import * as grpcWeb from 'grpc-web';

import * as google_protobuf_empty_pb from 'google-protobuf/google/protobuf/empty_pb'; // proto import: "google/protobuf/empty.proto"
import * as postal_verification_pb from './postal_verification_pb'; // proto import: "postal_verification.proto"


export class PostalVerificationClient {
  constructor (hostname: string,
               credentials?: null | { [index: string]: string; },
               options?: null | { [index: string]: any; });

  initiatePostalVerification(
    request: postal_verification_pb.InitiatePostalVerificationReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: postal_verification_pb.InitiatePostalVerificationRes) => void
  ): grpcWeb.ClientReadableStream<postal_verification_pb.InitiatePostalVerificationRes>;

  confirmPostalAddress(
    request: postal_verification_pb.ConfirmPostalAddressReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: postal_verification_pb.ConfirmPostalAddressRes) => void
  ): grpcWeb.ClientReadableStream<postal_verification_pb.ConfirmPostalAddressRes>;

  getPostalVerificationStatus(
    request: postal_verification_pb.GetPostalVerificationStatusReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: postal_verification_pb.GetPostalVerificationStatusRes) => void
  ): grpcWeb.ClientReadableStream<postal_verification_pb.GetPostalVerificationStatusRes>;

  verifyPostalCode(
    request: postal_verification_pb.VerifyPostalCodeReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: postal_verification_pb.VerifyPostalCodeRes) => void
  ): grpcWeb.ClientReadableStream<postal_verification_pb.VerifyPostalCodeRes>;

  cancelPostalVerification(
    request: postal_verification_pb.CancelPostalVerificationReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: google_protobuf_empty_pb.Empty) => void
  ): grpcWeb.ClientReadableStream<google_protobuf_empty_pb.Empty>;

  listPostalVerificationAttempts(
    request: postal_verification_pb.ListPostalVerificationAttemptsReq,
    metadata: grpcWeb.Metadata | undefined,
    callback: (err: grpcWeb.RpcError,
               response: postal_verification_pb.ListPostalVerificationAttemptsRes) => void
  ): grpcWeb.ClientReadableStream<postal_verification_pb.ListPostalVerificationAttemptsRes>;

}

export class PostalVerificationPromiseClient {
  constructor (hostname: string,
               credentials?: null | { [index: string]: string; },
               options?: null | { [index: string]: any; });

  initiatePostalVerification(
    request: postal_verification_pb.InitiatePostalVerificationReq,
    metadata?: grpcWeb.Metadata
  ): Promise<postal_verification_pb.InitiatePostalVerificationRes>;

  confirmPostalAddress(
    request: postal_verification_pb.ConfirmPostalAddressReq,
    metadata?: grpcWeb.Metadata
  ): Promise<postal_verification_pb.ConfirmPostalAddressRes>;

  getPostalVerificationStatus(
    request: postal_verification_pb.GetPostalVerificationStatusReq,
    metadata?: grpcWeb.Metadata
  ): Promise<postal_verification_pb.GetPostalVerificationStatusRes>;

  verifyPostalCode(
    request: postal_verification_pb.VerifyPostalCodeReq,
    metadata?: grpcWeb.Metadata
  ): Promise<postal_verification_pb.VerifyPostalCodeRes>;

  cancelPostalVerification(
    request: postal_verification_pb.CancelPostalVerificationReq,
    metadata?: grpcWeb.Metadata
  ): Promise<google_protobuf_empty_pb.Empty>;

  listPostalVerificationAttempts(
    request: postal_verification_pb.ListPostalVerificationAttemptsReq,
    metadata?: grpcWeb.Metadata
  ): Promise<postal_verification_pb.ListPostalVerificationAttemptsRes>;

}

