// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file tradeShared.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, ClaimSummary, DateTime, MetadataElement, QuantityVolume, QuantityWeight } from "./shared_pb.js";
import { QuantifiedGoodsByHU, QuantifiedRequestedGoods, QuantityByLV, QuantityInLV } from "./warehousingShared_pb.js";
import { ActorPayload } from "./actor_pb.js";
import { Interlocutor } from "./repositoryShared_pb.js";
import { PartnerPayload } from "./partner_pb.js";

/**
 *
 * 	All statuses for Order entity
 *
 * Order statuses are mainly computed from the executionflowupdated event, by getting the less-advanced executionflow status.
 *
 * https://hardisgroupe.sharepoint.com/:p:/r/sites/N1/_layouts/15/Doc.aspx?sourcedoc=%7B5ECE4F90-6775-4EDA-BC25-7AD4982F8415%7D&file=Statuts%20N1_v2.pptx&action=edit&mobileredirect=true
 *
 * @generated from enum api.OrderStatusCode
 */
export enum OrderStatusCode {
  /**
   * @generated from enum value: ORDER_0000_UNKNOWN = 0;
   */
  ORDER_0000_UNKNOWN = 0,

  /**
   * @generated from enum value: ORDER_0300_UNDETERMINED = 300;
   */
  ORDER_0300_UNDETERMINED = 300,

  /**
   * @generated from enum value: ORDER_0500_READY_TO_ALLOCATE = 500;
   */
  ORDER_0500_READY_TO_ALLOCATE = 500,

  /**
   * @generated from enum value: ORDER_1000_ALLOCATING = 1000;
   */
  ORDER_1000_ALLOCATING = 1000,

  /**
   * @generated from enum value: ORDER_1500_ALLOCATION_ERROR = 1500;
   */
  ORDER_1500_ALLOCATION_ERROR = 1500,

  /**
   * @generated from enum value: ORDER_1800_ALLOCATION_COMPLETED = 1800;
   */
  ORDER_1800_ALLOCATION_COMPLETED = 1800,

  /**
   * @generated from enum value: ORDER_2000_READY_TO_PREPARE = 2000;
   */
  ORDER_2000_READY_TO_PREPARE = 2000,

  /**
   * @generated from enum value: ORDER_2500_PREPARATION_ERROR = 2500;
   */
  ORDER_2500_PREPARATION_ERROR = 2500,

  /**
   * @generated from enum value: ORDER_3000_PREPARING = 3000;
   */
  ORDER_3000_PREPARING = 3000,

  /**
   * @generated from enum value: ORDER_3500_PREPARATION_COMPLETED = 3500;
   */
  ORDER_3500_PREPARATION_COMPLETED = 3500,

  /**
   * @generated from enum value: ORDER_4000_READY_TO_TRANSPORT = 4000;
   */
  ORDER_4000_READY_TO_TRANSPORT = 4000,

  /**
   * @generated from enum value: ORDER_4500_TRANSPORT_ERROR = 4500;
   */
  ORDER_4500_TRANSPORT_ERROR = 4500,

  /**
   * @generated from enum value: ORDER_5000_TRANSPORTING = 5000;
   */
  ORDER_5000_TRANSPORTING = 5000,

  /**
   * @generated from enum value: ORDER_5500_TRANSPORT_COMPLETED = 5500;
   */
  ORDER_5500_TRANSPORT_COMPLETED = 5500,

  /**
   * @generated from enum value: ORDER_6000_READY_TO_RECEIVE = 6000;
   */
  ORDER_6000_READY_TO_RECEIVE = 6000,

  /**
   * @generated from enum value: ORDER_6500_RECEPTION_ERROR = 6500;
   */
  ORDER_6500_RECEPTION_ERROR = 6500,

  /**
   * @generated from enum value: ORDER_7000_RECEIVING = 7000;
   */
  ORDER_7000_RECEIVING = 7000,

  /**
   * @generated from enum value: ORDER_7500_RECEPTION_COMPLETED = 7500;
   */
  ORDER_7500_RECEPTION_COMPLETED = 7500,

  /**
   * @generated from enum value: ORDER_8000_COMPLETED = 8000;
   */
  ORDER_8000_COMPLETED = 8000,

