Skip to content

Commit d1e416f

Browse files
Google APIscopybara-github
authored andcommitted
docs: Bringing the generated clients up-to-date with recent changes
PiperOrigin-RevId: 411093893
1 parent 96a1b13 commit d1e416f

5 files changed

Lines changed: 233 additions & 163 deletions

File tree

google/streetview/publish/v1/BUILD.bazel

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
# This file was automatically generated by BuildFileGenerator
2+
# https://github.com/googleapis/rules_gapic/tree/master/bazel
3+
4+
# Most of the manual changes to this file will be overwritten.
5+
# It's **only** allowed to change the following rule attribute values:
6+
# - names of *_gapic_assembly_* rules
7+
# - certain parameters of *_gapic_library rules, including but not limited to:
8+
# * extra_protoc_parameters
9+
# * extra_protoc_file_parameters
10+
# The complete list of preserved parameters can be found in the source code.
211

312
# This is an API workspace, having public visibility by default makes perfect sense.
413
package(default_visibility = ["//visibility:public"])
@@ -19,6 +28,8 @@ proto_library(
1928
deps = [
2029
"//google/api:annotations_proto",
2130
"//google/api:client_proto",
31+
"//google/api:field_behavior_proto",
32+
"//google/longrunning:operations_proto",
2233
"//google/rpc:status_proto",
2334
"//google/type:latlng_proto",
2435
"@com_google_protobuf//:empty_proto",
@@ -61,19 +72,22 @@ java_grpc_library(
6172
java_gapic_library(
6273
name = "publish_java_gapic",
6374
srcs = [":publish_proto_with_info"],
75+
gapic_yaml = "streetview_publish_gapic.yaml",
6476
grpc_service_config = "streetview_publish_grpc_service_config.json",
77+
service_yaml = "streetviewpublish.yaml",
6578
test_deps = [
6679
":publish_java_grpc",
6780
],
6881
deps = [
6982
":publish_java_proto",
83+
"//google/api:api_java_proto",
7084
],
7185
)
7286

7387
java_gapic_test(
7488
name = "publish_java_gapic_test_suite",
7589
test_classes = [
76-
"com.google.geo.ugc.streetview.publish.v1.StreetViewPublishServiceClientTest",
90+
"com.google.streetview.publish.v1.StreetViewPublishServiceClientTest",
7791
],
7892
runtime_deps = [":publish_java_gapic_test"],
7993
)
@@ -107,6 +121,7 @@ go_proto_library(
107121
protos = [":publish_proto"],
108122
deps = [
109123
"//google/api:annotations_go_proto",
124+
"//google/longrunning:longrunning_go_proto",
110125
"//google/rpc:status_go_proto",
111126
"//google/type:latlng_go_proto",
112127
],
@@ -115,26 +130,31 @@ go_proto_library(
115130
go_gapic_library(
116131
name = "publish_go_gapic",
117132
srcs = [":publish_proto_with_info"],
118-
gapic_yaml = "streetview_publish_gapic.yaml",
119-
importpath = "google.golang.org/api/streetviewpublish/apiv1;streetviewpublish",
120-
service_yaml = "streetview_publish.yaml",
133+
grpc_service_config = "streetview_publish_grpc_service_config.json",
134+
importpath = "google.golang.org/google/streetview/publish/v1;publish",
135+
metadata = True,
136+
service_yaml = "streetviewpublish.yaml",
121137
deps = [
122138
":publish_go_proto",
139+
"//google/longrunning:longrunning_go_proto",
140+
"@com_google_cloud_go//longrunning:go_default_library",
141+
"@com_google_cloud_go//longrunning/autogen:go_default_library",
123142
],
124143
)
125144

126145
go_test(
127146
name = "publish_go_gapic_test",
128147
srcs = [":publish_go_gapic_srcjar_test"],
129148
embed = [":publish_go_gapic"],
130-
importpath = "google.golang.org/api/streetviewpublish/apiv1",
149+
importpath = "google.golang.org/google/streetview/publish/v1",
131150
)
132151

133-
## Open Source Packages
152+
# Open Source Packages
134153
go_gapic_assembly_pkg(
135154
name = "gapi-cloud-streetview-publish-v1-go",
136155
deps = [
137156
":publish_go_gapic",
157+
":publish_go_gapic_srcjar-metadata.srcjar",
138158
":publish_go_gapic_srcjar-test.srcjar",
139159
":publish_go_proto",
140160
],
@@ -145,11 +165,8 @@ go_gapic_assembly_pkg(
145165
##############################################################################
146166
load(
147167
"@com_google_googleapis_imports//:imports.bzl",
148-
"moved_proto_library",
149168
"py_gapic_assembly_pkg",
150169
"py_gapic_library",
151-
"py_grpc_library",
152-
"py_proto_library",
153170
)
154171

155172
py_gapic_library(
@@ -191,6 +208,8 @@ php_grpc_library(
191208
php_gapic_library(
192209
name = "publish_php_gapic",
193210
srcs = [":publish_proto_with_info"],
211+
grpc_service_config = "streetview_publish_grpc_service_config.json",
212+
service_yaml = "streetviewpublish.yaml",
194213
deps = [
195214
":publish_php_grpc",
196215
":publish_php_proto",
@@ -218,11 +237,12 @@ load(
218237

219238
nodejs_gapic_library(
220239
name = "publish_nodejs_gapic",
240+
package_name = "@google-cloud/publish",
221241
src = ":publish_proto_with_info",
222242
extra_protoc_parameters = ["metadata"],
223-
gapic_yaml = "streetview_publish_gapic.yaml",
243+
grpc_service_config = "streetview_publish_grpc_service_config.json",
224244
package = "google.streetview.publish.v1",
225-
service_yaml = "streetview_publish.yaml",
245+
service_yaml = "streetviewpublish.yaml",
226246
deps = [],
227247
)
228248

@@ -239,8 +259,8 @@ nodejs_gapic_assembly_pkg(
239259
##############################################################################
240260
load(
241261
"@com_google_googleapis_imports//:imports.bzl",
242-
"ruby_gapic_assembly_pkg",
243262
"ruby_cloud_gapic_library",
263+
"ruby_gapic_assembly_pkg",
244264
"ruby_grpc_library",
245265
"ruby_proto_library",
246266
)
@@ -258,8 +278,9 @@ ruby_grpc_library(
258278

259279
ruby_cloud_gapic_library(
260280
name = "publish_ruby_gapic",
261-
srcs = [":publish_proto_with_info",],
281+
srcs = [":publish_proto_with_info"],
262282
extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-publish-v1"],
283+
grpc_service_config = "streetview_publish_grpc_service_config.json",
263284
deps = [
264285
":publish_ruby_grpc",
265286
":publish_ruby_proto",
@@ -302,6 +323,7 @@ csharp_gapic_library(
302323
name = "publish_csharp_gapic",
303324
srcs = [":publish_proto_with_info"],
304325
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
326+
grpc_service_config = "streetview_publish_grpc_service_config.json",
305327
deps = [
306328
":publish_csharp_grpc",
307329
":publish_csharp_proto",
@@ -321,4 +343,20 @@ csharp_gapic_assembly_pkg(
321343
##############################################################################
322344
# C++
323345
##############################################################################
324-
# Put your C++ rules here
346+
load(
347+
"@com_google_googleapis_imports//:imports.bzl",
348+
"cc_grpc_library",
349+
"cc_proto_library",
350+
)
351+
352+
cc_proto_library(
353+
name = "publish_cc_proto",
354+
deps = [":publish_proto"],
355+
)
356+
357+
cc_grpc_library(
358+
name = "publish_cc_grpc",
359+
srcs = [":publish_proto"],
360+
grpc_only = True,
361+
deps = [":publish_cc_proto"],
362+
)

google/streetview/publish/v1/resources.proto

Lines changed: 74 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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

1717
package google.streetview.publish.v1;
1818

19-
import "google/api/annotations.proto";
19+
import "google/api/field_behavior.proto";
2020
import "google/protobuf/timestamp.proto";
2121
import "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.
2828
message 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].
3639
message 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.
4245
message 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.
111116
message 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.
118123
message 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

Comments
 (0)