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

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { AttachmentSummary, EntityID, EventHeader } from "./shared_pb.js";
import { Address, PartnerStatusStruct } from "./repositoryShared_pb.js";

/**
 * @generated from message api.Partner
 */
export class Partner extends Message<Partner> {
  /**
   * @generated from field: api.EventHeader LastEventHeader = 1;
   */
  LastEventHeader?: EventHeader;

  /**
   * @generated from field: api.EntityID ID = 2;
   */
  ID?: EntityID;

  /**
   * @generated from field: api.PartnerPayload Payload = 3;
   */
  Payload?: PartnerPayload;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.Partner";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "LastEventHeader", kind: "message", T: EventHeader },
    { no: 2, name: "ID", kind: "message", T: EntityID },
    { no: 3, name: "Payload", kind: "message", T: PartnerPayload },
  ]);

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

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

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

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

/**
 * @generated from message api.PartnerPayload
 */
export class PartnerPayload extends Message<PartnerPayload> {
  /**
   * @generated from field: string Name = 1;
   */
  Name = "";

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

  /**
   * @generated from field: api.Address Address = 4;
   */
  Address?: Address;

  /**
   * Status field is not accessible from APIs
   *
   * @generated from field: api.PartnerStatusStruct Status = 6;
   */
  Status?: PartnerStatusStruct;

  /**
   * @generated from field: string PhotoURI = 7;
   */
  PhotoURI = "";

  /**
   * @generated from field: repeated api.AttachmentSummary Attachments = 8;
   */
  Attachments: AttachmentSummary[] = [];

  /**
   * @generated from field: int32 AttachmentNumber = 9;
   */
  AttachmentNumber = 0;

  /**
   * @generated from field: repeated string AllowedRoles = 10 [deprecated = true];
   * @deprecated
   */
  AllowedRoles: string[] = [];

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.PartnerPayload";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "LegalStructure", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "Address", kind: "message", T: Address },
    { no: 6, name: "Status", kind: "message", T: PartnerStatusStruct },
    { no: 7, name: "PhotoURI", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 8, name: "Attachments", kind: "message", T: AttachmentSummary, repeated: true },
    { no: 9, name: "AttachmentNumber", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 10, name: "AllowedRoles", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
  ]);

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

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

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

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

/**
 * @generated from message api.PartnerTriplet
 */
export class PartnerTriplet extends Message<PartnerTriplet> {
  /**
   * @generated from field: api.Partner Current = 1;
   */
  Current?: Partner;

  /**
   * @generated from field: api.Partner Previous = 2;
   */
  Previous?: Partner;

  /**
   * @generated from field: api.Partner LastEvent = 3;
   */
  LastEvent?: Partner;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.PartnerTriplet";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Current", kind: "message", T: Partner },
    { no: 2, name: "Previous", kind: "message", T: Partner },
    { no: 3, name: "LastEvent", kind: "message", T: Partner },
  ]);

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

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

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

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

