1 // Copyright 2019 Google LLC.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
17 package google.streetview.publish.v1;
19 import "google/protobuf/field_mask.proto";
20 import "google/rpc/status.proto";
21 import "google/streetview/publish/v1/resources.proto";
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";
27 // Specifies which view of the [Photo][google.streetview.publish.v1.Photo]
28 // to include in the response.
30 // Server reponses do not include the download URL for the photo bytes.
34 // Server responses include the download URL for the photo bytes.
35 INCLUDE_DOWNLOAD_URL = 1;
38 // Request to create a [Photo][google.streetview.publish.v1.Photo].
39 message CreatePhotoRequest {
40 // Required. Photo to create.
44 // Request to get a [Photo][google.streetview.publish.v1.Photo].
48 // * does not return the download URL for the photo bytes.
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].
57 // Specifies if a download URL for the photo bytes should be returned in the
58 // [Photo][google.streetview.publish.v1.Photo] response.
61 // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
63 // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
64 // If language_code is unspecified, the user's language preference for Google
66 string language_code = 3;
69 // Request to get one or more [Photos][google.streetview.publish.v1.Photo].
72 // * does not return the download URL for the photo bytes.
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;
83 // Specifies if a download URL for the photo bytes should be returned in the
87 // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
89 // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
90 // If language_code is unspecified, the user's language preference for Google
92 string language_code = 3;
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
100 // [BatchGetPhotos][google.streetview.publish.v1.StreetViewPublishService.BatchGetPhotos].
101 repeated PhotoResponse results = 1;
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]
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
113 google.rpc.Status status = 1;
115 // The [Photo][google.streetview.publish.v1.Photo] resource, if the request
120 // Request to list all photos that belong to the user sending the request.
124 // * does not return the download URL for the photo bytes.
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]
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
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`.
148 // [nextPageToken][google.streetview.publish.v1.ListPhotosResponse.next_page_token]
149 // value returned from a previous
150 // [ListPhotos][google.streetview.publish.v1.StreetViewPublishService.ListPhotos]
152 string page_token = 3;
154 // The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`.
156 // The only filter supported at the moment is `placeId`.
159 // The BCP-47 language code, such as "en-US" or "sr-Latn". For more
161 // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
162 // If language_code is unspecified, the user's language preference for Google
164 string language_code = 5;
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;
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;
179 // Request to update the metadata of a
180 // [Photo][google.streetview.publish.v1.Photo]. Updating the pixels of a photo
182 message UpdatePhotoRequest {
183 // Required. [Photo][google.streetview.publish.v1.Photo] object containing the
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.
194 // The following fields are valid:
197 // * `pose.latLngPair`
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;
216 // Request to update the metadata of photos.
217 // Updating the pixels of photos is not supported.
218 message BatchUpdatePhotosRequest {
220 // [UpdatePhotoRequests][google.streetview.publish.v1.UpdatePhotoRequest].
221 repeated UpdatePhotoRequest update_photo_requests = 1;
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
230 repeated PhotoResponse results = 1;
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].
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;
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;