Skip to content

Commit 5430bbf

Browse files
feat: [places] new features for Places GA (#4756)
* feat: new features for Places GA PiperOrigin-RevId: 575913105 Source-Link: googleapis/googleapis@0d6992f Source-Link: googleapis/googleapis-gen@7cdc9e8 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcGxhY2VzLy5Pd2xCb3QueWFtbCIsImgiOiI3Y2RjOWU4YzBiZDhlNjM1YmMwYWE5Yzk1M2U5M2M5NWRjOWRmODcyIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 27f2cfb commit 5430bbf

23 files changed

Lines changed: 18648 additions & 7375 deletions

packages/google-maps-places/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
9393

9494
| Sample | Source Code | Try it |
9595
| --------------------------- | --------------------------------- | ------ |
96+
| Places.get_photo_media | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.get_photo_media.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.get_photo_media.js,packages/google-maps-places/samples/README.md) |
97+
| Places.get_place | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.get_place.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.get_place.js,packages/google-maps-places/samples/README.md) |
98+
| Places.search_nearby | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.search_nearby.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.search_nearby.js,packages/google-maps-places/samples/README.md) |
9699
| Places.search_text | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/generated/v1/places.search_text.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/generated/v1/places.search_text.js,packages/google-maps-places/samples/README.md) |
97100
| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-places/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-maps-places/samples/quickstart.js,packages/google-maps-places/samples/README.md) |
98101

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+
}
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
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+
import "google/type/money.proto";
21+
22+
option cc_enable_arenas = true;
23+
option csharp_namespace = "Google.Maps.Places.V1";
24+
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
25+
option java_multiple_files = true;
26+
option java_outer_classname = "FuelOptionsProto";
27+
option java_package = "com.google.maps.places.v1";
28+
option objc_class_prefix = "GMPSV1";
29+
option php_namespace = "Google\\Maps\\Places\\V1";
30+
31+
// The most recent information about fuel options in a gas station. This
32+
// information is updated regularly.
33+
message FuelOptions {
34+
// Fuel price information for a given type.
35+
message FuelPrice {
36+
// Types of fuel.
37+
enum FuelType {
38+
// Unspecified fuel type.
39+
FUEL_TYPE_UNSPECIFIED = 0;
40+
41+
// Diesel fuel.
42+
DIESEL = 1;
43+
44+
// Regular unleaded.
45+
REGULAR_UNLEADED = 2;
46+
47+
// Midgrade.
48+
MIDGRADE = 3;
49+
50+
// Premium.
51+
PREMIUM = 4;
52+
53+
// SP 91.
54+
SP91 = 5;
55+
56+
// SP 91 E10.
57+
SP91_E10 = 6;
58+
59+
// SP 92.
60+
SP92 = 7;
61+
62+
// SP 95.
63+
SP95 = 8;
64+
65+
// SP95 E10.
66+
SP95_E10 = 9;
67+
68+
// SP 98.
69+
SP98 = 10;
70+
71+
// SP 99.
72+
SP99 = 11;
73+
74+
// SP 100.
75+
SP100 = 12;
76+
77+
// LPG.
78+
LPG = 13;
79+
80+
// E 80.
81+
E80 = 14;
82+
83+
// E 85.
84+
E85 = 15;
85+
86+
// Methane.
87+
METHANE = 16;
88+
89+
// Bio-diesel.
90+
BIO_DIESEL = 17;
91+
92+
// Truck diesel.
93+
TRUCK_DIESEL = 18;
94+
}
95+
96+
// The type of fuel.
97+
FuelType type = 1;
98+
99+
// The price of the fuel.
100+
google.type.Money price = 2;
101+
102+
// The time the fuel price was last updated.
103+
google.protobuf.Timestamp update_time = 3;
104+
}
105+
106+
// The last known fuel price for each type of fuel this station has. There is
107+
// one entry per fuel type this station has. Order is not important.
108+
repeated FuelPrice fuel_prices = 1;
109+
}

packages/google-maps-places/protos/google/maps/places/v1/geometry.proto

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ option php_namespace = "Google\\Maps\\Places\\V1";
3232
message Circle {
3333
// Required. Center latitude and longitude.
3434
//
35-
// The range of latitude must be within `[-90.0, 90.0]`. The range of the
36-
// longitude must be within `[-180.0, 180.0]`.
35+
// The range of latitude must be within [-90.0, 90.0]. The range of the
36+
// longitude must be within [-180.0, 180.0].
3737
google.type.LatLng center = 1 [(google.api.field_behavior) = REQUIRED];
3838

39-
// Required. Radius measured in meters. The radius must be within `[0.0,
40-
// 50000.0]`.
39+
// Required. Radius measured in meters. The radius must be within [0.0,
40+
// 50000.0].
4141
double radius = 2 [(google.api.field_behavior) = REQUIRED];
4242
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
import "google/api/resource.proto";
21+
import "google/maps/places/v1/attribution.proto";
22+
23+
option cc_enable_arenas = true;
24+
option csharp_namespace = "Google.Maps.Places.V1";
25+
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
26+
option java_multiple_files = true;
27+
option java_outer_classname = "PhotoProto";
28+
option java_package = "com.google.maps.places.v1";
29+
option objc_class_prefix = "GMPSV1";
30+
option php_namespace = "Google\\Maps\\Places\\V1";
31+
32+
// Information about a photo of a place.
33+
message Photo {
34+
option (google.api.resource) = {
35+
type: "places.googleapis.com/Photo"
36+
pattern: "places/{place}/photos/{photo}"
37+
plural: "photos"
38+
singular: "photo"
39+
};
40+
41+
// Output only. A reference representing this place photo which may be used to
42+
// look up this place photo again (a.k.a. the API "resource" name:
43+
// places/{place_id}/photos/{photo}).
44+
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
45+
46+
// Output only. The maximum available width, in pixels.
47+
int32 width_px = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
48+
49+
// Output only. The maximum available height, in pixels.
50+
int32 height_px = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
51+
52+
// Output only. This photo's authors.
53+
repeated AuthorAttribution author_attributions = 4
54+
[(google.api.field_behavior) = OUTPUT_ONLY];
55+
}

0 commit comments

Comments
 (0)