Skip to content

Commit f1640c9

Browse files
feat: Automated regeneration of Places client (googleapis#12499)
Auto-created at 2024-11-07 13:18:21 +0000 using the toys pull request generator.
1 parent 3c9abf1 commit f1640c9

9 files changed

+129
-4
lines changed

clients/places/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
1111

1212
```elixir
1313
def deps do
14-
[{:google_api_places, "~> 0.9"}]
14+
[{:google_api_places, "~> 0.10"}]
1515
end
1616
```
1717

clients/places/lib/google_api/places/v1/metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule GoogleApi.Places.V1 do
2020
API client metadata for GoogleApi.Places.V1.
2121
"""
2222

23-
@discovery_revision "20241029"
23+
@discovery_revision "20241106"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end

clients/places/lib/google_api/places/v1/model/google_maps_places_v1_autocomplete_places_request.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1AutocompletePlacesRequest
2121
2222
## Attributes
2323
24+
* `includePureServiceAreaBusinesses` (*type:* `boolean()`, *default:* `nil`) - 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.
2425
* `includeQueryPredictions` (*type:* `boolean()`, *default:* `nil`) - Optional. If true, the response will include both Place and query predictions. Otherwise the response will only return Place predictions.
2526
* `includedPrimaryTypes` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Included primary Place type (for example, "restaurant" or "gas_station") in Place Types (https://developers.google.com/maps/documentation/places/web-service/place-types), or only `(regions)`, or only `(cities)`. A Place is only returned if its primary type is included in this list. Up to 5 values can be specified. If no types are specified, all Place types are returned.
2627
* `includedRegionCodes` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Only include results in the specified regions, specified as up to 15 CLDR two-character region codes. An empty set will not restrict the results. If both `location_restriction` and `included_region_codes` are set, the results will be located in the area of intersection.
@@ -37,6 +38,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1AutocompletePlacesRequest
3738
use GoogleApi.Gax.ModelBase
3839

3940
@type t :: %__MODULE__{
41+
:includePureServiceAreaBusinesses => boolean() | nil,
4042
:includeQueryPredictions => boolean() | nil,
4143
:includedPrimaryTypes => list(String.t()) | nil,
4244
:includedRegionCodes => list(String.t()) | nil,
@@ -54,6 +56,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1AutocompletePlacesRequest
5456
:sessionToken => String.t() | nil
5557
}
5658

59+
field(:includePureServiceAreaBusinesses)
5760
field(:includeQueryPredictions)
5861
field(:includedPrimaryTypes, type: :list)
5962
field(:includedRegionCodes, type: :list)

clients/places/lib/google_api/places/v1/model/google_maps_places_v1_place.ex

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
3939
* `servesCocktails` (*type:* `boolean()`, *default:* `nil`) - Place serves cocktails.
4040
* `takeout` (*type:* `boolean()`, *default:* `nil`) - Specifies if the business supports takeout.
4141
* `paymentOptions` (*type:* `GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlacePaymentOptions.t`, *default:* `nil`) - Payment options the place accepts. If a payment option data is not available, the payment option field will be unset.
42+
* `pureServiceAreaBusiness` (*type:* `boolean()`, *default:* `nil`) - 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.
4243
* `regularOpeningHours` (*type:* `GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHours.t`, *default:* `nil`) - The regular hours of operation.
4344
* `shortFormattedAddress` (*type:* `String.t`, *default:* `nil`) - A short, human-readable address for this place.
4445
* `internationalPhoneNumber` (*type:* `String.t`, *default:* `nil`) - A human-readable phone number for the place, in international format.
@@ -61,7 +62,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
6162
* `viewport` (*type:* `GoogleApi.Places.V1.Model.GoogleGeoTypeViewport.t`, *default:* `nil`) - 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.
6263
* `websiteUri` (*type:* `String.t`, *default:* `nil`) - The authoritative website for this place, e.g. a business' homepage. Note that for places that are part of a chain (e.g. an IKEA store), this will usually be the website for the individual store, not the overall chain.
6364
* `utcOffsetMinutes` (*type:* `integer()`, *default:* `nil`) - Number of minutes this place's timezone is currently offset from UTC. This is expressed in minutes to support timezones that are offset by fractions of an hour, e.g. X hours and 15 minutes.
64-
* `businessStatus` (*type:* `String.t`, *default:* `nil`) -
65+
* `businessStatus` (*type:* `String.t`, *default:* `nil`) - The business status for the place.
6566
* `menuForChildren` (*type:* `boolean()`, *default:* `nil`) - Place has a children's menu.
6667
* `regularSecondaryOpeningHours` (*type:* `list(GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHours.t)`, *default:* `nil`) - Contains an array of entries for information about regular secondary hours of a business. Secondary hours are different from a business's main hours. For example, a restaurant can specify drive through hours or delivery hours as its secondary hours. This field populates the type subfield, which draws from a predefined list of opening hours types (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place.
6768
* `curbsidePickup` (*type:* `boolean()`, *default:* `nil`) - Specifies if the business supports curbside pickup.
@@ -81,9 +82,11 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
8182
* `types` (*type:* `list(String.t)`, *default:* `nil`) - A set of type tags for this result. For example, "political" and "locality". For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types
8283
* `servesCoffee` (*type:* `boolean()`, *default:* `nil`) - Place serves coffee.
8384
* `iconBackgroundColor` (*type:* `String.t`, *default:* `nil`) - Background color for icon_mask in hex format, e.g. #909CE1.
85+
* `containingPlaces` (*type:* `list(GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceContainingPlace.t)`, *default:* `nil`) - List of places in which the current place is located.
8486
* `primaryTypeDisplayName` (*type:* `GoogleApi.Places.V1.Model.GoogleTypeLocalizedText.t`, *default:* `nil`) - The display name of the primary type, localized to the request language if applicable. For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types
8587
* `parkingOptions` (*type:* `GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceParkingOptions.t`, *default:* `nil`) - Options of parking provided by the place.
8688
* `adrFormatAddress` (*type:* `String.t`, *default:* `nil`) - The place's address in adr microformat: http://microformats.org/wiki/adr.
89+
* `priceRange` (*type:* `GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PriceRange.t`, *default:* `nil`) - The price range associated with a Place.
8790
* `id` (*type:* `String.t`, *default:* `nil`) - The unique identifier of a place.
8891
* `googleMapsLinks` (*type:* `GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceGoogleMapsLinks.t`, *default:* `nil`) - Links to trigger different Google Maps actions.
8992
"""
@@ -113,6 +116,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
113116
:takeout => boolean() | nil,
114117
:paymentOptions =>
115118
GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlacePaymentOptions.t() | nil,
119+
:pureServiceAreaBusiness => boolean() | nil,
116120
:regularOpeningHours =>
117121
GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHours.t() | nil,
118122
:shortFormattedAddress => String.t() | nil,
@@ -163,10 +167,13 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
163167
:types => list(String.t()) | nil,
164168
:servesCoffee => boolean() | nil,
165169
:iconBackgroundColor => String.t() | nil,
170+
:containingPlaces =>
171+
list(GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceContainingPlace.t()) | nil,
166172
:primaryTypeDisplayName => GoogleApi.Places.V1.Model.GoogleTypeLocalizedText.t() | nil,
167173
:parkingOptions =>
168174
GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceParkingOptions.t() | nil,
169175
:adrFormatAddress => String.t() | nil,
176+
:priceRange => GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PriceRange.t() | nil,
170177
:id => String.t() | nil,
171178
:googleMapsLinks =>
172179
GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceGoogleMapsLinks.t() | nil
@@ -202,6 +209,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
202209
field(:servesCocktails)
203210
field(:takeout)
204211
field(:paymentOptions, as: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlacePaymentOptions)
212+
field(:pureServiceAreaBusiness)
205213
field(:regularOpeningHours, as: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHours)
206214
field(:shortFormattedAddress)
207215
field(:internationalPhoneNumber)
@@ -263,9 +271,16 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
263271
field(:types, type: :list)
264272
field(:servesCoffee)
265273
field(:iconBackgroundColor)
274+
275+
field(:containingPlaces,
276+
as: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceContainingPlace,
277+
type: :list
278+
)
279+
266280
field(:primaryTypeDisplayName, as: GoogleApi.Places.V1.Model.GoogleTypeLocalizedText)
267281
field(:parkingOptions, as: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceParkingOptions)
268282
field(:adrFormatAddress)
283+
field(:priceRange, as: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PriceRange)
269284
field(:id)
270285
field(:googleMapsLinks, as: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceGoogleMapsLinks)
271286
end
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright 2019 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+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceContainingPlace do
19+
@moduledoc """
20+
Info about the place in which this place is located.
21+
22+
## Attributes
23+
24+
* `id` (*type:* `String.t`, *default:* `nil`) - The place id of the place in which this place is located.
25+
* `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the place in which this place is located.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:id => String.t() | nil,
32+
:name => String.t() | nil
33+
}
34+
35+
field(:id)
36+
field(:name)
37+
end
38+
39+
defimpl Poison.Decoder, for: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceContainingPlace do
40+
def decode(value, options) do
41+
GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceContainingPlace.decode(value, options)
42+
end
43+
end
44+
45+
defimpl Poison.Encoder, for: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceContainingPlace do
46+
def encode(value, options) do
47+
GoogleApi.Gax.ModelBase.encode(value, options)
48+
end
49+
end

clients/places/lib/google_api/places/v1/model/google_maps_places_v1_place_opening_hours.ex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHours do
2121
2222
## Attributes
2323
24+
* `nextCloseTime` (*type:* `DateTime.t`, *default:* `nil`) - 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.
25+
* `nextOpenTime` (*type:* `DateTime.t`, *default:* `nil`) - 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.
2426
* `openNow` (*type:* `boolean()`, *default:* `nil`) - Whether the opening hours period is currently active. For regular opening hours and current opening hours, this field means whether the place is open. For secondary opening hours and current secondary opening hours, this field means whether the secondary hours of this place is active.
2527
* `periods` (*type:* `list(GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHoursPeriod.t)`, *default:* `nil`) - The periods that this place is open during the week. The periods are in chronological order, starting with Sunday in the place-local timezone. An empty (but not absent) value indicates a place that is never open, e.g. because it is closed temporarily for renovations.
2628
* `secondaryHoursType` (*type:* `String.t`, *default:* `nil`) - A type string used to identify the type of secondary hours.
@@ -31,6 +33,8 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHours do
3133
use GoogleApi.Gax.ModelBase
3234

3335
@type t :: %__MODULE__{
36+
:nextCloseTime => DateTime.t() | nil,
37+
:nextOpenTime => DateTime.t() | nil,
3438
:openNow => boolean() | nil,
3539
:periods =>
3640
list(GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHoursPeriod.t()) | nil,
@@ -41,6 +45,8 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHours do
4145
:weekdayDescriptions => list(String.t()) | nil
4246
}
4347

48+
field(:nextCloseTime, as: DateTime)
49+
field(:nextOpenTime, as: DateTime)
4450
field(:openNow)
4551

4652
field(:periods,
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright 2019 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+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PriceRange do
19+
@moduledoc """
20+
The price range associated with a Place. `end_price` could be unset, which indicates a range without upper bound (e.g. "More than $100").
21+
22+
## Attributes
23+
24+
* `endPrice` (*type:* `GoogleApi.Places.V1.Model.GoogleTypeMoney.t`, *default:* `nil`) - The high end of the price range (exclusive). Price should be lower than this amount.
25+
* `startPrice` (*type:* `GoogleApi.Places.V1.Model.GoogleTypeMoney.t`, *default:* `nil`) - The low end of the price range (inclusive). Price should be at or above this amount.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:endPrice => GoogleApi.Places.V1.Model.GoogleTypeMoney.t() | nil,
32+
:startPrice => GoogleApi.Places.V1.Model.GoogleTypeMoney.t() | nil
33+
}
34+
35+
field(:endPrice, as: GoogleApi.Places.V1.Model.GoogleTypeMoney)
36+
field(:startPrice, as: GoogleApi.Places.V1.Model.GoogleTypeMoney)
37+
end
38+
39+
defimpl Poison.Decoder, for: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PriceRange do
40+
def decode(value, options) do
41+
GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PriceRange.decode(value, options)
42+
end
43+
end
44+
45+
defimpl Poison.Encoder, for: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PriceRange do
46+
def encode(value, options) do
47+
GoogleApi.Gax.ModelBase.encode(value, options)
48+
end
49+
end

