1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
|
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.streetview.publish.v1;
import "google/api/field_behavior.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/field_mask.proto";
import "google/rpc/status.proto";
import "google/streetview/publish/v1/resources.proto";
option go_package = "google.golang.org/genproto/googleapis/streetview/publish/v1;publish";
option java_outer_classname = "StreetViewPublishRpcMessages";
option java_package = "com.google.geo.ugc.streetview.publish.v1";
// Request to create a [Photo][google.streetview.publish.v1.Photo].
message CreatePhotoRequest {
// Required. Photo to create.
Photo photo = 1 [(google.api.field_behavior) = REQUIRED];
}
// Request to get a [Photo][google.streetview.publish.v1.Photo].
//
// By default
//
// * does not return the download URL for the photo bytes.
//
// Parameters:
//
// * `view` controls if the download URL for the photo bytes is returned.
message GetPhotoRequest {
// Required. ID of the [Photo][google.streetview.publish.v1.Photo].
string photo_id = 1 [(google.api.field_behavior) = REQUIRED];
// Required. Specifies if a download URL for the photo bytes should be returned in the
// [Photo][google.streetview.publish.v1.Photo] response.
PhotoView view = 2 [(google.api.field_behavior) = REQUIRED];
// The BCP-47 language code, such as "en-US" or "sr-Latn". For more
// information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
// If language_code is unspecified, the user's language preference for Google
// services is used.
string language_code = 3;
}
// Request to get one or more [Photos][google.streetview.publish.v1.Photo].
// By default
//
// * does not return the download URL for the photo bytes.
//
// Parameters:
//
// * `view` controls if the download URL for the photo bytes is returned.
message BatchGetPhotosRequest {
// Required. IDs of the [Photos][google.streetview.publish.v1.Photo]. For HTTP
// GET requests, the URL query parameter should be
// `photoIds=<id1>&photoIds=<id2>&...`.
repeated string photo_ids = 1 [(google.api.field_behavior) = REQUIRED];
// Required. Specifies if a download URL for the photo bytes should be returned in the
// Photo response.
PhotoView view = 2 [(google.api.field_behavior) = REQUIRED];
// Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
// information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
// If language_code is unspecified, the user's language preference for Google
// services is used.
string language_code = 3 [(google.api.field_behavior) = OPTIONAL];
}
// Response to batch get of [Photos][google.streetview.publish.v1.Photo].
message BatchGetPhotosResponse {
// List of results for each individual
// [Photo][google.streetview.publish.v1.Photo] requested, in the same order as
// the requests in
// [BatchGetPhotos][google.streetview.publish.v1.StreetViewPublishService.BatchGetPhotos].
repeated PhotoResponse results = 1;
}
// Response payload for a single
// [Photo][google.streetview.publish.v1.Photo]
// in batch operations including
// [BatchGetPhotos][google.streetview.publish.v1.StreetViewPublishService.BatchGetPhotos]
// and
// [BatchUpdatePhotos][google.streetview.publish.v1.StreetViewPublishService.BatchUpdatePhotos].
message PhotoResponse {
// The status for the operation to get or update a single photo in the batch
// request.
google.rpc.Status status = 1;
// The [Photo][google.streetview.publish.v1.Photo] resource, if the request
// was successful.
Photo photo = 2;
}
// Request to list all photos that belong to the user sending the request.
//
// By default
//
// * does not return the download URL for the photo bytes.
//
// Parameters:
//
// * `view` controls if the download URL for the photo bytes is returned.
// * `pageSize` determines the maximum number of photos to return.
// * `pageToken` is the next page token value returned from a previous
// [ListPhotos][google.streetview.publish.v1.StreetViewPublishService.ListPhotos]
// request, if any.
// * `filter` allows filtering by a given parameter. 'placeId' is the only
// parameter supported at the moment.
message ListPhotosRequest {
// Required. Specifies if a download URL for the photos bytes should be returned in the
// Photos response.
PhotoView view = 1 [(google.api.field_behavior) = REQUIRED];
// Optional. The maximum number of photos to return.
// `pageSize` must be non-negative. If `pageSize` is zero or is not provided,
// the default page size of 100 is used.
// The number of photos returned in the response may be less than `pageSize`
// if the number of photos that belong to the user is less than `pageSize`.
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. The
// [nextPageToken][google.streetview.publish.v1.ListPhotosResponse.next_page_token]
// value returned from a previous
// [ListPhotos][google.streetview.publish.v1.StreetViewPublishService.ListPhotos]
// request, if any.
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`.
//
// The filters supported are: `placeId`, `min_latitude`, `max_latitude`,
// `min_longitude`, and `max_longitude`. See https://google.aip.dev/160 for
// more information.
string filter = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
// information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
// If language_code is unspecified, the user's language preference for Google
// services is used.
string language_code = 5 [(google.api.field_behavior) = OPTIONAL];
}
// Response to list all photos that belong to a user.
message ListPhotosResponse {
// List of photos. The
// [pageSize][google.streetview.publish.v1.ListPhotosRequest.page_size] field
// in the request determines the number of items returned.
repeated Photo photos = 1;
// Token to retrieve the next page of results, or empty if there are no more
// results in the list.
string next_page_token = 2;
}
// Request to update the metadata of a
// [Photo][google.streetview.publish.v1.Photo]. Updating the pixels of a photo
// is not supported.
message UpdatePhotoRequest {
// Required. [Photo][google.streetview.publish.v1.Photo] object containing the
// new metadata.
Photo photo = 1 [(google.api.field_behavior) = REQUIRED];
// Required. Mask that identifies fields on the photo metadata to update.
// If not present, the old [Photo][google.streetview.publish.v1.Photo]
// metadata is entirely replaced with the
// new [Photo][google.streetview.publish.v1.Photo] metadata in this request.
// The update fails if invalid fields are specified. Multiple fields can be
// specified in a comma-delimited list.
//
// The following fields are valid:
//
// * `pose.heading`
// * `pose.latLngPair`
// * `pose.pitch`
// * `pose.roll`
// * `pose.level`
// * `pose.altitude`
// * `connections`
// * `places`
//
//
// > Note: When
// [updateMask][google.streetview.publish.v1.UpdatePhotoRequest.update_mask]
// contains repeated fields, the entire set of repeated values get replaced
// with the new contents. For example, if
// [updateMask][google.streetview.publish.v1.UpdatePhotoRequest.update_mask]
// contains `connections` and `UpdatePhotoRequest.photo.connections` is empty,
// all connections are removed.
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request to update the metadata of photos.
// Updating the pixels of photos is not supported.
message BatchUpdatePhotosRequest {
// Required. List of
// [UpdatePhotoRequests][google.streetview.publish.v1.UpdatePhotoRequest].
repeated UpdatePhotoRequest update_photo_requests = 1 [(google.api.field_behavior) = REQUIRED];
}
// Response to batch update of metadata of one or more
// [Photos][google.streetview.publish.v1.Photo].
message BatchUpdatePhotosResponse {
// List of results for each individual
// [Photo][google.streetview.publish.v1.Photo] updated, in the same order as
// the request.
repeated PhotoResponse results = 1;
}
// Request to delete a [Photo][google.streetview.publish.v1.Photo].
message DeletePhotoRequest {
// Required. ID of the [Photo][google.streetview.publish.v1.Photo].
string photo_id = 1 [(google.api.field_behavior) = REQUIRED];
}
// Request to delete multiple [Photos][google.streetview.publish.v1.Photo].
message BatchDeletePhotosRequest {
// Required. IDs of the [Photos][google.streetview.publish.v1.Photo]. HTTP
// GET requests require the following syntax for the URL query parameter:
// `photoIds=<id1>&photoIds=<id2>&...`.
repeated string photo_ids = 1 [(google.api.field_behavior) = REQUIRED];
}
// Request to create a
// [PhotoSequence][google.streetview.publish.v1.PhotoSequence] from a video.
message CreatePhotoSequenceRequest {
// Input forms of [PhotoSequence][google.streetview.publish.v1.PhotoSequence].
enum InputType {
// Not specified. Server will return [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
INPUT_TYPE_UNSPECIFIED = 0;
// 360 Video.
VIDEO = 1;
// Extensible Device Metadata, http://www.xdm.org
XDM = 2;
}
// Required. [PhotoSequence][google.streetview.publish.v1.PhotoSequence] to
// create.
PhotoSequence photo_sequence = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The input form of
// [PhotoSequence][google.streetview.publish.v1.PhotoSequence].
InputType input_type = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request to get a [PhotoSequence][google.streetview.publish.v1.PhotoSequence].
//
// By default
//
// * does not return the download URL for the
// [PhotoSequence][google.streetview.publish.v1.PhotoSequence].
//
// Parameters:
//
// * `view` controls if the download URL for the
// [PhotoSequence][google.streetview.publish.v1.PhotoSequence] is
// returned.
message GetPhotoSequenceRequest {
// Required. ID of the photo sequence.
string sequence_id = 1 [(google.api.field_behavior) = REQUIRED];
// Specifies if a download URL for the photo sequence should be returned in
// `download_url` of individual photos in the
// [PhotoSequence][google.streetview.publish.v1.PhotoSequence] response.
// > Note: Currently not implemented.
PhotoView view = 2 [deprecated = true];
// Optional. The filter expression. For example: `published_status=PUBLISHED`.
//
// The filters supported are: `published_status`. See
// https://google.aip.dev/160 for more information.
string filter = 3 [(google.api.field_behavior) = OPTIONAL];
}
// Request to delete a
// [PhotoSequence][google.streetview.publish.v1.PhotoSequence].
message DeletePhotoSequenceRequest {
// Required. ID of the
// [PhotoSequence][google.streetview.publish.v1.PhotoSequence].
string sequence_id = 1 [(google.api.field_behavior) = REQUIRED];
}
// Response to batch delete of one or more
// [Photos][google.streetview.publish.v1.Photo].
message BatchDeletePhotosResponse {
// The status for the operation to delete a single
// [Photo][google.streetview.publish.v1.Photo] in the batch request.
repeated google.rpc.Status status = 1;
}
// Request to list all photo sequences that belong to the user sending the
// request.
//
// Parameters:
//
// * `pageSize` determines the maximum number of photo sequences to return.
// * `pageToken` is the next page token value returned from a previous
// [ListPhotoSequences][google.streetview.publish.v1.StreetViewPublishService.ListPhotoSequences]
// request, if any.
message ListPhotoSequencesRequest {
// Optional. The maximum number of photo sequences to return.
// `pageSize` must be non-negative. If `pageSize` is zero or is not
// provided, the default page size of 100 is used.
// The number of photo sequences returned in the response may be less than
// `pageSize` if the number of matches is less than `pageSize`.
// This is currently unimplemented but is in process.
int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. The
// [nextPageToken][google.streetview.publish.v1.ListPhotosResponse.next_page_token]
// value returned from a previous
// [ListPhotoSequences][google.streetview.publish.v1.StreetViewPublishService.ListPhotoSequences]
// request, if any.
string page_token = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. The filter expression. For example: `imagery_type=SPHERICAL`.
//
// The filters supported are: `imagery_type`, `processing_state`,
// `min_latitude`, `max_latitude`, `min_longitude`, `max_longitude`, and
// `filename_query`. See https://google.aip.dev/160 for more information.
// Filename queries should sent as a Phrase in order to support multple words
// and special characters by adding escaped quotes. Ex:
// filename_query="example of a phrase.mp4"
string filter = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Response to list all photo sequences that belong to a user.
message ListPhotoSequencesResponse {
// List of photo sequences via [Operation][google.longrunning.Operation]
// interface.
//
// The maximum number of items returned is based on the
// [pageSize][google.streetview.publish.v1.ListPhotoSequencesRequest.page_size]
// field in the request.
//
// Each item in the list can have three possible states,
//
// * `Operation.done` = false, if the processing of
// [PhotoSequence][google.streetview.publish.v1.PhotoSequence] is not
// finished yet.
// * `Operation.done` = true and `Operation.error` is populated, if there was
// an error in processing.
// * `Operation.done` = true and `Operation.response` contains a
// [PhotoSequence][google.streetview.publish.v1.PhotoSequence] message,
// In each sequence, only
// [Id][google.streetview.publish.v1.PhotoSequence.id] is populated.
repeated google.longrunning.Operation photo_sequences = 1;
// Token to retrieve the next page of results, or empty if there are no more
// results in the list.
string next_page_token = 2;
}
// Specifies which view of the [Photo][google.streetview.publish.v1.Photo]
// to include in the response.
enum PhotoView {
// Server responses do not include the download URL for the photo bytes.
// The default value.
BASIC = 0;
// Server responses include the download URL for the photo bytes.
INCLUDE_DOWNLOAD_URL = 1;
}
|