import * as jspb from 'google-protobuf'

import * as google_protobuf_empty_pb from 'google-protobuf/google/protobuf/empty_pb'; // proto import: "google/protobuf/empty.proto"
import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto"
import * as annotations_pb from './annotations_pb'; // proto import: "annotations.proto"


export class PostalAddress extends jspb.Message {
  getAddressLine1(): string;
  setAddressLine1(value: string): PostalAddress;

  getAddressLine2(): string;
  setAddressLine2(value: string): PostalAddress;

  getCity(): string;
  setCity(value: string): PostalAddress;

  getState(): string;
  setState(value: string): PostalAddress;

  getPostalCode(): string;
  setPostalCode(value: string): PostalAddress;

  getCountryCode(): string;
  setCountryCode(value: string): PostalAddress;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): PostalAddress.AsObject;
  static toObject(includeInstance: boolean, msg: PostalAddress): PostalAddress.AsObject;
  static serializeBinaryToWriter(message: PostalAddress, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): PostalAddress;
  static deserializeBinaryFromReader(message: PostalAddress, reader: jspb.BinaryReader): PostalAddress;
}

export namespace PostalAddress {
  export type AsObject = {
    addressLine1: string,
    addressLine2: string,
    city: string,
    state: string,
    postalCode: string,
    countryCode: string,
  }
}

export class InitiatePostalVerificationReq extends jspb.Message {
  getAddress(): PostalAddress | undefined;
  setAddress(value?: PostalAddress): InitiatePostalVerificationReq;
  hasAddress(): boolean;
  clearAddress(): InitiatePostalVerificationReq;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): InitiatePostalVerificationReq.AsObject;
  static toObject(includeInstance: boolean, msg: InitiatePostalVerificationReq): InitiatePostalVerificationReq.AsObject;
  static serializeBinaryToWriter(message: InitiatePostalVerificationReq, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): InitiatePostalVerificationReq;
  static deserializeBinaryFromReader(message: InitiatePostalVerificationReq, reader: jspb.BinaryReader): InitiatePostalVerificationReq;
}

export namespace InitiatePostalVerificationReq {
  export type AsObject = {
    address?: PostalAddress.AsObject,
  }
}

export class InitiatePostalVerificationRes extends jspb.Message {
  getPostalVerificationAttemptId(): number;
  setPostalVerificationAttemptId(value: number): InitiatePostalVerificationRes;

  getCorrectedAddress(): PostalAddress | undefined;
  setCorrectedAddress(value?: PostalAddress): InitiatePostalVerificationRes;
  hasCorrectedAddress(): boolean;
  clearCorrectedAddress(): InitiatePostalVerificationRes;

  getAddressWasCorrected(): boolean;
  setAddressWasCorrected(value: boolean): InitiatePostalVerificationRes;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): InitiatePostalVerificationRes.AsObject;
  static toObject(includeInstance: boolean, msg: InitiatePostalVerificationRes): InitiatePostalVerificationRes.AsObject;
  static serializeBinaryToWriter(message: InitiatePostalVerificationRes, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): InitiatePostalVerificationRes;
  static deserializeBinaryFromReader(message: InitiatePostalVerificationRes, reader: jspb.BinaryReader): InitiatePostalVerificationRes;
}

export namespace InitiatePostalVerificationRes {
  export type AsObject = {
    postalVerificationAttemptId: number,
    correctedAddress?: PostalAddress.AsObject,
    addressWasCorrected: boolean,
  }
}

export class ConfirmPostalAddressReq extends jspb.Message {
  getPostalVerificationAttemptId(): number;
  setPostalVerificationAttemptId(value: number): ConfirmPostalAddressReq;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): ConfirmPostalAddressReq.AsObject;
  static toObject(includeInstance: boolean, msg: ConfirmPostalAddressReq): ConfirmPostalAddressReq.AsObject;
  static serializeBinaryToWriter(message: ConfirmPostalAddressReq, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): ConfirmPostalAddressReq;
  static deserializeBinaryFromReader(message: ConfirmPostalAddressReq, reader: jspb.BinaryReader): ConfirmPostalAddressReq;
}

export namespace ConfirmPostalAddressReq {
  export type AsObject = {
    postalVerificationAttemptId: number,
  }
}

export class ConfirmPostalAddressRes extends jspb.Message {
  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): ConfirmPostalAddressRes.AsObject;
  static toObject(includeInstance: boolean, msg: ConfirmPostalAddressRes): ConfirmPostalAddressRes.AsObject;
  static serializeBinaryToWriter(message: ConfirmPostalAddressRes, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): ConfirmPostalAddressRes;
  static deserializeBinaryFromReader(message: ConfirmPostalAddressRes, reader: jspb.BinaryReader): ConfirmPostalAddressRes;
}

export namespace ConfirmPostalAddressRes {
  export type AsObject = {
  }
}

export class GetPostalVerificationStatusReq extends jspb.Message {
  getPostalVerificationAttemptId(): number;
  setPostalVerificationAttemptId(value: number): GetPostalVerificationStatusReq;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): GetPostalVerificationStatusReq.AsObject;
  static toObject(includeInstance: boolean, msg: GetPostalVerificationStatusReq): GetPostalVerificationStatusReq.AsObject;
  static serializeBinaryToWriter(message: GetPostalVerificationStatusReq, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): GetPostalVerificationStatusReq;
  static deserializeBinaryFromReader(message: GetPostalVerificationStatusReq, reader: jspb.BinaryReader): GetPostalVerificationStatusReq;
}

export namespace GetPostalVerificationStatusReq {
  export type AsObject = {
    postalVerificationAttemptId: number,
  }
}

export class GetPostalVerificationStatusRes extends jspb.Message {
  getHasPostalVerification(): boolean;
  setHasPostalVerification(value: boolean): GetPostalVerificationStatusRes;

  getHasActiveAttempt(): boolean;
  setHasActiveAttempt(value: boolean): GetPostalVerificationStatusRes;

  getPostalVerificationAttemptId(): number;
  setPostalVerificationAttemptId(value: number): GetPostalVerificationStatusRes;

  getStatus(): PostalVerificationStatus;
  setStatus(value: PostalVerificationStatus): GetPostalVerificationStatusRes;

  getAddress(): PostalAddress | undefined;
  setAddress(value?: PostalAddress): GetPostalVerificationStatusRes;
  hasAddress(): boolean;
  clearAddress(): GetPostalVerificationStatusRes;

  getCreated(): google_protobuf_timestamp_pb.Timestamp | undefined;
  setCreated(value?: google_protobuf_timestamp_pb.Timestamp): GetPostalVerificationStatusRes;
  hasCreated(): boolean;
  clearCreated(): GetPostalVerificationStatusRes;

  getPostcardSentAt(): google_protobuf_timestamp_pb.Timestamp | undefined;
  setPostcardSentAt(value?: google_protobuf_timestamp_pb.Timestamp): GetPostalVerificationStatusRes;
  hasPostcardSentAt(): boolean;
  clearPostcardSentAt(): GetPostalVerificationStatusRes;

  getCanInitiateNewAttempt(): boolean;
  setCanInitiateNewAttempt(value: boolean): GetPostalVerificationStatusRes;

  getNextAttemptAllowedAt(): google_protobuf_timestamp_pb.Timestamp | undefined;
  setNextAttemptAllowedAt(value?: google_protobuf_timestamp_pb.Timestamp): GetPostalVerificationStatusRes;
  hasNextAttemptAllowedAt(): boolean;
  clearNextAttemptAllowedAt(): GetPostalVerificationStatusRes;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): GetPostalVerificationStatusRes.AsObject;
  static toObject(includeInstance: boolean, msg: GetPostalVerificationStatusRes): GetPostalVerificationStatusRes.AsObject;
  static serializeBinaryToWriter(message: GetPostalVerificationStatusRes, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): GetPostalVerificationStatusRes;
  static deserializeBinaryFromReader(message: GetPostalVerificationStatusRes, reader: jspb.BinaryReader): GetPostalVerificationStatusRes;
}