clients/places/lib/google_api/places/v1/model/google_maps_places_v1_search_text_request.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextRequest do
2222
## Attributes
2323
2424
* `evOptions` (*type:* `GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextRequestEVOptions.t`, *default:* `nil`) - Optional. Set the searchable EV options of a place search request.
25+
* `includePureServiceAreaBusinesses` (*type:* `boolean()`, *default:* `nil`) - 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.
2526
* `includedType` (*type:* `String.t`, *default:* `nil`) - The requested place type. Full list of types supported: https://developers.google.com/maps/documentation/places/web-service/place-types. Only support one included type.
2627
* `languageCode` (*type:* `String.t`, *default:* `nil`) - Place details will be displayed with the preferred language if available. If the language code is unspecified or unrecognized, place details of any language may be returned, with a preference for English if such details exist. Current list of supported languages: https://developers.google.com/maps/faq#languagesupport.
2728
* `locationBias` (*type:* `GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextRequestLocationBias.t`, *default:* `nil`) - The region to search. This location serves as a bias which means results around given location might be returned. Cannot be set along with location_restriction.
@@ -45,6 +46,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextRequest do
4546
@type t :: %__MODULE__{
4647
:evOptions =>
4748
GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextRequestEVOptions.t() | nil,
49+
:includePureServiceAreaBusinesses => boolean() | nil,
4850
:includedType => String.t() | nil,
4951
:languageCode => String.t() | nil,
5052
:locationBias =>
@@ -70,6 +72,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextRequest do
7072
}
7173

7274
field(:evOptions, as: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextRequestEVOptions)
75+
field(:includePureServiceAreaBusinesses)
7376
field(:includedType)
7477
field(:languageCode)
7578

clients/places/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
defmodule GoogleApi.Places.Mixfile do
1919
use Mix.Project
2020

21-
@version "0.9.0"
21+
@version "0.10.0"
2222

2323
def project() do
2424
[

0 commit comments

Comments
 (0)