Skip to content

Commit 0d6992f

Browse files
Google APIscopybara-github
authored andcommitted
feat: new features for Places GA
PiperOrigin-RevId: 575913105
1 parent 3501865 commit 0d6992f

10 files changed

Lines changed: 1104 additions & 298 deletions

File tree

google/maps/places/v1/BUILD.bazel

Lines changed: 101 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@
99
# * extra_protoc_file_parameters
1010
# The complete list of preserved parameters can be found in the source code.
1111

12+
# This is an API workspace, having public visibility by default makes perfect sense.
13+
package(default_visibility = ["//visibility:public"])
14+
1215
##############################################################################
1316
# Common
1417
##############################################################################
1518
load("@rules_proto//proto:defs.bzl", "proto_library")
19+
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
1620
load(
1721
"@com_google_googleapis_imports//:imports.bzl",
1822
"cc_grpc_library",
@@ -45,24 +49,28 @@ load(
4549
"ruby_proto_library",
4650
)
4751

48-
# This is an API workspace, having public visibility by default makes perfect sense.
49-
package(default_visibility = ["//visibility:public"])
50-
5152
proto_library(
5253
name = "places_proto",
5354
srcs = [
55+
"attribution.proto",
56+
"ev_charging.proto",
57+
"fuel_options.proto",
5458
"geometry.proto",
59+
"photo.proto",
5560
"place.proto",
5661
"places_service.proto",
62+
"review.proto",
5763
],
5864
deps = [
5965
"//google/api:annotations_proto",
6066
"//google/api:client_proto",
6167
"//google/api:field_behavior_proto",
68+
"//google/api:resource_proto",
6269
"//google/geo/type:viewport_proto",
6370
"//google/type:date_proto",
6471
"//google/type:latlng_proto",
6572
"//google/type:localized_text_proto",
73+
"//google/type:money_proto",
6674
"@com_google_protobuf//:timestamp_proto",
6775
],
6876
)
@@ -82,6 +90,18 @@ py_import(
8290
],
8391
)
8492

93+
##############################################################################
94+
# Java
95+
##############################################################################
96+
load(
97+
"@com_google_googleapis_imports//:imports.bzl",
98+
"java_gapic_assembly_gradle_pkg",
99+
"java_gapic_library",
100+
"java_gapic_test",
101+
"java_grpc_library",
102+
"java_proto_library",
103+
)
104+
85105
java_proto_library(
86106
name = "places_java_proto",
87107
deps = [":places_proto"],
@@ -132,6 +152,16 @@ java_gapic_assembly_gradle_pkg(
132152
],
133153
)
134154

155+
##############################################################################
156+
# Go
157+
##############################################################################
158+
load(
159+
"@com_google_googleapis_imports//:imports.bzl",
160+
"go_gapic_assembly_pkg",
161+
"go_gapic_library",
162+
"go_proto_library",
163+
)
164+
135165
go_proto_library(
136166
name = "places_go_proto",
137167
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
@@ -143,6 +173,7 @@ go_proto_library(
143173
"//google/type:date_go_proto",
144174
"//google/type:latlng_go_proto",
145175
"//google/type:localized_text_go_proto",
176+
"//google/type:money_go_proto",
146177
],
147178
)
148179

@@ -173,18 +204,26 @@ go_gapic_assembly_pkg(
173204
],
174205
)
175206

207+
##############################################################################
208+
# Python
209+
##############################################################################
210+
load(
211+
"@com_google_googleapis_imports//:imports.bzl",
212+
"py_gapic_assembly_pkg",
213+
"py_gapic_library",
214+
"py_test",
215+
)
216+
176217
py_gapic_library(
177218
name = "places_py_gapic",
178219
srcs = [":places_proto"],
179220
grpc_service_config = "places_grpc_service_config.json",
180-
opt_args = [
181-
"proto-plus-deps=google.geo.type",
182-
],
221+
opt_args = ["proto-plus-deps=google.geo.type"],
183222
rest_numeric_enums = True,
184223
service_yaml = "places_v1.yaml",
185224
transport = "grpc+rest",
186225
deps = [
187-
":viewport",
226+
":viewport"
188227
],
189228
)
190229

@@ -195,9 +234,7 @@ py_test(
195234
"places_py_gapic_test.py",
196235
],
197236
legacy_create_init = False,
198-
deps = [
199-
":places_py_gapic",
200-
],
237+
deps = [":places_py_gapic"],
201238
)
202239

