Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / streetview / publish / v1 / rpcmessages.proto
1 // Copyright 2019 Google LLC.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 syntax = "proto3";
16
17 package google.streetview.publish.v1;
18
19 import "google/protobuf/field_mask.proto";
20 import "google/rpc/status.proto";
21 import "google/streetview/publish/v1/resources.proto";
22
23 option go_package = "google.golang.org/genproto/googleapis/streetview/publish/v1;publish";
24 option java_outer_classname = "StreetViewPublishRpcMessages";
25 option java_package = "com.google.geo.ugc.streetview.publish.v1";
26
27 // Specifies which view of the [Photo][google.streetview.publish.v1.Photo]
28 // to include in the response.
29 enum PhotoView {
30   // Server reponses do not include the download URL for the photo bytes.
31   // The default value.
32   BASIC = 0;
33
34   // Server responses include the download URL for the photo bytes.
35   INCLUDE_DOWNLOAD_URL = 1;
36 }
37
38 // Request to create a [Photo][google.streetview.publish.v1.Photo].
39 message CreatePhotoRequest {
40   // Required. Photo to create.
41   Photo photo = 1;
42 }
43
44 // Request to get a [Photo][google.streetview.publish.v1.Photo].
45 //
46 // By default
47 //
48 // * does not return the download URL for the photo bytes.
49 //
50 // Parameters:
51 //
52 // * `view` controls if the download URL for the photo bytes is returned.
53 message GetPhotoRequest {
54   // Required. ID of the [Photo][google.streetview.publish.v1.Photo].
55   string photo_id = 1;
56
57   // Specifies if a download URL for the photo bytes should be returned in the
58   // [Photo][google.streetview.publish.v1.Photo] response.
59   PhotoView view = 2;
60
61   // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
62   // information, see
63   // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
64   // If language_code is unspecified, the user's language preference for Google
65   // services is used.
66   string language_code = 3;
67 }
68
69 // Request to get one or more [Photos][google.streetview.publish.v1.Photo].
70 // By default
71 //
72 // * does not return the download URL for the photo bytes.
73 //
74 // Parameters:
75 //
76 // * `view` controls if the download URL for the photo bytes is returned.
77 message BatchGetPhotosRequest {
78   // Required. IDs of the [Photos][google.streetview.publish.v1.Photo]. HTTP GET
79   // requests require the following syntax for the URL query parameter:
80   // `photoIds=<id1>&photoIds=<id2>&...`.
81   repeated string photo_ids = 1;
82
83   // Specifies if a download URL for the photo bytes should be returned in the
84   // Photo response.
85   PhotoView view = 2;
86
87   // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
88   // information, see
89   // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
90   // If language_code is unspecified, the user's language preference for Google
91   // services is used.
92   string language_code = 3;
93 }
94
95 // Response to batch get of [Photos][google.streetview.publish.v1.Photo].
96 message BatchGetPhotosResponse {
97   // List of results for each individual
98   // [Photo][google.streetview.publish.v1.Photo] requested, in the same order as
99   // the requests in
100   // [BatchGetPhotos][google.streetview.publish.v1.StreetViewPublishService.BatchGetPhotos].
101   repeated PhotoResponse results = 1;
102 }
103
104 // Response payload for a single
105 // [Photo][google.streetview.publish.v1.Photo]
106 // in batch operations including
107 // [BatchGetPhotos][google.streetview.publish.v1.StreetViewPublishService.BatchGetPhotos]
108 // and
109 // [BatchUpdatePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchUpdatePhotos].
110 message PhotoResponse {
111   // The status for the operation to get or update a single photo in the batch
112   // request.
113   google.rpc.Status status = 1;
114
115   // The [Photo][google.streetview.publish.v1.Photo] resource, if the request
116   // was successful.
117   Photo photo = 2;
118 }
119
120 // Request to list all photos that belong to the user sending the request.
121 //
122 // By default
123 //
124 // * does not return the download URL for the photo bytes.
125 //
126 // Parameters:
127 //
128 // * `view` controls if the download URL for the photo bytes is returned.
129 // * `pageSize` determines the maximum number of photos to return.
130 // * `pageToken` is the next page token value returned from a previous
131 // [ListPhotos][google.streetview.publish.v1.StreetViewPublishService.ListPhotos]
132 //     request, if any.
133 // * `filter` allows filtering by a given parameter. 'placeId' is the only
134 // parameter supported at the moment.
135 message ListPhotosRequest {
136   // Specifies if a download URL for the photos bytes should be returned in the
137   // Photos response.
138   PhotoView view = 1;
139
140   // The maximum number of photos to return.
141   // `pageSize` must be non-negative. If `pageSize` is zero or is not provided,
142   // the default page size of 100 is used.
143   // The number of photos returned in the response may be less than `pageSize`
144   // if the number of photos that belong to the user is less than `pageSize`.
145   int32 page_size = 2;
146
147   // The
148   // [nextPageToken][google.streetview.publish.v1.ListPhotosResponse.next_page_token]
149   // value returned from a previous
150   // [ListPhotos][google.streetview.publish.v1.StreetViewPublishService.ListPhotos]
151   // request, if any.
152   string page_token = 3;
153
154   // The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`.
155   //
156   // The only filter supported at the moment is `placeId`.
157   string filter = 4;
158
159   // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
160   // information, see
161   // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
162   // If language_code is unspecified, the user's language preference for Google
163   // services is used.
164   string language_code = 5;
165 }
166
167 // Response to list all photos that belong to a user.
168 message ListPhotosResponse {
169   // List of photos. The
170   // [pageSize][google.streetview.publish.v1.ListPhotosRequest.page_size] field
171   // in the request determines the number of items returned.
172   repeated Photo photos = 1;
173
174   // Token to retrieve the next page of results, or empty if there are no more
175   // results in the list.
176   string next_page_token = 2;
177 }
178
179 // Request to update the metadata of a
180 // [Photo][google.streetview.publish.v1.Photo]. Updating the pixels of a photo
181 // is not supported.
182 message UpdatePhotoRequest {
183   // Required. [Photo][google.streetview.publish.v1.Photo] object containing the
184   // new metadata.
185   Photo photo = 1;
186
187   // Mask that identifies fields on the photo metadata to update.
188   // If not present, the old [Photo][google.streetview.publish.v1.Photo]
189   // metadata is entirely replaced with the
190   // new [Photo][google.streetview.publish.v1.Photo] metadata in this request.
191   // The update fails if invalid fields are specified. Multiple fields can be
192   // specified in a comma-delimited list.
193   //
194   // The following fields are valid:
195   //
196   // * `pose.heading`
197   // * `pose.latLngPair`
198   // * `pose.pitch`
199   // * `pose.roll`
200   // * `pose.level`
201   // * `pose.altitude`
202   // * `connections`
203   // * `places`
204   //
205   //
206   // <aside class="note"><b>Note:</b>  When
207   // [updateMask][google.streetview.publish.v1.UpdatePhotoRequest.update_mask]
208   // contains repeated fields, the entire set of repeated values get replaced
209   // with the new contents. For example, if
210   // [updateMask][google.streetview.publish.v1.UpdatePhotoRequest.update_mask]
211   // contains `connections` and `UpdatePhotoRequest.photo.connections` is empty,
212   // all connections are removed.</aside>
213   google.protobuf.FieldMask update_mask = 2;
214 }
215
216 // Request to update the metadata of photos.
217 // Updating the pixels of photos is not supported.
218 message BatchUpdatePhotosRequest {
219   // Required. List of
220   // [UpdatePhotoRequests][google.streetview.publish.v1.UpdatePhotoRequest].
221   repeated UpdatePhotoRequest update_photo_requests = 1;
222 }
223
224 // Response to batch update of metadata of one or more
225 // [Photos][google.streetview.publish.v1.Photo].
226 message BatchUpdatePhotosResponse {
227   // List of results for each individual
228   // [Photo][google.streetview.publish.v1.Photo] updated, in the same order as
229   // the request.
230   repeated PhotoResponse results = 1;
231 }
232
233 // Request to delete a [Photo][google.streetview.publish.v1.Photo].
234 message DeletePhotoRequest {
235   // Required. ID of the [Photo][google.streetview.publish.v1.Photo].
236   string photo_id = 1;
237 }
238
239 // Request to delete multiple [Photos][google.streetview.publish.v1.Photo].
240 message BatchDeletePhotosRequest {
241   // Required. IDs of the [Photos][google.streetview.publish.v1.Photo]. HTTP
242   // GET requests require the following syntax for the URL query parameter:
243   // `photoIds=<id1>&photoIds=<id2>&...`.
244   repeated string photo_ids = 1;
245 }
246
247 // Response to batch delete of one or more
248 // [Photos][google.streetview.publish.v1.Photo].
249 message BatchDeletePhotosResponse {
250   // The status for the operation to delete a single
251   // [Photo][google.streetview.publish.v1.Photo] in the batch request.
252   repeated google.rpc.Status status = 1;
253 }