  /**
   * @generated from enum value: ORDER_8500_CANCELLED = 8500;
   */
  ORDER_8500_CANCELLED = 8500,
}
// Retrieve enum metadata with: proto3.getEnumType(OrderStatusCode)
proto3.util.setEnumType(OrderStatusCode, "api.OrderStatusCode", [
  { no: 0, name: "ORDER_0000_UNKNOWN" },
  { no: 300, name: "ORDER_0300_UNDETERMINED" },
  { no: 500, name: "ORDER_0500_READY_TO_ALLOCATE" },
  { no: 1000, name: "ORDER_1000_ALLOCATING" },
  { no: 1500, name: "ORDER_1500_ALLOCATION_ERROR" },
  { no: 1800, name: "ORDER_1800_ALLOCATION_COMPLETED" },
  { no: 2000, name: "ORDER_2000_READY_TO_PREPARE" },
  { no: 2500, name: "ORDER_2500_PREPARATION_ERROR" },
  { no: 3000, name: "ORDER_3000_PREPARING" },
  { no: 3500, name: "ORDER_3500_PREPARATION_COMPLETED" },
  { no: 4000, name: "ORDER_4000_READY_TO_TRANSPORT" },
  { no: 4500, name: "ORDER_4500_TRANSPORT_ERROR" },
  { no: 5000, name: "ORDER_5000_TRANSPORTING" },
  { no: 5500, name: "ORDER_5500_TRANSPORT_COMPLETED" },
  { no: 6000, name: "ORDER_6000_READY_TO_RECEIVE" },
  { no: 6500, name: "ORDER_6500_RECEPTION_ERROR" },
  { no: 7000, name: "ORDER_7000_RECEIVING" },
  { no: 7500, name: "ORDER_7500_RECEPTION_COMPLETED" },
  { no: 8000, name: "ORDER_8000_COMPLETED" },
  { no: 8500, name: "ORDER_8500_CANCELLED" },
]);

/**
 *
 * 	All statuses for Executionflow entity
 *
 * The executionflow statuses are the most complexe statuses to get. They are computed from handlingunitupdated.
 *
 * In addition, because we do not know in advance how the execution flow will be prepare, we need to compare the prepared quantity the requested quantity.
 *
 * https://hardisgroupe.sharepoint.com/:p:/r/sites/N1/_layouts/15/Doc.aspx?sourcedoc=%7B5ECE4F90-6775-4EDA-BC25-7AD4982F8415%7D&file=Statuts%20N1_v2.pptx&action=edit&mobileredirect=true
 *
 * @generated from enum api.ExecutionflowStatusCode
 */
export enum ExecutionflowStatusCode {
  /**
   * @generated from enum value: EXECUTIONFLOW_0000_UNKNOWN = 0;
   */
  EXECUTIONFLOW_0000_UNKNOWN = 0,

  /**
   * @generated from enum value: EXECUTIONFLOW_0050_UNDETERMINED = 50;
   */
  EXECUTIONFLOW_0050_UNDETERMINED = 50,

  /**
   * @generated from enum value: EXECUTIONFLOW_0300_READY_TO_ALLOCATE = 300;
   */
  EXECUTIONFLOW_0300_READY_TO_ALLOCATE = 300,

  /**
   * @generated from enum value: EXECUTIONFLOW_0500_ALLOCATING = 500;
   */
  EXECUTIONFLOW_0500_ALLOCATING = 500,

  /**
   * @generated from enum value: EXECUTIONFLOW_1000_ALLOCATION_ERROR = 1000;
   */
  EXECUTIONFLOW_1000_ALLOCATION_ERROR = 1000,

  /**
   * @generated from enum value: EXECUTIONFLOW_1300_ALLOCATION_COMPLETED = 1300;
   */
  EXECUTIONFLOW_1300_ALLOCATION_COMPLETED = 1300,

  /**
   * @generated from enum value: EXECUTIONFLOW_1500_READY_TO_PREPARE = 1500;
   */
  EXECUTIONFLOW_1500_READY_TO_PREPARE = 1500,

  /**
   * @generated from enum value: EXECUTIONFLOW_2000_PREPARATION_ERROR = 2000;
   */
  EXECUTIONFLOW_2000_PREPARATION_ERROR = 2000,

  /**
   * @generated from enum value: EXECUTIONFLOW_2500_PREPARING = 2500;
   */
  EXECUTIONFLOW_2500_PREPARING = 2500,

  /**
   * @generated from enum value: EXECUTIONFLOW_3000_PREPARATION_COMPLETED = 3000;
   */
  EXECUTIONFLOW_3000_PREPARATION_COMPLETED = 3000,

  /**
   * @generated from enum value: EXECUTIONFLOW_3500_READY_TO_TRANSPORT = 3500;
   */
  EXECUTIONFLOW_3500_READY_TO_TRANSPORT = 3500,

  /**
   * @generated from enum value: EXECUTIONFLOW_4000_TRANSPORT_ERROR = 4000;
   */
  EXECUTIONFLOW_4000_TRANSPORT_ERROR = 4000,

  /**
   * @generated from enum value: EXECUTIONFLOW_4500_TRANSPORTING = 4500;
   */
  EXECUTIONFLOW_4500_TRANSPORTING = 4500,

  /**
   * @generated from enum value: EXECUTIONFLOW_5000_TRANSPORT_COMPLETED = 5000;
   */
  EXECUTIONFLOW_5000_TRANSPORT_COMPLETED = 5000,

  /**
   * @generated from enum value: EXECUTIONFLOW_5500_READY_TO_RECEIVE = 5500;
   */
  EXECUTIONFLOW_5500_READY_TO_RECEIVE = 5500,

  /**
   * @generated from enum value: EXECUTIONFLOW_6000_RECEPTION_ERROR = 6000;
   */
  EXECUTIONFLOW_6000_RECEPTION_ERROR = 6000,

  /**
   * @generated from enum value: EXECUTIONFLOW_6500_RECEIVING = 6500;
   */
  EXECUTIONFLOW_6500_RECEIVING = 6500,

  /**
   * @generated from enum value: EXECUTIONFLOW_7000_RECEPTION_COMPLETED = 7000;
   */
  EXECUTIONFLOW_7000_RECEPTION_COMPLETED = 7000,

  /**
   * @generated from enum value: EXECUTIONFLOW_7500_COMPLETED = 7500;
   */
  EXECUTIONFLOW_7500_COMPLETED = 7500,

  /**
   * @generated from enum value: EXECUTIONFLOW_8000_CANCELLED = 8000;
   */
  EXECUTIONFLOW_8000_CANCELLED = 8000,
}
// Retrieve enum metadata with: proto3.getEnumType(ExecutionflowStatusCode)
proto3.util.setEnumType(ExecutionflowStatusCode, "api.ExecutionflowStatusCode", [
  { no: 0, name: "EXECUTIONFLOW_0000_UNKNOWN" },
  { no: 50, name: "EXECUTIONFLOW_0050_UNDETERMINED" },
  { no: 300, name: "EXECUTIONFLOW_0300_READY_TO_ALLOCATE" },
  { no: 500, name: "EXECUTIONFLOW_0500_ALLOCATING" },
  { no: 1000, name: "EXECUTIONFLOW_1000_ALLOCATION_ERROR" },
  { no: 1300, name: "EXECUTIONFLOW_1300_ALLOCATION_COMPLETED" },
  { no: 1500, name: "EXECUTIONFLOW_1500_READY_TO_PREPARE" },
  { no: 2000, name: "EXECUTIONFLOW_2000_PREPARATION_ERROR" },
  { no: 2500, name: "EXECUTIONFLOW_2500_PREPARING" },
  { no: 3000, name: "EXECUTIONFLOW_3000_PREPARATION_COMPLETED" },
  { no: 3500, name: "EXECUTIONFLOW_3500_READY_TO_TRANSPORT" },
  { no: 4000, name: "EXECUTIONFLOW_4000_TRANSPORT_ERROR" },
  { no: 4500, name: "EXECUTIONFLOW_4500_TRANSPORTING" },
  { no: 5000, name: "EXECUTIONFLOW_5000_TRANSPORT_COMPLETED" },
  { no: 5500, name: "EXECUTIONFLOW_5500_READY_TO_RECEIVE" },
  { no: 6000, name: "EXECUTIONFLOW_6000_RECEPTION_ERROR" },
  { no: 6500, name: "EXECUTIONFLOW_6500_RECEIVING" },
  { no: 7000, name: "EXECUTIONFLOW_7000_RECEPTION_COMPLETED" },
  { no: 7500, name: "EXECUTIONFLOW_7500_COMPLETED" },
  { no: 8000, name: "EXECUTIONFLOW_8000_CANCELLED" },
]);