203240
# Open Source Packages
@@ -208,6 +245,16 @@ py_gapic_assembly_pkg(
208245
],
209246
)
210247

248+
##############################################################################
249+
# PHP
250+
##############################################################################
251+
load(
252+
"@com_google_googleapis_imports//:imports.bzl",
253+
"php_gapic_assembly_pkg",
254+
"php_gapic_library",
255+
"php_proto_library",
256+
)
257+
211258
php_proto_library(
212259
name = "places_php_proto",
213260
deps = [":places_proto"],
@@ -221,7 +268,9 @@ php_gapic_library(
221268
rest_numeric_enums = True,
222269
service_yaml = "places_v1.yaml",
223270
transport = "grpc+rest",
224-
deps = [":places_php_proto"],
271+
deps = [
272+
":places_php_proto",
273+
],
225274
)
226275

227276
# Open Source Packages
@@ -233,6 +282,15 @@ php_gapic_assembly_pkg(
233282
],
234283
)
235284

285+
##############################################################################
286+
# Node.js
287+
##############################################################################
288+
load(
289+
"@com_google_googleapis_imports//:imports.bzl",
290+
"nodejs_gapic_assembly_pkg",
291+
"nodejs_gapic_library",
292+
)
293+
236294
nodejs_gapic_library(
237295
name = "places_nodejs_gapic",
238296
package_name = "@googlemaps/places",
@@ -251,10 +309,20 @@ nodejs_gapic_assembly_pkg(
251309
deps = [
252310
":places_nodejs_gapic",
253311
":places_proto",
254-
"//google/geo/type:viewport_proto",
255312
],
256313
)
257314

315+
##############################################################################
316+
# Ruby
317+
##############################################################################
318+
load(
319+
"@com_google_googleapis_imports//:imports.bzl",
320+
"ruby_cloud_gapic_library",
321+
"ruby_gapic_assembly_pkg",
322+
"ruby_grpc_library",
323+
"ruby_proto_library",
324+
)
325+
258326
ruby_proto_library(
259327
name = "places_ruby_proto",
260328
deps = [":places_proto"],
@@ -290,8 +358,20 @@ ruby_gapic_assembly_pkg(
290358
],
291359
)
292360

361+
##############################################################################
362+
# C#
363+
##############################################################################
364+
load(
365+
"@com_google_googleapis_imports//:imports.bzl",
366+
"csharp_gapic_assembly_pkg",
367+
"csharp_gapic_library",
368+
"csharp_grpc_library",
369+
"csharp_proto_library",
370+
)
371+
293372
csharp_proto_library(
294373
name = "places_csharp_proto",
374+
extra_opts = [],
295375
deps = [":places_proto"],
296376
)
297377

@@ -324,6 +404,15 @@ csharp_gapic_assembly_pkg(
324404
],
325405
)
326406

