// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file transportShared.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 { DateTime } from "./shared_pb.js";
import { GeographicalCoordinates } from "./repositoryShared_pb.js";
import { TradeTier } from "./tradeShared_pb.js";

/**
 *
 * All statuses for Tracking entity.
 *
 * Thsese status are computed from the tracking event code. They globally match to IFTSTA event codes.
 *
 * 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.TrackingStatusCode
 */
export enum TrackingStatusCode {
  /**
   * @generated from enum value: TRACKINGSTATUS_0000_UNKNOWN = 0;
   */
  TRACKINGSTATUS_0000_UNKNOWN = 0,

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

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

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

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

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

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

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

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

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

  /**
   * @generated from enum value: TRACKINGSTATUS_4800_CARRIER_SWITCHED = 4800;
   */
  TRACKINGSTATUS_4800_CARRIER_SWITCHED = 4800,

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

  /**
   * @generated from enum value: TRACKINGSTATUS_5500_CANCELED = 5500;
   */
  TRACKINGSTATUS_5500_CANCELED = 5500,
}
// Retrieve enum metadata with: proto3.getEnumType(TrackingStatusCode)
proto3.util.setEnumType(TrackingStatusCode, "api.TrackingStatusCode", [
  { no: 0, name: "TRACKINGSTATUS_0000_UNKNOWN" },
  { no: 500, name: "TRACKINGSTATUS_0500_INSTRUCTION_RECEIVED" },
  { no: 1000, name: "TRACKINGSTATUS_1000_BOOKED" },
  { no: 1500, name: "TRACKINGSTATUS_1500_COLLECTING" },
  { no: 2000, name: "TRACKINGSTATUS_2000_COLLECTION_ERROR" },
  { no: 2500, name: "TRACKINGSTATUS_2500_COLLECTED" },
  { no: 3000, name: "TRACKINGSTATUS_3000_HANDLED_BY_CARRIER" },
  { no: 3500, name: "TRACKINGSTATUS_3500_DELIVERY_ERROR" },
  { no: 4000, name: "TRACKINGSTATUS_4000_INTERRUPTED" },
  { no: 4500, name: "TRACKINGSTATUS_4500_DELIVERING" },
  { no: 4800, name: "TRACKINGSTATUS_4800_CARRIER_SWITCHED" },
  { no: 5000, name: "TRACKINGSTATUS_5000_DELIVERY_COMPLETED" },
  { no: 5500, name: "TRACKINGSTATUS_5500_CANCELED" },
]);

/**
 * @generated from enum api.TrackingEventCode
 */
export enum TrackingEventCode {
  /**
   * @generated from enum value: TRACKING_EVENT_UNKNOWN = 0;
   */
  TRACKING_EVENT_UNKNOWN = 0,

  /**
   * Instrcutions d'expédition reçues
   *
   * @generated from enum value: TRACKING_EVENT_IFTSTA_321 = 1;
   */
  TRACKING_EVENT_IFTSTA_321 = 1,

  /**
   * Réservation des moyens réalisés
   *
   * @generated from enum value: TRACKING_EVENT_IFTSTA_6 = 2;
   */
  TRACKING_EVENT_IFTSTA_6 = 2,

  /**
   * Enlèvement en cours
   *
   * @generated from enum value: TRACKING_EVENT_IFTSTA_5 = 3;
   */
  TRACKING_EVENT_IFTSTA_5 = 3,

  /**
   * Enlèvement non réalisé
   *
   * @generated from enum value: TRACKING_EVENT_IFTSTA_53 = 4;
   */
  TRACKING_EVENT_IFTSTA_53 = 4,

  /**
   * Enlevé
   *
   * @generated from enum value: TRACKING_EVENT_IFTSTA_13 = 5;
   */
  TRACKING_EVENT_IFTSTA_13 = 5,

  /**
   * Pris en charge par le transporteur
   *
   * @generated from enum value: TRACKING_EVENT_IFTSTA_349 = 6;
   */
  TRACKING_EVENT_IFTSTA_349 = 6,

  /**
   * Livraison en cours
   *
   * @generated from enum value: TRACKING_EVENT_IFTSTA_113 = 7;
   */
  TRACKING_EVENT_IFTSTA_113 = 7,

  /**
   * Interruption de l'acheminement
   *
   * @generated from enum value: TRACKING_EVENT_IFTSTA_90 = 8;
   */
  TRACKING_EVENT_IFTSTA_90 = 8,

  /**
   * Livraison non aboutie
   *
   * @generated from enum value: TRACKING_EVENT_IFTSTA_56 = 9;
   */
  TRACKING_EVENT_IFTSTA_56 = 9,

