// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file stockAction.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, QuantityInLV, StockMovement, StockSnapshot } from "./warehousingShared_pb.js";
import { CommandHeader, EntityID } from "./shared_pb.js";

/**
 *
 * GenerateDelta : generate a movement with the delta value following the snapshotted message
 *
 * @generated from message api.StockGenerateDeltaPayload
 */
export class StockGenerateDeltaPayload extends Message<StockGenerateDeltaPayload> {
  /**
   * @generated from field: api.EnrichedGoods Goods = 1;
   */
  Goods?: EnrichedGoods;

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

  /**
   * @generated from field: api.StockSnapshot Snapshot = 3;
   */
  Snapshot?: StockSnapshot;

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.StockGenerateDeltaPayload";
  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: "Snapshot", kind: "message", T: StockSnapshot },
    { no: 4, name: "QuantityInBaseLV", kind: "message", T: QuantityInLV },
  ]);

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

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

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

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

/**
 * @generated from message api.StockGenerateDelta
 */
export class StockGenerateDelta extends Message<StockGenerateDelta> {
  /**
   * @generated from field: api.CommandHeader Header = 1;
   */
  Header?: CommandHeader;

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

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

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

  /**
   * @generated from field: api.StockGenerateDeltaPayload PreviousPayload = 5;
   */
  PreviousPayload?: StockGenerateDeltaPayload;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.StockGenerateDelta";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Header", kind: "message", T: CommandHeader },
    { no: 2, name: "ID", kind: "message", T: EntityID },
    { no: 3, name: "Payload", kind: "message", T: StockGenerateDeltaPayload },
    { no: 4, name: "EventPayload", kind: "message", T: StockGenerateDeltaPayload },
    { no: 5, name: "PreviousPayload", kind: "message", T: StockGenerateDeltaPayload },
  ]);

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

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

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

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

/**
 *
 * UpdateMovement : send to the movement the value of the stock just after the movement is applied
 *
 * @generated from message api.StockUpdateMovementPayload
 */
export class StockUpdateMovementPayload extends Message<StockUpdateMovementPayload> {
  /**
   * @generated from field: api.StockMovement Movement = 1;
   */
  Movement?: StockMovement;

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.StockUpdateMovementPayload";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Movement", kind: "message", T: StockMovement },
    { no: 2, name: "QuantityInBaseLV", kind: "message", T: QuantityInLV },
  ]);

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

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

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

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

/**
 * @generated from message api.StockUpdateMovement
 */
export class StockUpdateMovement extends Message<StockUpdateMovement> {
  /**
   * @generated from field: api.CommandHeader Header = 1;
   */
  Header?: CommandHeader;

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

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

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

  /**
   * @generated from field: api.StockUpdateMovementPayload PreviousPayload = 5;
   */
  PreviousPayload?: StockUpdateMovementPayload;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.StockUpdateMovement";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Header", kind: "message", T: CommandHeader },
    { no: 2, name: "ID", kind: "message", T: EntityID },
    { no: 3, name: "Payload", kind: "message", T: StockUpdateMovementPayload },
    { no: 4, name: "EventPayload", kind: "message", T: StockUpdateMovementPayload },
    { no: 5, name: "PreviousPayload", kind: "message", T: StockUpdateMovementPayload },
  ]);

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

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

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

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

