@googlemaps/addressvalidation
Version:
1,023 lines (832 loc) • 414 kB
TypeScript
// Copyright 2025 Google LLC
//
// 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.
import type {protobuf as $protobuf} from "google-gax";
import Long = require("long");
/** Namespace google. */
export namespace google {
/** Namespace geo. */
namespace geo {
/** Namespace type. */
namespace type {
/** Properties of a Viewport. */
interface IViewport {
/** Viewport low */
low?: (google.type.ILatLng|null);
/** Viewport high */
high?: (google.type.ILatLng|null);
}
/** Represents a Viewport. */
class Viewport implements IViewport {
/**
* Constructs a new Viewport.
* @param [properties] Properties to set
*/
constructor(properties?: google.geo.type.IViewport);
/** Viewport low. */
public low?: (google.type.ILatLng|null);
/** Viewport high. */
public high?: (google.type.ILatLng|null);
/**
* Creates a new Viewport instance using the specified properties.
* @param [properties] Properties to set
* @returns Viewport instance
*/
public static create(properties?: google.geo.type.IViewport): google.geo.type.Viewport;
/**
* Encodes the specified Viewport message. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages.
* @param message Viewport message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.geo.type.IViewport, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Viewport message, length delimited. Does not implicitly {@link google.geo.type.Viewport.verify|verify} messages.
* @param message Viewport message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.geo.type.IViewport, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Viewport message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Viewport
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.geo.type.Viewport;
/**
* Decodes a Viewport message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Viewport
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.geo.type.Viewport;
/**
* Verifies a Viewport message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a Viewport message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Viewport
*/
public static fromObject(object: { [k: string]: any }): google.geo.type.Viewport;
/**
* Creates a plain object from a Viewport message. Also converts values to other types if specified.
* @param message Viewport
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.geo.type.Viewport, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Viewport to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for Viewport
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
}
}
/** Namespace type. */
namespace type {
/** Properties of a LatLng. */
interface ILatLng {
/** LatLng latitude */
latitude?: (number|null);
/** LatLng longitude */
longitude?: (number|null);
}
/** Represents a LatLng. */
class LatLng implements ILatLng {
/**
* Constructs a new LatLng.
* @param [properties] Properties to set
*/
constructor(properties?: google.type.ILatLng);
/** LatLng latitude. */
public latitude: number;
/** LatLng longitude. */
public longitude: number;
/**
* Creates a new LatLng instance using the specified properties.
* @param [properties] Properties to set
* @returns LatLng instance
*/
public static create(properties?: google.type.ILatLng): google.type.LatLng;
/**
* Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages.
* @param message LatLng message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages.
* @param message LatLng message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.type.ILatLng, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a LatLng message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns LatLng
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.LatLng;
/**
* Decodes a LatLng message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns LatLng
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.LatLng;
/**
* Verifies a LatLng message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a LatLng message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns LatLng
*/
public static fromObject(object: { [k: string]: any }): google.type.LatLng;
/**
* Creates a plain object from a LatLng message. Also converts values to other types if specified.
* @param message LatLng
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.type.LatLng, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this LatLng to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for LatLng
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a PostalAddress. */
interface IPostalAddress {
/** PostalAddress revision */
revision?: (number|null);
/** PostalAddress regionCode */
regionCode?: (string|null);
/** PostalAddress languageCode */
languageCode?: (string|null);
/** PostalAddress postalCode */
postalCode?: (string|null);
/** PostalAddress sortingCode */
sortingCode?: (string|null);
/** PostalAddress administrativeArea */
administrativeArea?: (string|null);
/** PostalAddress locality */
locality?: (string|null);
/** PostalAddress sublocality */
sublocality?: (string|null);
/** PostalAddress addressLines */
addressLines?: (string[]|null);
/** PostalAddress recipients */
recipients?: (string[]|null);
/** PostalAddress organization */
organization?: (string|null);
}
/** Represents a PostalAddress. */
class PostalAddress implements IPostalAddress {
/**
* Constructs a new PostalAddress.
* @param [properties] Properties to set
*/
constructor(properties?: google.type.IPostalAddress);
/** PostalAddress revision. */
public revision: number;
/** PostalAddress regionCode. */
public regionCode: string;
/** PostalAddress languageCode. */
public languageCode: string;
/** PostalAddress postalCode. */
public postalCode: string;
/** PostalAddress sortingCode. */
public sortingCode: string;
/** PostalAddress administrativeArea. */
public administrativeArea: string;
/** PostalAddress locality. */
public locality: string;
/** PostalAddress sublocality. */
public sublocality: string;
/** PostalAddress addressLines. */
public addressLines: string[];
/** PostalAddress recipients. */
public recipients: string[];
/** PostalAddress organization. */
public organization: string;
/**
* Creates a new PostalAddress instance using the specified properties.
* @param [properties] Properties to set
* @returns PostalAddress instance
*/
public static create(properties?: google.type.IPostalAddress): google.type.PostalAddress;
/**
* Encodes the specified PostalAddress message. Does not implicitly {@link google.type.PostalAddress.verify|verify} messages.
* @param message PostalAddress message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.type.IPostalAddress, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified PostalAddress message, length delimited. Does not implicitly {@link google.type.PostalAddress.verify|verify} messages.
* @param message PostalAddress message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.type.IPostalAddress, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a PostalAddress message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns PostalAddress
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.PostalAddress;
/**
* Decodes a PostalAddress message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns PostalAddress
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.PostalAddress;
/**
* Verifies a PostalAddress message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a PostalAddress message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns PostalAddress
*/
public static fromObject(object: { [k: string]: any }): google.type.PostalAddress;
/**
* Creates a plain object from a PostalAddress message. Also converts values to other types if specified.
* @param message PostalAddress
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.type.PostalAddress, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this PostalAddress to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for PostalAddress
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
}
/** Namespace maps. */
namespace maps {
/** Namespace addressvalidation. */
namespace addressvalidation {
/** Namespace v1. */
namespace v1 {
/** Properties of an Address. */
interface IAddress {
/** Address formattedAddress */
formattedAddress?: (string|null);
/** Address postalAddress */
postalAddress?: (google.type.IPostalAddress|null);
/** Address addressComponents */
addressComponents?: (google.maps.addressvalidation.v1.IAddressComponent[]|null);
/** Address missingComponentTypes */
missingComponentTypes?: (string[]|null);
/** Address unconfirmedComponentTypes */
unconfirmedComponentTypes?: (string[]|null);
/** Address unresolvedTokens */
unresolvedTokens?: (string[]|null);
}
/** Represents an Address. */
class Address implements IAddress {
/**
* Constructs a new Address.
* @param [properties] Properties to set
*/
constructor(properties?: google.maps.addressvalidation.v1.IAddress);
/** Address formattedAddress. */
public formattedAddress: string;
/** Address postalAddress. */
public postalAddress?: (google.type.IPostalAddress|null);
/** Address addressComponents. */
public addressComponents: google.maps.addressvalidation.v1.IAddressComponent[];
/** Address missingComponentTypes. */
public missingComponentTypes: string[];
/** Address unconfirmedComponentTypes. */
public unconfirmedComponentTypes: string[];
/** Address unresolvedTokens. */
public unresolvedTokens: string[];
/**
* Creates a new Address instance using the specified properties.
* @param [properties] Properties to set
* @returns Address instance
*/
public static create(properties?: google.maps.addressvalidation.v1.IAddress): google.maps.addressvalidation.v1.Address;
/**
* Encodes the specified Address message. Does not implicitly {@link google.maps.addressvalidation.v1.Address.verify|verify} messages.
* @param message Address message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.maps.addressvalidation.v1.IAddress, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Address message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.Address.verify|verify} messages.
* @param message Address message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.maps.addressvalidation.v1.IAddress, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an Address message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Address
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.Address;
/**
* Decodes an Address message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Address
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.Address;
/**
* Verifies an Address message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates an Address message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Address
*/
public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.Address;
/**
* Creates a plain object from an Address message. Also converts values to other types if specified.
* @param message Address
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.maps.addressvalidation.v1.Address, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Address to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for Address
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of an AddressComponent. */
interface IAddressComponent {
/** AddressComponent componentName */
componentName?: (google.maps.addressvalidation.v1.IComponentName|null);
/** AddressComponent componentType */
componentType?: (string|null);
/** AddressComponent confirmationLevel */
confirmationLevel?: (google.maps.addressvalidation.v1.AddressComponent.ConfirmationLevel|keyof typeof google.maps.addressvalidation.v1.AddressComponent.ConfirmationLevel|null);
/** AddressComponent inferred */
inferred?: (boolean|null);
/** AddressComponent spellCorrected */
spellCorrected?: (boolean|null);
/** AddressComponent replaced */
replaced?: (boolean|null);
/** AddressComponent unexpected */
unexpected?: (boolean|null);
}
/** Represents an AddressComponent. */
class AddressComponent implements IAddressComponent {
/**
* Constructs a new AddressComponent.
* @param [properties] Properties to set
*/
constructor(properties?: google.maps.addressvalidation.v1.IAddressComponent);
/** AddressComponent componentName. */
public componentName?: (google.maps.addressvalidation.v1.IComponentName|null);
/** AddressComponent componentType. */
public componentType: string;
/** AddressComponent confirmationLevel. */
public confirmationLevel: (google.maps.addressvalidation.v1.AddressComponent.ConfirmationLevel|keyof typeof google.maps.addressvalidation.v1.AddressComponent.ConfirmationLevel);
/** AddressComponent inferred. */
public inferred: boolean;
/** AddressComponent spellCorrected. */
public spellCorrected: boolean;
/** AddressComponent replaced. */
public replaced: boolean;
/** AddressComponent unexpected. */
public unexpected: boolean;
/**
* Creates a new AddressComponent instance using the specified properties.
* @param [properties] Properties to set
* @returns AddressComponent instance
*/
public static create(properties?: google.maps.addressvalidation.v1.IAddressComponent): google.maps.addressvalidation.v1.AddressComponent;
/**
* Encodes the specified AddressComponent message. Does not implicitly {@link google.maps.addressvalidation.v1.AddressComponent.verify|verify} messages.
* @param message AddressComponent message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.maps.addressvalidation.v1.IAddressComponent, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified AddressComponent message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.AddressComponent.verify|verify} messages.
* @param message AddressComponent message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.maps.addressvalidation.v1.IAddressComponent, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an AddressComponent message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns AddressComponent
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.AddressComponent;
/**
* Decodes an AddressComponent message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns AddressComponent
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.AddressComponent;
/**
* Verifies an AddressComponent message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates an AddressComponent message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns AddressComponent
*/
public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.AddressComponent;
/**
* Creates a plain object from an AddressComponent message. Also converts values to other types if specified.
* @param message AddressComponent
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.maps.addressvalidation.v1.AddressComponent, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this AddressComponent to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for AddressComponent
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace AddressComponent {
/** ConfirmationLevel enum. */
enum ConfirmationLevel {
CONFIRMATION_LEVEL_UNSPECIFIED = 0,
CONFIRMED = 1,
UNCONFIRMED_BUT_PLAUSIBLE = 2,
UNCONFIRMED_AND_SUSPICIOUS = 3
}
}
/** Properties of a ComponentName. */
interface IComponentName {
/** ComponentName text */
text?: (string|null);
/** ComponentName languageCode */
languageCode?: (string|null);
}
/** Represents a ComponentName. */
class ComponentName implements IComponentName {
/**
* Constructs a new ComponentName.
* @param [properties] Properties to set
*/
constructor(properties?: google.maps.addressvalidation.v1.IComponentName);
/** ComponentName text. */
public text: string;
/** ComponentName languageCode. */
public languageCode: string;
/**
* Creates a new ComponentName instance using the specified properties.
* @param [properties] Properties to set
* @returns ComponentName instance
*/
public static create(properties?: google.maps.addressvalidation.v1.IComponentName): google.maps.addressvalidation.v1.ComponentName;
/**
* Encodes the specified ComponentName message. Does not implicitly {@link google.maps.addressvalidation.v1.ComponentName.verify|verify} messages.
* @param message ComponentName message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.maps.addressvalidation.v1.IComponentName, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified ComponentName message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.ComponentName.verify|verify} messages.
* @param message ComponentName message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.maps.addressvalidation.v1.IComponentName, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a ComponentName message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns ComponentName
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.ComponentName;
/**
* Decodes a ComponentName message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns ComponentName
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.ComponentName;
/**
* Verifies a ComponentName message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a ComponentName message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ComponentName
*/
public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.ComponentName;
/**
* Creates a plain object from a ComponentName message. Also converts values to other types if specified.
* @param message ComponentName
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.maps.addressvalidation.v1.ComponentName, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this ComponentName to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for ComponentName
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Represents an AddressValidation */
class AddressValidation extends $protobuf.rpc.Service {
/**
* Constructs a new AddressValidation service.
* @param rpcImpl RPC implementation
* @param [requestDelimited=false] Whether requests are length-delimited
* @param [responseDelimited=false] Whether responses are length-delimited
*/
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
/**
* Creates new AddressValidation service using the specified rpc implementation.
* @param rpcImpl RPC implementation
* @param [requestDelimited=false] Whether requests are length-delimited
* @param [responseDelimited=false] Whether responses are length-delimited
* @returns RPC service. Useful where requests and/or responses are streamed.
*/
public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): AddressValidation;
/**
* Calls ValidateAddress.
* @param request ValidateAddressRequest message or plain object
* @param callback Node-style callback called with the error, if any, and ValidateAddressResponse
*/
public validateAddress(request: google.maps.addressvalidation.v1.IValidateAddressRequest, callback: google.maps.addressvalidation.v1.AddressValidation.ValidateAddressCallback): void;
/**
* Calls ValidateAddress.
* @param request ValidateAddressRequest message or plain object
* @returns Promise
*/
public validateAddress(request: google.maps.addressvalidation.v1.IValidateAddressRequest): Promise<google.maps.addressvalidation.v1.ValidateAddressResponse>;
/**
* Calls ProvideValidationFeedback.
* @param request ProvideValidationFeedbackRequest message or plain object
* @param callback Node-style callback called with the error, if any, and ProvideValidationFeedbackResponse
*/
public provideValidationFeedback(request: google.maps.addressvalidation.v1.IProvideValidationFeedbackRequest, callback: google.maps.addressvalidation.v1.AddressValidation.ProvideValidationFeedbackCallback): void;
/**
* Calls ProvideValidationFeedback.
* @param request ProvideValidationFeedbackRequest message or plain object
* @returns Promise
*/
public provideValidationFeedback(request: google.maps.addressvalidation.v1.IProvideValidationFeedbackRequest): Promise<google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse>;
}
namespace AddressValidation {
/**
* Callback as used by {@link google.maps.addressvalidation.v1.AddressValidation|validateAddress}.
* @param error Error, if any
* @param [response] ValidateAddressResponse
*/
type ValidateAddressCallback = (error: (Error|null), response?: google.maps.addressvalidation.v1.ValidateAddressResponse) => void;
/**
* Callback as used by {@link google.maps.addressvalidation.v1.AddressValidation|provideValidationFeedback}.
* @param error Error, if any
* @param [response] ProvideValidationFeedbackResponse
*/
type ProvideValidationFeedbackCallback = (error: (Error|null), response?: google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse) => void;
}
/** Properties of a ValidateAddressRequest. */
interface IValidateAddressRequest {
/** ValidateAddressRequest address */
address?: (google.type.IPostalAddress|null);
/** ValidateAddressRequest previousResponseId */
previousResponseId?: (string|null);
/** ValidateAddressRequest enableUspsCass */
enableUspsCass?: (boolean|null);
/** ValidateAddressRequest sessionToken */
sessionToken?: (string|null);
}
/** Represents a ValidateAddressRequest. */
class ValidateAddressRequest implements IValidateAddressRequest {
/**
* Constructs a new ValidateAddressRequest.
* @param [properties] Properties to set
*/
constructor(properties?: google.maps.addressvalidation.v1.IValidateAddressRequest);
/** ValidateAddressRequest address. */
public address?: (google.type.IPostalAddress|null);
/** ValidateAddressRequest previousResponseId. */
public previousResponseId: string;
/** ValidateAddressRequest enableUspsCass. */
public enableUspsCass: boolean;
/** ValidateAddressRequest sessionToken. */
public sessionToken: string;
/**
* Creates a new ValidateAddressRequest instance using the specified properties.
* @param [properties] Properties to set
* @returns ValidateAddressRequest instance
*/
public static create(properties?: google.maps.addressvalidation.v1.IValidateAddressRequest): google.maps.addressvalidation.v1.ValidateAddressRequest;
/**
* Encodes the specified ValidateAddressRequest message. Does not implicitly {@link google.maps.addressvalidation.v1.ValidateAddressRequest.verify|verify} messages.
* @param message ValidateAddressRequest message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.maps.addressvalidation.v1.IValidateAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified ValidateAddressRequest message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.ValidateAddressRequest.verify|verify} messages.
* @param message ValidateAddressRequest message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.maps.addressvalidation.v1.IValidateAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a ValidateAddressRequest message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns ValidateAddressRequest
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.ValidateAddressRequest;
/**
* Decodes a ValidateAddressRequest message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns ValidateAddressRequest
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.addressvalidation.v1.ValidateAddressRequest;
/**
* Verifies a ValidateAddressRequest message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a ValidateAddressRequest message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ValidateAddressRequest
*/
public static fromObject(object: { [k: string]: any }): google.maps.addressvalidation.v1.ValidateAddressRequest;
/**
* Creates a plain object from a ValidateAddressRequest message. Also converts values to other types if specified.
* @param message ValidateAddressRequest
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.maps.addressvalidation.v1.ValidateAddressRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this ValidateAddressRequest to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for ValidateAddressRequest
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a ValidateAddressResponse. */
interface IValidateAddressResponse {
/** ValidateAddressResponse result */
result?: (google.maps.addressvalidation.v1.IValidationResult|null);
/** ValidateAddressResponse responseId */
responseId?: (string|null);
}
/** Represents a ValidateAddressResponse. */
class ValidateAddressResponse implements IValidateAddressResponse {
/**
* Constructs a new ValidateAddressResponse.
* @param [properties] Properties to set
*/
constructor(properties?: google.maps.addressvalidation.v1.IValidateAddressResponse);
/** ValidateAddressResponse result. */
public result?: (google.maps.addressvalidation.v1.IValidationResult|null);
/** ValidateAddressResponse responseId. */
public responseId: string;
/**
* Creates a new ValidateAddressResponse instance using the specified properties.
* @param [properties] Properties to set
* @returns ValidateAddressResponse instance
*/
public static create(properties?: google.maps.addressvalidation.v1.IValidateAddressResponse): google.maps.addressvalidation.v1.ValidateAddressResponse;
/**
* Encodes the specified ValidateAddressResponse message. Does not implicitly {@link google.maps.addressvalidation.v1.ValidateAddressResponse.verify|verify} messages.
* @param message ValidateAddressResponse message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.maps.addressvalidation.v1.IValidateAddressResponse, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified ValidateAddressResponse message, length delimited. Does not implicitly {@link google.maps.addressvalidation.v1.ValidateAddressResponse.verify|verify} messages.
* @param message ValidateAddressResponse message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.maps.addressvalidation.v1.IValidateAddressResponse, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a ValidateAddressResponse message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns ValidateAddressResponse
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.addressvalidation.v1.ValidateAddressResponse;
/**
* Decodes a ValidateAddressResponse message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns ValidateAddressResponse
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing