addressvalidationpb

package
v1.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AddressComponent_ConfirmationLevel_name = map[int32]string{
		0: "CONFIRMATION_LEVEL_UNSPECIFIED",
		1: "CONFIRMED",
		2: "UNCONFIRMED_BUT_PLAUSIBLE",
		3: "UNCONFIRMED_AND_SUSPICIOUS",
	}
	AddressComponent_ConfirmationLevel_value = map[string]int32{
		"CONFIRMATION_LEVEL_UNSPECIFIED": 0,
		"CONFIRMED":                      1,
		"UNCONFIRMED_BUT_PLAUSIBLE":      2,
		"UNCONFIRMED_AND_SUSPICIOUS":     3,
	}
)

Enum value maps for AddressComponent_ConfirmationLevel.

View Source
var (
	ProvideValidationFeedbackRequest_ValidationConclusion_name = map[int32]string{
		0: "VALIDATION_CONCLUSION_UNSPECIFIED",
		1: "VALIDATED_VERSION_USED",
		2: "USER_VERSION_USED",
		3: "UNVALIDATED_VERSION_USED",
		4: "UNUSED",
	}
	ProvideValidationFeedbackRequest_ValidationConclusion_value = map[string]int32{
		"VALIDATION_CONCLUSION_UNSPECIFIED": 0,
		"VALIDATED_VERSION_USED":            1,
		"USER_VERSION_USED":                 2,
		"UNVALIDATED_VERSION_USED":          3,
		"UNUSED":                            4,
	}
)

Enum value maps for ProvideValidationFeedbackRequest_ValidationConclusion.

View Source
var (
	Verdict_Granularity_name = map[int32]string{
		0: "GRANULARITY_UNSPECIFIED",
		1: "SUB_PREMISE",
		2: "PREMISE",
		3: "PREMISE_PROXIMITY",
		4: "BLOCK",
		5: "ROUTE",
		6: "OTHER",
	}
	Verdict_Granularity_value = map[string]int32{
		"GRANULARITY_UNSPECIFIED": 0,
		"SUB_PREMISE":             1,
		"PREMISE":                 2,
		"PREMISE_PROXIMITY":       3,
		"BLOCK":                   4,
		"ROUTE":                   5,
		"OTHER":                   6,
	}
)

Enum value maps for Verdict_Granularity.

View Source
var File_google_maps_addressvalidation_v1_address_proto protoreflect.FileDescriptor
View Source
var File_google_maps_addressvalidation_v1_address_validation_service_proto protoreflect.FileDescriptor
View Source
var File_google_maps_addressvalidation_v1_geocode_proto protoreflect.FileDescriptor
View Source
var File_google_maps_addressvalidation_v1_metadata_proto protoreflect.FileDescriptor
View Source
var File_google_maps_addressvalidation_v1_usps_data_proto protoreflect.FileDescriptor

Functions

func RegisterAddressValidationServer

func RegisterAddressValidationServer(s *grpc.Server, srv AddressValidationServer)

Types

type Address

type Address struct {

	// The post-processed address, formatted as a single-line address following
	// the address formatting rules of the region where the address is located.
	FormattedAddress string `protobuf:"bytes,2,opt,name=formatted_address,json=formattedAddress,proto3" json:"formatted_address,omitempty"`
	// The post-processed address represented as a postal address.
	PostalAddress *postaladdress.PostalAddress `protobuf:"bytes,3,opt,name=postal_address,json=postalAddress,proto3" json:"postal_address,omitempty"`
	// 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.
	AddressComponents []*AddressComponent `protobuf:"bytes,4,rep,name=address_components,json=addressComponents,proto3" json:"address_components,omitempty"`
	// 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
	// [here](https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types).
	MissingComponentTypes []string `` /* 126-byte string literal not displayed */
	// 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][google.maps.addressvalidation.v1.AddressComponent.confirmation_level]
	// is not
	// [CONFIRMED][google.maps.addressvalidation.v1.AddressComponent.ConfirmationLevel.CONFIRMED]
	// or the
	// [inferred][google.maps.addressvalidation.v1.AddressComponent.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).
	UnconfirmedComponentTypes []string `` /* 138-byte string literal not displayed */
	// 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.
	UnresolvedTokens []string `protobuf:"bytes,7,rep,name=unresolved_tokens,json=unresolvedTokens,proto3" json:"unresolved_tokens,omitempty"`
	// contains filtered or unexported fields
}

Details of the post-processed address. Post-processing includes correcting misspelled parts of the address, replacing incorrect parts, and inferring missing parts.

func (*Address) Descriptor deprecated

func (*Address) Descriptor() ([]byte, []int)

Deprecated: Use Address.ProtoReflect.Descriptor instead.

func (*Address) GetAddressComponents

func (x *Address) GetAddressComponents() []*AddressComponent

func (*Address) GetFormattedAddress

func (x *Address) GetFormattedAddress() string

func (*Address) GetMissingComponentTypes

func (x *Address) GetMissingComponentTypes() []string

func (*Address) GetPostalAddress

func (x *Address) GetPostalAddress() *postaladdress.PostalAddress

func (*Address) GetUnconfirmedComponentTypes

func (x *Address) GetUnconfirmedComponentTypes() []string

func (*Address) GetUnresolvedTokens

func (x *Address) GetUnresolvedTokens() []string

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) ProtoReflect

func (x *Address) ProtoReflect() protoreflect.Message

func (*Address) Reset

func (x *Address) Reset()

func (*Address) String

func (x *Address) String() string

type AddressComponent

type AddressComponent struct {

	// The name for this component.
	ComponentName *ComponentName `protobuf:"bytes,1,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"`
	// 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.
	ComponentType string `protobuf:"bytes,2,opt,name=component_type,json=componentType,proto3" json:"component_type,omitempty"`
	// Indicates the level of certainty that we have that the component
	// is correct.
	ConfirmationLevel AddressComponent_ConfirmationLevel `` /* 186-byte string literal not displayed */
	// 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.
	Inferred bool `protobuf:"varint,4,opt,name=inferred,proto3" json:"inferred,omitempty"`
	// 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".
	SpellCorrected bool `protobuf:"varint,5,opt,name=spell_corrected,json=spellCorrected,proto3" json:"spell_corrected,omitempty"`
	// 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.
	Replaced bool `protobuf:"varint,6,opt,name=replaced,proto3" json:"replaced,omitempty"`
	// 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.
	Unexpected bool `protobuf:"varint,7,opt,name=unexpected,proto3" json:"unexpected,omitempty"`
	// contains filtered or unexported fields
}

