diff --git a/packages/google-maps-addressvalidation/google/maps/addressvalidation/gapic_version.py b/packages/google-maps-addressvalidation/google/maps/addressvalidation/gapic_version.py index e29df836e903..20a9cd975b02 100644 --- a/packages/google-maps-addressvalidation/google/maps/addressvalidation/gapic_version.py +++ b/packages/google-maps-addressvalidation/google/maps/addressvalidation/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.3.19" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/gapic_version.py b/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/gapic_version.py index e29df836e903..20a9cd975b02 100644 --- a/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/gapic_version.py +++ b/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.3.19" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/address.py b/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/address.py index efa07c9b7db4..685540ee377e 100644 --- a/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/address.py +++ b/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/address.py @@ -37,10 +37,16 @@ class Address(proto.Message): Attributes: formatted_address (str): - The post-processed address, formatted as a - single-line address following the address - formatting rules of the region where the address - is located. + The post-processed address, formatted as a single-line + address following the address formatting rules of the region + where the address is located. + + Note: the format of this address may not match the format of + the address in the ``postal_address`` field. For example, + the ``postal_address`` always represents the country as a 2 + letter ``region_code``, such as "US" or "NZ". By contrast, + this field uses a longer form of the country name, such as + "USA" or "New Zealand". postal_address (google.type.postal_address_pb2.PostalAddress): The post-processed address represented as a postal address. @@ -58,13 +64,20 @@ class Address(proto.Message): missing_component_types (MutableSequence[str]): The types of components that were expected to be present in a correctly formatted mailing address but were not found in - the input AND could not be inferred. Components of this type - are not present in ``formatted_address``, - ``postal_address``, or ``address_components``. An example - might be ``['street_number', 'route']`` for an input like - "Boulder, Colorado, 80301, USA". The list of possible types - can be found + the input AND could not be inferred. An example might be + ``['street_number', 'route']`` for an input like "Boulder, + Colorado, 80301, USA". The list of possible types can be + found `here `__. + + **Note: you might see a missing component type when you + think you've already supplied the missing component.** For + example, this can happen when the input address contains the + building name, but not the premise number. In the address + "渋谷区渋谷3丁目 Shibuya Stream", the building name + "Shibuya Stream" has the component type ``premise``, but the + premise number is missing, so ``missing_component_types`` + will contain ``premise``. unconfirmed_component_types (MutableSequence[str]): The types of the components that are present in the ``address_components`` but could not be confirmed to be @@ -83,10 +96,10 @@ class Address(proto.Message): unresolved_tokens (MutableSequence[str]): Any tokens in the input that could not be resolved. This might be an input that was not recognized as a valid part of - an address (for example in an input like "123235253253 Main - St, San Francisco, CA, 94105", the unresolved tokens may - look like ``["123235253253"]`` since that does not look like - a valid street number. + an address. For example, for an input such as "Parcel + 0000123123 & 0000456456 Str # Guthrie Center IA 50115 US", + the unresolved tokens might look like + ``["Parcel", "0000123123", "&", "0000456456"]``. """ formatted_address: str = proto.Field( diff --git a/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/address_validation_service.py b/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/address_validation_service.py index faefdc6cc22f..5c4c35a5b578 100644 --- a/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/address_validation_service.py +++ b/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/address_validation_service.py @@ -95,22 +95,21 @@ class ValidateAddressRequest(proto.Message): string with at most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is returned. - The session begins when the user starts typing a query, and - concludes when they select a place and a call to Place - Details or Address Validation is made. Each session can have - multiple autocomplete queries, followed by one Place Details - or Address Validation request. The credentials used for each - request within a session must belong to the same Google - Cloud Console project. Once a session has concluded, the - token is no longer valid; your app must generate a fresh - token for each session. If the ``session_token`` parameter - is omitted, or if you reuse a session token, the session is - charged as if no session token was provided (each request is - billed separately). + The session begins when the user makes an Autocomplete + query, and concludes when they select a place and a call to + Place Details or Address Validation is made. Each session + can have multiple Autocomplete queries, followed by one + Place Details or Address Validation request. The credentials + used for each request within a session must belong to the + same Google Cloud Console project. Once a session has + concluded, the token is no longer valid; your app must + generate a fresh token for each session. If the + ``sessionToken`` parameter is omitted, or if you reuse a + session token, the session is charged as if no session token + was provided (each request is billed separately). Note: Address Validation can only be used in sessions with - the Autocomplete (New) API, not the old Autocomplete API. - See + the Autocomplete (New) API, not the Autocomplete API. See https://developers.google.com/maps/documentation/places/web-service/session-pricing for more details. """ @@ -287,15 +286,16 @@ class Verdict(proto.Message): For example, if the input address includes a specific apartment number, then the ``input_granularity`` here will - be ``SUB_PREMISE``. If we cannot match the apartment number - in the databases or the apartment number is invalid, the - ``validation_granularity`` will likely be ``PREMISE`` or - below. + be ``SUB_PREMISE``. If the address validation service cannot + match the apartment number in the databases or the apartment + number is invalid, the ``validation_granularity`` will + likely be ``PREMISE`` or more coarse. validation_granularity (google.maps.addressvalidation_v1.types.Verdict.Granularity): - The granularity level that the API can fully **validate** - the address to. For example, an ``validation_granularity`` - of ``PREMISE`` indicates all address components at the level - of ``PREMISE`` or more coarse can be validated. + The level of granularity for the post-processed address that + the API can fully validate. For example, a + ``validation_granularity`` of ``PREMISE`` indicates all + address components at the level of ``PREMISE`` or more + coarse can be validated. Per address component validation result can be found in [google.maps.addressvalidation.v1.Address.address_components]. @@ -313,9 +313,10 @@ class Verdict(proto.Message): ``SUB_PREMISE`` but the ``geocode_granularity`` will be ``PREMISE``. address_complete (bool): - The address is considered complete if there are no - unresolved tokens, no unexpected or missing address - components. See + The post-processed address is considered complete if there + are no unresolved tokens, no unexpected or missing address + components. If unset, indicates that the value is ``false``. + See [``missing_component_types``][google.maps.addressvalidation.v1.Address.missing_component_types], [``unresolved_tokens``][google.maps.addressvalidation.v1.Address.unresolved_tokens] or @@ -335,6 +336,10 @@ class Verdict(proto.Message): At least one address component was replaced, see [google.maps.addressvalidation.v1.Address.address_components] for details. + has_spell_corrected_components (bool): + At least one address component was spell-corrected, see + [google.maps.addressvalidation.v1.Address.address_components] + for details. """ class Granularity(proto.Enum): @@ -409,6 +414,10 @@ class Granularity(proto.Enum): proto.BOOL, number=7, ) + has_spell_corrected_components: bool = proto.Field( + proto.BOOL, + number=9, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/metadata_.py b/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/metadata_.py index 56ffd74835a7..799a3e52ae13 100644 --- a/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/metadata_.py +++ b/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/metadata_.py @@ -28,9 +28,9 @@ class AddressMetadata(proto.Message): - r"""The metadata for the address. ``metadata`` is not guaranteed to be - fully populated for every address sent to the Address Validation - API. + r"""The metadata for the post-processed address. ``metadata`` is not + guaranteed to be fully populated for every address sent to the + Address Validation API. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields diff --git a/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/usps_data.py b/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/usps_data.py index 9621884b0f7a..fbf839f1f4c7 100644 --- a/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/usps_data.py +++ b/packages/google-maps-addressvalidation/google/maps/addressvalidation_v1/types/usps_data.py @@ -250,10 +250,10 @@ class UspsData(proto.Message): - ``N``: Primary and any secondary number information failed to DPV confirm. - ``S``: Address was DPV confirmed for the primary number - only, and the secondary number information was present by - not confirmed, or a single trailing alpha on a primary - number was dropped to make a DPV match and secondary - information required. + only, and the secondary number information was present + but not confirmed, or a single trailing alpha on a + primary number was dropped to make a DPV match and + secondary information required. - ``D``: Address was DPV confirmed for the primary number only, and the secondary number information was missing. - ``R``: Address confirmed but assigned to phantom route diff --git a/packages/google-maps-addressvalidation/samples/generated_samples/snippet_metadata_google.maps.addressvalidation.v1.json b/packages/google-maps-addressvalidation/samples/generated_samples/snippet_metadata_google.maps.addressvalidation.v1.json index 7a835e63cbbf..f06f24bcc68e 100644 --- a/packages/google-maps-addressvalidation/samples/generated_samples/snippet_metadata_google.maps.addressvalidation.v1.json +++ b/packages/google-maps-addressvalidation/samples/generated_samples/snippet_metadata_google.maps.addressvalidation.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-maps-addressvalidation", - "version": "0.3.19" + "version": "0.1.0" }, "snippets": [ {