1- // Copyright 2019 Google LLC.
1+ // Copyright 2021 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@ syntax = "proto3";
1616
1717package google.streetview.publish.v1 ;
1818
19- import "google/api/annotations .proto" ;
19+ import "google/api/field_behavior .proto" ;
2020import "google/protobuf/timestamp.proto" ;
2121import "google/type/latlng.proto" ;
2222
@@ -26,29 +26,32 @@ option java_package = "com.google.geo.ugc.streetview.publish.v1";
2626
2727// Upload reference for media files.
2828message UploadRef {
29- // Required. An upload reference should be unique for each user. It follows
30- // the form:
31- // "https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{upload_reference}"
32- string upload_url = 1 ;
29+ // Required.
30+ oneof file_source {
31+ // An upload reference should be unique for each user. It follows
32+ // the form:
33+ // "https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{upload_reference}"
34+ string upload_url = 1 ;
35+ }
3336}
3437
3538// Identifier for a [Photo][google.streetview.publish.v1.Photo].
3639message PhotoId {
37- // Required. A unique identifier for a photo.
40+ // A unique identifier for a photo.
3841 string id = 1 ;
3942}
4043
4144// Level information containing level number and its corresponding name.
4245message Level {
43- // Floor number, used for ordering. 0 indicates the ground level, 1 indicates
46+ // Optional. Floor number, used for ordering. 0 indicates the ground level, 1 indicates
4447 // the first level above ground level, -1 indicates the first level under
4548 // ground level. Non-integer values are OK.
46- double number = 1 ;
49+ double number = 1 [ (google.api .field_behavior ) = OPTIONAL ] ;
4750
4851 // Required. A name assigned to this Level, restricted to 3 characters.
4952 // Consider how the elevator buttons would be labeled for this level if there
5053 // was an elevator.
51- string name = 2 ;
54+ string name = 2 [ (google.api .field_behavior ) = REQUIRED ] ;
5255}
5356
5457// Raw pose measurement for an entity.
@@ -58,16 +61,18 @@ message Pose {
5861 // When creating a [Photo][google.streetview.publish.v1.Photo], if the
5962 // latitude and longitude pair are not provided, the geolocation from the
6063 // exif header is used. A latitude and longitude pair not provided in the
61- // photo or exif header causes the create photo process to fail.
64+ // photo or exif header causes the photo process to fail.
6265 google.type.LatLng lat_lng_pair = 1 ;
6366
6467 // Altitude of the pose in meters above WGS84 ellipsoid.
6568 // NaN indicates an unmeasured quantity.
6669 double altitude = 2 ;
6770
71+ // The following pose parameters pertain to the center of the photo. They
72+ // match https://developers.google.com/streetview/spherical-metadata.
6873 // Compass heading, measured at the center of the photo in degrees clockwise
69- // from North. Value must be >=0 and <360.
70- // NaN indicates an unmeasured quantity.
74+ // from North. Value must be >=0 and <360. NaN indicates an unmeasured
75+ // quantity.
7176 double heading = 3 ;
7277
7378 // Pitch, measured at the center of the photo in degrees. Value must be >=-90
@@ -99,63 +104,23 @@ message Place {
99104 // https://developers.google.com/places/place-id.
100105 string place_id = 1 ;
101106
102- // Output- only. The name of the place, localized to the language_code.
103- string name = 2 ;
107+ // Output only. The name of the place, localized to the language_code.
108+ string name = 2 [ (google.api .field_behavior ) = OUTPUT_ONLY ] ;
104109
105- // Output- only. The language_code that the name is localized with. This should
110+ // Output only. The language_code that the name is localized with. This should
106111 // be the language_code specified in the request, but may be a fallback.
107- string language_code = 3 ;
112+ string language_code = 3 [ (google.api .field_behavior ) = OUTPUT_ONLY ] ;
108113}
109114
110115// A connection is the link from a source photo to a destination photo.
111116message Connection {
112117 // Required. The destination of the connection from the containing photo to
113118 // another photo.
114- PhotoId target = 1 ;
119+ PhotoId target = 1 [ (google.api .field_behavior ) = REQUIRED ] ;
115120}
116121
117122// Photo is used to store 360 photos along with photo metadata.
118123message Photo {
119- // Required when updating a photo. Output only when creating a photo.
120- // Identifier for the photo, which is unique among all photos in
121- // Google.
122- PhotoId photo_id = 1 ;
123-
124- // Required when creating a photo. Input only. The resource URL where the
125- // photo bytes are uploaded to.
126- UploadRef upload_reference = 2 ;
127-
128- // Output only. The download URL for the photo bytes. This field is set only
129- // when
130- // [GetPhotoRequest.view][google.streetview.publish.v1.GetPhotoRequest.view]
131- // is set to
132- // [PhotoView.INCLUDE_DOWNLOAD_URL][google.streetview.publish.v1.PhotoView.INCLUDE_DOWNLOAD_URL].
133- string download_url = 3 ;
134-
135- // Output only. The thumbnail URL for showing a preview of the given photo.
136- string thumbnail_url = 9 ;
137-
138- // Output only. The share link for the photo.
139- string share_link = 11 ;
140-
141- // Pose of the photo.
142- Pose pose = 4 ;
143-
144- // Connections to other photos. A connection represents the link from this
145- // photo to another photo.
146- repeated Connection connections = 5 ;
147-
148- // Absolute time when the photo was captured.
149- // When the photo has no exif timestamp, this is used to set a timestamp in
150- // the photo metadata.
151- google.protobuf.Timestamp capture_time = 6 ;
152-
153- // Places where this photo belongs.
154- repeated Place places = 7 ;
155-
156- // Output only. View count of the photo.
157- int64 view_count = 10 ;
158-
159124 // Status of rights transfer.
160125 enum TransferStatus {
161126 // The status of this transfer is unspecified.
@@ -185,9 +150,6 @@ message Photo {
185150 RECEIVED_VIA_TRANSFER = 7 ;
186151 }
187152
188- // Output only. Status of rights transfer on this photo.
189- TransferStatus transfer_status = 12 ;
190-
191153 // Publication status of the photo in Google Maps.
192154 enum MapsPublishStatus {
193155 // The status of the photo is unknown.
@@ -200,7 +162,55 @@ message Photo {
200162 REJECTED_UNKNOWN = 2 ;
201163 }
202164
203- // Output only. Status in Google Maps, whether this photo was published or
204- // rejected.
205- MapsPublishStatus maps_publish_status = 13 ;
165+ // Required. Output only. Required when updating a photo. Output only when creating a photo.
166+ // Identifier for the photo, which is unique among all photos in
167+ // Google.
168+ PhotoId photo_id = 1 [
169+ (google.api.field_behavior ) = REQUIRED ,
170+ (google.api.field_behavior ) = OUTPUT_ONLY
171+ ];
172+
173+ // Input only. Required when creating a photo. Input only. The resource URL where the
174+ // photo bytes are uploaded to.
175+ UploadRef upload_reference = 2 [(google.api.field_behavior ) = INPUT_ONLY ];
176+
177+ // Output only. The download URL for the photo bytes. This field is set only
178+ // when
179+ // [GetPhotoRequest.view][google.streetview.publish.v1.GetPhotoRequest.view]
180+ // is set to
181+ // [PhotoView.INCLUDE_DOWNLOAD_URL][google.streetview.publish.v1.PhotoView.INCLUDE_DOWNLOAD_URL].
182+ string download_url = 3 [(google.api.field_behavior ) = OUTPUT_ONLY ];
183+
184+ // Output only. The thumbnail URL for showing a preview of the given photo.
185+ string thumbnail_url = 9 [(google.api.field_behavior ) = OUTPUT_ONLY ];
186+
187+ // Output only. The share link for the photo.
188+ string share_link = 11 [(google.api.field_behavior ) = OUTPUT_ONLY ];
189+
190+ // Optional. Pose of the photo.
191+ Pose pose = 4 [(google.api.field_behavior ) = OPTIONAL ];
192+
193+ // Optional. Connections to other photos. A connection represents the link from this
194+ // photo to another photo.
195+ repeated Connection connections = 5 [(google.api.field_behavior ) = OPTIONAL ];
196+
197+ // Optional. Absolute time when the photo was captured.
198+ // When the photo has no exif timestamp, this is used to set a timestamp in
199+ // the photo metadata.
200+ google.protobuf.Timestamp capture_time = 6 [(google.api.field_behavior ) = OPTIONAL ];
201+
202+ // Output only. Time when the image was uploaded.
203+ google.protobuf.Timestamp upload_time = 14 [(google.api.field_behavior ) = OUTPUT_ONLY ];
204+
205+ // Optional. Places where this photo belongs.
206+ repeated Place places = 7 [(google.api.field_behavior ) = OPTIONAL ];
207+
208+ // Output only. View count of the photo.
209+ int64 view_count = 10 [(google.api.field_behavior ) = OUTPUT_ONLY ];
210+
211+ // Output only. Status of rights transfer on this photo.
212+ TransferStatus transfer_status = 12 [(google.api.field_behavior ) = OUTPUT_ONLY ];
213+
214+ // Output only. Status in Google Maps, whether this photo was published or rejected.
215+ MapsPublishStatus maps_publish_status = 13 [(google.api.field_behavior ) = OUTPUT_ONLY ];
206216}
0 commit comments