export namespace GetPostalVerificationStatusRes {
  export type AsObject = {
    hasPostalVerification: boolean,
    hasActiveAttempt: boolean,
    postalVerificationAttemptId: number,
    status: PostalVerificationStatus,
    address?: PostalAddress.AsObject,
    created?: google_protobuf_timestamp_pb.Timestamp.AsObject,
    postcardSentAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
    canInitiateNewAttempt: boolean,
    nextAttemptAllowedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
  }
}

export class VerifyPostalCodeReq extends jspb.Message {
  getCode(): string;
  setCode(value: string): VerifyPostalCodeReq;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): VerifyPostalCodeReq.AsObject;
  static toObject(includeInstance: boolean, msg: VerifyPostalCodeReq): VerifyPostalCodeReq.AsObject;
  static serializeBinaryToWriter(message: VerifyPostalCodeReq, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): VerifyPostalCodeReq;
  static deserializeBinaryFromReader(message: VerifyPostalCodeReq, reader: jspb.BinaryReader): VerifyPostalCodeReq;
}

export namespace VerifyPostalCodeReq {
  export type AsObject = {
    code: string,
  }
}

export class VerifyPostalCodeRes extends jspb.Message {
  getSuccess(): boolean;
  setSuccess(value: boolean): VerifyPostalCodeRes;

  getRemainingAttempts(): number;
  setRemainingAttempts(value: number): VerifyPostalCodeRes;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): VerifyPostalCodeRes.AsObject;
  static toObject(includeInstance: boolean, msg: VerifyPostalCodeRes): VerifyPostalCodeRes.AsObject;
  static serializeBinaryToWriter(message: VerifyPostalCodeRes, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): VerifyPostalCodeRes;
  static deserializeBinaryFromReader(message: VerifyPostalCodeRes, reader: jspb.BinaryReader): VerifyPostalCodeRes;
}

export namespace VerifyPostalCodeRes {
  export type AsObject = {
    success: boolean,
    remainingAttempts: number,
  }
}

export class CancelPostalVerificationReq extends jspb.Message {
  getPostalVerificationAttemptId(): number;
  setPostalVerificationAttemptId(value: number): CancelPostalVerificationReq;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): CancelPostalVerificationReq.AsObject;
  static toObject(includeInstance: boolean, msg: CancelPostalVerificationReq): CancelPostalVerificationReq.AsObject;
  static serializeBinaryToWriter(message: CancelPostalVerificationReq, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): CancelPostalVerificationReq;
  static deserializeBinaryFromReader(message: CancelPostalVerificationReq, reader: jspb.BinaryReader): CancelPostalVerificationReq;
}

export namespace CancelPostalVerificationReq {
  export type AsObject = {
    postalVerificationAttemptId: number,
  }
}

export class ListPostalVerificationAttemptsReq extends jspb.Message {
  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): ListPostalVerificationAttemptsReq.AsObject;
  static toObject(includeInstance: boolean, msg: ListPostalVerificationAttemptsReq): ListPostalVerificationAttemptsReq.AsObject;
  static serializeBinaryToWriter(message: ListPostalVerificationAttemptsReq, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): ListPostalVerificationAttemptsReq;
  static deserializeBinaryFromReader(message: ListPostalVerificationAttemptsReq, reader: jspb.BinaryReader): ListPostalVerificationAttemptsReq;
}

export namespace ListPostalVerificationAttemptsReq {
  export type AsObject = {
  }
}