/**
 *
 * 	Structure to reference another entity with a reason
 *
 * @generated from message api.ReferencedID
 */
export class ReferencedID extends Message<ReferencedID> {
  /**
   * @generated from field: string RefID = 1;
   */
  RefID = "";

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ReferencedID";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "RefID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "Reason", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

/**
 * @generated from message api.OrderRequestedMilestones
 */
export class OrderRequestedMilestones extends Message<OrderRequestedMilestones> {
  /**
   * @generated from field: api.DateTime RequestedDeliveryDateTime = 1;
   */
  RequestedDeliveryDateTime?: DateTime;

  /**
   * @generated from field: api.DateTime RequestedPickUpDateTime = 2;
   */
  RequestedPickUpDateTime?: DateTime;

  /**
   * @generated from field: api.DateTime RequestedShipDateTime = 3;
   */
  RequestedShipDateTime?: DateTime;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.OrderRequestedMilestones";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "RequestedDeliveryDateTime", kind: "message", T: DateTime },
    { no: 2, name: "RequestedPickUpDateTime", kind: "message", T: DateTime },
    { no: 3, name: "RequestedShipDateTime", kind: "message", T: DateTime },
  ]);

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

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

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

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

/**
 *
 * 	Definition of trade.Order.
 * 	It defines the requested goods
 *
 * @generated from message api.OrderLine
 */
export class OrderLine extends Message<OrderLine> {
  /**
   * @generated from field: string LineID = 1;
   */
  LineID = "";

  /**
   * Option to prevent metadata definition in UI
   *
   * @generated from field: api.QuantifiedRequestedGoods RequestedContent = 2;
   */
  RequestedContent?: QuantifiedRequestedGoods;

  /**
   * 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 = 3;
   */
  MetaData: MetadataElement[] = [];

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.OrderLine";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "LineID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "RequestedContent", kind: "message", T: QuantifiedRequestedGoods },
    { no: 3, name: "MetaData", kind: "message", T: MetadataElement, repeated: true },
    { no: 4, name: "RequestedMetrics", kind: "message", T: GoodsMetrics },
  ]);

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

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

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

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

/**
 *
 * 	Definition of trade. Executionflow lines.
 * 	It defines the requested goods and the prepared goods
 *
 * @generated from message api.ExeFlowLine
 */
export class ExeFlowLine extends Message<ExeFlowLine> {
  /**
   * @generated from field: string LineID = 1;
   */
  LineID = "";

  /**
   * @generated from field: api.QuantifiedRequestedGoods RequestedContent = 2;
   */
  RequestedContent?: QuantifiedRequestedGoods;

  /**
   * 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 = 3;
   */
  MetaData: MetadataElement[] = [];

  /**
   * @generated from field: repeated api.QuantifiedGoodsByHU ShippedContents = 4;
   */
  ShippedContents: QuantifiedGoodsByHU[] = [];

  /**
   * This field will be computed at aggregation, not exposed through APIs
   *
   * @generated from field: bool PreparedItemDiffersFromRequestedItem = 5;
   */
  PreparedItemDiffersFromRequestedItem = false;

  /**
   * This field will be computed at aggregation, not exposed through APIs
   *
   * @generated from field: bool ReceivedItemDiffersFromRequestedItem = 6;
   */
  ReceivedItemDiffersFromRequestedItem = false;

  /**
   * @generated from field: api.GoodsMetrics RequestedMetrics = 7;
   */
  RequestedMetrics?: GoodsMetrics;

  /**
   * @generated from field: api.GoodsMetrics TotalPreparedMetrics = 8;
   */
  TotalPreparedMetrics?: GoodsMetrics;

  /**
   * @generated from field: api.GoodsMetrics TotalReceivedMetrics = 9;
   */
  TotalReceivedMetrics?: GoodsMetrics;