Represents an address component, such as a street, city, or state.

func (*AddressComponent) Descriptor deprecated

func (*AddressComponent) Descriptor() ([]byte, []int)

Deprecated: Use AddressComponent.ProtoReflect.Descriptor instead.

func (*AddressComponent) GetComponentName

func (x *AddressComponent) GetComponentName() *ComponentName

func (*AddressComponent) GetComponentType

func (x *AddressComponent) GetComponentType() string

func (*AddressComponent) GetConfirmationLevel

func (x *AddressComponent) GetConfirmationLevel() AddressComponent_ConfirmationLevel

func (*AddressComponent) GetInferred

func (x *AddressComponent) GetInferred() bool

func (*AddressComponent) GetReplaced

func (x *AddressComponent) GetReplaced() bool

func (*AddressComponent) GetSpellCorrected

func (x *AddressComponent) GetSpellCorrected() bool

func (*AddressComponent) GetUnexpected

func (x *AddressComponent) GetUnexpected() bool

func (*AddressComponent) ProtoMessage

func (*AddressComponent) ProtoMessage()

func (*AddressComponent) ProtoReflect

func (x *AddressComponent) ProtoReflect() protoreflect.Message

func (*AddressComponent) Reset

func (x *AddressComponent) Reset()

func (*AddressComponent) String

func (x *AddressComponent) String() string

type AddressComponent_ConfirmationLevel

type AddressComponent_ConfirmationLevel int32

The different possible values for confirmation levels.

const (
	// Default value. This value is unused.
	AddressComponent_CONFIRMATION_LEVEL_UNSPECIFIED AddressComponent_ConfirmationLevel = 0
	// We were able to verify that this component exists and makes sense in the
	// context of the rest of the address.
	AddressComponent_CONFIRMED AddressComponent_ConfirmationLevel = 1
	// 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.
	AddressComponent_UNCONFIRMED_BUT_PLAUSIBLE AddressComponent_ConfirmationLevel = 2
	// This component was not confirmed and is likely to be wrong. For
	// example, a neighborhood that does not fit the rest of the address.
	AddressComponent_UNCONFIRMED_AND_SUSPICIOUS AddressComponent_ConfirmationLevel = 3
)

func (AddressComponent_ConfirmationLevel) Descriptor

func (AddressComponent_ConfirmationLevel) Enum

func (AddressComponent_ConfirmationLevel) EnumDescriptor deprecated

func (AddressComponent_ConfirmationLevel) EnumDescriptor() ([]byte, []int)

Deprecated: Use AddressComponent_ConfirmationLevel.Descriptor instead.

func (AddressComponent_ConfirmationLevel) Number

func (AddressComponent_ConfirmationLevel) String

func (AddressComponent_ConfirmationLevel) Type

type AddressMetadata

type AddressMetadata struct {

	// Indicates that this is the address of a business.
	// If unset, indicates that the value is unknown.
	Business *bool `protobuf:"varint,2,opt,name=business,proto3,oneof" json:"business,omitempty"`
	// Indicates that the address of a PO box.
	// If unset, indicates that the value is unknown.
	PoBox *bool `protobuf:"varint,3,opt,name=po_box,json=poBox,proto3,oneof" json:"po_box,omitempty"`
	// Indicates that this is the address of a residence.
	// If unset, indicates that the value is unknown.
	Residential *bool `protobuf:"varint,6,opt,name=residential,proto3,oneof" json:"residential,omitempty"`
	// contains filtered or unexported fields
}

The metadata for the address. `metadata` is not guaranteed to be fully populated for every address sent to the Address Validation API.

func (*AddressMetadata) Descriptor deprecated

func (*AddressMetadata) Descriptor() ([]byte, []int)

Deprecated: Use AddressMetadata.ProtoReflect.Descriptor instead.

func (*AddressMetadata) GetBusiness

func (x *AddressMetadata) GetBusiness() bool

func (*AddressMetadata) GetPoBox

func (x *AddressMetadata) GetPoBox() bool

func (*AddressMetadata) GetResidential

func (x *AddressMetadata) GetResidential() bool

func (*AddressMetadata) ProtoMessage

func (*AddressMetadata) ProtoMessage()

func (*AddressMetadata) ProtoReflect

func (x *AddressMetadata) ProtoReflect() protoreflect.Message

func (*AddressMetadata) Reset

func (x *AddressMetadata) Reset()

func (*AddressMetadata) String

func (x *AddressMetadata) String() string

type AddressValidationClient

type AddressValidationClient interface {
	// Validates an address.
	ValidateAddress(ctx context.Context, in *ValidateAddressRequest, opts ...grpc.CallOption) (*ValidateAddressResponse, error)
	// 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.
	ProvideValidationFeedback(ctx context.Context, in *ProvideValidationFeedbackRequest, opts ...grpc.CallOption) (*ProvideValidationFeedbackResponse, error)
}

AddressValidationClient is the client API for AddressValidation service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type AddressValidationServer

type AddressValidationServer interface {
	// Validates an address.
	ValidateAddress(context.Context, *ValidateAddressRequest) (*ValidateAddressResponse, error)
	// 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.
	ProvideValidationFeedback(context.Context, *ProvideValidationFeedbackRequest) (*ProvideValidationFeedbackResponse, error)
}

AddressValidationServer is the server API for AddressValidation service.

type ComponentName

type ComponentName struct {

	// The name text. For example, "5th Avenue" for a street name or "1253" for a
	// street number.
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// 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.
	LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
	// contains filtered or unexported fields
}

A wrapper for the name of the component.

func (*ComponentName) Descriptor deprecated

func (*ComponentName) Descriptor() ([]byte, []int)

Deprecated: Use ComponentName.ProtoReflect.Descriptor instead.

func (*ComponentName) GetLanguageCode

func (x *ComponentName) GetLanguageCode() string

func (*ComponentName) GetText

func (x *ComponentName) GetText() string

func (*ComponentName) ProtoMessage

func (*ComponentName) ProtoMessage()

func (*ComponentName) ProtoReflect

func (x *ComponentName) ProtoReflect() protoreflect.Message

func (*ComponentName) Reset

func (x *ComponentName) Reset()

func (*ComponentName) String

func (x *ComponentName) String() string

type Geocode

