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

/**
 * @generated from message api.StockPayload
 */
export class StockPayload extends Message<StockPayload> {
  /**
   * @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;

  /**
   * this struct is managed into preAgg cumulateSnapshotQuantity method
   *
   * @generated from field: api.StockSnapshot Snapshot = 4;
   */
  Snapshot?: StockSnapshot;

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

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

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

  /**
   * @generated from field: repeated api.QuantityByLV QuantityByLVs = 8;
   */
  QuantityByLVs: QuantityByLV[] = [];

  /**
   * @generated from field: string LVDetailledQuantity = 9;
   */
  LVDetailledQuantity = "";

  /**
   * @generated from field: repeated api.StockMovement LatestMovements = 10;
   */
  LatestMovements: StockMovement[] = [];

  /**
   * Only used for clickhouse extended-stock
   *
   * @generated from field: double RequestedStockValue = 11;
   */
  RequestedStockValue = 0;

  /**
   * Only used for clickhouse extended-stock
   *
   * @generated from field: double ToReceiveStockValue = 12;
   */
  ToReceiveStockValue = 0;

  /**
   * Only used for clickhouse extended-stock
   *
   * @generated from field: string LastUpdateStockDateTime = 13;
   */
  LastUpdateStockDateTime = "";

  /**
   * Only used for clickhouse extended-stock
   *
   * @generated from field: string LastUpdateRequestedDateTime = 14;
   */
  LastUpdateRequestedDateTime = "";

  /**
   * Only used for clickhouse extended-stock
   *
   * @generated from field: string LastUpdateToReceiveDateTime = 15;
   */
  LastUpdateToReceiveDateTime = "";

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.StockPayload";
  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: "Snapshot", kind: "message", T: StockSnapshot },
    { no: 5, name: "Movement", kind: "message", T: StockMovement },
    { no: 6, name: "Status", kind: "message", T: StockStatusStruct },
    { no: 7, name: "QuantityInBaseLV", kind: "message", T: QuantityInLV },
    { no: 8, name: "QuantityByLVs", kind: "message", T: QuantityByLV, repeated: true },
    { no: 9, name: "LVDetailledQuantity", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 10, name: "LatestMovements", kind: "message", T: StockMovement, repeated: true },
    { no: 11, name: "RequestedStockValue", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
    { no: 12, name: "ToReceiveStockValue", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
    { no: 13, name: "LastUpdateStockDateTime", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 14, name: "LastUpdateRequestedDateTime", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 15, name: "LastUpdateToReceiveDateTime", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

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

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

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

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

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

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

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

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

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

/**
 * @generated from message api.StockEnrichment
 */
export class StockEnrichment extends Message<StockEnrichment> {
  /**
   * @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.StockEnrichment.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<StockEnrichment>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.StockEnrichment";
  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>): StockEnrichment {
    return new StockEnrichment().fromBinary(bytes, options);
  }

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

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

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

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

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

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

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

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

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

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

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

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

