// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file movement.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 { EnrichedGoods, MovementStatusStruct, QuantityInLV, StockMovement } from "./warehousingShared_pb.js";
import { ActorPayload } from "./actor_pb.js";
import { AttachmentSummary, ClaimSummary, EntityID, EventHeader } from "./shared_pb.js";
import { ItemPayload } from "./item_pb.js";

/**
 * @generated from message api.MovementPayload
 */
export class MovementPayload extends Message<MovementPayload> {
  /**
   * @generated from field: api.EnrichedGoods Goods = 1;
   */
  Goods?: EnrichedGoods;

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

  /**
   * @generated from field: api.ActorPayload Actor = 3;
   */
  Actor?: ActorPayload;

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

  /**
   * @generated from field: repeated api.ClaimSummary Claims = 5;
   */
  Claims: ClaimSummary[] = [];

  /**
   * @generated from field: int32 ClaimNumber = 6;
   */
  ClaimNumber = 0;

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

  /**
   * @generated from field: api.QuantityInLV QuantityInBaseLV = 8;
   */
  QuantityInBaseLV?: QuantityInLV;

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

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.MovementPayload";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Goods", kind: "message", T: EnrichedGoods },
    { no: 2, name: "ActorID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "Actor", kind: "message", T: ActorPayload },
    { no: 4, name: "Movement", kind: "message", T: StockMovement },
    { no: 5, name: "Claims", kind: "message", T: ClaimSummary, repeated: true },
    { no: 6, name: "ClaimNumber", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 7, name: "Status", kind: "message", T: MovementStatusStruct },
    { no: 8, name: "QuantityInBaseLV", kind: "message", T: QuantityInLV },
    { no: 9, name: "Attachments", kind: "message", T: AttachmentSummary, repeated: true },
    { no: 10, name: "AttachmentNumber", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
  ]);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /**
   * @generated from oneof api.MovementEnrichment.Content
   */
  Content: {
    /**
     * @generated from field: api.ItemPayload Item = 10;
     */
    value: ItemPayload;
    case: "Item";
  } | {
    /**
     * @generated from field: api.ActorPayload Actor = 11;
     */
    value: ActorPayload;
    case: "Actor";
  } | { case: undefined; value?: undefined } = { case: undefined };

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

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

  /**
   * @generated from field: string ParentEntityID = 8;
   */
  ParentEntityID = "";

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.MovementEnrichment";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "ParentEventID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "EntityName", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "EntityRefID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "RefFilter", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "MergePath", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 10, name: "Item", kind: "message", T: ItemPayload, oneof: "Content" },
    { no: 11, name: "Actor", kind: "message", T: ActorPayload, oneof: "Content" },
    { no: 6, name: "Project", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 7, name: "ParentEntityName", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 8, name: "ParentEntityID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

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

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

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

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

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

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

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

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

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