type Geocode struct {

	// 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.
	Location *latlng.LatLng `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
	// The plus code corresponding to the `location`.
	PlusCode *PlusCode `protobuf:"bytes,2,opt,name=plus_code,json=plusCode,proto3" json:"plus_code,omitempty"`
	// The bounds of the geocoded place.
	Bounds *viewport.Viewport `protobuf:"bytes,4,opt,name=bounds,proto3" json:"bounds,omitempty"`
	// 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.
	FeatureSizeMeters float32 `protobuf:"fixed32,5,opt,name=feature_size_meters,json=featureSizeMeters,proto3" json:"feature_size_meters,omitempty"`
	// 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).
	PlaceId string `protobuf:"bytes,6,opt,name=place_id,json=placeId,proto3" json:"place_id,omitempty"`
	// 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).
	PlaceTypes []string `protobuf:"bytes,7,rep,name=place_types,json=placeTypes,proto3" json:"place_types,omitempty"`
	// contains filtered or unexported fields
}

Contains information about the place the input was geocoded to.

func (*Geocode) Descriptor deprecated

func (*Geocode) Descriptor() ([]byte, []int)

Deprecated: Use Geocode.ProtoReflect.Descriptor instead.

func (*Geocode) GetBounds

func (x *Geocode) GetBounds() *viewport.Viewport

func (*Geocode) GetFeatureSizeMeters

func (x *Geocode) GetFeatureSizeMeters() float32

func (*Geocode) GetLocation

func (x *Geocode) GetLocation() *latlng.LatLng

func (*Geocode) GetPlaceId

func (x *Geocode) GetPlaceId() string

func (*Geocode) GetPlaceTypes

func (x *Geocode) GetPlaceTypes() []string

func (*Geocode) GetPlusCode

func (x *Geocode) GetPlusCode() *PlusCode

func (*Geocode) ProtoMessage

func (*Geocode) ProtoMessage()

func (*Geocode) ProtoReflect

func (x *Geocode) ProtoReflect() protoreflect.Message

func (*Geocode) Reset

func (x *Geocode) Reset()

func (*Geocode) String

func (x *Geocode) String() string

type PlusCode

type PlusCode struct {

	// Place's global (full) code, such as "9FWM33GV+HQ", representing an
	// 1/8000 by 1/8000 degree area (~14 by 14 meters).
	GlobalCode string `protobuf:"bytes,1,opt,name=global_code,json=globalCode,proto3" json:"global_code,omitempty"`
	// 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.
	CompoundCode string `protobuf:"bytes,2,opt,name=compound_code,json=compoundCode,proto3" json:"compound_code,omitempty"`
	// contains filtered or unexported fields
}

Plus code (http://plus.codes) is a location reference with two formats: global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, and compound code, replacing the prefix with a reference location.

func (*PlusCode) Descriptor deprecated

func (*PlusCode) Descriptor() ([]byte, []int)

Deprecated: Use PlusCode.ProtoReflect.Descriptor instead.

func (*PlusCode) GetCompoundCode

func (x *PlusCode) GetCompoundCode() string

func (*PlusCode) GetGlobalCode

func (x *PlusCode) GetGlobalCode() string

func (*PlusCode) ProtoMessage

func (*PlusCode) ProtoMessage()

func (*PlusCode) ProtoReflect

func (x *PlusCode) ProtoReflect() protoreflect.Message

func (*PlusCode) Reset

func (x *PlusCode) Reset()

func (*PlusCode) String

func (x *PlusCode) String() string

type ProvideValidationFeedbackRequest

type ProvideValidationFeedbackRequest struct {

	// 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.
	Conclusion ProvideValidationFeedbackRequest_ValidationConclusion `` /* 166-byte string literal not displayed */
	// Required. The ID of the response that this feedback is for. This should be
	// the
	// [response_id][google.maps.addressvalidation.v1.ValidateAddressRequest.response_id]
	// from the first response in a series of address validation attempts.
	ResponseId string `protobuf:"bytes,2,opt,name=response_id,json=responseId,proto3" json:"response_id,omitempty"`
	// contains filtered or unexported fields
}

The request for sending validation feedback.

func (*ProvideValidationFeedbackRequest) Descriptor deprecated

func (*ProvideValidationFeedbackRequest) Descriptor() ([]byte, []int)

Deprecated: Use ProvideValidationFeedbackRequest.ProtoReflect.Descriptor instead.

func (*ProvideValidationFeedbackRequest) GetConclusion

func (*ProvideValidationFeedbackRequest) GetResponseId

func (x *ProvideValidationFeedbackRequest) GetResponseId() string

func (*ProvideValidationFeedbackRequest) ProtoMessage

func (*ProvideValidationFeedbackRequest) ProtoMessage()

func (*ProvideValidationFeedbackRequest) ProtoReflect

func (*ProvideValidationFeedbackRequest) Reset

func (*ProvideValidationFeedbackRequest) String

type ProvideValidationFeedbackRequest_ValidationConclusion

type ProvideValidationFeedbackRequest_ValidationConclusion int32

The possible final outcomes of the sequence of address validation requests needed to validate an address.

const (
	// This value is unused.
	// If the `ProvideValidationFeedbackRequest.conclusion` field is set to
	// `VALIDATION_CONCLUSION_UNSPECIFIED`, an `INVALID_ARGUMENT` error will be
	// returned.
	ProvideValidationFeedbackRequest_VALIDATION_CONCLUSION_UNSPECIFIED ProvideValidationFeedbackRequest_ValidationConclusion = 0
	// The version of the address returned by the Address Validation API was
	// used for the transaction.
	ProvideValidationFeedbackRequest_VALIDATED_VERSION_USED ProvideValidationFeedbackRequest_ValidationConclusion = 1
	// The version of the address provided by the user was used for the
	// transaction
	ProvideValidationFeedbackRequest_USER_VERSION_USED ProvideValidationFeedbackRequest_ValidationConclusion = 2
	// A version of the address that was entered after the last validation
	// attempt but that was not re-validated was used for the transaction.
	ProvideValidationFeedbackRequest_UNVALIDATED_VERSION_USED ProvideValidationFeedbackRequest_ValidationConclusion = 3
	// The transaction was abandoned and the address was not used.
	ProvideValidationFeedbackRequest_UNUSED ProvideValidationFeedbackRequest_ValidationConclusion = 4
)

func (ProvideValidationFeedbackRequest_ValidationConclusion) Descriptor

func (ProvideValidationFeedbackRequest_ValidationConclusion) Enum

func (ProvideValidationFeedbackRequest_ValidationConclusion) EnumDescriptor deprecated

Deprecated: Use ProvideValidationFeedbackRequest_ValidationConclusion.Descriptor instead.

func (ProvideValidationFeedbackRequest_ValidationConclusion) Number

func (ProvideValidationFeedbackRequest_ValidationConclusion) String

func (ProvideValidationFeedbackRequest_ValidationConclusion) Type

type ProvideValidationFeedbackResponse

type ProvideValidationFeedbackResponse struct {
	// contains filtered or unexported fields
}

The response for validation feedback.

The response is empty if the feedback is sent successfully.

func (*ProvideValidationFeedbackResponse) Descriptor deprecated

func (*ProvideValidationFeedbackResponse) Descriptor() ([]byte, []int)

Deprecated: Use ProvideValidationFeedbackResponse.ProtoReflect.Descriptor instead.

func (*ProvideValidationFeedbackResponse) ProtoMessage

func (*ProvideValidationFeedbackResponse) ProtoMessage()

func (*ProvideValidationFeedbackResponse) ProtoReflect

func (*ProvideValidationFeedbackResponse) Reset

func (*ProvideValidationFeedbackResponse) String

type UnimplementedAddressValidationServer

type UnimplementedAddressValidationServer struct {
}

UnimplementedAddressValidationServer can be embedded to have forward compatible implementations.

func (*UnimplementedAddressValidationServer) ValidateAddress

type UspsAddress

type UspsAddress struct {

	// First address line.
	FirstAddressLine string `protobuf:"bytes,1,opt,name=first_address_line,json=firstAddressLine,proto3" json:"first_address_line,omitempty"`
	// Firm name.
	Firm string `protobuf:"bytes,2,opt,name=firm,proto3" json:"firm,omitempty"`
	// Second address line.
	SecondAddressLine string `protobuf:"bytes,3,opt,name=second_address_line,json=secondAddressLine,proto3" json:"second_address_line,omitempty"`
	// Puerto Rican urbanization name.
	Urbanization string `protobuf:"bytes,4,opt,name=urbanization,proto3" json:"urbanization,omitempty"`
	// City + state + postal code.
	CityStateZipAddressLine string `` /* 136-byte string literal not displayed */
	// City name.
	City string `protobuf:"bytes,6,opt,name=city,proto3" json:"city,omitempty"`
	// 2 letter state code.
	State string `protobuf:"bytes,7,opt,name=state,proto3" json:"state,omitempty"`
	// Postal code e.g. 10009.
	ZipCode string `protobuf:"bytes,8,opt,name=zip_code,json=zipCode,proto3" json:"zip_code,omitempty"`
	// 4-digit postal code extension e.g. 5023.
	ZipCodeExtension string `protobuf:"bytes,9,opt,name=zip_code_extension,json=zipCodeExtension,proto3" json:"zip_code_extension,omitempty"`
	// contains filtered or unexported fields
}

USPS representation of a US address.

func (*UspsAddress) Descriptor deprecated

func (*UspsAddress) Descriptor() ([]byte, []int)

Deprecated: Use UspsAddress.ProtoReflect.Descriptor instead.

func (*UspsAddress) GetCity

func (x *UspsAddress) GetCity() string

func (*UspsAddress) GetCityStateZipAddressLine

func (x *UspsAddress) GetCityStateZipAddressLine() string

func (*UspsAddress) GetFirm

func (x *UspsAddress) GetFirm() string

func (*UspsAddress) GetFirstAddressLine

func (x *UspsAddress) GetFirstAddressLine() string

func (*UspsAddress) GetSecondAddressLine

func (x *UspsAddress) GetSecondAddressLine() string

func (*UspsAddress) GetState

func (x *UspsAddress) GetState() string

func (*UspsAddress) GetUrbanization

func (x *UspsAddress) GetUrbanization() string

func (*UspsAddress) GetZipCode

func (x *UspsAddress) GetZipCode() string

func (*UspsAddress) GetZipCodeExtension

func (x *UspsAddress) GetZipCodeExtension() string

func (*UspsAddress) ProtoMessage

func (*UspsAddress) ProtoMessage()

func (*UspsAddress) ProtoReflect

func (x *UspsAddress) ProtoReflect() protoreflect.Message

func (*UspsAddress) Reset

func (x *UspsAddress) Reset()

func (*UspsAddress) String

func (x *UspsAddress) String() string

type UspsData

type UspsData struct {

	// USPS standardized address.
	StandardizedAddress *UspsAddress `protobuf:"bytes,1,opt,name=standardized_address,json=standardizedAddress,proto3" json:"standardized_address,omitempty"`
	// 2 digit delivery point code
	DeliveryPointCode string `protobuf:"bytes,2,opt,name=delivery_point_code,json=deliveryPointCode,proto3" json:"delivery_point_code,omitempty"`
	// The delivery point check digit. This number is added to the end of the
	// delivery_point_barcode for mechanically scanned mail. Adding all the
	// digits of the delivery_point_barcode, delivery_point_check_digit, postal
	// code, and ZIP+4 together should yield a number divisible by 10.
	DeliveryPointCheckDigit string `` /* 134-byte string literal not displayed */
	// The possible values for DPV confirmation. Returns a single character or
	// returns no value.
	//
	// * `N`: Primary and any secondary number information failed to
	// DPV confirm.
	// * `D`: Address was DPV confirmed for the primary number only, and the
	// secondary number information was missing.
	// * `S`: Address was DPV confirmed for the primary number only, and the
	// secondary number information was present but not confirmed.
	// * `Y`: Address was DPV confirmed for primary and any secondary numbers.
	// * Empty: If the response does not contain a `dpv_confirmation` value, the
	// address was not submitted for DPV confirmation.
	DpvConfirmation string `protobuf:"bytes,4,opt,name=dpv_confirmation,json=dpvConfirmation,proto3" json:"dpv_confirmation,omitempty"`
	// The footnotes from delivery point validation.
	// Multiple footnotes may be strung together in the same string.
	//
	// * `AA`: Input address matched to the ZIP+4 file
	// * `A1`: Input address was not matched to the ZIP+4 file
	// * `BB`: Matched to DPV (all components)
	// * `CC`: Secondary number not matched and not required
	// * `C1`: Secondary number not matched but required
	// * `N1`: High-rise address missing secondary number
	// * `M1`: Primary number missing
	// * `M3`: Primary number invalid
	// * `P1`: Input address PO, RR or HC box number missing
	// * `P3`: Input address PO, RR, or HC Box number invalid
	// * `F1`: Input address matched to a military address
	// * `G1`: Input address matched to a general delivery address
	// * `U1`: Input address matched to a unique ZIP code
	// * `PB`: Input address matched to PBSA record
	// * `RR`: DPV confirmed address with PMB information
	// * `R1`: DPV confirmed address without PMB information
	// * `R7`: Carrier Route R777 or R779 record
	// * `IA`: Informed Address identified
	// * `TA`: Primary number matched by dropping a trailing alpha
	DpvFootnote string `protobuf:"bytes,5,opt,name=dpv_footnote,json=dpvFootnote,proto3" json:"dpv_footnote,omitempty"`
	// Indicates if the address is a CMRA (Commercial Mail Receiving Agency)--a
	// private business receiving mail for clients. Returns a single character.
	//
	// * `Y`: The address is a CMRA
	// * `N`: The address is not a CMRA
	DpvCmra string `protobuf:"bytes,6,opt,name=dpv_cmra,json=dpvCmra,proto3" json:"dpv_cmra,omitempty"`
	// Is this place vacant?
	// Returns a single character.
	//
	// * `Y`: The address is vacant
	// * `N`: The address is not vacant
	DpvVacant string `protobuf:"bytes,7,opt,name=dpv_vacant,json=dpvVacant,proto3" json:"dpv_vacant,omitempty"`
	// Is this a no stat address or an active address?
	// No stat addresses are ones which are not continuously occupied or addresses
	// that the USPS does not service. Returns a single character.
	//
	// * `Y`: The address is not active
	// * `N`: The address is active
	DpvNoStat string `protobuf:"bytes,8,opt,name=dpv_no_stat,json=dpvNoStat,proto3" json:"dpv_no_stat,omitempty"`
	// Indicates the NoStat type. Returns a reason code as int.
	//
	// * `1`: IDA (Internal Drop Address) – Addresses that do not receive mail
	// directly from the USPS but are delivered to a drop address that services
	// them.
	// * `2`: CDS - Addresses that have not yet become deliverable. For example, a
	// new subdivision where lots and primary numbers have been determined, but no
	// structure exists yet for occupancy.
	// * `3`: Collision - Addresses that do not actually DPV confirm.
	// * `4`: CMZ (College, Military and Other Types) - ZIP + 4 records USPS has
	// incorporated into the data.
	// * `5`: Regular - Indicates addresses not receiving delivery and the
	// addresses are not counted as possible deliveries.
	// * `6`: Secondary Required - The address requires secondary information.
	DpvNoStatReasonCode int32 `` /* 126-byte string literal not displayed */
	// Flag indicates mail is delivered to a single receptable at a site.
	// Returns a single character.
	//
	// * `Y`: The mail is delivered to a single receptable at a site.
	// * `N`: The mail is not delivered to a single receptable at a site.
	DpvDrop string `protobuf:"bytes,30,opt,name=dpv_drop,json=dpvDrop,proto3" json:"dpv_drop,omitempty"`
	// Indicates that mail is not delivered to the street address.
	// Returns a single character.
	//
	// * `Y`: The mail is not delivered to the street address.
	// * `N`: The mail is delivered to the street address.
	DpvThrowback string `protobuf:"bytes,31,opt,name=dpv_throwback,json=dpvThrowback,proto3" json:"dpv_throwback,omitempty"`
	// Flag indicates mail delivery is not performed every day of the week.
	// Returns a single character.
	//
	// * `Y`: The mail delivery is not performed every day of the week.
	// * `N`: No indication the mail delivery is not performed every day of the
	// week.
	DpvNonDeliveryDays string `protobuf:"bytes,32,opt,name=dpv_non_delivery_days,json=dpvNonDeliveryDays,proto3" json:"dpv_non_delivery_days,omitempty"`
	// Integer identifying non-delivery days. It can be interrogated using bit
	// flags:
	// 0x40 – Sunday is a non-delivery day
	// 0x20 – Monday is a non-delivery day
	// 0x10 – Tuesday is a non-delivery day
	// 0x08 – Wednesday is a non-delivery day
	// 0x04 – Thursday is a non-delivery day
	// 0x02 – Friday is a non-delivery day
	// 0x01 – Saturday is a non-delivery day
	DpvNonDeliveryDaysValues int32 `` /* 141-byte string literal not displayed */
	// Flag indicates door is accessible, but package will not be left due to
	// security concerns.
	// Returns a single character.
	//
	// * `Y`: The package will not be left due to security concerns.
	// * `N`: No indication the package will not be left due to security concerns.
	DpvNoSecureLocation string `protobuf:"bytes,34,opt,name=dpv_no_secure_location,json=dpvNoSecureLocation,proto3" json:"dpv_no_secure_location,omitempty"`
	// Indicates the address was matched to PBSA record.
	// Returns a single character.
	//
	// * `Y`: The address was matched to PBSA record.
	// * `N`: The address was not matched to PBSA record.
	DpvPbsa string `protobuf:"bytes,35,opt,name=dpv_pbsa,json=dpvPbsa,proto3" json:"dpv_pbsa,omitempty"`
	// Flag indicates addresses where USPS cannot knock on a door to deliver mail.
	// Returns a single character.
	//
	// * `Y`: The door is not accessible.
	// * `N`: No indication the door is not accessible.
	DpvDoorNotAccessible string `` /* 126-byte string literal not displayed */
	// Indicates that more than one DPV return code is valid for the address.
	// Returns a single character.
	//
	// * `Y`: Address was DPV confirmed for primary and any secondary numbers.
	// * `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.
	// * `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 R777 and R779 and
	// USPS delivery is not provided.
	DpvEnhancedDeliveryCode string `` /* 135-byte string literal not displayed */
	// The carrier route code.
	// A four character code consisting of a one letter prefix and a three digit
	// route designator.
	//
	// Prefixes:
	//
	// * `C`: Carrier route (or city route)
	// * `R`: Rural route
	// * `H`: Highway Contract Route
	// * `B`: Post Office Box Section
	// * `G`: General delivery unit
	CarrierRoute string `protobuf:"bytes,9,opt,name=carrier_route,json=carrierRoute,proto3" json:"carrier_route,omitempty"`
	// Carrier route rate sort indicator.
	CarrierRouteIndicator string `` /* 127-byte string literal not displayed */
	// The delivery address is matchable, but the EWS file indicates that an exact
	// match will be available soon.
	EwsNoMatch bool `protobuf:"varint,11,opt,name=ews_no_match,json=ewsNoMatch,proto3" json:"ews_no_match,omitempty"`
	// Main post office city.
	PostOfficeCity string `protobuf:"bytes,12,opt,name=post_office_city,json=postOfficeCity,proto3" json:"post_office_city,omitempty"`
	// Main post office state.
	PostOfficeState string `protobuf:"bytes,13,opt,name=post_office_state,json=postOfficeState,proto3" json:"post_office_state,omitempty"`
	// Abbreviated city.
	AbbreviatedCity string `protobuf:"bytes,14,opt,name=abbreviated_city,json=abbreviatedCity,proto3" json:"abbreviated_city,omitempty"`
	// FIPS county code.
	FipsCountyCode string `protobuf:"bytes,15,opt,name=fips_county_code,json=fipsCountyCode,proto3" json:"fips_county_code,omitempty"`
	// County name.
	County string `protobuf:"bytes,16,opt,name=county,proto3" json:"county,omitempty"`
	// Enhanced Line of Travel (eLOT) number.
	ElotNumber string `protobuf:"bytes,17,opt,name=elot_number,json=elotNumber,proto3" json:"elot_number,omitempty"`
	// eLOT Ascending/Descending Flag (A/D).
	ElotFlag string `protobuf:"bytes,18,opt,name=elot_flag,json=elotFlag,proto3" json:"elot_flag,omitempty"`
	// LACSLink return code.
	LacsLinkReturnCode string `protobuf:"bytes,19,opt,name=lacs_link_return_code,json=lacsLinkReturnCode,proto3" json:"lacs_link_return_code,omitempty"`
	// LACSLink indicator.
	LacsLinkIndicator string `protobuf:"bytes,20,opt,name=lacs_link_indicator,json=lacsLinkIndicator,proto3" json:"lacs_link_indicator,omitempty"`
	// PO Box only postal code.
	PoBoxOnlyPostalCode bool `` /* 126-byte string literal not displayed */
	// Footnotes from matching a street or highrise record to suite information.
	// If business name match is found, the secondary number is returned.
	//
	// * `A`: SuiteLink record match, business address improved.
	// * `00`: No match, business address is not improved.
	SuitelinkFootnote string `protobuf:"bytes,22,opt,name=suitelink_footnote,json=suitelinkFootnote,proto3" json:"suitelink_footnote,omitempty"`
	// PMB (Private Mail Box) unit designator.
	PmbDesignator string `protobuf:"bytes,23,opt,name=pmb_designator,json=pmbDesignator,proto3" json:"pmb_designator,omitempty"`
	// PMB (Private Mail Box) number;
	PmbNumber string `protobuf:"bytes,24,opt,name=pmb_number,json=pmbNumber,proto3" json:"pmb_number,omitempty"`
	// Type of the address record that matches the input address.
	//
	// * `F`: FIRM. This is a match to a Firm Record, which is the finest level of
	// match available for an address.
	// * `G`: GENERAL DELIVERY. This is a match to a General Delivery record.
	// * `H`: BUILDING / APARTMENT. This is a match to a Building or Apartment
	// record.
	// * `P`: POST OFFICE BOX. This is a match to a Post Office Box.
	// * `R`: RURAL ROUTE or HIGHWAY CONTRACT: This is a match to either a Rural
	// Route or a Highway Contract record, both of which may have associated Box
	// Number ranges.
	// * `S`: STREET RECORD: This is a match to a Street record containing a valid
	// primary number range.
	AddressRecordType string `protobuf:"bytes,25,opt,name=address_record_type,json=addressRecordType,proto3" json:"address_record_type,omitempty"`
	// Indicator that a default address was found, but more specific addresses
	// exists.
	DefaultAddress bool `protobuf:"varint,26,opt,name=default_address,json=defaultAddress,proto3" json:"default_address,omitempty"`
	// Error message for USPS data retrieval. This is populated when USPS
	// processing is suspended because of the detection of artificially created
	// addresses.
	//
	// The USPS data fields might not be populated when this error is present.
	ErrorMessage string `protobuf:"bytes,27,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// Indicator that the request has been CASS processed.
	CassProcessed bool `protobuf:"varint,28,opt,name=cass_processed,json=cassProcessed,proto3" json:"cass_processed,omitempty"`
	// contains filtered or unexported fields
}

The USPS data for the address. `uspsData` is not guaranteed to be fully populated for every US or PR address sent to the Address Validation API. It's recommended to integrate the backup address fields in the response if you utilize uspsData as the primary part of the response.

func (*UspsData) Descriptor deprecated

func (*UspsData) Descriptor() ([]byte, []int)

Deprecated: Use UspsData.ProtoReflect.Descriptor instead.

func (*UspsData) GetAbbreviatedCity

func (x *UspsData) GetAbbreviatedCity() string

func (*UspsData) GetAddressRecordType

func (x *UspsData) GetAddressRecordType() string

func (*UspsData) GetCarrierRoute

func (x *UspsData) GetCarrierRoute() string

func (*UspsData) GetCarrierRouteIndicator

func (x *UspsData) GetCarrierRouteIndicator() string

func (*UspsData) GetCassProcessed

func (x *UspsData) GetCassProcessed() bool

func (*UspsData) GetCounty

func (x *UspsData) GetCounty() string

func (*UspsData) GetDefaultAddress

func (x *UspsData) GetDefaultAddress() bool

func (*UspsData) GetDeliveryPointCheckDigit

func (x *UspsData) GetDeliveryPointCheckDigit() string

func (*UspsData) GetDeliveryPointCode

func (x *UspsData) GetDeliveryPointCode() string

func (*UspsData) GetDpvCmra

func (x *UspsData) GetDpvCmra() string

func (*UspsData) GetDpvConfirmation

func (x *UspsData) GetDpvConfirmation() string

func (*UspsData) GetDpvDoorNotAccessible added in v1.7.0

func (x *UspsData) GetDpvDoorNotAccessible() string

func (*UspsData) GetDpvDrop added in v1.7.0

func (x *UspsData) GetDpvDrop() string

func (*UspsData) GetDpvEnhancedDeliveryCode added in v1.7.0

func (x *UspsData) GetDpvEnhancedDeliveryCode() string

func (*UspsData) GetDpvFootnote

func (x *UspsData) GetDpvFootnote() string

func (*UspsData) GetDpvNoSecureLocation added in v1.7.0

func (x *UspsData) GetDpvNoSecureLocation() string

func (*UspsData) GetDpvNoStat

func (x *UspsData) GetDpvNoStat() string

func (*UspsData) GetDpvNoStatReasonCode added in v1.7.0

func (x *UspsData) GetDpvNoStatReasonCode() int32

func (*UspsData) GetDpvNonDeliveryDays added in v1.7.0

func (x *UspsData) GetDpvNonDeliveryDays() string

func (*UspsData) GetDpvNonDeliveryDaysValues added in v1.7.0

func (x *UspsData) GetDpvNonDeliveryDaysValues() int32

func (*UspsData) GetDpvPbsa added in v1.7.0

func (x *UspsData) GetDpvPbsa() string

func (*UspsData) GetDpvThrowback added in v1.7.0

func (x *UspsData) GetDpvThrowback() string

func (*UspsData) GetDpvVacant

func (x *UspsData) GetDpvVacant() string

func (*UspsData) GetElotFlag

func (x *UspsData) GetElotFlag() string

func (*UspsData) GetElotNumber

func (x *UspsData) GetElotNumber() string

func (*UspsData) GetErrorMessage

func (x *UspsData) GetErrorMessage() string

func (*UspsData) GetEwsNoMatch

func (x *UspsData) GetEwsNoMatch() bool

func (*UspsData) GetFipsCountyCode

func (x *UspsData) GetFipsCountyCode() string

func (*UspsData) GetLacsLinkIndicator

func (x *UspsData) GetLacsLinkIndicator() string

func (*UspsData) GetLacsLinkReturnCode

func (x *UspsData) GetLacsLinkReturnCode() string

func (*UspsData) GetPmbDesignator

func (x *UspsData) GetPmbDesignator() string

func (*UspsData) GetPmbNumber

func (x *UspsData) GetPmbNumber() string

func (*UspsData) GetPoBoxOnlyPostalCode

func (x *UspsData) GetPoBoxOnlyPostalCode() bool

func (*UspsData) GetPostOfficeCity

func (x *UspsData) GetPostOfficeCity() string

func (*UspsData) GetPostOfficeState

func (x *UspsData) GetPostOfficeState() string

func (*UspsData) GetStandardizedAddress

func (x *UspsData) GetStandardizedAddress() *UspsAddress

func (*UspsData) GetSuitelinkFootnote

func (x *UspsData) GetSuitelinkFootnote() string

func (*UspsData) ProtoMessage

func (*UspsData) ProtoMessage()

func (*UspsData) ProtoReflect

func (x *UspsData) ProtoReflect() protoreflect.Message

func (*UspsData) Reset

func (x *UspsData) Reset()

func (*UspsData) String

func (x *UspsData) String() string

type ValidateAddressRequest

type ValidateAddressRequest struct {

	// 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](https://developers.google.com/maps/documentation/address-validation/coverage).
	//
	// 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.
	Address *postaladdress.PostalAddress `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// 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.
	PreviousResponseId string `protobuf:"bytes,2,opt,name=previous_response_id,json=previousResponseId,proto3" json:"previous_response_id,omitempty"`
	// 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.
	EnableUspsCass bool `protobuf:"varint,3,opt,name=enable_usps_cass,json=enableUspsCass,proto3" json:"enable_usps_cass,omitempty"`
	// 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.
	SessionToken string `protobuf:"bytes,5,opt,name=session_token,json=sessionToken,proto3" json:"session_token,omitempty"`
	// contains filtered or unexported fields
}