407+
##############################################################################
408+
# C++
409+
##############################################################################
410+
load(
411+
"@com_google_googleapis_imports//:imports.bzl",
412+
"cc_grpc_library",
413+
"cc_proto_library",
414+
)
415+
327416
cc_proto_library(
328417
name = "places_cc_proto",
329418
deps = [":places_proto"],
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// Copyright 2023 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+
15+
syntax = "proto3";
16+
17+
package google.maps.places.v1;
18+
19+
import "google/api/field_behavior.proto";
20+
21+
option cc_enable_arenas = true;
22+
option csharp_namespace = "Google.Maps.Places.V1";
23+
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
24+
option java_multiple_files = true;
25+
option java_outer_classname = "AttributionProto";
26+
option java_package = "com.google.maps.places.v1";
27+
option objc_class_prefix = "GMPSV1";
28+
option php_namespace = "Google\\Maps\\Places\\V1";
29+
30+
// Information about the author of the UGC data. Used in
31+
// [Photo][google.maps.places.v1.Photo], and
32+
// [Review][google.maps.places.v1.Review].
33+
message AuthorAttribution {
34+
// Output only. Name of the author of the [Photo][google.maps.places.v1.Photo]
35+
// or [Review][google.maps.places.v1.Review].
36+
string display_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
37+
38+
// Output only. URI of the author of the [Photo][google.maps.places.v1.Photo]
39+
// or [Review][google.maps.places.v1.Review].
40+
string uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
41+
42+
// Output only. Profile photo URI of the author of the
43+
// [Photo][google.maps.places.v1.Photo] or
44+
// [Review][google.maps.places.v1.Review].
45+
string photo_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
46+
}
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
// Copyright 2023 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+
15+
syntax = "proto3";
16+
17+
package google.maps.places.v1;
18+
19+
import "google/protobuf/timestamp.proto";
20+
21+
option cc_enable_arenas = true;
22+
option csharp_namespace = "Google.Maps.Places.V1";
23+
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
24+
option java_multiple_files = true;
25+
option java_outer_classname = "EvChargingProto";
26+
option java_package = "com.google.maps.places.v1";
27+
option objc_class_prefix = "GMPSV1";
28+
option php_namespace = "Google\\Maps\\Places\\V1";
29+
30+
// Information about the EV Charge Station hosted in Place.
31+
// Terminology follows
32+
// https://afdc.energy.gov/fuels/electricity_infrastructure.html One port
33+
// could charge one car at a time. One port has one or more connectors. One
34+
// station has one or more ports.
35+
message EVChargeOptions {
36+
// EV charging information grouped by [type, max_charge_rate_kw].
37+
// Shows EV charge aggregation of connectors that have the same type and max
38+
// charge rate in kw.
39+
message ConnectorAggregation {
40+
// The connector type of this aggregation.
41+
EVConnectorType type = 1;
42+
43+
// The static max charging rate in kw of each connector in the aggregation.
44+
double max_charge_rate_kw = 2;
45+
46+
// Number of connectors in this aggregation.
47+
int32 count = 3;
48+
49+
// Number of connectors in this aggregation that are currently available.
50+
optional int32 available_count = 4;
51+
52+
// Number of connectors in this aggregation that are currently out of
53+
// service.
54+
optional int32 out_of_service_count = 5;
55+
56+
// The timestamp when the connector availability information in this
57+
// aggregation was last updated.
58+
google.protobuf.Timestamp availability_last_update_time = 6;
59+
}
60+
61+
// Number of connectors at this station. However, because some ports can have
62+
// multiple connectors but only be able to charge one car at a time (e.g.) the
63+
// number of connectors may be greater than the total number of cars which can
64+
// charge simultaneously.
65+
int32 connector_count = 1;
66+
67+
// A list of EV charging connector aggregations that contain connectors of the
68+
// same type and same charge rate.
69+
repeated ConnectorAggregation connector_aggregation = 2;
70+
}
71+
72+
// See http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=6872107 for
73+
// additional information/context on EV charging connector types.
74+
enum EVConnectorType {
75+
// Unspecified connector.
76+
EV_CONNECTOR_TYPE_UNSPECIFIED = 0;
77+
78+
// Other connector types.
79+
EV_CONNECTOR_TYPE_OTHER = 1;
80+
81+
// J1772 type 1 connector.
82+
EV_CONNECTOR_TYPE_J1772 = 2;
83+
84+
// IEC 62196 type 2 connector. Often referred to as MENNEKES.
85+
EV_CONNECTOR_TYPE_TYPE_2 = 3;
86+
87+
// CHAdeMO type connector.
88+
EV_CONNECTOR_TYPE_CHADEMO = 4;
89+
90+
// Combined Charging System (AC and DC). Based on SAE.
91+
// Type-1 J-1772 connector
92+
EV_CONNECTOR_TYPE_CCS_COMBO_1 = 5;
93+
94+
// Combined Charging System (AC and DC). Based on Type-2
95+
// Mennekes connector
96+
EV_CONNECTOR_TYPE_CCS_COMBO_2 = 6;
97+
98+
// The generic TESLA connector. This is NACS in the North America but can be
99+
// non-NACS in other parts of the world (e.g. CCS Combo 2 (CCS2) or GB/T).
100+
// This value is less representative of an actual connector type, and more
101+
// represents the ability to charge a Tesla brand vehicle at a Tesla owned
102+
// charging station.
103+
EV_CONNECTOR_TYPE_TESLA = 7;
104+
105+
// GB/T type corresponds to the GB/T standard in China. This type covers all
106+
// GB_T types.
107+
EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T = 8;
108+
109+
// Unspecified wall outlet.
110+
EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET = 9;
111+
}

0 commit comments

Comments
 (0)