// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=none"
// @generated from file types/v1/payment_method.proto (package types.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf";

/**
 * @generated from message types.v1.Address
 */
export class Address extends Message<Address> {
  /**
   * @generated from field: string city = 1;
   */
  city = "";

  /**
   * @generated from field: string country = 2;
   */
  country = "";

  /**
   * @generated from field: string line1 = 3;
   */
  line1 = "";

  /**
   * @generated from field: string line2 = 4;
   */
  line2 = "";

  /**
   * @generated from field: string postal_code = 5;
   */
  postalCode = "";

  /**
   * @generated from field: string state = 6;
   */
  state = "";

  constructor(data?: PartialMessage<Address>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "types.v1.Address";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "city", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "country", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "line1", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "line2", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "postal_code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 6, name: "state", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Address {
    return new Address().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Address {
    return new Address().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Address {
    return new Address().fromJsonString(jsonString, options);
  }

  static equals(a: Address | PlainMessage<Address> | undefined, b: Address | PlainMessage<Address> | undefined): boolean {
    return proto3.util.equals(Address, a, b);
  }
}

/**
 * @generated from message types.v1.PaymentMethod
 */
export class PaymentMethod extends Message<PaymentMethod> {
  /**
   * @generated from field: google.protobuf.Timestamp created_at = 100;
   */
  createdAt?: Timestamp;

  /**
   * @generated from field: string stripe_id = 1;
   */
  stripeId = "";

  /**
   * @generated from oneof types.v1.PaymentMethod.type
   */
  type: {
    /**
     * @generated from field: types.v1.PaymentMethod.Card card = 200;
     */
    value: PaymentMethod_Card;
    case: "card";
  } | { case: undefined; value?: undefined } = { case: undefined };

  /**
   * @generated from field: types.v1.PaymentMethod.BillingDetails billing_details = 3;
   */
  billingDetails?: PaymentMethod_BillingDetails;

  constructor(data?: PartialMessage<PaymentMethod>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "types.v1.PaymentMethod";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 100, name: "created_at", kind: "message", T: Timestamp },
    { no: 1, name: "stripe_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 200, name: "card", kind: "message", T: PaymentMethod_Card, oneof: "type" },
    { no: 3, name: "billing_details", kind: "message", T: PaymentMethod_BillingDetails },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PaymentMethod {
    return new PaymentMethod().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PaymentMethod {
    return new PaymentMethod().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PaymentMethod {
    return new PaymentMethod().fromJsonString(jsonString, options);
  }

  static equals(a: PaymentMethod | PlainMessage<PaymentMethod> | undefined, b: PaymentMethod | PlainMessage<PaymentMethod> | undefined): boolean {
    return proto3.util.equals(PaymentMethod, a, b);
  }
}

/**
 * @generated from message types.v1.PaymentMethod.Card
 */
export class PaymentMethod_Card extends Message<PaymentMethod_Card> {
  /**
   * @generated from field: types.v1.PaymentMethod.Card.Brand brand = 1;
   */
  brand = PaymentMethod_Card_Brand.unknown;

  /**
   * @generated from field: string country = 2;
   */
  country = "";

  /**
   * @generated from field: string display_brandh = 3;
   */
  displayBrandh = "";

  /**
   * @generated from field: int64 exp_month = 4;
   */
  expMonth = protoInt64.zero;

  /**
   * @generated from field: int64 exp_year = 5;
   */
  expYear = protoInt64.zero;

  /**
   * @generated from field: string last4 = 6;
   */
  last4 = "";

  constructor(data?: PartialMessage<PaymentMethod_Card>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "types.v1.PaymentMethod.Card";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "brand", kind: "enum", T: proto3.getEnumType(PaymentMethod_Card_Brand) },
    { no: 2, name: "country", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "display_brandh", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "exp_month", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 5, name: "exp_year", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 6, name: "last4", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PaymentMethod_Card {
    return new PaymentMethod_Card().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PaymentMethod_Card {
    return new PaymentMethod_Card().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PaymentMethod_Card {
    return new PaymentMethod_Card().fromJsonString(jsonString, options);
  }

  static equals(a: PaymentMethod_Card | PlainMessage<PaymentMethod_Card> | undefined, b: PaymentMethod_Card | PlainMessage<PaymentMethod_Card> | undefined): boolean {
    return proto3.util.equals(PaymentMethod_Card, a, b);
  }
}

/**
 * @generated from enum types.v1.PaymentMethod.Card.Brand
 */
export enum PaymentMethod_Card_Brand {
  /**
   * @generated from enum value: unknown = 0;
   */
  unknown = 0,

  /**
   * @generated from enum value: amex = 1;
   */
  amex = 1,

  /**
   * @generated from enum value: diners = 2;
   */
  diners = 2,

  /**
   * @generated from enum value: discover = 3;
   */
  discover = 3,

  /**
   * @generated from enum value: jcb = 4;
   */
  jcb = 4,

  /**
   * @generated from enum value: mastercard = 5;
   */
  mastercard = 5,

  /**
   * @generated from enum value: unionpay = 6;
   */
  unionpay = 6,

  /**
   * @generated from enum value: visa = 7;
   */
  visa = 7,
}
// Retrieve enum metadata with: proto3.getEnumType(PaymentMethod_Card_Brand)
proto3.util.setEnumType(PaymentMethod_Card_Brand, "types.v1.PaymentMethod.Card.Brand", [
  { no: 0, name: "unknown" },
  { no: 1, name: "amex" },
  { no: 2, name: "diners" },
  { no: 3, name: "discover" },
  { no: 4, name: "jcb" },
  { no: 5, name: "mastercard" },
  { no: 6, name: "unionpay" },
  { no: 7, name: "visa" },
]);

/**
 * @generated from message types.v1.PaymentMethod.BillingDetails
 */
export class PaymentMethod_BillingDetails extends Message<PaymentMethod_BillingDetails> {
  /**
   * @generated from field: types.v1.Address address = 1;
   */
  address?: Address;

  /**
   * @generated from field: string email = 2;
   */
  email = "";

  /**
   * @generated from field: string name = 3;
   */
  name = "";

  /**
   * @generated from field: string phone = 4;
   */
  phone = "";

  constructor(data?: PartialMessage<PaymentMethod_BillingDetails>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "types.v1.PaymentMethod.BillingDetails";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "address", kind: "message", T: Address },
    { no: 2, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "phone", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PaymentMethod_BillingDetails {
    return new PaymentMethod_BillingDetails().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PaymentMethod_BillingDetails {
    return new PaymentMethod_BillingDetails().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PaymentMethod_BillingDetails {
    return new PaymentMethod_BillingDetails().fromJsonString(jsonString, options);
  }

  static equals(a: PaymentMethod_BillingDetails | PlainMessage<PaymentMethod_BillingDetails> | undefined, b: PaymentMethod_BillingDetails | PlainMessage<PaymentMethod_BillingDetails> | undefined): boolean {
    return proto3.util.equals(PaymentMethod_BillingDetails, a, b);
  }
}

