resources.proto 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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. syntax = "proto3";
  15. package google.streetview.publish.v1;
  16. import "google/api/annotations.proto";
  17. import "google/protobuf/timestamp.proto";
  18. import "google/type/latlng.proto";
  19. option go_package = "google.golang.org/genproto/googleapis/streetview/publish/v1;publish";
  20. option java_outer_classname = "StreetViewPublishResources";
  21. option java_package = "com.google.geo.ugc.streetview.publish.v1";
  22. // Upload reference for media files.
  23. message UploadRef {
  24. // Required. An upload reference should be unique for each user. It follows
  25. // the form:
  26. // "https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{upload_reference}"
  27. string upload_url = 1;
  28. }
  29. // Identifier for a [Photo][google.streetview.publish.v1.Photo].
  30. message PhotoId {
  31. // Required. A unique identifier for a photo.
  32. string id = 1;
  33. }
  34. // Level information containing level number and its corresponding name.
  35. message Level {
  36. // Floor number, used for ordering. 0 indicates the ground level, 1 indicates
  37. // the first level above ground level, -1 indicates the first level under
  38. // ground level. Non-integer values are OK.
  39. double number = 1;
  40. // Required. A name assigned to this Level, restricted to 3 characters.
  41. // Consider how the elevator buttons would be labeled for this level if there
  42. // was an elevator.
  43. string name = 2;
  44. }
  45. // Raw pose measurement for an entity.
  46. message Pose {
  47. // Latitude and longitude pair of the pose, as explained here:
  48. // https://cloud.google.com/datastore/docs/reference/rest/Shared.Types/LatLng
  49. // When creating a [Photo][google.streetview.publish.v1.Photo], if the
  50. // latitude and longitude pair are not provided, the geolocation from the
  51. // exif header is used. A latitude and longitude pair not provided in the
  52. // photo or exif header causes the create photo process to fail.
  53. google.type.LatLng lat_lng_pair = 1;
  54. // Altitude of the pose in meters above WGS84 ellipsoid.
  55. // NaN indicates an unmeasured quantity.
  56. double altitude = 2;
  57. // Compass heading, measured at the center of the photo in degrees clockwise
  58. // from North. Value must be >=0 and <360.
  59. // NaN indicates an unmeasured quantity.
  60. double heading = 3;
  61. // Pitch, measured at the center of the photo in degrees. Value must be >=-90
  62. // and <= 90. A value of -90 means looking directly down, and a value of 90
  63. // means looking directly up.
  64. // NaN indicates an unmeasured quantity.
  65. double pitch = 4;
  66. // Roll, measured in degrees. Value must be >= 0 and <360. A value of 0
  67. // means level with the horizon.
  68. // NaN indicates an unmeasured quantity.
  69. double roll = 5;
  70. // Level (the floor in a building) used to configure vertical navigation.
  71. Level level = 7;
  72. // The estimated horizontal accuracy of this pose in meters with 68%
  73. // confidence (one standard deviation). For example, on Android, this value is
  74. // available from this method:
  75. // https://developer.android.com/reference/android/location/Location#getAccuracy().
  76. // Other platforms have different methods of obtaining similar accuracy
  77. // estimations.
  78. float accuracy_meters = 9;
  79. }
  80. // Place metadata for an entity.
  81. message Place {
  82. // Place identifier, as described in
  83. // https://developers.google.com/places/place-id.
  84. string place_id = 1;
  85. // Output-only. The name of the place, localized to the language_code.
  86. string name = 2;
  87. // Output-only. The language_code that the name is localized with. This should
  88. // be the language_code specified in the request, but may be a fallback.
  89. string language_code = 3;
  90. }
  91. // A connection is the link from a source photo to a destination photo.
  92. message Connection {
  93. // Required. The destination of the connection from the containing photo to
  94. // another photo.
  95. PhotoId target = 1;
  96. }
  97. // Photo is used to store 360 photos along with photo metadata.
  98. message Photo {
  99. // Required when updating a photo. Output only when creating a photo.
  100. // Identifier for the photo, which is unique among all photos in
  101. // Google.
  102. PhotoId photo_id = 1;
  103. // Required when creating a photo. Input only. The resource URL where the
  104. // photo bytes are uploaded to.
  105. UploadRef upload_reference = 2;
  106. // Output only. The download URL for the photo bytes. This field is set only
  107. // when
  108. // [GetPhotoRequest.view][google.streetview.publish.v1.GetPhotoRequest.view]
  109. // is set to
  110. // [PhotoView.INCLUDE_DOWNLOAD_URL][google.streetview.publish.v1.PhotoView.INCLUDE_DOWNLOAD_URL].
  111. string download_url = 3;
  112. // Output only. The thumbnail URL for showing a preview of the given photo.
  113. string thumbnail_url = 9;
  114. // Output only. The share link for the photo.
  115. string share_link = 11;
  116. // Pose of the photo.
  117. Pose pose = 4;
  118. // Connections to other photos. A connection represents the link from this
  119. // photo to another photo.
  120. repeated Connection connections = 5;
  121. // Absolute time when the photo was captured.
  122. // When the photo has no exif timestamp, this is used to set a timestamp in
  123. // the photo metadata.
  124. google.protobuf.Timestamp capture_time = 6;
  125. // Places where this photo belongs.
  126. repeated Place places = 7;
  127. // Output only. View count of the photo.
  128. int64 view_count = 10;
  129. // Status of rights transfer.
  130. enum TransferStatus {
  131. // The status of this transfer is unspecified.
  132. TRANSFER_STATUS_UNKNOWN = 0;
  133. // This photo has never been in a transfer.
  134. NEVER_TRANSFERRED = 1;
  135. // This photo transfer has been initiated, but the receiver has not yet
  136. // responded.
  137. PENDING = 2;
  138. // The photo transfer has been completed, and this photo has been
  139. // transferred to the recipient.
  140. COMPLETED = 3;
  141. // The recipient rejected this photo transfer.
  142. REJECTED = 4;
  143. // The photo transfer expired before the recipient took any action.
  144. EXPIRED = 5;
  145. // The sender cancelled this photo transfer.
  146. CANCELLED = 6;
  147. // The recipient owns this photo due to a rights transfer.
  148. RECEIVED_VIA_TRANSFER = 7;
  149. }
  150. // Output only. Status of rights transfer on this photo.
  151. TransferStatus transfer_status = 12;
  152. // Publication status of the photo in Google Maps.
  153. enum MapsPublishStatus {
  154. // The status of the photo is unknown.
  155. UNSPECIFIED_MAPS_PUBLISH_STATUS = 0;
  156. // The photo is published to the public through Google Maps.
  157. PUBLISHED = 1;
  158. // The photo has been rejected for an unknown reason.
  159. REJECTED_UNKNOWN = 2;
  160. }
  161. // Output only. Status in Google Maps, whether this photo was published or
  162. // rejected.
  163. MapsPublishStatus maps_publish_status = 13;
  164. }