The request for validating an address.

func (*ValidateAddressRequest) Descriptor deprecated

func (*ValidateAddressRequest) Descriptor() ([]byte, []int)

Deprecated: Use ValidateAddressRequest.ProtoReflect.Descriptor instead.

func (*ValidateAddressRequest) GetAddress

func (*ValidateAddressRequest) GetEnableUspsCass

func (x *ValidateAddressRequest) GetEnableUspsCass() bool

func (*ValidateAddressRequest) GetPreviousResponseId

func (x *ValidateAddressRequest) GetPreviousResponseId() string

func (*ValidateAddressRequest) GetSessionToken added in v1.7.0

func (x *ValidateAddressRequest) GetSessionToken() string

func (*ValidateAddressRequest) ProtoMessage

func (*ValidateAddressRequest) ProtoMessage()

func (*ValidateAddressRequest) ProtoReflect

func (x *ValidateAddressRequest) ProtoReflect() protoreflect.Message

func (*ValidateAddressRequest) Reset

func (x *ValidateAddressRequest) Reset()

func (*ValidateAddressRequest) String

func (x *ValidateAddressRequest) String() string

type ValidateAddressResponse

type ValidateAddressResponse struct {

	// The result of the address validation.
	Result *ValidationResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// The UUID that identifies this response. If the address needs to be
	// re-validated, this UUID *must* accompany the new request.
	ResponseId string `protobuf:"bytes,2,opt,name=response_id,json=responseId,proto3" json:"response_id,omitempty"`
	// contains filtered or unexported fields
}

