rpcmessages.proto 15 KB

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