Struct google_api_proto::google::maps::addressvalidation::v1::ValidateAddressRequest
source · pub struct ValidateAddressRequest {
pub address: Option<PostalAddress>,
pub previous_response_id: String,
pub enable_usps_cass: bool,
pub session_token: String,
}
Expand description
The request for validating an address.
Fields§
§address: Option<PostalAddress>
Required. The address being validated. Unformatted addresses should be
submitted via [address_lines
][google.type.PostalAddress.address_lines].
The total length of the fields in this input must not exceed 280 characters.
Supported regions can be found here.
The [language_code][google.type.PostalAddress.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][google.type.PostalAddress.recipients] and [organization][google.type.PostalAddress.organization]. Any values in those fields will be discarded and not returned. Please do not set them.
previous_response_id: String
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][google.maps.addressvalidation.v1.ValidateAddressResponse.response_id] from the very first response in the validation sequence.
enable_usps_cass: bool
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.
session_token: String
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 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).
Note: Address Validation can only be used in sessions with the Autocomplete (New) API, not the old Autocomplete API. See https://developers.google.com/maps/documentation/places/web-service/session-pricing for more details.
Trait Implementations§
source§impl Clone for ValidateAddressRequest
impl Clone for ValidateAddressRequest
source§fn clone(&self) -> ValidateAddressRequest
fn clone(&self) -> ValidateAddressRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ValidateAddressRequest
impl Debug for ValidateAddressRequest
source§impl Default for ValidateAddressRequest
impl Default for ValidateAddressRequest
source§impl Message for ValidateAddressRequest
impl Message for ValidateAddressRequest
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for ValidateAddressRequest
impl PartialEq for ValidateAddressRequest
source§fn eq(&self, other: &ValidateAddressRequest) -> bool
fn eq(&self, other: &ValidateAddressRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ValidateAddressRequest
Auto Trait Implementations§
impl Freeze for ValidateAddressRequest
impl RefUnwindSafe for ValidateAddressRequest
impl Send for ValidateAddressRequest
impl Sync for ValidateAddressRequest
impl Unpin for ValidateAddressRequest
impl UnwindSafe for ValidateAddressRequest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request