gestione documentale avanzata 1 parte

This commit is contained in:
2026-05-28 09:34:28 +02:00
parent 3471befb1a
commit f2b0833b90
34482 changed files with 4312269 additions and 546 deletions
@@ -0,0 +1,62 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleGeoTypeViewport extends \Google\Model
{
protected $highType = GoogleTypeLatLng::class;
protected $highDataType = '';
protected $lowType = GoogleTypeLatLng::class;
protected $lowDataType = '';
/**
* Required. The high point of the viewport.
*
* @param GoogleTypeLatLng $high
*/
public function setHigh(GoogleTypeLatLng $high)
{
$this->high = $high;
}
/**
* @return GoogleTypeLatLng
*/
public function getHigh()
{
return $this->high;
}
/**
* Required. The low point of the viewport.
*
* @param GoogleTypeLatLng $low
*/
public function setLow(GoogleTypeLatLng $low)
{
$this->low = $low;
}
/**
* @return GoogleTypeLatLng
*/
public function getLow()
{
return $this->low;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleGeoTypeViewport::class, 'Google_Service_AddressValidation_GoogleGeoTypeViewport');
@@ -0,0 +1,211 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleMapsAddressvalidationV1Address extends \Google\Collection
{
protected $collection_key = 'unresolvedTokens';
protected $addressComponentsType = GoogleMapsAddressvalidationV1AddressComponent::class;
protected $addressComponentsDataType = 'array';
/**
* 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".
*
* @var string
*/
public $formattedAddress;
/**
* 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. An example might be `['street_number', 'route']` for an input
* like "Boulder, Colorado, 80301, USA". The list of possible types can be
* found
* [here](https://developers.google.com/maps/documentation/geocoding/requests-
* geocoding#Types). **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`.
*
* @var string[]
*/
public $missingComponentTypes;
protected $postalAddressType = GoogleTypePostalAddress::class;
protected $postalAddressDataType = '';
/**
* The types of the components that are present in the `address_components`
* but could not be confirmed to be correct. This field is provided for the
* sake of convenience: its contents are equivalent to iterating through the
* `address_components` to find the types of all the components where the
* confirmation_level is not CONFIRMED or the inferred flag is not set to
* `true`. The list of possible types can be found
* [here](https://developers.google.com/maps/documentation/geocoding/requests-
* geocoding#Types).
*
* @var string[]
*/
public $unconfirmedComponentTypes;
/**
* 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, for an
* input such as "Parcel 0000123123 & 0000456456 Str # Guthrie Center IA 50115
* US", the unresolved tokens might look like `["Parcel", "0000123123", "&",
* "0000456456"]`.
*
* @var string[]
*/
public $unresolvedTokens;
/**
* Unordered list. The individual address components of the formatted and
* corrected address, along with validation information. This provides
* information on the validation status of the individual components. Address
* components are not ordered in a particular way. Do not make any assumptions
* on the ordering of the address components in the list.
*
* @param GoogleMapsAddressvalidationV1AddressComponent[] $addressComponents
*/
public function setAddressComponents($addressComponents)
{
$this->addressComponents = $addressComponents;
}
/**
* @return GoogleMapsAddressvalidationV1AddressComponent[]
*/
public function getAddressComponents()
{
return $this->addressComponents;
}
/**
* 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".
*
* @param string $formattedAddress
*/
public function setFormattedAddress($formattedAddress)
{
$this->formattedAddress = $formattedAddress;
}
/**
* @return string
*/
public function getFormattedAddress()
{
return $this->formattedAddress;
}
/**
* 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. An example might be `['street_number', 'route']` for an input
* like "Boulder, Colorado, 80301, USA". The list of possible types can be
* found
* [here](https://developers.google.com/maps/documentation/geocoding/requests-
* geocoding#Types). **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`.
*
* @param string[] $missingComponentTypes
*/
public function setMissingComponentTypes($missingComponentTypes)
{
$this->missingComponentTypes = $missingComponentTypes;
}
/**
* @return string[]
*/
public function getMissingComponentTypes()
{
return $this->missingComponentTypes;
}
/**
* The post-processed address represented as a postal address.
*
* @param GoogleTypePostalAddress $postalAddress
*/
public function setPostalAddress(GoogleTypePostalAddress $postalAddress)
{
$this->postalAddress = $postalAddress;
}
/**
* @return GoogleTypePostalAddress
*/
public function getPostalAddress()
{
return $this->postalAddress;
}
/**
* The types of the components that are present in the `address_components`
* but could not be confirmed to be correct. This field is provided for the
* sake of convenience: its contents are equivalent to iterating through the
* `address_components` to find the types of all the components where the
* confirmation_level is not CONFIRMED or the inferred flag is not set to
* `true`. The list of possible types can be found
* [here](https://developers.google.com/maps/documentation/geocoding/requests-
* geocoding#Types).
*
* @param string[] $unconfirmedComponentTypes
*/
public function setUnconfirmedComponentTypes($unconfirmedComponentTypes)
{
$this->unconfirmedComponentTypes = $unconfirmedComponentTypes;
}
/**
* @return string[]
*/
public function getUnconfirmedComponentTypes()
{
return $this->unconfirmedComponentTypes;
}
/**
* 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, for an
* input such as "Parcel 0000123123 & 0000456456 Str # Guthrie Center IA 50115
* US", the unresolved tokens might look like `["Parcel", "0000123123", "&",
* "0000456456"]`.
*
* @param string[] $unresolvedTokens
*/
public function setUnresolvedTokens($unresolvedTokens)
{
$this->unresolvedTokens = $unresolvedTokens;
}
/**
* @return string[]
*/
public function getUnresolvedTokens()
{
return $this->unresolvedTokens;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleMapsAddressvalidationV1Address::class, 'Google_Service_AddressValidation_GoogleMapsAddressvalidationV1Address');
@@ -0,0 +1,227 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleMapsAddressvalidationV1AddressComponent extends \Google\Model
{
/**
* Default value. This value is unused.
*/
public const CONFIRMATION_LEVEL_CONFIRMATION_LEVEL_UNSPECIFIED = 'CONFIRMATION_LEVEL_UNSPECIFIED';
/**
* We were able to verify that this component exists and makes sense in the
* context of the rest of the address.
*/
public const CONFIRMATION_LEVEL_CONFIRMED = 'CONFIRMED';
/**
* This component could not be confirmed, but it is plausible that it exists.
* For example, a street number within a known valid range of numbers on a
* street where specific house numbers are not known.
*/
public const CONFIRMATION_LEVEL_UNCONFIRMED_BUT_PLAUSIBLE = 'UNCONFIRMED_BUT_PLAUSIBLE';
/**
* This component was not confirmed and is likely to be wrong. For example, a
* neighborhood that does not fit the rest of the address.
*/
public const CONFIRMATION_LEVEL_UNCONFIRMED_AND_SUSPICIOUS = 'UNCONFIRMED_AND_SUSPICIOUS';
protected $componentNameType = GoogleMapsAddressvalidationV1ComponentName::class;
protected $componentNameDataType = '';
/**
* The type of the address component. See [Table 2: Additional types returned
* by the Places service](https://developers.google.com/places/web-
* service/supported_types#table2) for a list of possible types.
*
* @var string
*/
public $componentType;
/**
* Indicates the level of certainty that we have that the component is
* correct.
*
* @var string
*/
public $confirmationLevel;
/**
* Indicates that the component was not part of the input, but we inferred it
* for the address location and believe it should be provided for a complete
* address.
*
* @var bool
*/
public $inferred;
/**
* Indicates the name of the component was replaced with a completely
* different one, for example a wrong postal code being replaced with one that
* is correct for the address. This is not a cosmetic change, the input
* component has been changed to a different one.
*
* @var bool
*/
public $replaced;
/**
* Indicates a correction to a misspelling in the component name. The API does
* not always flag changes from one spelling variant to another, such as when
* changing "centre" to "center". It also does not always flag common
* misspellings, such as when changing "Amphitheater Pkwy" to "Amphitheatre
* Pkwy".
*
* @var bool
*/
public $spellCorrected;
/**
* Indicates an address component that is not expected to be present in a
* postal address for the given region. We have retained it only because it
* was part of the input.
*
* @var bool
*/
public $unexpected;
/**
* The name for this component.
*
* @param GoogleMapsAddressvalidationV1ComponentName $componentName
*/
public function setComponentName(GoogleMapsAddressvalidationV1ComponentName $componentName)
{
$this->componentName = $componentName;
}
/**
* @return GoogleMapsAddressvalidationV1ComponentName
*/
public function getComponentName()
{
return $this->componentName;
}
/**
* The type of the address component. See [Table 2: Additional types returned
* by the Places service](https://developers.google.com/places/web-
* service/supported_types#table2) for a list of possible types.
*
* @param string $componentType
*/
public function setComponentType($componentType)
{
$this->componentType = $componentType;
}
/**
* @return string
*/
public function getComponentType()
{
return $this->componentType;
}
/**
* Indicates the level of certainty that we have that the component is
* correct.
*
* Accepted values: CONFIRMATION_LEVEL_UNSPECIFIED, CONFIRMED,
* UNCONFIRMED_BUT_PLAUSIBLE, UNCONFIRMED_AND_SUSPICIOUS
*
* @param self::CONFIRMATION_LEVEL_* $confirmationLevel
*/
public function setConfirmationLevel($confirmationLevel)
{
$this->confirmationLevel = $confirmationLevel;
}
/**
* @return self::CONFIRMATION_LEVEL_*
*/
public function getConfirmationLevel()
{
return $this->confirmationLevel;
}
/**
* Indicates that the component was not part of the input, but we inferred it
* for the address location and believe it should be provided for a complete
* address.
*
* @param bool $inferred
*/
public function setInferred($inferred)
{
$this->inferred = $inferred;
}
/**
* @return bool
*/
public function getInferred()
{
return $this->inferred;
}
/**
* Indicates the name of the component was replaced with a completely
* different one, for example a wrong postal code being replaced with one that
* is correct for the address. This is not a cosmetic change, the input
* component has been changed to a different one.
*
* @param bool $replaced
*/
public function setReplaced($replaced)
{
$this->replaced = $replaced;
}
/**
* @return bool
*/
public function getReplaced()
{
return $this->replaced;
}
/**
* Indicates a correction to a misspelling in the component name. The API does
* not always flag changes from one spelling variant to another, such as when
* changing "centre" to "center". It also does not always flag common
* misspellings, such as when changing "Amphitheater Pkwy" to "Amphitheatre
* Pkwy".
*
* @param bool $spellCorrected
*/
public function setSpellCorrected($spellCorrected)
{
$this->spellCorrected = $spellCorrected;
}
/**
* @return bool
*/
public function getSpellCorrected()
{
return $this->spellCorrected;
}
/**
* Indicates an address component that is not expected to be present in a
* postal address for the given region. We have retained it only because it
* was part of the input.
*
* @param bool $unexpected
*/
public function setUnexpected($unexpected)
{
$this->unexpected = $unexpected;
}
/**
* @return bool
*/
public function getUnexpected()
{
return $this->unexpected;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleMapsAddressvalidationV1AddressComponent::class, 'Google_Service_AddressValidation_GoogleMapsAddressvalidationV1AddressComponent');
@@ -0,0 +1,98 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleMapsAddressvalidationV1AddressMetadata extends \Google\Model
{
/**
* Indicates that this is the address of a business. If unset, indicates that
* the value is unknown.
*
* @var bool
*/
public $business;
/**
* Indicates that the address of a PO box. If unset, indicates that the value
* is unknown.
*
* @var bool
*/
public $poBox;
/**
* Indicates that this is the address of a residence. If unset, indicates that
* the value is unknown.
*
* @var bool
*/
public $residential;
/**
* Indicates that this is the address of a business. If unset, indicates that
* the value is unknown.
*
* @param bool $business
*/
public function setBusiness($business)
{
$this->business = $business;
}
/**
* @return bool
*/
public function getBusiness()
{
return $this->business;
}
/**
* Indicates that the address of a PO box. If unset, indicates that the value
* is unknown.
*
* @param bool $poBox
*/
public function setPoBox($poBox)
{
$this->poBox = $poBox;
}
/**
* @return bool
*/
public function getPoBox()
{
return $this->poBox;
}
/**
* Indicates that this is the address of a residence. If unset, indicates that
* the value is unknown.
*
* @param bool $residential
*/
public function setResidential($residential)
{
$this->residential = $residential;
}
/**
* @return bool
*/
public function getResidential()
{
return $this->residential;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleMapsAddressvalidationV1AddressMetadata::class, 'Google_Service_AddressValidation_GoogleMapsAddressvalidationV1AddressMetadata');
@@ -0,0 +1,74 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleMapsAddressvalidationV1ComponentName extends \Google\Model
{
/**
* The BCP-47 language code. This will not be present if the component name is
* not associated with a language, such as a street number.
*
* @var string
*/
public $languageCode;
/**
* The name text. For example, "5th Avenue" for a street name or "1253" for a
* street number.
*
* @var string
*/
public $text;
/**
* The BCP-47 language code. This will not be present if the component name is
* not associated with a language, such as a street number.
*
* @param string $languageCode
*/
public function setLanguageCode($languageCode)
{
$this->languageCode = $languageCode;
}
/**
* @return string
*/
public function getLanguageCode()
{
return $this->languageCode;
}
/**
* The name text. For example, "5th Avenue" for a street name or "1253" for a
* street number.
*
* @param string $text
*/
public function setText($text)
{
$this->text = $text;
}
/**
* @return string
*/
public function getText()
{
return $this->text;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleMapsAddressvalidationV1ComponentName::class, 'Google_Service_AddressValidation_GoogleMapsAddressvalidationV1ComponentName');
@@ -0,0 +1,170 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleMapsAddressvalidationV1Geocode extends \Google\Collection
{
protected $collection_key = 'placeTypes';
protected $boundsType = GoogleGeoTypeViewport::class;
protected $boundsDataType = '';
/**
* The size of the geocoded place, in meters. This is another measure of the
* coarseness of the geocoded location, but in physical size rather than in
* semantic meaning.
*
* @var float
*/
public $featureSizeMeters;
protected $locationType = GoogleTypeLatLng::class;
protected $locationDataType = '';
/**
* The PlaceID of the place this input geocodes to. For more information about
* Place IDs see
* [here](https://developers.google.com/maps/documentation/places/web-
* service/place-id).
*
* @var string
*/
public $placeId;
/**
* The type(s) of place that the input geocoded to. For example, `['locality',
* 'political']`. The full list of types can be found
* [here](https://developers.google.com/maps/documentation/geocoding/requests-
* geocoding#Types).
*
* @var string[]
*/
public $placeTypes;
protected $plusCodeType = GoogleMapsAddressvalidationV1PlusCode::class;
protected $plusCodeDataType = '';
/**
* The bounds of the geocoded place.
*
* @param GoogleGeoTypeViewport $bounds
*/
public function setBounds(GoogleGeoTypeViewport $bounds)
{
$this->bounds = $bounds;
}
/**
* @return GoogleGeoTypeViewport
*/
public function getBounds()
{
return $this->bounds;
}
/**
* The size of the geocoded place, in meters. This is another measure of the
* coarseness of the geocoded location, but in physical size rather than in
* semantic meaning.
*
* @param float $featureSizeMeters
*/
public function setFeatureSizeMeters($featureSizeMeters)
{
$this->featureSizeMeters = $featureSizeMeters;
}
/**
* @return float
*/
public function getFeatureSizeMeters()
{
return $this->featureSizeMeters;
}
/**
* The geocoded location of the input. Using place IDs is preferred over using
* addresses, latitude/longitude coordinates, or plus codes. Using coordinates
* when routing or calculating driving directions will always result in the
* point being snapped to the road nearest to those coordinates. This may not
* be a road that will quickly or safely lead to the destination and may not
* be near an access point to the property. Additionally, when a location is
* reverse geocoded, there is no guarantee that the returned address will
* match the original.
*
* @param GoogleTypeLatLng $location
*/
public function setLocation(GoogleTypeLatLng $location)
{
$this->location = $location;
}
/**
* @return GoogleTypeLatLng
*/
public function getLocation()
{
return $this->location;
}
/**
* The PlaceID of the place this input geocodes to. For more information about
* Place IDs see
* [here](https://developers.google.com/maps/documentation/places/web-
* service/place-id).
*
* @param string $placeId
*/
public function setPlaceId($placeId)
{
$this->placeId = $placeId;
}
/**
* @return string
*/
public function getPlaceId()
{
return $this->placeId;
}
/**
* The type(s) of place that the input geocoded to. For example, `['locality',
* 'political']`. The full list of types can be found
* [here](https://developers.google.com/maps/documentation/geocoding/requests-
* geocoding#Types).
*
* @param string[] $placeTypes
*/
public function setPlaceTypes($placeTypes)
{
$this->placeTypes = $placeTypes;
}
/**
* @return string[]
*/
public function getPlaceTypes()
{
return $this->placeTypes;
}
/**
* The plus code corresponding to the `location`.
*
* @param GoogleMapsAddressvalidationV1PlusCode $plusCode
*/
public function setPlusCode(GoogleMapsAddressvalidationV1PlusCode $plusCode)
{
$this->plusCode = $plusCode;
}
/**
* @return GoogleMapsAddressvalidationV1PlusCode
*/
public function getPlusCode()
{
return $this->plusCode;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleMapsAddressvalidationV1Geocode::class, 'Google_Service_AddressValidation_GoogleMapsAddressvalidationV1Geocode');
@@ -0,0 +1,54 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleMapsAddressvalidationV1LanguageOptions extends \Google\Model
{
/**
* Preview: Return a [google.maps.addressvalidation.v1.Address] in English.
* See
* [google.maps.addressvalidation.v1.ValidationResult.english_latin_address]
* for details.
*
* @var bool
*/
public $returnEnglishLatinAddress;
/**
* Preview: Return a [google.maps.addressvalidation.v1.Address] in English.
* See
* [google.maps.addressvalidation.v1.ValidationResult.english_latin_address]
* for details.
*
* @param bool $returnEnglishLatinAddress
*/
public function setReturnEnglishLatinAddress($returnEnglishLatinAddress)
{
$this->returnEnglishLatinAddress = $returnEnglishLatinAddress;
}
/**
* @return bool
*/
public function getReturnEnglishLatinAddress()
{
return $this->returnEnglishLatinAddress;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleMapsAddressvalidationV1LanguageOptions::class, 'Google_Service_AddressValidation_GoogleMapsAddressvalidationV1LanguageOptions');
@@ -0,0 +1,76 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleMapsAddressvalidationV1PlusCode extends \Google\Model
{
/**
* Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing the
* suffix of the global code and replacing the prefix with a formatted name of
* a reference entity.
*
* @var string
*/
public $compoundCode;
/**
* Place's global (full) code, such as "9FWM33GV+HQ", representing an 1/8000
* by 1/8000 degree area (~14 by 14 meters).
*
* @var string
*/
public $globalCode;
/**
* Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing the
* suffix of the global code and replacing the prefix with a formatted name of
* a reference entity.
*
* @param string $compoundCode
*/
public function setCompoundCode($compoundCode)
{
$this->compoundCode = $compoundCode;
}
/**
* @return string
*/
public function getCompoundCode()
{
return $this->compoundCode;
}
/**
* Place's global (full) code, such as "9FWM33GV+HQ", representing an 1/8000
* by 1/8000 degree area (~14 by 14 meters).
*
* @param string $globalCode
*/
public function setGlobalCode($globalCode)
{
$this->globalCode = $globalCode;
}
/**
* @return string
*/
public function getGlobalCode()
{
return $this->globalCode;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleMapsAddressvalidationV1PlusCode::class, 'Google_Service_AddressValidation_GoogleMapsAddressvalidationV1PlusCode');
@@ -0,0 +1,106 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleMapsAddressvalidationV1ProvideValidationFeedbackRequest extends \Google\Model
{
/**
* This value is unused. If the `ProvideValidationFeedbackRequest.conclusion`
* field is set to `VALIDATION_CONCLUSION_UNSPECIFIED`, an `INVALID_ARGUMENT`
* error will be returned.
*/
public const CONCLUSION_VALIDATION_CONCLUSION_UNSPECIFIED = 'VALIDATION_CONCLUSION_UNSPECIFIED';
/**
* The version of the address returned by the Address Validation API was used
* for the transaction.
*/
public const CONCLUSION_VALIDATED_VERSION_USED = 'VALIDATED_VERSION_USED';
/**
* The version of the address provided by the user was used for the
* transaction
*/
public const CONCLUSION_USER_VERSION_USED = 'USER_VERSION_USED';
/**
* A version of the address that was entered after the last validation attempt
* but that was not re-validated was used for the transaction.
*/
public const CONCLUSION_UNVALIDATED_VERSION_USED = 'UNVALIDATED_VERSION_USED';
/**
* The transaction was abandoned and the address was not used.
*/
public const CONCLUSION_UNUSED = 'UNUSED';
/**
* Required. The outcome of the sequence of validation attempts. If this field
* is set to `VALIDATION_CONCLUSION_UNSPECIFIED`, an `INVALID_ARGUMENT` error
* will be returned.
*
* @var string
*/
public $conclusion;
/**
* Required. The ID of the response that this feedback is for. This should be
* the response_id from the first response in a series of address validation
* attempts.
*
* @var string
*/
public $responseId;
/**
* Required. The outcome of the sequence of validation attempts. If this field
* is set to `VALIDATION_CONCLUSION_UNSPECIFIED`, an `INVALID_ARGUMENT` error
* will be returned.
*
* Accepted values: VALIDATION_CONCLUSION_UNSPECIFIED, VALIDATED_VERSION_USED,
* USER_VERSION_USED, UNVALIDATED_VERSION_USED, UNUSED
*
* @param self::CONCLUSION_* $conclusion
*/
public function setConclusion($conclusion)
{
$this->conclusion = $conclusion;
}
/**
* @return self::CONCLUSION_*
*/
public function getConclusion()
{
return $this->conclusion;
}
/**
* Required. The ID of the response that this feedback is for. This should be
* the response_id from the first response in a series of address validation
* attempts.
*
* @param string $responseId
*/
public function setResponseId($responseId)
{
$this->responseId = $responseId;
}
/**
* @return string
*/
public function getResponseId()
{
return $this->responseId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleMapsAddressvalidationV1ProvideValidationFeedbackRequest::class, 'Google_Service_AddressValidation_GoogleMapsAddressvalidationV1ProvideValidationFeedbackRequest');
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleMapsAddressvalidationV1ProvideValidationFeedbackResponse extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleMapsAddressvalidationV1ProvideValidationFeedbackResponse::class, 'Google_Service_AddressValidation_GoogleMapsAddressvalidationV1ProvideValidationFeedbackResponse');
@@ -0,0 +1,224 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleMapsAddressvalidationV1UspsAddress extends \Google\Model
{
/**
* City name.
*
* @var string
*/
public $city;
/**
* City + state + postal code.
*
* @var string
*/
public $cityStateZipAddressLine;
/**
* Firm name.
*
* @var string
*/
public $firm;
/**
* First address line.
*
* @var string
*/
public $firstAddressLine;
/**
* Second address line.
*
* @var string
*/
public $secondAddressLine;
/**
* 2 letter state code.
*
* @var string
*/
public $state;
/**
* Puerto Rican urbanization name.
*
* @var string
*/
public $urbanization;
/**
* Postal code e.g. 10009.
*
* @var string
*/
public $zipCode;
/**
* 4-digit postal code extension e.g. 5023.
*
* @var string
*/
public $zipCodeExtension;
/**
* City name.
*
* @param string $city
*/
public function setCity($city)
{
$this->city = $city;
}
/**
* @return string
*/
public function getCity()
{
return $this->city;
}
/**
* City + state + postal code.
*
* @param string $cityStateZipAddressLine
*/
public function setCityStateZipAddressLine($cityStateZipAddressLine)
{
$this->cityStateZipAddressLine = $cityStateZipAddressLine;
}
/**
* @return string
*/
public function getCityStateZipAddressLine()
{
return $this->cityStateZipAddressLine;
}
/**
* Firm name.
*
* @param string $firm
*/
public function setFirm($firm)
{
$this->firm = $firm;
}
/**
* @return string
*/
public function getFirm()
{
return $this->firm;
}
/**
* First address line.
*
* @param string $firstAddressLine
*/
public function setFirstAddressLine($firstAddressLine)
{
$this->firstAddressLine = $firstAddressLine;
}
/**
* @return string
*/
public function getFirstAddressLine()
{
return $this->firstAddressLine;
}
/**
* Second address line.
*
* @param string $secondAddressLine
*/
public function setSecondAddressLine($secondAddressLine)
{
$this->secondAddressLine = $secondAddressLine;
}
/**
* @return string
*/
public function getSecondAddressLine()
{
return $this->secondAddressLine;
}
/**
* 2 letter state code.
*
* @param string $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return string
*/
public function getState()
{
return $this->state;
}
/**
* Puerto Rican urbanization name.
*
* @param string $urbanization
*/
public function setUrbanization($urbanization)
{
$this->urbanization = $urbanization;
}
/**
* @return string
*/
public function getUrbanization()
{
return $this->urbanization;
}
/**
* Postal code e.g. 10009.
*
* @param string $zipCode
*/
public function setZipCode($zipCode)
{
$this->zipCode = $zipCode;
}
/**
* @return string
*/
public function getZipCode()
{
return $this->zipCode;
}
/**
* 4-digit postal code extension e.g. 5023.
*
* @param string $zipCodeExtension
*/
public function setZipCodeExtension($zipCodeExtension)
{
$this->zipCodeExtension = $zipCodeExtension;
}
/**
* @return string
*/
public function getZipCodeExtension()
{
return $this->zipCodeExtension;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleMapsAddressvalidationV1UspsAddress::class, 'Google_Service_AddressValidation_GoogleMapsAddressvalidationV1UspsAddress');
@@ -0,0 +1,203 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleMapsAddressvalidationV1ValidateAddressRequest extends \Google\Model
{
protected $addressType = GoogleTypePostalAddress::class;
protected $addressDataType = '';
/**
* Enables USPS CASS compatible mode. This affects _only_ the
* [google.maps.addressvalidation.v1.ValidationResult.usps_data] field of
* [google.maps.addressvalidation.v1.ValidationResult]. Note: for USPS CASS
* enabled requests for addresses in Puerto Rico, a
* [google.type.PostalAddress.region_code] of the `address` must be provided
* as "PR", or an [google.type.PostalAddress.administrative_area] of the
* `address` must be provided as "Puerto Rico" (case-insensitive) or "PR".
* It's recommended to use a componentized `address`, or alternatively specify
* at least two [google.type.PostalAddress.address_lines] where the first line
* contains the street number and name and the second line contains the city,
* state, and zip code.
*
* @var bool
*/
public $enableUspsCass;
protected $languageOptionsType = GoogleMapsAddressvalidationV1LanguageOptions::class;
protected $languageOptionsDataType = '';
/**
* This field must be empty for the first address validation request. If more
* requests are necessary to fully validate a single address (for example if
* the changes the user makes after the initial validation need to be re-
* validated), then each followup request must populate this field with the
* response_id from the very first response in the validation sequence.
*
* @var string
*/
public $previousResponseId;
/**
* Optional. A string which identifies an Autocomplete session for billing
* purposes. Must be a URL and filename safe base64 string with at most 36
* ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
* returned. 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 Autocomplete API. See
* https://developers.google.com/maps/documentation/places/web-
* service/session-pricing for more details.
*
* @var string
*/
public $sessionToken;
/**
* Required. The address being validated. Unformatted addresses should be
* submitted via `address_lines`. The total length of the fields in this input
* must not exceed 280 characters. Supported regions can be found
* [here](https://developers.google.com/maps/documentation/address-
* validation/coverage). The language_code value in the input address is
* reserved for future uses and is ignored today. The validated address result
* will be populated based on the preferred language for the given address, as
* identified by the system. The Address Validation API ignores the values in
* recipients and organization. Any values in those fields will be discarded
* and not returned. Please do not set them.
*
* @param GoogleTypePostalAddress $address
*/
public function setAddress(GoogleTypePostalAddress $address)
{
$this->address = $address;
}
/**
* @return GoogleTypePostalAddress
*/
public function getAddress()
{
return $this->address;
}
/**
* Enables USPS CASS compatible mode. This affects _only_ the
* [google.maps.addressvalidation.v1.ValidationResult.usps_data] field of
* [google.maps.addressvalidation.v1.ValidationResult]. Note: for USPS CASS
* enabled requests for addresses in Puerto Rico, a
* [google.type.PostalAddress.region_code] of the `address` must be provided
* as "PR", or an [google.type.PostalAddress.administrative_area] of the
* `address` must be provided as "Puerto Rico" (case-insensitive) or "PR".
* It's recommended to use a componentized `address`, or alternatively specify
* at least two [google.type.PostalAddress.address_lines] where the first line
* contains the street number and name and the second line contains the city,
* state, and zip code.
*
* @param bool $enableUspsCass
*/
public function setEnableUspsCass($enableUspsCass)
{
$this->enableUspsCass = $enableUspsCass;
}
/**
* @return bool
*/
public function getEnableUspsCass()
{
return $this->enableUspsCass;
}
/**
* Optional. Preview: This feature is in Preview (pre-GA). Pre-GA products and
* features might have limited support, and changes to pre-GA products and
* features might not be compatible with other pre-GA versions. Pre-GA
* Offerings are covered by the [Google Maps Platform Service Specific
* Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
* For more information, see the [launch stage
* descriptions](https://developers.google.com/maps/launch-stages). Enables
* the Address Validation API to include additional information in the
* response.
*
* @param GoogleMapsAddressvalidationV1LanguageOptions $languageOptions
*/
public function setLanguageOptions(GoogleMapsAddressvalidationV1LanguageOptions $languageOptions)
{
$this->languageOptions = $languageOptions;
}
/**
* @return GoogleMapsAddressvalidationV1LanguageOptions
*/
public function getLanguageOptions()
{
return $this->languageOptions;
}
/**
* This field must be empty for the first address validation request. If more
* requests are necessary to fully validate a single address (for example if
* the changes the user makes after the initial validation need to be re-
* validated), then each followup request must populate this field with the
* response_id from the very first response in the validation sequence.
*
* @param string $previousResponseId
*/
public function setPreviousResponseId($previousResponseId)
{
$this->previousResponseId = $previousResponseId;
}
/**
* @return string
*/
public function getPreviousResponseId()
{
return $this->previousResponseId;
}
/**
* Optional. A string which identifies an Autocomplete session for billing
* purposes. Must be a URL and filename safe base64 string with at most 36
* ASCII characters in length. Otherwise an INVALID_ARGUMENT error is
* returned. 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 Autocomplete API. See
* https://developers.google.com/maps/documentation/places/web-
* service/session-pricing for more details.
*
* @param string $sessionToken
*/
public function setSessionToken($sessionToken)
{
$this->sessionToken = $sessionToken;
}
/**
* @return string
*/
public function getSessionToken()
{
return $this->sessionToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleMapsAddressvalidationV1ValidateAddressRequest::class, 'Google_Service_AddressValidation_GoogleMapsAddressvalidationV1ValidateAddressRequest');
@@ -0,0 +1,68 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleMapsAddressvalidationV1ValidateAddressResponse extends \Google\Model
{
/**
* The UUID that identifies this response. If the address needs to be re-
* validated, this UUID *must* accompany the new request.
*
* @var string
*/
public $responseId;
protected $resultType = GoogleMapsAddressvalidationV1ValidationResult::class;
protected $resultDataType = '';
/**
* The UUID that identifies this response. If the address needs to be re-
* validated, this UUID *must* accompany the new request.
*
* @param string $responseId
*/
public function setResponseId($responseId)
{
$this->responseId = $responseId;
}
/**
* @return string
*/
public function getResponseId()
{
return $this->responseId;
}
/**
* The result of the address validation.
*
* @param GoogleMapsAddressvalidationV1ValidationResult $result
*/
public function setResult(GoogleMapsAddressvalidationV1ValidationResult $result)
{
$this->result = $result;
}
/**
* @return GoogleMapsAddressvalidationV1ValidationResult
*/
public function getResult()
{
return $this->result;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleMapsAddressvalidationV1ValidateAddressResponse::class, 'Google_Service_AddressValidation_GoogleMapsAddressvalidationV1ValidateAddressResponse');
@@ -0,0 +1,159 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleMapsAddressvalidationV1ValidationResult extends \Google\Model
{
protected $addressType = GoogleMapsAddressvalidationV1Address::class;
protected $addressDataType = '';
protected $englishLatinAddressType = GoogleMapsAddressvalidationV1Address::class;
protected $englishLatinAddressDataType = '';
protected $geocodeType = GoogleMapsAddressvalidationV1Geocode::class;
protected $geocodeDataType = '';
protected $metadataType = GoogleMapsAddressvalidationV1AddressMetadata::class;
protected $metadataDataType = '';
protected $uspsDataType = GoogleMapsAddressvalidationV1UspsData::class;
protected $uspsDataDataType = '';
protected $verdictType = GoogleMapsAddressvalidationV1Verdict::class;
protected $verdictDataType = '';
/**
* Information about the address itself as opposed to the geocode.
*
* @param GoogleMapsAddressvalidationV1Address $address
*/
public function setAddress(GoogleMapsAddressvalidationV1Address $address)
{
$this->address = $address;
}
/**
* @return GoogleMapsAddressvalidationV1Address
*/
public function getAddress()
{
return $this->address;
}
/**
* Preview: This feature is in Preview (pre-GA). Pre-GA products and features
* might have limited support, and changes to pre-GA products and features
* might not be compatible with other pre-GA versions. Pre-GA Offerings are
* covered by the [Google Maps Platform Service Specific
* Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
* For more information, see the [launch stage
* descriptions](https://developers.google.com/maps/launch-stages). The
* address translated to English. Translated addresses are not reusable as API
* input. The service provides them so that the user can use their native
* language to confirm or deny the validation of the originally-provided
* address. If part of the address doesn't have an English translation, the
* service returns that part in an alternate language that uses a Latin
* script. See
* [here](https://developers.google.com/maps/documentation/address-
* validation/convert-addresses-english) for an explanation of how the
* alternate language is selected. If part of the address doesn't have any
* translations or transliterations in a language that uses a Latin script,
* the service returns that part in the local language associated with the
* address. Enable this output by using the [google.maps.addressvalidation.v1.
* LanguageOptions.return_english_latin_address] flag. Note: the
* [google.maps.addressvalidation.v1.Address.unconfirmed_component_types]
* field in the `english_latin_address` and the
* [google.maps.addressvalidation.v1.AddressComponent.confirmation_level]
* fields in `english_latin_address.address_components` are not populated.
*
* @param GoogleMapsAddressvalidationV1Address $englishLatinAddress
*/
public function setEnglishLatinAddress(GoogleMapsAddressvalidationV1Address $englishLatinAddress)
{
$this->englishLatinAddress = $englishLatinAddress;
}
/**
* @return GoogleMapsAddressvalidationV1Address
*/
public function getEnglishLatinAddress()
{
return $this->englishLatinAddress;
}
/**
* Information about the location and place that the address geocoded to.
*
* @param GoogleMapsAddressvalidationV1Geocode $geocode
*/
public function setGeocode(GoogleMapsAddressvalidationV1Geocode $geocode)
{
$this->geocode = $geocode;
}
/**
* @return GoogleMapsAddressvalidationV1Geocode
*/
public function getGeocode()
{
return $this->geocode;
}
/**
* Other information relevant to deliverability. `metadata` is not guaranteed
* to be fully populated for every address sent to the Address Validation API.
*
* @param GoogleMapsAddressvalidationV1AddressMetadata $metadata
*/
public function setMetadata(GoogleMapsAddressvalidationV1AddressMetadata $metadata)
{
$this->metadata = $metadata;
}
/**
* @return GoogleMapsAddressvalidationV1AddressMetadata
*/
public function getMetadata()
{
return $this->metadata;
}
/**
* Extra deliverability flags provided by USPS. Only provided in region `US`
* and `PR`.
*
* @param GoogleMapsAddressvalidationV1UspsData $uspsData
*/
public function setUspsData(GoogleMapsAddressvalidationV1UspsData $uspsData)
{
$this->uspsData = $uspsData;
}
/**
* @return GoogleMapsAddressvalidationV1UspsData
*/
public function getUspsData()
{
return $this->uspsData;
}
/**
* Overall verdict flags
*
* @param GoogleMapsAddressvalidationV1Verdict $verdict
*/
public function setVerdict(GoogleMapsAddressvalidationV1Verdict $verdict)
{
$this->verdict = $verdict;
}
/**
* @return GoogleMapsAddressvalidationV1Verdict
*/
public function getVerdict()
{
return $this->verdict;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleMapsAddressvalidationV1ValidationResult::class, 'Google_Service_AddressValidation_GoogleMapsAddressvalidationV1ValidationResult');
@@ -0,0 +1,436 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleMapsAddressvalidationV1Verdict extends \Google\Model
{
/**
* Default value. This value is unused.
*/
public const GEOCODE_GRANULARITY_GRANULARITY_UNSPECIFIED = 'GRANULARITY_UNSPECIFIED';
/**
* Below-building level result, such as an apartment.
*/
public const GEOCODE_GRANULARITY_SUB_PREMISE = 'SUB_PREMISE';
/**
* Building-level result.
*/
public const GEOCODE_GRANULARITY_PREMISE = 'PREMISE';
/**
* A geocode that approximates the building-level location of the address.
*/
public const GEOCODE_GRANULARITY_PREMISE_PROXIMITY = 'PREMISE_PROXIMITY';
/**
* The address or geocode indicates a block. Only used in regions which have
* block-level addressing, such as Japan.
*/
public const GEOCODE_GRANULARITY_BLOCK = 'BLOCK';
/**
* The geocode or address is granular to route, such as a street, road, or
* highway.
*/
public const GEOCODE_GRANULARITY_ROUTE = 'ROUTE';
/**
* All other granularities, which are bucketed together since they are not
* deliverable.
*/
public const GEOCODE_GRANULARITY_OTHER = 'OTHER';
/**
* Default value. This value is unused.
*/
public const INPUT_GRANULARITY_GRANULARITY_UNSPECIFIED = 'GRANULARITY_UNSPECIFIED';
/**
* Below-building level result, such as an apartment.
*/
public const INPUT_GRANULARITY_SUB_PREMISE = 'SUB_PREMISE';
/**
* Building-level result.
*/
public const INPUT_GRANULARITY_PREMISE = 'PREMISE';
/**
* A geocode that approximates the building-level location of the address.
*/
public const INPUT_GRANULARITY_PREMISE_PROXIMITY = 'PREMISE_PROXIMITY';
/**
* The address or geocode indicates a block. Only used in regions which have
* block-level addressing, such as Japan.
*/
public const INPUT_GRANULARITY_BLOCK = 'BLOCK';
/**
* The geocode or address is granular to route, such as a street, road, or
* highway.
*/
public const INPUT_GRANULARITY_ROUTE = 'ROUTE';
/**
* All other granularities, which are bucketed together since they are not
* deliverable.
*/
public const INPUT_GRANULARITY_OTHER = 'OTHER';
/**
* Default value. This value is unused.
*/
public const POSSIBLE_NEXT_ACTION_POSSIBLE_NEXT_ACTION_UNSPECIFIED = 'POSSIBLE_NEXT_ACTION_UNSPECIFIED';
/**
* One or more fields of the API response indicate a potential issue with the
* post-processed address, for example the `verdict.validation_granularity` is
* `OTHER`. Prompting your customer to edit the address could help improve the
* quality of the address.
*/
public const POSSIBLE_NEXT_ACTION_FIX = 'FIX';
/**
* The API response indicates the post-processed address might be missing a
* subpremises. Prompting your customer to review the address and consider
* adding a unit number could help improve the quality of the address. The
* post-processed address might also have other minor issues. Note: this enum
* value can only be returned for US addresses.
*/
public const POSSIBLE_NEXT_ACTION_CONFIRM_ADD_SUBPREMISES = 'CONFIRM_ADD_SUBPREMISES';
/**
* One or more fields of the API response indicate potential minor issues with
* the post-processed address, for example the `postal_code` address component
* was `replaced`. Prompting your customer to review the address could help
* improve the quality of the address.
*/
public const POSSIBLE_NEXT_ACTION_CONFIRM = 'CONFIRM';
/**
* The API response does not contain signals that warrant one of the other
* PossibleNextAction values. You might consider using the post-processed
* address without further prompting your customer, though this does not
* guarantee the address is valid, and the address might still contain
* corrections. It is your responsibility to determine if and how to prompt
* your customer, depending on your own risk assessment.
*/
public const POSSIBLE_NEXT_ACTION_ACCEPT = 'ACCEPT';
/**
* Default value. This value is unused.
*/
public const VALIDATION_GRANULARITY_GRANULARITY_UNSPECIFIED = 'GRANULARITY_UNSPECIFIED';
/**
* Below-building level result, such as an apartment.
*/
public const VALIDATION_GRANULARITY_SUB_PREMISE = 'SUB_PREMISE';
/**
* Building-level result.
*/
public const VALIDATION_GRANULARITY_PREMISE = 'PREMISE';
/**
* A geocode that approximates the building-level location of the address.
*/
public const VALIDATION_GRANULARITY_PREMISE_PROXIMITY = 'PREMISE_PROXIMITY';
/**
* The address or geocode indicates a block. Only used in regions which have
* block-level addressing, such as Japan.
*/
public const VALIDATION_GRANULARITY_BLOCK = 'BLOCK';
/**
* The geocode or address is granular to route, such as a street, road, or
* highway.
*/
public const VALIDATION_GRANULARITY_ROUTE = 'ROUTE';
/**
* All other granularities, which are bucketed together since they are not
* deliverable.
*/
public const VALIDATION_GRANULARITY_OTHER = 'OTHER';
/**
* 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`,
* `unresolved_tokens` or `unexpected` fields for more details.
*
* @var bool
*/
public $addressComplete;
/**
* Information about the granularity of the `geocode`. This can be understood
* as the semantic meaning of how coarse or fine the geocoded location is.
* This can differ from the `validation_granularity` above occasionally. For
* example, our database might record the existence of an apartment number but
* do not have a precise location for the apartment within a big apartment
* complex. In that case, the `validation_granularity` will be `SUB_PREMISE`
* but the `geocode_granularity` will be `PREMISE`.
*
* @var string
*/
public $geocodeGranularity;
/**
* At least one address component was inferred (added) that wasn't in the
* input, see [google.maps.addressvalidation.v1.Address.address_components]
* for details.
*
* @var bool
*/
public $hasInferredComponents;
/**
* At least one address component was replaced, see
* [google.maps.addressvalidation.v1.Address.address_components] for details.
*
* @var bool
*/
public $hasReplacedComponents;
/**
* At least one address component was spell-corrected, see
* [google.maps.addressvalidation.v1.Address.address_components] for details.
*
* @var bool
*/
public $hasSpellCorrectedComponents;
/**
* At least one address component cannot be categorized or validated, see
* [google.maps.addressvalidation.v1.Address.address_components] for details.
*
* @var bool
*/
public $hasUnconfirmedComponents;
/**
* The granularity of the **input** address. This is the result of parsing the
* input address and does not give any validation signals. For validation
* signals, refer to `validation_granularity` below. For example, if the input
* address includes a specific apartment number, then the `input_granularity`
* here will 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.
*
* @var string
*/
public $inputGranularity;
/**
* Preview: This feature is in Preview (pre-GA). Pre-GA products and features
* might have limited support, and changes to pre-GA products and features
* might not be compatible with other pre-GA versions. Pre-GA Offerings are
* covered by the [Google Maps Platform Service Specific
* Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
* For more information, see the [launch stage
* descriptions](https://developers.google.com/maps/launch-stages). Offers an
* interpretive summary of the API response, intended to assist in determining
* a potential subsequent action to take. This field is derived from other
* fields in the API response and should not be considered as a guarantee of
* address accuracy or deliverability. See [Build your validation
* logic](https://developers.google.com/maps/documentation/address-
* validation/build-validation-logic) for more details.
*
* @var string
*/
public $possibleNextAction;
/**
* 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].
*
* @var string
*/
public $validationGranularity;
/**
* 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`,
* `unresolved_tokens` or `unexpected` fields for more details.
*
* @param bool $addressComplete
*/
public function setAddressComplete($addressComplete)
{
$this->addressComplete = $addressComplete;
}
/**
* @return bool
*/
public function getAddressComplete()
{
return $this->addressComplete;
}
/**
* Information about the granularity of the `geocode`. This can be understood
* as the semantic meaning of how coarse or fine the geocoded location is.
* This can differ from the `validation_granularity` above occasionally. For
* example, our database might record the existence of an apartment number but
* do not have a precise location for the apartment within a big apartment
* complex. In that case, the `validation_granularity` will be `SUB_PREMISE`
* but the `geocode_granularity` will be `PREMISE`.
*
* Accepted values: GRANULARITY_UNSPECIFIED, SUB_PREMISE, PREMISE,
* PREMISE_PROXIMITY, BLOCK, ROUTE, OTHER
*
* @param self::GEOCODE_GRANULARITY_* $geocodeGranularity
*/
public function setGeocodeGranularity($geocodeGranularity)
{
$this->geocodeGranularity = $geocodeGranularity;
}
/**
* @return self::GEOCODE_GRANULARITY_*
*/
public function getGeocodeGranularity()
{
return $this->geocodeGranularity;
}
/**
* At least one address component was inferred (added) that wasn't in the
* input, see [google.maps.addressvalidation.v1.Address.address_components]
* for details.
*
* @param bool $hasInferredComponents
*/
public function setHasInferredComponents($hasInferredComponents)
{
$this->hasInferredComponents = $hasInferredComponents;
}
/**
* @return bool
*/
public function getHasInferredComponents()
{
return $this->hasInferredComponents;
}
/**
* At least one address component was replaced, see
* [google.maps.addressvalidation.v1.Address.address_components] for details.
*
* @param bool $hasReplacedComponents
*/
public function setHasReplacedComponents($hasReplacedComponents)
{
$this->hasReplacedComponents = $hasReplacedComponents;
}
/**
* @return bool
*/
public function getHasReplacedComponents()
{
return $this->hasReplacedComponents;
}
/**
* At least one address component was spell-corrected, see
* [google.maps.addressvalidation.v1.Address.address_components] for details.
*
* @param bool $hasSpellCorrectedComponents
*/
public function setHasSpellCorrectedComponents($hasSpellCorrectedComponents)
{
$this->hasSpellCorrectedComponents = $hasSpellCorrectedComponents;
}
/**
* @return bool
*/
public function getHasSpellCorrectedComponents()
{
return $this->hasSpellCorrectedComponents;
}
/**
* At least one address component cannot be categorized or validated, see
* [google.maps.addressvalidation.v1.Address.address_components] for details.
*
* @param bool $hasUnconfirmedComponents
*/
public function setHasUnconfirmedComponents($hasUnconfirmedComponents)
{
$this->hasUnconfirmedComponents = $hasUnconfirmedComponents;
}
/**
* @return bool
*/
public function getHasUnconfirmedComponents()
{
return $this->hasUnconfirmedComponents;
}
/**
* The granularity of the **input** address. This is the result of parsing the
* input address and does not give any validation signals. For validation
* signals, refer to `validation_granularity` below. For example, if the input
* address includes a specific apartment number, then the `input_granularity`
* here will 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.
*
* Accepted values: GRANULARITY_UNSPECIFIED, SUB_PREMISE, PREMISE,
* PREMISE_PROXIMITY, BLOCK, ROUTE, OTHER
*
* @param self::INPUT_GRANULARITY_* $inputGranularity
*/
public function setInputGranularity($inputGranularity)
{
$this->inputGranularity = $inputGranularity;
}
/**
* @return self::INPUT_GRANULARITY_*
*/
public function getInputGranularity()
{
return $this->inputGranularity;
}
/**
* Preview: This feature is in Preview (pre-GA). Pre-GA products and features
* might have limited support, and changes to pre-GA products and features
* might not be compatible with other pre-GA versions. Pre-GA Offerings are
* covered by the [Google Maps Platform Service Specific
* Terms](https://cloud.google.com/maps-platform/terms/maps-service-terms).
* For more information, see the [launch stage
* descriptions](https://developers.google.com/maps/launch-stages). Offers an
* interpretive summary of the API response, intended to assist in determining
* a potential subsequent action to take. This field is derived from other
* fields in the API response and should not be considered as a guarantee of
* address accuracy or deliverability. See [Build your validation
* logic](https://developers.google.com/maps/documentation/address-
* validation/build-validation-logic) for more details.
*
* Accepted values: POSSIBLE_NEXT_ACTION_UNSPECIFIED, FIX,
* CONFIRM_ADD_SUBPREMISES, CONFIRM, ACCEPT
*
* @param self::POSSIBLE_NEXT_ACTION_* $possibleNextAction
*/
public function setPossibleNextAction($possibleNextAction)
{
$this->possibleNextAction = $possibleNextAction;
}
/**
* @return self::POSSIBLE_NEXT_ACTION_*
*/
public function getPossibleNextAction()
{
return $this->possibleNextAction;
}
/**
* 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].
*
* Accepted values: GRANULARITY_UNSPECIFIED, SUB_PREMISE, PREMISE,
* PREMISE_PROXIMITY, BLOCK, ROUTE, OTHER
*
* @param self::VALIDATION_GRANULARITY_* $validationGranularity
*/
public function setValidationGranularity($validationGranularity)
{
$this->validationGranularity = $validationGranularity;
}
/**
* @return self::VALIDATION_GRANULARITY_*
*/
public function getValidationGranularity()
{
return $this->validationGranularity;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleMapsAddressvalidationV1Verdict::class, 'Google_Service_AddressValidation_GoogleMapsAddressvalidationV1Verdict');
@@ -0,0 +1,54 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleTypeLatLng extends \Google\Model
{
/**
* The latitude in degrees. It must be in the range [-90.0, +90.0].
*
* @var
*/
public $latitude;
/**
* The longitude in degrees. It must be in the range [-180.0, +180.0].
*
* @var
*/
public $longitude;
public function setLatitude($latitude)
{
$this->latitude = $latitude;
}
public function getLatitude()
{
return $this->latitude;
}
public function setLongitude($longitude)
{
$this->longitude = $longitude;
}
public function getLongitude()
{
return $this->longitude;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleTypeLatLng::class, 'Google_Service_AddressValidation_GoogleTypeLatLng');
@@ -0,0 +1,365 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation;
class GoogleTypePostalAddress extends \Google\Collection
{
protected $collection_key = 'recipients';
/**
* 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 or 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). In 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).
*
* @var string[]
*/
public $addressLines;
/**
* 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. 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.
*
* @var string
*/
public $administrativeArea;
/**
* 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".
*
* @var string
*/
public $languageCode;
/**
* Optional. Generally refers to the city or 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`.
*
* @var string
*/
public $locality;
/**
* Optional. The name of the organization at the address.
*
* @var string
*/
public $organization;
/**
* 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
* or zip code validation in the United States).
*
* @var string
*/
public $postalCode;
/**
* Optional. The recipient at the address. This field may, under certain
* circumstances, contain multiline information. For example, it might contain
* "care of" information.
*
* @var string[]
*/
public $recipients;
/**
* 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/supple
* mental/territory_information.html for details. Example: "CH" for
* Switzerland.
*
* @var string
*/
public $regionCode;
/**
* 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.
*
* @var int
*/
public $revision;
/**
* 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" (Côte d'Ivoire).
*
* @var string
*/
public $sortingCode;
/**
* Optional. Sublocality of the address. For example, this can be a
* neighborhood, borough, or district.
*
* @var string
*/
public $sublocality;
/**
* 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 or 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). In 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).
*
* @param string[] $addressLines
*/
public function setAddressLines($addressLines)
{
$this->addressLines = $addressLines;
}
/**
* @return string[]
*/
public function getAddressLines()
{
return $this->addressLines;
}
/**
* 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. 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.
*
* @param string $administrativeArea
*/
public function setAdministrativeArea($administrativeArea)
{
$this->administrativeArea = $administrativeArea;
}
/**
* @return string
*/
public function getAdministrativeArea()
{
return $this->administrativeArea;
}
/**
* 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".
*
* @param string $languageCode
*/
public function setLanguageCode($languageCode)
{
$this->languageCode = $languageCode;
}
/**
* @return string
*/
public function getLanguageCode()
{
return $this->languageCode;
}
/**
* Optional. Generally refers to the city or 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`.
*
* @param string $locality
*/
public function setLocality($locality)
{
$this->locality = $locality;
}
/**
* @return string
*/
public function getLocality()
{
return $this->locality;
}
/**
* Optional. The name of the organization at the address.
*
* @param string $organization
*/
public function setOrganization($organization)
{
$this->organization = $organization;
}
/**
* @return string
*/
public function getOrganization()
{
return $this->organization;
}
/**
* 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
* or zip code validation in the United States).
*
* @param string $postalCode
*/
public function setPostalCode($postalCode)
{
$this->postalCode = $postalCode;
}
/**
* @return string
*/
public function getPostalCode()
{
return $this->postalCode;
}
/**
* Optional. The recipient at the address. This field may, under certain
* circumstances, contain multiline information. For example, it might contain
* "care of" information.
*
* @param string[] $recipients
*/
public function setRecipients($recipients)
{
$this->recipients = $recipients;
}
/**
* @return string[]
*/
public function getRecipients()
{
return $this->recipients;
}
/**
* 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/supple
* mental/territory_information.html for details. Example: "CH" for
* Switzerland.
*
* @param string $regionCode
*/
public function setRegionCode($regionCode)
{
$this->regionCode = $regionCode;
}
/**
* @return string
*/
public function getRegionCode()
{
return $this->regionCode;
}
/**
* 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.
*
* @param int $revision
*/
public function setRevision($revision)
{
$this->revision = $revision;
}
/**
* @return int
*/
public function getRevision()
{
return $this->revision;
}
/**
* 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" (Côte d'Ivoire).
*
* @param string $sortingCode
*/
public function setSortingCode($sortingCode)
{
$this->sortingCode = $sortingCode;
}
/**
* @return string
*/
public function getSortingCode()
{
return $this->sortingCode;
}
/**
* Optional. Sublocality of the address. For example, this can be a
* neighborhood, borough, or district.
*
* @param string $sublocality
*/
public function setSublocality($sublocality)
{
$this->sublocality = $sublocality;
}
/**
* @return string
*/
public function getSublocality()
{
return $this->sublocality;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleTypePostalAddress::class, 'Google_Service_AddressValidation_GoogleTypePostalAddress');
@@ -0,0 +1,70 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\AddressValidation\Resource;
use Google\Service\AddressValidation\GoogleMapsAddressvalidationV1ProvideValidationFeedbackRequest;
use Google\Service\AddressValidation\GoogleMapsAddressvalidationV1ProvideValidationFeedbackResponse;
use Google\Service\AddressValidation\GoogleMapsAddressvalidationV1ValidateAddressRequest;
use Google\Service\AddressValidation\GoogleMapsAddressvalidationV1ValidateAddressResponse;
/**
* The "v1" collection of methods.
* Typical usage is:
* <code>
* $addressvalidationService = new Google\Service\AddressValidation(...);
* $v1 = $addressvalidationService->v1;
* </code>
*/
class V1 extends \Google\Service\Resource
{
/**
* Feedback about the outcome of the sequence of validation attempts. This
* should be the last call made after a sequence of validation calls for the
* same address, and should be called once the transaction is concluded. This
* should only be sent once for the sequence of `ValidateAddress` requests
* needed to validate an address fully. (v1.provideValidationFeedback)
*
* @param GoogleMapsAddressvalidationV1ProvideValidationFeedbackRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleMapsAddressvalidationV1ProvideValidationFeedbackResponse
* @throws \Google\Service\Exception
*/
public function provideValidationFeedback(GoogleMapsAddressvalidationV1ProvideValidationFeedbackRequest $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('provideValidationFeedback', [$params], GoogleMapsAddressvalidationV1ProvideValidationFeedbackResponse::class);
}
/**
* Validates an address. (v1.validateAddress)
*
* @param GoogleMapsAddressvalidationV1ValidateAddressRequest $postBody
* @param array $optParams Optional parameters.
* @return GoogleMapsAddressvalidationV1ValidateAddressResponse
* @throws \Google\Service\Exception
*/
public function validateAddress(GoogleMapsAddressvalidationV1ValidateAddressRequest $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('validateAddress', [$params], GoogleMapsAddressvalidationV1ValidateAddressResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(V1::class, 'Google_Service_AddressValidation_Resource_V1');