Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of Places client #12499

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clients/places/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding

```elixir
def deps do
[{:google_api_places, "~> 0.9"}]
[{:google_api_places, "~> 0.10"}]
end
```

Expand Down
2 changes: 1 addition & 1 deletion clients/places/lib/google_api/places/v1/metadata.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.Places.V1 do
API client metadata for GoogleApi.Places.V1.
"""

@discovery_revision "20241029"
@discovery_revision "20241106"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1AutocompletePlacesRequest

## Attributes

* `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.
* `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.
* `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.
* `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.
Expand All @@ -37,6 +38,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1AutocompletePlacesRequest
use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:includePureServiceAreaBusinesses => boolean() | nil,
:includeQueryPredictions => boolean() | nil,
:includedPrimaryTypes => list(String.t()) | nil,
:includedRegionCodes => list(String.t()) | nil,
Expand All @@ -54,6 +56,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1AutocompletePlacesRequest
:sessionToken => String.t() | nil
}

field(:includePureServiceAreaBusinesses)
field(:includeQueryPredictions)
field(:includedPrimaryTypes, type: :list)
field(:includedRegionCodes, type: :list)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
* `servesCocktails` (*type:* `boolean()`, *default:* `nil`) - Place serves cocktails.
* `takeout` (*type:* `boolean()`, *default:* `nil`) - Specifies if the business supports takeout.
* `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.
* `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.
* `regularOpeningHours` (*type:* `GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHours.t`, *default:* `nil`) - The regular hours of operation.
* `shortFormattedAddress` (*type:* `String.t`, *default:* `nil`) - A short, human-readable address for this place.
* `internationalPhoneNumber` (*type:* `String.t`, *default:* `nil`) - A human-readable phone number for the place, in international format.
Expand All @@ -61,7 +62,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
* `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.
* `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.
* `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.
* `businessStatus` (*type:* `String.t`, *default:* `nil`) -
* `businessStatus` (*type:* `String.t`, *default:* `nil`) - The business status for the place.
* `menuForChildren` (*type:* `boolean()`, *default:* `nil`) - Place has a children's menu.
* `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.
* `curbsidePickup` (*type:* `boolean()`, *default:* `nil`) - Specifies if the business supports curbside pickup.
Expand All @@ -81,9 +82,11 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
* `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
* `servesCoffee` (*type:* `boolean()`, *default:* `nil`) - Place serves coffee.
* `iconBackgroundColor` (*type:* `String.t`, *default:* `nil`) - Background color for icon_mask in hex format, e.g. #909CE1.
* `containingPlaces` (*type:* `list(GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceContainingPlace.t)`, *default:* `nil`) - List of places in which the current place is located.
* `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
* `parkingOptions` (*type:* `GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceParkingOptions.t`, *default:* `nil`) - Options of parking provided by the place.
* `adrFormatAddress` (*type:* `String.t`, *default:* `nil`) - The place's address in adr microformat: http://microformats.org/wiki/adr.
* `priceRange` (*type:* `GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PriceRange.t`, *default:* `nil`) - The price range associated with a Place.
* `id` (*type:* `String.t`, *default:* `nil`) - The unique identifier of a place.
* `googleMapsLinks` (*type:* `GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceGoogleMapsLinks.t`, *default:* `nil`) - Links to trigger different Google Maps actions.
"""
Expand Down Expand Up @@ -113,6 +116,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
:takeout => boolean() | nil,
:paymentOptions =>
GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlacePaymentOptions.t() | nil,
:pureServiceAreaBusiness => boolean() | nil,
:regularOpeningHours =>
GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHours.t() | nil,
:shortFormattedAddress => String.t() | nil,
Expand Down Expand Up @@ -163,10 +167,13 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
:types => list(String.t()) | nil,
:servesCoffee => boolean() | nil,
:iconBackgroundColor => String.t() | nil,
:containingPlaces =>
list(GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceContainingPlace.t()) | nil,
:primaryTypeDisplayName => GoogleApi.Places.V1.Model.GoogleTypeLocalizedText.t() | nil,
:parkingOptions =>
GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceParkingOptions.t() | nil,
:adrFormatAddress => String.t() | nil,
:priceRange => GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PriceRange.t() | nil,
:id => String.t() | nil,
:googleMapsLinks =>
GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceGoogleMapsLinks.t() | nil
Expand Down Expand Up @@ -202,6 +209,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
field(:servesCocktails)
field(:takeout)
field(:paymentOptions, as: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlacePaymentOptions)
field(:pureServiceAreaBusiness)
field(:regularOpeningHours, as: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHours)
field(:shortFormattedAddress)
field(:internationalPhoneNumber)
Expand Down Expand Up @@ -263,9 +271,16 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
field(:types, type: :list)
field(:servesCoffee)
field(:iconBackgroundColor)