  /**
   * Livraison effectuée
   *
   * @generated from enum value: TRACKING_EVENT_IFTSTA_21 = 10;
   */
  TRACKING_EVENT_IFTSTA_21 = 10,

  /**
   * Processus terminé
   *
   * @generated from enum value: TRACKING_EVENT_IFTSTA_14 = 11;
   */
  TRACKING_EVENT_IFTSTA_14 = 11,
}
// Retrieve enum metadata with: proto3.getEnumType(TrackingEventCode)
proto3.util.setEnumType(TrackingEventCode, "api.TrackingEventCode", [
  { no: 0, name: "TRACKING_EVENT_UNKNOWN" },
  { no: 1, name: "TRACKING_EVENT_IFTSTA_321" },
  { no: 2, name: "TRACKING_EVENT_IFTSTA_6" },
  { no: 3, name: "TRACKING_EVENT_IFTSTA_5" },
  { no: 4, name: "TRACKING_EVENT_IFTSTA_53" },
  { no: 5, name: "TRACKING_EVENT_IFTSTA_13" },
  { no: 6, name: "TRACKING_EVENT_IFTSTA_349" },
  { no: 7, name: "TRACKING_EVENT_IFTSTA_113" },
  { no: 8, name: "TRACKING_EVENT_IFTSTA_90" },
  { no: 9, name: "TRACKING_EVENT_IFTSTA_56" },
  { no: 10, name: "TRACKING_EVENT_IFTSTA_21" },
  { no: 11, name: "TRACKING_EVENT_IFTSTA_14" },
]);

/**
 * @generated from message api.TrackingStatus
 */
export class TrackingStatus extends Message<TrackingStatus> {
  /**
   * @generated from field: api.TrackingStatusCode StatusCode = 1;
   */
  StatusCode = TrackingStatusCode.TRACKINGSTATUS_0000_UNKNOWN;

  /**
   * UTC date/time in <a href='https://en.wikipedia.org/wiki/ISO_8601'>ISO 8601</a> format
   *
   * @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<TrackingStatus>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.TrackingStatus";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "StatusCode", kind: "enum", T: proto3.getEnumType(TrackingStatusCode) },
    { 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>): TrackingStatus {
    return new TrackingStatus().fromBinary(bytes, options);
  }

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

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

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

/**
 * @generated from message api.TrackingStatusStruct
 */
export class TrackingStatusStruct extends Message<TrackingStatusStruct> {
  /**
   * Current status of the Handlingunit entity
   *
   * @generated from field: api.TrackingStatus Current = 1;
   */
  Current?: TrackingStatus;

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

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

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

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

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

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

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

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

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

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

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

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

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

  /**
   * @generated from field: api.GeographicalCoordinates Location = 6;
   */
  Location?: GeographicalCoordinates;

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

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

  /**
   * DateTime DispatchedDateTime = 8 ;
   *
   * @generated from field: api.TradeTier HUCarrier = 9;
   */
  HUCarrier?: TradeTier;

  /**
   * @generated from field: api.TradeTier HUShipFrom = 10;
   */
  HUShipFrom?: TradeTier;

  /**
   * @generated from field: api.TradeTier HUShipTo = 11;
   */
  HUShipTo?: TradeTier;

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.TrackingSummary";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "TrackingID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "Status", kind: "message", T: TrackingStatus },
    { no: 3, name: "TrackedHandlingunitID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "TrackingURL", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "NextTrackingID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 6, name: "Location", kind: "message", T: GeographicalCoordinates },
    { no: 7, name: "Reason", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 8, name: "PlusCode", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 9, name: "HUCarrier", kind: "message", T: TradeTier },
    { no: 10, name: "HUShipFrom", kind: "message", T: TradeTier },
    { no: 11, name: "HUShipTo", kind: "message", T: TradeTier },
  ]);

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

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

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

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

/**
 *
 * Description for tracking event could be added ...
 *
 * @generated from message api.TrackingEvent
 */
export class TrackingEvent extends Message<TrackingEvent> {
  /**
   * @generated from field: api.DateTime Date = 1;
   */
  Date?: DateTime;

  /**
   * @generated from field: api.TrackingEventCode Code = 2;
   */
  Code = TrackingEventCode.TRACKING_EVENT_UNKNOWN;

  /**
   * @generated from field: api.GeographicalCoordinates Location = 3;
   */
  Location?: GeographicalCoordinates;

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

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

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

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.TrackingEvent";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Date", kind: "message", T: DateTime },
    { no: 2, name: "Code", kind: "enum", T: proto3.getEnumType(TrackingEventCode) },
    { no: 3, name: "Location", kind: "message", T: GeographicalCoordinates },
    { no: 4, name: "Reason", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "PlusCode", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

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

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

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

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

