Skip to content

Commit 151842d

Browse files
feat: Automated regeneration of Places client (#13157)
Auto-created at 2025-03-14 13:13:52 +0000 using the toys pull request generator.
1 parent 6c6954b commit 151842d

File tree

4 files changed

+81
-2
lines changed

4 files changed

+81
-2
lines changed

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 "20250309"
23+
@discovery_revision "20250312"
2424

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

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
6464
* `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.
6565
* `businessStatus` (*type:* `String.t`, *default:* `nil`) - The business status for the place.
6666
* `menuForChildren` (*type:* `boolean()`, *default:* `nil`) - Place has a children's menu.
67+
* `postalAddress` (*type:* `GoogleApi.Places.V1.Model.GoogleTypePostalAddress.t`, *default:* `nil`) - The address in postal address format.
6768
* `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.
6869
* `curbsidePickup` (*type:* `boolean()`, *default:* `nil`) - Specifies if the business supports curbside pickup.
6970
* `evChargeOptions` (*type:* `GoogleApi.Places.V1.Model.GoogleMapsPlacesV1EVChargeOptions.t`, *default:* `nil`) - Information of ev charging options.
@@ -146,6 +147,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
146147
:utcOffsetMinutes => integer() | nil,
147148
:businessStatus => String.t() | nil,
148149
:menuForChildren => boolean() | nil,
150+
:postalAddress => GoogleApi.Places.V1.Model.GoogleTypePostalAddress.t() | nil,
149151
:regularSecondaryOpeningHours =>
150152
list(GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHours.t()) | nil,
151153
:curbsidePickup => boolean() | nil,
@@ -246,6 +248,7 @@ defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1Place do
246248
field(:utcOffsetMinutes)
247249
field(:businessStatus)
248250
field(:menuForChildren)
251+
field(:postalAddress, as: GoogleApi.Places.V1.Model.GoogleTypePostalAddress)
249252

250253
field(:regularSecondaryOpeningHours,
251254
as: GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceOpeningHours,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
defmodule GoogleApi.Places.V1.Model.GoogleMapsPlacesV1PlaceSubDestination do
1919
@moduledoc """
20-
Sub destinations are specific places associated with a main place. These provide more specific destinations for users who are searching for a large or complex place, like an airport, national park, university, or stadium. For example, sub destinations at an airport might include associated terminals and parking lots. Sub destinations return the place id and place resource name, which can be used in subsequent Place Details (New) requests to fetch richer details, including the sub destination's displayName and location.
20+
Sub-destinations are specific places associated with a main place. These provide more specific destinations for users who are searching inside a large or complex place, like an airport, national park, university, or stadium. For example, sub-destinations at an airport might include associated terminals and parking lots. Sub-destinations return the place ID and place resource name, which can be used in subsequent Place Details (new) requests to fetch richer details, including the sub-destination's display name and location.
2121
2222
## Attributes
2323
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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.GoogleTypePostalAddress do
19+
@moduledoc """
20+
Represents a postal address. For example for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created by user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, see: https://support.google.com/business/answer/6397478
21+
22+
## Attributes
23+
24+
* `addressLines` (*type:* `list(String.t)`, *default:* `nil`) - Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (For example "Austin, TX"), it is important that the line order is clear. The order of address lines should be "envelope order" for the country/region of the address. In places where this can vary (For example Japan), address_language is used to make it explicit (For example "ja" for large-to-small ordering and "ja-Latn" or "en" for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).
25+
* `administrativeArea` (*type:* `String.t`, *default:* `nil`) - Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (For example "Barcelona" and not "Catalonia"). Many countries don't use an administrative area in postal addresses. For example in Switzerland this should be left unpopulated.
26+
* `languageCode` (*type:* `String.t`, *default:* `nil`) - Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address' country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. If this value is not known, it should be omitted (rather than specifying a possibly incorrect default). Examples: "zh-Hant", "ja", "ja-Latn", "en".
27+
* `locality` (*type:* `String.t`, *default:* `nil`) - Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines.
28+
* `organization` (*type:* `String.t`, *default:* `nil`) - Optional. The name of the organization at the address.
29+
* `postalCode` (*type:* `String.t`, *default:* `nil`) - Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (For example state/zip validation in the U.S.A.).
30+
* `recipients` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain "care of" information.
31+
* `regionCode` (*type:* `String.t`, *default:* `nil`) - Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: "CH" for Switzerland.
32+
* `revision` (*type:* `integer()`, *default:* `nil`) - The schema revision of the `PostalAddress`. This must be set to 0, which is the latest revision. All new revisions **must** be backward compatible with old revisions.
33+
* `sortingCode` (*type:* `String.t`, *default:* `nil`) - Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like "CEDEX", optionally followed by a number (For example "CEDEX 7"), or just a number alone, representing the "sector code" (Jamaica), "delivery area indicator" (Malawi) or "post office indicator" (For example Côte d'Ivoire).
34+
* `sublocality` (*type:* `String.t`, *default:* `nil`) - Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.
35+
"""
36+
37+
use GoogleApi.Gax.ModelBase
38+
39+
@type t :: %__MODULE__{
40+
:addressLines => list(String.t()) | nil,
41+
:administrativeArea => String.t() | nil,
42+
:languageCode => String.t() | nil,
43+
:locality => String.t() | nil,
44+
:organization => String.t() | nil,
45+
:postalCode => String.t() | nil,
46+
:recipients => list(String.t()) | nil,
47+
:regionCode => String.t() | nil,
48+
:revision => integer() | nil,
49+
:sortingCode => String.t() | nil,
50+
:sublocality => String.t() | nil
51+
}
52+
53+
field(:addressLines, type: :list)
54+
field(:administrativeArea)
55+
field(:languageCode)
56+
field(:locality)
57+
field(:organization)
58+
field(:postalCode)
59+
field(:recipients, type: :list)
60+
field(:regionCode)
61+
field(:revision)
62+
field(:sortingCode)
63+
field(:sublocality)
64+
end
65+
66+
defimpl Poison.Decoder, for: GoogleApi.Places.V1.Model.GoogleTypePostalAddress do
67+
def decode(value, options) do
68+
GoogleApi.Places.V1.Model.GoogleTypePostalAddress.decode(value, options)
69+
end
70+
end
71+
72+
defimpl Poison.Encoder, for: GoogleApi.Places.V1.Model.GoogleTypePostalAddress do
73+
def encode(value, options) do
74+
GoogleApi.Gax.ModelBase.encode(value, options)
75+
end
76+
end

0 commit comments

Comments
 (0)