  /**
   * @generated from field: bool CreatedFromHU = 12;
   */
  CreatedFromHU = false;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ExeFlowLine";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "LineID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "RequestedContent", kind: "message", T: QuantifiedRequestedGoods },
    { no: 3, name: "MetaData", kind: "message", T: MetadataElement, repeated: true },
    { no: 4, name: "ShippedContents", kind: "message", T: QuantifiedGoodsByHU, repeated: true },
    { no: 5, name: "PreparedItemDiffersFromRequestedItem", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
    { no: 6, name: "ReceivedItemDiffersFromRequestedItem", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
    { no: 7, name: "RequestedMetrics", kind: "message", T: GoodsMetrics },
    { no: 8, name: "TotalPreparedMetrics", kind: "message", T: GoodsMetrics },
    { no: 9, name: "TotalReceivedMetrics", kind: "message", T: GoodsMetrics },
    { no: 12, name: "CreatedFromHU", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
  ]);

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

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

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

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

/**
 * @generated from message api.GoodsMetrics
 */
export class GoodsMetrics extends Message<GoodsMetrics> {
  /**
   * @generated from field: api.QuantityWeight GrossWeight = 1;
   */
  GrossWeight?: QuantityWeight;

  /**
   * @generated from field: api.QuantityVolume Volume = 2;
   */
  Volume?: QuantityVolume;

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

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

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.GoodsMetrics";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "GrossWeight", kind: "message", T: QuantityWeight },
    { no: 2, name: "Volume", kind: "message", T: QuantityVolume },
    { no: 3, name: "QuantityInBaseLV", kind: "message", T: QuantityInLV },
    { no: 4, name: "QuantityByLVs", kind: "message", T: QuantityByLV, repeated: true },
    { no: 5, name: "LVDetailledQuantity", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

/**
 * @generated from message api.TradeTier
 */
export class TradeTier extends Message<TradeTier> {
  /**
   * @generated from field: string ActorID = 2;
   */
  ActorID = "";

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

  /**
   * @generated from field: api.Interlocutor Contact = 5;
   */
  Contact?: Interlocutor;

  /**
   * Must be an ID of an existing partner
   *
   * @generated from field: string PartnerID = 6;
   */
  PartnerID = "";

  /**
   * @generated from field: api.PartnerPayload Partner = 7;
   */
  Partner?: PartnerPayload;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.TradeTier";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 2, name: "ActorID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "Actor", kind: "message", T: ActorPayload },
    { no: 5, name: "Contact", kind: "message", T: Interlocutor },
    { no: 6, name: "PartnerID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 7, name: "Partner", kind: "message", T: PartnerPayload },
  ]);

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

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

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

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

/**
 * @generated from message api.ETA
 */
export class ETA extends Message<ETA> {
  /**
   *    DateTime ETA = 1;                  // removed for 1.7
   *    DateTime WhenETAWasCalculated = 2; // removed for 1.7
   *
   * @generated from field: api.DateTime StartETA = 3;
   */
  StartETA?: DateTime;

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

  /**
   * @generated from field: api.DateTime ActualDate = 5;
   */
  ActualDate?: DateTime;

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ETA";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 3, name: "StartETA", kind: "message", T: DateTime },
    { no: 4, name: "EndETA", kind: "message", T: DateTime },
    { no: 5, name: "ActualDate", kind: "message", T: DateTime },
    { no: 6, name: "Comment", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

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

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ETAbyHU";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "HandlingunitID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "ETA", kind: "message", T: ETA },
  ]);

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

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

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

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

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

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ETAbyExecutionflow";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "ExecutionflowID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "ETA", kind: "message", T: ETA },
  ]);

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

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

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

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

/**
 *
 * 	Order entity status structure
 *
 * @generated from message api.OrderStatus
 */
export class OrderStatus extends Message<OrderStatus> {
  /**
   * @generated from field: api.OrderStatusCode StatusCode = 1;
   */
  StatusCode = OrderStatusCode.ORDER_0000_UNKNOWN;

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

  /**
   * Status effective date. Set by the event's RefDate that triggered the status change.
   *
   * @generated from field: api.DateTime ActualDate = 3;
   */
  ActualDate?: DateTime;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.OrderStatus";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "StatusCode", kind: "enum", T: proto3.getEnumType(OrderStatusCode) },
    { no: 2, name: "Date", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "ActualDate", kind: "message", T: DateTime },
  ]);

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

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

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

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

