// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file claim.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 { Amount, AttachmentSummary, ClaimClosure, ClaimCriticality, ClaimEntityType, ClaimSector, EntityID, EventHeader, MetadataElement } from "./shared_pb.js";
import { ClaimStatusStruct } from "./collabShared_pb.js";

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

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

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.Claim";
  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: ClaimPayload },
  ]);

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

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

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

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

/**
 * @generated from message api.ClaimPayload
 */
export class ClaimPayload extends Message<ClaimPayload> {
  /**
   * Identifier of the claim type
   *
   * @generated from field: string ClaimTypeID = 1;
   */
  ClaimTypeID = "";

  /**
   * Identifier of the targetted entity
   *
   * @generated from field: string EntityID = 2;
   */
  EntityID = "";

  /**
   * Criticality of the claim
   *
   * @generated from field: api.ClaimCriticality Criticality = 3;
   */
  Criticality = ClaimCriticality.UNKNOWN;

  /**
   * Status of the claim
   *
   * @generated from field: api.ClaimStatusStruct Status = 4;
   */
  Status?: ClaimStatusStruct;

  /**
   * Creation date of the claim
   *
   * @generated from field: string CreationDate = 6;
   */
  CreationDate = "";

  /**
   * Contacts assigned on the claim
   *
   * @generated from field: repeated string Assignees = 7;
   */
  Assignees: string[] = [];

  /**
   * Contacts assigned removed from the claim
   *
   * @generated from field: repeated string RemovedAssignees = 16;
   */
  RemovedAssignees: string[] = [];

  /**
   * Contacts assigned added from the claim
   *
   * @generated from field: repeated string AddedAssignees = 17;
   */
  AddedAssignees: string[] = [];

  /**
   * End comment of the claim
   *
   * @generated from field: string EndComment = 8;
   */
  EndComment = "";

  /**
   * Closure responsible and causes of the claim
   *
   * @generated from field: api.ClaimClosure Closure = 9;
   */
  Closure?: ClaimClosure;

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

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

  /**
   * @generated from field: api.Amount Amount = 12;
   */
  Amount?: Amount;

  /**
   * @generated from field: string Reason = 13;
   */
  Reason = "";

  /**
   * Code for the reason of the claim. It should be unique for the project.
   *
   * @generated from field: string ReasonCode = 18;
   */
  ReasonCode = "";

  /**
   * @generated from field: api.ClaimSector Sector = 14;
   */
  Sector = ClaimSector.UNKNOWN;

  /**
   * @generated from field: api.ClaimEntityType EntityType = 15;
   */
  EntityType = ClaimEntityType.UNKNOWN;

  /**
   * Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)
   *
   * @generated from field: repeated api.MetadataElement MetaData = 19;
   */
  MetaData: MetadataElement[] = [];

  /**
   * Title of the claim
   *
   * @generated from field: string Title = 20;
   */
  Title = "";

  /**
   * Identifier to display, because it may differ from the EntityID
   *
   * @generated from field: string DisplayID = 21;
   */
  DisplayID = "";

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ClaimPayload";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "ClaimTypeID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "EntityID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "Criticality", kind: "enum", T: proto3.getEnumType(ClaimCriticality) },
    { no: 4, name: "Status", kind: "message", T: ClaimStatusStruct },
    { no: 6, name: "CreationDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 7, name: "Assignees", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 16, name: "RemovedAssignees", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 17, name: "AddedAssignees", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 8, name: "EndComment", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 9, name: "Closure", kind: "message", T: ClaimClosure },
    { no: 10, name: "Attachments", kind: "message", T: AttachmentSummary, repeated: true },
    { no: 11, name: "AttachmentNumber", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 12, name: "Amount", kind: "message", T: Amount },
    { no: 13, name: "Reason", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 18, name: "ReasonCode", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 14, name: "Sector", kind: "enum", T: proto3.getEnumType(ClaimSector) },
    { no: 15, name: "EntityType", kind: "enum", T: proto3.getEnumType(ClaimEntityType) },
    { no: 19, name: "MetaData", kind: "message", T: MetadataElement, repeated: true },
    { no: 20, name: "Title", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 21, name: "DisplayID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

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

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

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

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

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

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

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

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

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