export class ListPostalVerificationAttemptsRes extends jspb.Message {
  getAttemptsList(): Array<PostalVerificationAttemptSummary>;
  setAttemptsList(value: Array<PostalVerificationAttemptSummary>): ListPostalVerificationAttemptsRes;
  clearAttemptsList(): ListPostalVerificationAttemptsRes;
  addAttempts(value?: PostalVerificationAttemptSummary, index?: number): PostalVerificationAttemptSummary;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): ListPostalVerificationAttemptsRes.AsObject;
  static toObject(includeInstance: boolean, msg: ListPostalVerificationAttemptsRes): ListPostalVerificationAttemptsRes.AsObject;
  static serializeBinaryToWriter(message: ListPostalVerificationAttemptsRes, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): ListPostalVerificationAttemptsRes;
  static deserializeBinaryFromReader(message: ListPostalVerificationAttemptsRes, reader: jspb.BinaryReader): ListPostalVerificationAttemptsRes;
}

export namespace ListPostalVerificationAttemptsRes {
  export type AsObject = {
    attemptsList: Array<PostalVerificationAttemptSummary.AsObject>,
  }
}

export class PostalVerificationAttemptSummary extends jspb.Message {
  getPostalVerificationAttemptId(): number;
  setPostalVerificationAttemptId(value: number): PostalVerificationAttemptSummary;

  getStatus(): PostalVerificationStatus;
  setStatus(value: PostalVerificationStatus): PostalVerificationAttemptSummary;

  getAddress(): PostalAddress | undefined;
  setAddress(value?: PostalAddress): PostalVerificationAttemptSummary;
  hasAddress(): boolean;
  clearAddress(): PostalVerificationAttemptSummary;

  getCreated(): google_protobuf_timestamp_pb.Timestamp | undefined;
  setCreated(value?: google_protobuf_timestamp_pb.Timestamp): PostalVerificationAttemptSummary;
  hasCreated(): boolean;
  clearCreated(): PostalVerificationAttemptSummary;

  getVerifiedAt(): google_protobuf_timestamp_pb.Timestamp | undefined;
  setVerifiedAt(value?: google_protobuf_timestamp_pb.Timestamp): PostalVerificationAttemptSummary;
  hasVerifiedAt(): boolean;
  clearVerifiedAt(): PostalVerificationAttemptSummary;

  serializeBinary(): Uint8Array;
  toObject(includeInstance?: boolean): PostalVerificationAttemptSummary.AsObject;
  static toObject(includeInstance: boolean, msg: PostalVerificationAttemptSummary): PostalVerificationAttemptSummary.AsObject;
  static serializeBinaryToWriter(message: PostalVerificationAttemptSummary, writer: jspb.BinaryWriter): void;
  static deserializeBinary(bytes: Uint8Array): PostalVerificationAttemptSummary;
  static deserializeBinaryFromReader(message: PostalVerificationAttemptSummary, reader: jspb.BinaryReader): PostalVerificationAttemptSummary;
}

export namespace PostalVerificationAttemptSummary {
  export type AsObject = {
    postalVerificationAttemptId: number,
    status: PostalVerificationStatus,
    address?: PostalAddress.AsObject,
    created?: google_protobuf_timestamp_pb.Timestamp.AsObject,
    verifiedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject,
  }
}

export enum PostalVerificationStatus { 
  POSTAL_VERIFICATION_STATUS_UNKNOWN = 0,
  POSTAL_VERIFICATION_STATUS_PENDING_ADDRESS_CONFIRMATION = 1,
  POSTAL_VERIFICATION_STATUS_IN_PROGRESS = 2,
  POSTAL_VERIFICATION_STATUS_AWAITING_VERIFICATION = 3,
  POSTAL_VERIFICATION_STATUS_SUCCEEDED = 4,
  POSTAL_VERIFICATION_STATUS_FAILED = 5,
  POSTAL_VERIFICATION_STATUS_CANCELLED = 6,
}