field(:containingPlaces,
as: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceContainingPlace,
type: :list
)

field(:primaryTypeDisplayName, as: GoogleApi.Places.V1.Model.GoogleTypeLocalizedText)
field(:parkingOptions, as: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceParkingOptions)
field(:adrFormatAddress)
field(:priceRange, as: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PriceRange)
field(:id)
field(:googleMapsLinks, as: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceGoogleMapsLinks)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2019 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.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceContainingPlace do
@moduledoc """
Info about the place in which this place is located.

## Attributes

* `id` (*type:* `String.t`, *default:* `nil`) - The place id of the place in which this place is located.
* `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the place in which this place is located.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:id => String.t() | nil,
:name => String.t() | nil
}

field(:id)
field(:name)
end

defimpl Poison.Decoder, for: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceContainingPlace do
def decode(value, options) do
GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceContainingPlace.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceContainingPlace do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHours do

## Attributes

* `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.
* `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.
* `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.
* `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.
* `secondaryHoursType` (*type:* `String.t`, *default:* `nil`) - A type string used to identify the type of secondary hours.
Expand All @@ -31,6 +33,8 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHours do
use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:nextCloseTime => DateTime.t() | nil,
:nextOpenTime => DateTime.t() | nil,
:openNow => boolean() | nil,
:periods =>
list(GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHoursPeriod.t()) | nil,
Expand All @@ -41,6 +45,8 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHours do
:weekdayDescriptions => list(String.t()) | nil
}

field(:nextCloseTime, as: DateTime)
field(:nextOpenTime, as: DateTime)
field(:openNow)

field(:periods,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2019 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.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PriceRange do
@moduledoc """
The price range associated with a Place. `end_price` could be unset, which indicates a range without upper bound (e.g. "More than $100").

## Attributes

* `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.
* `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.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:endPrice => GoogleApi.Places.V1.Model.GoogleTypeMoney.t() | nil,
:startPrice => GoogleApi.Places.V1.Model.GoogleTypeMoney.t() | nil
}

field(:endPrice, as: GoogleApi.Places.V1.Model.GoogleTypeMoney)
field(:startPrice, as: GoogleApi.Places.V1.Model.GoogleTypeMoney)
end

defimpl Poison.Decoder, for: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PriceRange do
def decode(value, options) do
GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PriceRange.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PriceRange do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextRequest do
## Attributes

* `evOptions` (*type:* `GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextRequestEVOptions.t`, *default:* `nil`) - Optional. Set the searchable EV options of a place search request.
* `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.
* `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.
* `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.
* `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.
Expand All @@ -45,6 +46,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextRequest do
@type t :: %__MODULE__{
:evOptions =>
GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextRequestEVOptions.t() | nil,
:includePureServiceAreaBusinesses => boolean() | nil,
:includedType => String.t() | nil,
:languageCode => String.t() | nil,
:locationBias =>
Expand All @@ -70,6 +72,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextRequest do
}

field(:evOptions, as: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1SearchTextRequestEVOptions)
field(:includePureServiceAreaBusinesses)
field(:includedType)
field(:languageCode)

Expand Down
2 changes: 1 addition & 1 deletion clients/places/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.Places.Mixfile do
use Mix.Project

@version "0.9.0"
@version "0.10.0"

def project() do
[
Expand Down
Loading