The response to an address validation request.

func (*ValidateAddressResponse) Descriptor deprecated

func (*ValidateAddressResponse) Descriptor() ([]byte, []int)

Deprecated: Use ValidateAddressResponse.ProtoReflect.Descriptor instead.

func (*ValidateAddressResponse) GetResponseId

func (x *ValidateAddressResponse) GetResponseId() string

func (*ValidateAddressResponse) GetResult

func (x *ValidateAddressResponse) GetResult() *ValidationResult

func (*ValidateAddressResponse) ProtoMessage

func (*ValidateAddressResponse) ProtoMessage()

func (*ValidateAddressResponse) ProtoReflect

func (x *ValidateAddressResponse) ProtoReflect() protoreflect.Message

func (*ValidateAddressResponse) Reset

func (x *ValidateAddressResponse) Reset()

func (*ValidateAddressResponse) String

func (x *ValidateAddressResponse) String() string

type ValidationResult

type ValidationResult struct {

	// Overall verdict flags
	Verdict *Verdict `protobuf:"bytes,1,opt,name=verdict,proto3" json:"verdict,omitempty"`
	// Information about the address itself as opposed to the geocode.
	Address *Address `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// Information about the location and place that the address geocoded to.
	Geocode *Geocode `protobuf:"bytes,3,opt,name=geocode,proto3" json:"geocode,omitempty"`
	// Other information relevant to deliverability. `metadata` is not guaranteed
	// to be fully populated for every address sent to the Address Validation API.
	Metadata *AddressMetadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Extra deliverability flags provided by USPS. Only provided in region `US`
	// and `PR`.
	UspsData *UspsData `protobuf:"bytes,5,opt,name=usps_data,json=uspsData,proto3" json:"usps_data,omitempty"`
	// contains filtered or unexported fields
}

The result of validating an address.

func (*ValidationResult) Descriptor deprecated

func (*ValidationResult) Descriptor() ([]byte, []int)

Deprecated: Use ValidationResult.ProtoReflect.Descriptor instead.

func (*ValidationResult) GetAddress

func (x *ValidationResult) GetAddress() *Address

func (*ValidationResult) GetGeocode

func (x *ValidationResult) GetGeocode() *Geocode

func (*ValidationResult) GetMetadata

func (x *ValidationResult) GetMetadata() *AddressMetadata

func (*ValidationResult) GetUspsData

func (x *ValidationResult) GetUspsData() *UspsData

func (*ValidationResult) GetVerdict

func (x *ValidationResult) GetVerdict() *Verdict

func (*ValidationResult) ProtoMessage

func (*ValidationResult) ProtoMessage()

func (*ValidationResult) ProtoReflect

func (x *ValidationResult) ProtoReflect() protoreflect.Message

func (*ValidationResult) Reset

func (x *ValidationResult) Reset()

func (*ValidationResult) String

func (x *ValidationResult) String() string

type Verdict

type Verdict struct {

	// 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 we cannot match
	// the apartment number in the databases or the apartment number is invalid,
	// the `validation_granularity` will likely be `PREMISE` or below.
	InputGranularity Verdict_Granularity `` /* 168-byte string literal not displayed */
	// 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.
	//
	// Per address component validation result can be found in
	// [google.maps.addressvalidation.v1.Address.address_components].
	ValidationGranularity Verdict_Granularity `` /* 183-byte string literal not displayed */
	// Information about the granularity of the
	// [`geocode`][google.maps.addressvalidation.v1.ValidationResult.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`.
	GeocodeGranularity Verdict_Granularity `` /* 174-byte string literal not displayed */
	// The address is considered complete if there are no unresolved tokens, no
	// unexpected or missing address components. See
	// [`missing_component_types`][google.maps.addressvalidation.v1.Address.missing_component_types],
	// [`unresolved_tokens`][google.maps.addressvalidation.v1.Address.unresolved_tokens]
	// or
	// [`unexpected`][google.maps.addressvalidation.v1.AddressComponent.unexpected]
	// fields for more details.
	AddressComplete bool `protobuf:"varint,4,opt,name=address_complete,json=addressComplete,proto3" json:"address_complete,omitempty"`
	// At least one address component cannot be categorized or validated, see
	// [google.maps.addressvalidation.v1.Address.address_components] for
	// details.
	HasUnconfirmedComponents bool `` /* 136-byte string literal not displayed */
	// At least one address component was inferred (added) that wasn't in the
	// input, see
	// [google.maps.addressvalidation.v1.Address.address_components] for
	// details.
	HasInferredComponents bool `` /* 127-byte string literal not displayed */
	// At least one address component was replaced, see
	// [google.maps.addressvalidation.v1.Address.address_components] for
	// details.
	HasReplacedComponents bool `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

High level overview of the address validation result and geocode.

func (*Verdict) Descriptor deprecated

func (*Verdict) Descriptor() ([]byte, []int)

Deprecated: Use Verdict.ProtoReflect.Descriptor instead.

func (*Verdict) GetAddressComplete

func (x *Verdict) GetAddressComplete() bool

func (*Verdict) GetGeocodeGranularity

func (x *Verdict) GetGeocodeGranularity() Verdict_Granularity

func (*Verdict) GetHasInferredComponents

func (x *Verdict) GetHasInferredComponents() bool

func (*Verdict) GetHasReplacedComponents

func (x *Verdict) GetHasReplacedComponents() bool

func (*Verdict) GetHasUnconfirmedComponents

func (x *Verdict) GetHasUnconfirmedComponents() bool

func (*Verdict) GetInputGranularity

func (x *Verdict) GetInputGranularity() Verdict_Granularity

func (*Verdict) GetValidationGranularity

func (x *Verdict) GetValidationGranularity() Verdict_Granularity

func (*Verdict) ProtoMessage

func (*Verdict) ProtoMessage()

func (*Verdict) ProtoReflect

func (x *Verdict) ProtoReflect() protoreflect.Message

func (*Verdict) Reset

func (x *Verdict) Reset()

func (*Verdict) String

func (x *Verdict) String() string

type Verdict_Granularity

type Verdict_Granularity int32

The various granularities that an address or a geocode can have. When used to indicate granularity for an *address*, these values indicate with how fine a granularity the address identifies a mailing destination. For example, an address such as "123 Main Street, Redwood City, CA, 94061" identifies a `PREMISE` while something like "Redwood City, CA, 94061" identifies a `LOCALITY`. However, if we are unable to find a geocode for "123 Main Street" in Redwood City, the geocode returned might be of `LOCALITY` granularity even though the address is more granular.

const (
	// Default value. This value is unused.
	Verdict_GRANULARITY_UNSPECIFIED Verdict_Granularity = 0
	// Below-building level result, such as an apartment.
	Verdict_SUB_PREMISE Verdict_Granularity = 1
	// Building-level result.
	Verdict_PREMISE Verdict_Granularity = 2
	// A geocode that approximates the building-level location of the address.
	Verdict_PREMISE_PROXIMITY Verdict_Granularity = 3
	// The address or geocode indicates a block. Only used in regions which
	// have block-level addressing, such as Japan.
	Verdict_BLOCK Verdict_Granularity = 4
	// The geocode or address is granular to route, such as a street, road, or
	// highway.
	Verdict_ROUTE Verdict_Granularity = 5
	// All other granularities, which are bucketed together since they are not
	// deliverable.
	Verdict_OTHER Verdict_Granularity = 6
)

func (Verdict_Granularity) Descriptor

func (Verdict_Granularity) Enum

func (Verdict_Granularity) EnumDescriptor deprecated

func (Verdict_Granularity) EnumDescriptor() ([]byte, []int)

Deprecated: Use Verdict_Granularity.Descriptor instead.

func (Verdict_Granularity) Number

func (Verdict_Granularity) String

func (x Verdict_Granularity) String() string

func (Verdict_Granularity) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL