Skip to content

Commit

Permalink
feat: update attributes in Places API
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 694522095
  • Loading branch information
Google APIs authored and copybara-github committed Nov 8, 2024
1 parent e6fd904 commit e7084f3
Show file tree
Hide file tree
Showing 19 changed files with 117 additions and 23 deletions.
4 changes: 2 additions & 2 deletions google/maps/places/v1/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ proto_library(
"place.proto",
"places_service.proto",
"polyline.proto",
"price_range.proto",
"reference.proto",
"review.proto",
"route_modifiers.proto",
Expand Down Expand Up @@ -197,13 +198,13 @@ go_gapic_library(
grpc_service_config = "places_grpc_service_config.json",
importpath = "cloud.google.com/go/maps/places/apiv1;places",
metadata = True,
# Labeling beta so we get unstable notice in client.
release_level = "beta",
rest_numeric_enums = True,
service_yaml = "places_v1.yaml",
transport = "grpc+rest",
deps = [
":places_go_proto",
"@io_bazel_rules_go//proto/wkt:duration_go_proto",
],
)

Expand Down Expand Up @@ -392,7 +393,6 @@ load(

csharp_proto_library(
name = "places_csharp_proto",
extra_opts = [],
deps = [":places_proto"],
)

Expand Down
1 change: 0 additions & 1 deletion google/maps/places/v1/attribution.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package google.maps.places.v1;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand Down
1 change: 0 additions & 1 deletion google/maps/places/v1/content_block.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package google.maps.places.v1;
import "google/maps/places/v1/reference.proto";
import "google/type/localized_text.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand Down
1 change: 0 additions & 1 deletion google/maps/places/v1/contextual_content.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package google.maps.places.v1;
import "google/maps/places/v1/photo.proto";
import "google/maps/places/v1/review.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand Down
1 change: 0 additions & 1 deletion google/maps/places/v1/ev_charging.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package google.maps.places.v1;

import "google/protobuf/timestamp.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand Down
1 change: 0 additions & 1 deletion google/maps/places/v1/fuel_options.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package google.maps.places.v1;
import "google/protobuf/timestamp.proto";
import "google/type/money.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand Down
1 change: 0 additions & 1 deletion google/maps/places/v1/geometry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package google.maps.places.v1;
import "google/api/field_behavior.proto";
import "google/type/latlng.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand Down
1 change: 0 additions & 1 deletion google/maps/places/v1/photo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/maps/places/v1/attribution.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand Down
42 changes: 39 additions & 3 deletions google/maps/places/v1/place.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ import "google/maps/places/v1/content_block.proto";
import "google/maps/places/v1/ev_charging.proto";
import "google/maps/places/v1/fuel_options.proto";
import "google/maps/places/v1/photo.proto";
import "google/maps/places/v1/price_range.proto";
import "google/maps/places/v1/reference.proto";
import "google/maps/places/v1/review.proto";
import "google/protobuf/timestamp.proto";
import "google/type/date.proto";
import "google/type/latlng.proto";
import "google/type/localized_text.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand Down Expand Up @@ -193,6 +194,16 @@ message Place {
// current_opening_hours and current_secondary_opening_hours if there are
// exceptional hours.
repeated SpecialDay special_days = 5;

// The next time the current opening hours period starts up to 7 days in the
// future. This field is only populated if the opening hours period is not
// active at the time of serving the request.
google.protobuf.Timestamp next_open_time = 6;

// The next time the current opening hours period ends up to 7 days in the
// future. This field is only populated if the opening hours period is
// active at the time of serving the request.
google.protobuf.Timestamp next_close_time = 7;
}

// Business status for the place.
Expand Down Expand Up @@ -314,6 +325,17 @@ message Place {
repeated ContentBlock content_blocks = 4;
}

// Info about the place in which this place is located.
message ContainingPlace {
// The resource name of the place in which this place is located.
string name = 1 [
(google.api.resource_reference) = { type: "places.googleapis.com/Place" }
];

// The place id of the place in which this place is located.
string id = 2;
}

// This Place's resource name, in `places/{place_id}` format. Can be used to
// look up the Place.
string name = 1;
Expand Down Expand Up @@ -378,7 +400,9 @@ message Place {
// The position of this place.
google.type.LatLng location = 12;

// A viewport suitable for displaying the place on an average-sized map.
// A viewport suitable for displaying the place on an average-sized map. This
// viewport should not be used as the physical boundary or the service area of
// the business.
google.geo.type.Viewport viewport = 13;

// A rating between 1.0 and 5.0, based on user reviews of this place.
Expand Down Expand Up @@ -412,7 +436,6 @@ message Place {
// The place's address in adr microformat: http://microformats.org/wiki/adr.
string adr_format_address = 24;

// The business status for the place.
BusinessStatus business_status = 25;

// Price level of the place.
Expand Down Expand Up @@ -562,6 +585,19 @@ message Place {
//
// AI-generated summary of the area that the place is in.
AreaSummary area_summary = 81;

// List of places in which the current place is located.
repeated ContainingPlace containing_places = 82;

// Indicates whether the place is a pure service area business. Pure service
// area business is a business that visits or delivers to customers directly
// but does not serve customers at their business address. For example,
// businesses like cleaning services or plumbers. Those businesses may not
// have a physical address or location on Google Maps.
optional bool pure_service_area_business = 83;

// The price range associated with a Place.
PriceRange price_range = 86;
}

// Price level of the place.
Expand Down
25 changes: 22 additions & 3 deletions google/maps/places/v1/places_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import "google/maps/places/v1/routing_summary.proto";
import "google/maps/places/v1/travel_mode.proto";
import "google/type/latlng.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand Down Expand Up @@ -263,7 +262,7 @@ message SearchNearbyResponse {
repeated Place places = 1;

// A list of routing summaries where each entry associates to the
// corresponding place in the same index in the places field. If the routing
// corresponding place in the same index in the `places` field. If the routing
// summary is not available for one of the places, it will contain an empty
// entry. This list should have as many entries as the list of places if
// requested.
Expand Down Expand Up @@ -430,6 +429,16 @@ message SearchTextRequest {
// Optional. Additional parameters proto for searching along a route.
SearchAlongRouteParameters search_along_route_parameters = 17
[(google.api.field_behavior) = OPTIONAL];

// Optional. Include pure service area businesses if the field is set to true.
// Pure service area business is a business that visits or delivers to
// customers directly but does not serve customers at their business address.
// For example, businesses like cleaning services or plumbers. Those
// businesses do not have a physical address or location on Google Maps.
// Places will not return fields including `location`, `plus_code`, and other
// location related fields for these businesses.
bool include_pure_service_area_businesses = 20
[(google.api.field_behavior) = OPTIONAL];
}

// Response proto for SearchText.
Expand All @@ -439,7 +448,7 @@ message SearchTextResponse {
repeated Place places = 1;

// A list of routing summaries where each entry associates to the
// corresponding place in the same index in the places field. If the routing
// corresponding place in the same index in the `places` field. If the routing
// summary is not available for one of the places, it will contain an empty
// entry. This list will have as many entries as the list of places if
// requested.
Expand Down Expand Up @@ -698,6 +707,16 @@ message AutocompletePlacesRequest {
// same token for more than one session will result in each request being
// billed individually.
string session_token = 11 [(google.api.field_behavior) = OPTIONAL];

// Optional. Include pure service area businesses if the field is set to true.
// Pure service area business is a business that visits or delivers to
// customers directly but does not serve customers at their business address.
// For example, businesses like cleaning services or plumbers. Those
// businesses do not have a physical address or location on Google Maps.
// Places will not return fields including `location`, `plus_code`, and other
// location related fields for these businesses.
bool include_pure_service_area_businesses = 12
[(google.api.field_behavior) = OPTIONAL];
}

// Response proto for AutocompletePlaces.
Expand Down
6 changes: 6 additions & 0 deletions google/maps/places/v1/places_v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ publishing:
common:
destinations:
- PACKAGE_MANAGER
cpp_settings:
common: {}
php_settings:
common: {}
python_settings:
common:
destinations:
Expand All @@ -38,6 +42,8 @@ publishing:
common:
destinations:
- PACKAGE_MANAGER
ruby_settings:
common: {}
go_settings:
common:
destinations:
Expand Down
1 change: 0 additions & 1 deletion google/maps/places/v1/polyline.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package google.maps.places.v1;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand Down
39 changes: 39 additions & 0 deletions google/maps/places/v1/price_range.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.maps.places.v1;

import "google/type/money.proto";

option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
option java_outer_classname = "PriceRangeProto";
option java_package = "com.google.maps.places.v1";
option objc_class_prefix = "GMPSV1";
option php_namespace = "Google\\Maps\\Places\\V1";

// The price range associated with a Place. `end_price` could be unset, which
// indicates a range without upper bound (e.g. "More than $100").
message PriceRange {
// The low end of the price range (inclusive). Price should be at or above
// this amount.
google.type.Money start_price = 1;

// The high end of the price range (exclusive). Price should be lower than
// this amount.
google.type.Money end_price = 2;
}
1 change: 0 additions & 1 deletion google/maps/places/v1/reference.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package google.maps.places.v1;
import "google/api/resource.proto";
import "google/maps/places/v1/review.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand Down
1 change: 0 additions & 1 deletion google/maps/places/v1/review.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import "google/maps/places/v1/attribution.proto";
import "google/protobuf/timestamp.proto";
import "google/type/localized_text.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand Down
1 change: 0 additions & 1 deletion google/maps/places/v1/route_modifiers.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package google.maps.places.v1;

import "google/api/field_behavior.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand Down
1 change: 0 additions & 1 deletion google/maps/places/v1/routing_preference.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package google.maps.places.v1;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand Down
11 changes: 9 additions & 2 deletions google/maps/places/v1/routing_summary.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package google.maps.places.v1;

import "google/protobuf/duration.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand All @@ -29,7 +28,7 @@ option php_namespace = "Google\\Maps\\Places\\V1";

// The duration and distance from the routing origin to a place in the
// response, and a second leg from that place to the destination, if requested.
// Note: Adding `routingSummaries` in the field mask without also including
// **Note:** Adding `routingSummaries` in the field mask without also including
// either the `routingParameters.origin` parameter or the
// `searchAlongRouteParameters.polyline.encodedPolyline` parameter in the
// request causes an error.
Expand All @@ -51,4 +50,12 @@ message RoutingSummary {
// legs: one from the origin to place, and one from the place to the
// destination.
repeated Leg legs = 1;

// A link to show directions on Google Maps using the waypoints from the given
// routing summary. The route generated by this link is not guaranteed to be
// the same as the route used to generate the routing summary.
// The link uses information provided in the request, from fields including
// `routingParameters` and `searchAlongRouteParameters` when applicable, to
// generate the directions link.
string directions_uri = 2;
}
1 change: 0 additions & 1 deletion google/maps/places/v1/travel_mode.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ syntax = "proto3";

package google.maps.places.v1;

option cc_enable_arenas = true;
option csharp_namespace = "Google.Maps.Places.V1";
option go_package = "cloud.google.com/go/maps/places/apiv1/placespb;placespb";
option java_multiple_files = true;
Expand Down

0 comments on commit e7084f3

Please sign in to comment.