/**
 *
 * 	OrderStatusStruct statuses structure
 *
 * @generated from message api.OrderStatusStruct
 */
export class OrderStatusStruct extends Message<OrderStatusStruct> {
  /**
   * Current status of the Order entity
   *
   * @generated from field: api.OrderStatus Current = 1;
   */
  Current?: OrderStatus;

  /**
   * List of all status history of the Order entity
   *
   * @generated from field: repeated api.OrderStatus History = 2;
   */
  History: OrderStatus[] = [];

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.OrderStatusStruct";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Current", kind: "message", T: OrderStatus },
    { no: 2, name: "History", kind: "message", T: OrderStatus, repeated: true },
    { no: 3, name: "CreationDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

/**
 *
 * 	Executionflow entity status structure
 *
 * @generated from message api.ExecutionflowStatus
 */
export class ExecutionflowStatus extends Message<ExecutionflowStatus> {
  /**
   * @generated from field: api.ExecutionflowStatusCode StatusCode = 1;
   */
  StatusCode = ExecutionflowStatusCode.EXECUTIONFLOW_0000_UNKNOWN;

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

  /**
   * Status effective date. Set by the event's RefDate that triggered the status change.
   *
   * @generated from field: api.DateTime ActualDate = 3;
   */
  ActualDate?: DateTime;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ExecutionflowStatus";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "StatusCode", kind: "enum", T: proto3.getEnumType(ExecutionflowStatusCode) },
    { no: 2, name: "Date", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "ActualDate", kind: "message", T: DateTime },
  ]);

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

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

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

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

/**
 *
 * 	ExecutionflowStatusStruct statuses structure
 *
 * @generated from message api.ExecutionflowStatusStruct
 */
export class ExecutionflowStatusStruct extends Message<ExecutionflowStatusStruct> {
  /**
   * Current status of the Executionflow entity
   *
   * @generated from field: api.ExecutionflowStatus Current = 1;
   */
  Current?: ExecutionflowStatus;

  /**
   * List of all status history of the Executionflow entity
   *
   * @generated from field: repeated api.ExecutionflowStatus History = 2;
   */
  History: ExecutionflowStatus[] = [];

  /**
   * @generated from field: uint32 Version = 3;
   */
  Version = 0;

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ExecutionflowStatusStruct";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Current", kind: "message", T: ExecutionflowStatus },
    { no: 2, name: "History", kind: "message", T: ExecutionflowStatus, repeated: true },
    { no: 3, name: "Version", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
    { no: 4, name: "CreationDate", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

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

  /**
   * @generated from field: api.ExecutionflowStatus Status = 2;
   */
  Status?: ExecutionflowStatus;

  /**
   * Where to ship the executionflow from
   *
   * @generated from field: api.TradeTier ShipFrom = 7;
   */
  ShipFrom?: TradeTier;

  /**
   * Where to ship the executionflow to
   *
   * @generated from field: api.TradeTier ShipTo = 8;
   */
  ShipTo?: TradeTier;

  /**
   * @generated from field: api.TradeTier Carrier = 6;
   */
  Carrier?: TradeTier;

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

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

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

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ExecutionflowSummary";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "ExecutionflowID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "Status", kind: "message", T: ExecutionflowStatus },
    { no: 7, name: "ShipFrom", kind: "message", T: TradeTier },
    { no: 8, name: "ShipTo", kind: "message", T: TradeTier },
    { no: 6, name: "Carrier", kind: "message", T: TradeTier },
    { no: 18, name: "Attachments", kind: "message", T: AttachmentSummary, repeated: true },
    { no: 19, name: "AttachmentNumber", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 20, name: "Claims", kind: "message", T: ClaimSummary, repeated: true },
    { no: 21, name: "ClaimNumber", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
  ]);

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

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

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

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

/**
 * Not a GS1 Object.
 * Temporary version
 *
 * @generated from message api.ExecutionGraph
 */
export class ExecutionGraph extends Message<ExecutionGraph> {
  /**
   * @generated from field: repeated string ParcelIDs = 1;
   */
  ParcelIDs: string[] = [];

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ExecutionGraph";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "ParcelIDs", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
  ]);

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

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

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

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

