You've already forked npm-core-sdk
670 lines
36 KiB
TypeScript
670 lines
36 KiB
TypeScript
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
|
|
// @generated from protobuf file "trackingAction.proto" (package "api", syntax proto3)
|
|
// tslint:disable
|
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
import { WireType } from "@protobuf-ts/runtime";
|
|
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
import { ETA } from "./tradeShared";
|
|
import { EntityID } from "./shared";
|
|
import { CommandHeader } from "./shared";
|
|
import { TrackingEvent } from "./transportShared";
|
|
import { TradeTier } from "./tradeShared";
|
|
import { DateTime } from "./shared";
|
|
import { TrackingStatusStruct } from "./transportShared";
|
|
// Action Summary
|
|
// - MapSummaryToHU : Map entity status to Handlingunit entity > handlingunit.TrackingUpdated
|
|
// - InitNexTracking : Initiate next Tracking after a switched event > tracking.Dispatched
|
|
// - MapETAToHU : map TrackingETA to Handlingunit entity > handlingunit.TrackingETAUpdated
|
|
//
|
|
|
|
/**
|
|
*
|
|
* MapSummaryToHU : map the tracking Summary to the corresponding HU
|
|
*
|
|
* @generated from protobuf message api.TrackingMapSummaryToHUPayload
|
|
*/
|
|
export interface TrackingMapSummaryToHUPayload {
|
|
/**
|
|
* @generated from protobuf field: string HandlingunitID = 1
|
|
*/
|
|
HandlingunitID: string;
|
|
/**
|
|
* @generated from protobuf field: api.TrackingStatusStruct Status = 2
|
|
*/
|
|
Status?: TrackingStatusStruct;
|
|
/**
|
|
* @generated from protobuf field: string TrackingURL = 3
|
|
*/
|
|
TrackingURL: string;
|
|
/**
|
|
* @generated from protobuf field: api.DateTime DispatchedDateTime = 4
|
|
*/
|
|
DispatchedDateTime?: DateTime; // TODO : will disappear when dispatched is removed ...
|
|
/**
|
|
* @generated from protobuf field: api.TradeTier HUCarrier = 9
|
|
*/
|
|
HUCarrier?: TradeTier;
|
|
/**
|
|
* @generated from protobuf field: api.TradeTier HUShipFrom = 10
|
|
*/
|
|
HUShipFrom?: TradeTier;
|
|
/**
|
|
* @generated from protobuf field: api.TradeTier HUShipTo = 11
|
|
*/
|
|
HUShipTo?: TradeTier;
|
|
/**
|
|
* @generated from protobuf field: string NextTrackingID = 12
|
|
*/
|
|
NextTrackingID: string;
|
|
/**
|
|
* @generated from protobuf field: repeated api.TrackingEvent Events = 13
|
|
*/
|
|
Events: TrackingEvent[];
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.TrackingMapStatusToHU
|
|
*/
|
|
export interface TrackingMapStatusToHU {
|
|
/**
|
|
* @generated from protobuf field: api.CommandHeader Header = 1
|
|
*/
|
|
Header?: CommandHeader;
|
|
/**
|
|
* @generated from protobuf field: api.EntityID ID = 2
|
|
*/
|
|
ID?: EntityID;
|
|
/**
|
|
* @generated from protobuf field: api.TrackingMapSummaryToHUPayload Payload = 3
|
|
*/
|
|
Payload?: TrackingMapSummaryToHUPayload;
|
|
/**
|
|
* @generated from protobuf field: api.TrackingMapSummaryToHUPayload EventPayload = 4
|
|
*/
|
|
EventPayload?: TrackingMapSummaryToHUPayload;
|
|
/**
|
|
* @generated from protobuf field: api.TrackingMapSummaryToHUPayload PreviousPayload = 5
|
|
*/
|
|
PreviousPayload?: TrackingMapSummaryToHUPayload;
|
|
}
|
|
/**
|
|
*
|
|
* InitNexTracking : initiate the next tracking after a switched
|
|
*
|
|
* @generated from protobuf message api.TrackingInitNextTrackingPayload
|
|
*/
|
|
export interface TrackingInitNextTrackingPayload {
|
|
/**
|
|
* @generated from protobuf field: string HandlingunitID = 1
|
|
*/
|
|
HandlingunitID: string;
|
|
/**
|
|
* @generated from protobuf field: string NextTrackingID = 2
|
|
*/
|
|
NextTrackingID: string;
|
|
/**
|
|
* @generated from protobuf field: string NextTrackingURL = 3
|
|
*/
|
|
NextTrackingURL: string;
|
|
/**
|
|
* @generated from protobuf field: api.DateTime DispatchedDateTime = 4
|
|
*/
|
|
DispatchedDateTime?: DateTime;
|
|
/**
|
|
* @generated from protobuf field: api.TradeTier NextHUCarrier = 5
|
|
*/
|
|
NextHUCarrier?: TradeTier;
|
|
/**
|
|
* @generated from protobuf field: api.TradeTier NextHUShipFrom = 6
|
|
*/
|
|
NextHUShipFrom?: TradeTier;
|
|
/**
|
|
* @generated from protobuf field: api.TradeTier NextHUShipTo = 7
|
|
*/
|
|
NextHUShipTo?: TradeTier;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.TrackingInitNext
|
|
*/
|
|
export interface TrackingInitNext {
|
|
/**
|
|
* @generated from protobuf field: api.CommandHeader Header = 1
|
|
*/
|
|
Header?: CommandHeader;
|
|
/**
|
|
* @generated from protobuf field: api.EntityID ID = 2
|
|
*/
|
|
ID?: EntityID;
|
|
/**
|
|
* @generated from protobuf field: api.TrackingInitNextTrackingPayload Payload = 3
|
|
*/
|
|
Payload?: TrackingInitNextTrackingPayload;
|
|
/**
|
|
* @generated from protobuf field: api.TrackingInitNextTrackingPayload EventPayload = 4
|
|
*/
|
|
EventPayload?: TrackingInitNextTrackingPayload;
|
|
/**
|
|
* @generated from protobuf field: api.TrackingInitNextTrackingPayload PreviousPayload = 5
|
|
*/
|
|
PreviousPayload?: TrackingInitNextTrackingPayload;
|
|
}
|
|
/**
|
|
*
|
|
* MapETAToHU : map the tracking ETA to the corresponding HU
|
|
*
|
|
* @generated from protobuf message api.TrackingMapETAToHUPayload
|
|
*/
|
|
export interface TrackingMapETAToHUPayload {
|
|
/**
|
|
* @generated from protobuf field: string HandlingunitID = 1
|
|
*/
|
|
HandlingunitID: string;
|
|
/**
|
|
* @generated from protobuf field: api.ETA TrackingETA = 2
|
|
*/
|
|
TrackingETA?: ETA;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.TrackingMapETAToHU
|
|
*/
|
|
export interface TrackingMapETAToHU {
|
|
/**
|
|
* @generated from protobuf field: api.CommandHeader Header = 1
|
|
*/
|
|
Header?: CommandHeader;
|
|
/**
|
|
* @generated from protobuf field: api.EntityID ID = 2
|
|
*/
|
|
ID?: EntityID;
|
|
/**
|
|
* @generated from protobuf field: api.TrackingMapETAToHUPayload Payload = 3
|
|
*/
|
|
Payload?: TrackingMapETAToHUPayload;
|
|
/**
|
|
* @generated from protobuf field: api.TrackingMapETAToHUPayload EventPayload = 4
|
|
*/
|
|
EventPayload?: TrackingMapETAToHUPayload;
|
|
/**
|
|
* @generated from protobuf field: api.TrackingMapETAToHUPayload PreviousPayload = 5
|
|
*/
|
|
PreviousPayload?: TrackingMapETAToHUPayload;
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class TrackingMapSummaryToHUPayload$Type extends MessageType<TrackingMapSummaryToHUPayload> {
|
|
constructor() {
|
|
super("api.TrackingMapSummaryToHUPayload", [
|
|
{ no: 1, name: "HandlingunitID", kind: "scalar", localName: "HandlingunitID", jsonName: "HandlingunitID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "Status", kind: "message", localName: "Status", jsonName: "Status", T: () => TrackingStatusStruct },
|
|
{ no: 3, name: "TrackingURL", kind: "scalar", localName: "TrackingURL", jsonName: "TrackingURL", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 4, name: "DispatchedDateTime", kind: "message", localName: "DispatchedDateTime", jsonName: "DispatchedDateTime", T: () => DateTime },
|
|
{ no: 9, name: "HUCarrier", kind: "message", localName: "HUCarrier", jsonName: "HUCarrier", T: () => TradeTier },
|
|
{ no: 10, name: "HUShipFrom", kind: "message", localName: "HUShipFrom", jsonName: "HUShipFrom", T: () => TradeTier },
|
|
{ no: 11, name: "HUShipTo", kind: "message", localName: "HUShipTo", jsonName: "HUShipTo", T: () => TradeTier },
|
|
{ no: 12, name: "NextTrackingID", kind: "scalar", localName: "NextTrackingID", jsonName: "NextTrackingID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 13, name: "Events", kind: "message", localName: "Events", jsonName: "Events", repeat: 2 /*RepeatType.UNPACKED*/, T: () => TrackingEvent }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Map the tracking Summary to the corresponding HU" } }, "api.messageType": "Command", "api.payload": true, "api.action": "MapSummaryToHU" });
|
|
}
|
|
create(value?: PartialMessage<TrackingMapSummaryToHUPayload>): TrackingMapSummaryToHUPayload {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.HandlingunitID = "";
|
|
message.TrackingURL = "";
|
|
message.NextTrackingID = "";
|
|
message.Events = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<TrackingMapSummaryToHUPayload>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingMapSummaryToHUPayload): TrackingMapSummaryToHUPayload {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string HandlingunitID */ 1:
|
|
message.HandlingunitID = reader.string();
|
|
break;
|
|
case /* api.TrackingStatusStruct Status */ 2:
|
|
message.Status = TrackingStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.Status);
|
|
break;
|
|
case /* string TrackingURL */ 3:
|
|
message.TrackingURL = reader.string();
|
|
break;
|
|
case /* api.DateTime DispatchedDateTime */ 4:
|
|
message.DispatchedDateTime = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.DispatchedDateTime);
|
|
break;
|
|
case /* api.TradeTier HUCarrier */ 9:
|
|
message.HUCarrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.HUCarrier);
|
|
break;
|
|
case /* api.TradeTier HUShipFrom */ 10:
|
|
message.HUShipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.HUShipFrom);
|
|
break;
|
|
case /* api.TradeTier HUShipTo */ 11:
|
|
message.HUShipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.HUShipTo);
|
|
break;
|
|
case /* string NextTrackingID */ 12:
|
|
message.NextTrackingID = reader.string();
|
|
break;
|
|
case /* repeated api.TrackingEvent Events */ 13:
|
|
message.Events.push(TrackingEvent.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: TrackingMapSummaryToHUPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string HandlingunitID = 1; */
|
|
if (message.HandlingunitID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.HandlingunitID);
|
|
/* api.TrackingStatusStruct Status = 2; */
|
|
if (message.Status)
|
|
TrackingStatusStruct.internalBinaryWrite(message.Status, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* string TrackingURL = 3; */
|
|
if (message.TrackingURL !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.TrackingURL);
|
|
/* api.DateTime DispatchedDateTime = 4; */
|
|
if (message.DispatchedDateTime)
|
|
DateTime.internalBinaryWrite(message.DispatchedDateTime, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TradeTier HUCarrier = 9; */
|
|
if (message.HUCarrier)
|
|
TradeTier.internalBinaryWrite(message.HUCarrier, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TradeTier HUShipFrom = 10; */
|
|
if (message.HUShipFrom)
|
|
TradeTier.internalBinaryWrite(message.HUShipFrom, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TradeTier HUShipTo = 11; */
|
|
if (message.HUShipTo)
|
|
TradeTier.internalBinaryWrite(message.HUShipTo, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
/* string NextTrackingID = 12; */
|
|
if (message.NextTrackingID !== "")
|
|
writer.tag(12, WireType.LengthDelimited).string(message.NextTrackingID);
|
|
/* repeated api.TrackingEvent Events = 13; */
|
|
for (let i = 0; i < message.Events.length; i++)
|
|
TrackingEvent.internalBinaryWrite(message.Events[i], writer.tag(13, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.TrackingMapSummaryToHUPayload
|
|
*/
|
|
export const TrackingMapSummaryToHUPayload = new TrackingMapSummaryToHUPayload$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class TrackingMapStatusToHU$Type extends MessageType<TrackingMapStatusToHU> {
|
|
constructor() {
|
|
super("api.TrackingMapStatusToHU", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => CommandHeader },
|
|
{ no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID },
|
|
{ no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => TrackingMapSummaryToHUPayload },
|
|
{ no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => TrackingMapSummaryToHUPayload },
|
|
{ no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => TrackingMapSummaryToHUPayload }
|
|
], { "api.messageType": "Command", "api.action": "MapSummaryToHU", "api.resultingEvent": "handlingunit.TrackingUpdated", "api.triggerNotEventFilters": "ETAUpdated" });
|
|
}
|
|
create(value?: PartialMessage<TrackingMapStatusToHU>): TrackingMapStatusToHU {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<TrackingMapStatusToHU>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingMapStatusToHU): TrackingMapStatusToHU {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.CommandHeader Header */ 1:
|
|
message.Header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* api.EntityID ID */ 2:
|
|
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
|
|
break;
|
|
case /* api.TrackingMapSummaryToHUPayload Payload */ 3:
|
|
message.Payload = TrackingMapSummaryToHUPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
|
|
break;
|
|
case /* api.TrackingMapSummaryToHUPayload EventPayload */ 4:
|
|
message.EventPayload = TrackingMapSummaryToHUPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload);
|
|
break;
|
|
case /* api.TrackingMapSummaryToHUPayload PreviousPayload */ 5:
|
|
message.PreviousPayload = TrackingMapSummaryToHUPayload.internalBinaryRead(reader, reader.uint32(), options, message.PreviousPayload);
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: TrackingMapStatusToHU, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.CommandHeader Header = 1; */
|
|
if (message.Header)
|
|
CommandHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EntityID ID = 2; */
|
|
if (message.ID)
|
|
EntityID.internalBinaryWrite(message.ID, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TrackingMapSummaryToHUPayload Payload = 3; */
|
|
if (message.Payload)
|
|
TrackingMapSummaryToHUPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TrackingMapSummaryToHUPayload EventPayload = 4; */
|
|
if (message.EventPayload)
|
|
TrackingMapSummaryToHUPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TrackingMapSummaryToHUPayload PreviousPayload = 5; */
|
|
if (message.PreviousPayload)
|
|
TrackingMapSummaryToHUPayload.internalBinaryWrite(message.PreviousPayload, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.TrackingMapStatusToHU
|
|
*/
|
|
export const TrackingMapStatusToHU = new TrackingMapStatusToHU$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class TrackingInitNextTrackingPayload$Type extends MessageType<TrackingInitNextTrackingPayload> {
|
|
constructor() {
|
|
super("api.TrackingInitNextTrackingPayload", [
|
|
{ no: 1, name: "HandlingunitID", kind: "scalar", localName: "HandlingunitID", jsonName: "HandlingunitID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "NextTrackingID", kind: "scalar", localName: "NextTrackingID", jsonName: "NextTrackingID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 3, name: "NextTrackingURL", kind: "scalar", localName: "NextTrackingURL", jsonName: "NextTrackingURL", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 4, name: "DispatchedDateTime", kind: "message", localName: "DispatchedDateTime", jsonName: "DispatchedDateTime", T: () => DateTime },
|
|
{ no: 5, name: "NextHUCarrier", kind: "message", localName: "NextHUCarrier", jsonName: "NextHUCarrier", T: () => TradeTier },
|
|
{ no: 6, name: "NextHUShipFrom", kind: "message", localName: "NextHUShipFrom", jsonName: "NextHUShipFrom", T: () => TradeTier },
|
|
{ no: 7, name: "NextHUShipTo", kind: "message", localName: "NextHUShipTo", jsonName: "NextHUShipTo", T: () => TradeTier }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Initiate the next tracking after a switched event" } }, "api.messageType": "Command", "api.payload": true, "api.action": "InitNextTracking" });
|
|
}
|
|
create(value?: PartialMessage<TrackingInitNextTrackingPayload>): TrackingInitNextTrackingPayload {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.HandlingunitID = "";
|
|
message.NextTrackingID = "";
|
|
message.NextTrackingURL = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<TrackingInitNextTrackingPayload>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingInitNextTrackingPayload): TrackingInitNextTrackingPayload {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string HandlingunitID */ 1:
|
|
message.HandlingunitID = reader.string();
|
|
break;
|
|
case /* string NextTrackingID */ 2:
|
|
message.NextTrackingID = reader.string();
|
|
break;
|
|
case /* string NextTrackingURL */ 3:
|
|
message.NextTrackingURL = reader.string();
|
|
break;
|
|
case /* api.DateTime DispatchedDateTime */ 4:
|
|
message.DispatchedDateTime = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.DispatchedDateTime);
|
|
break;
|
|
case /* api.TradeTier NextHUCarrier */ 5:
|
|
message.NextHUCarrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.NextHUCarrier);
|
|
break;
|
|
case /* api.TradeTier NextHUShipFrom */ 6:
|
|
message.NextHUShipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.NextHUShipFrom);
|
|
break;
|
|
case /* api.TradeTier NextHUShipTo */ 7:
|
|
message.NextHUShipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.NextHUShipTo);
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: TrackingInitNextTrackingPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string HandlingunitID = 1; */
|
|
if (message.HandlingunitID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.HandlingunitID);
|
|
/* string NextTrackingID = 2; */
|
|
if (message.NextTrackingID !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.NextTrackingID);
|
|
/* string NextTrackingURL = 3; */
|
|
if (message.NextTrackingURL !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.NextTrackingURL);
|
|
/* api.DateTime DispatchedDateTime = 4; */
|
|
if (message.DispatchedDateTime)
|
|
DateTime.internalBinaryWrite(message.DispatchedDateTime, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TradeTier NextHUCarrier = 5; */
|
|
if (message.NextHUCarrier)
|
|
TradeTier.internalBinaryWrite(message.NextHUCarrier, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TradeTier NextHUShipFrom = 6; */
|
|
if (message.NextHUShipFrom)
|
|
TradeTier.internalBinaryWrite(message.NextHUShipFrom, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TradeTier NextHUShipTo = 7; */
|
|
if (message.NextHUShipTo)
|
|
TradeTier.internalBinaryWrite(message.NextHUShipTo, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.TrackingInitNextTrackingPayload
|
|
*/
|
|
export const TrackingInitNextTrackingPayload = new TrackingInitNextTrackingPayload$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class TrackingInitNext$Type extends MessageType<TrackingInitNext> {
|
|
constructor() {
|
|
super("api.TrackingInitNext", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => CommandHeader },
|
|
{ no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID },
|
|
{ no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => TrackingInitNextTrackingPayload },
|
|
{ no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => TrackingInitNextTrackingPayload },
|
|
{ no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => TrackingInitNextTrackingPayload }
|
|
], { "api.messageType": "Command", "api.action": "InitNextTracking", "api.resultingEvent": "tracking.HULabeled", "api.triggerEventFilters": "Switched" });
|
|
}
|
|
create(value?: PartialMessage<TrackingInitNext>): TrackingInitNext {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<TrackingInitNext>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingInitNext): TrackingInitNext {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.CommandHeader Header */ 1:
|
|
message.Header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* api.EntityID ID */ 2:
|
|
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
|
|
break;
|
|
case /* api.TrackingInitNextTrackingPayload Payload */ 3:
|
|
message.Payload = TrackingInitNextTrackingPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
|
|
break;
|
|
case /* api.TrackingInitNextTrackingPayload EventPayload */ 4:
|
|
message.EventPayload = TrackingInitNextTrackingPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload);
|
|
break;
|
|
case /* api.TrackingInitNextTrackingPayload PreviousPayload */ 5:
|
|
message.PreviousPayload = TrackingInitNextTrackingPayload.internalBinaryRead(reader, reader.uint32(), options, message.PreviousPayload);
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: TrackingInitNext, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.CommandHeader Header = 1; */
|
|
if (message.Header)
|
|
CommandHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EntityID ID = 2; */
|
|
if (message.ID)
|
|
EntityID.internalBinaryWrite(message.ID, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TrackingInitNextTrackingPayload Payload = 3; */
|
|
if (message.Payload)
|
|
TrackingInitNextTrackingPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TrackingInitNextTrackingPayload EventPayload = 4; */
|
|
if (message.EventPayload)
|
|
TrackingInitNextTrackingPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TrackingInitNextTrackingPayload PreviousPayload = 5; */
|
|
if (message.PreviousPayload)
|
|
TrackingInitNextTrackingPayload.internalBinaryWrite(message.PreviousPayload, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.TrackingInitNext
|
|
*/
|
|
export const TrackingInitNext = new TrackingInitNext$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class TrackingMapETAToHUPayload$Type extends MessageType<TrackingMapETAToHUPayload> {
|
|
constructor() {
|
|
super("api.TrackingMapETAToHUPayload", [
|
|
{ no: 1, name: "HandlingunitID", kind: "scalar", localName: "HandlingunitID", jsonName: "HandlingunitID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "TrackingETA", kind: "message", localName: "TrackingETA", jsonName: "TrackingETA", T: () => ETA }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Map the TrackingETA to the corresponding HU" } }, "api.messageType": "Command", "api.payload": true, "api.action": "MapETAToHU" });
|
|
}
|
|
create(value?: PartialMessage<TrackingMapETAToHUPayload>): TrackingMapETAToHUPayload {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.HandlingunitID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<TrackingMapETAToHUPayload>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingMapETAToHUPayload): TrackingMapETAToHUPayload {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string HandlingunitID */ 1:
|
|
message.HandlingunitID = reader.string();
|
|
break;
|
|
case /* api.ETA TrackingETA */ 2:
|
|
message.TrackingETA = ETA.internalBinaryRead(reader, reader.uint32(), options, message.TrackingETA);
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: TrackingMapETAToHUPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string HandlingunitID = 1; */
|
|
if (message.HandlingunitID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.HandlingunitID);
|
|
/* api.ETA TrackingETA = 2; */
|
|
if (message.TrackingETA)
|
|
ETA.internalBinaryWrite(message.TrackingETA, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.TrackingMapETAToHUPayload
|
|
*/
|
|
export const TrackingMapETAToHUPayload = new TrackingMapETAToHUPayload$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class TrackingMapETAToHU$Type extends MessageType<TrackingMapETAToHU> {
|
|
constructor() {
|
|
super("api.TrackingMapETAToHU", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => CommandHeader },
|
|
{ no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID },
|
|
{ no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => TrackingMapETAToHUPayload },
|
|
{ no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => TrackingMapETAToHUPayload },
|
|
{ no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => TrackingMapETAToHUPayload }
|
|
], { "api.messageType": "Command", "api.action": "MapETAToHU", "api.resultingEvent": "handlingunit.TrackingETAUpdated", "api.triggerEventFilters": "ETAUpdated,HULabeled" });
|
|
}
|
|
create(value?: PartialMessage<TrackingMapETAToHU>): TrackingMapETAToHU {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<TrackingMapETAToHU>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingMapETAToHU): TrackingMapETAToHU {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.CommandHeader Header */ 1:
|
|
message.Header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* api.EntityID ID */ 2:
|
|
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
|
|
break;
|
|
case /* api.TrackingMapETAToHUPayload Payload */ 3:
|
|
message.Payload = TrackingMapETAToHUPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
|
|
break;
|
|
case /* api.TrackingMapETAToHUPayload EventPayload */ 4:
|
|
message.EventPayload = TrackingMapETAToHUPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload);
|
|
break;
|
|
case /* api.TrackingMapETAToHUPayload PreviousPayload */ 5:
|
|
message.PreviousPayload = TrackingMapETAToHUPayload.internalBinaryRead(reader, reader.uint32(), options, message.PreviousPayload);
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: TrackingMapETAToHU, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.CommandHeader Header = 1; */
|
|
if (message.Header)
|
|
CommandHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EntityID ID = 2; */
|
|
if (message.ID)
|
|
EntityID.internalBinaryWrite(message.ID, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TrackingMapETAToHUPayload Payload = 3; */
|
|
if (message.Payload)
|
|
TrackingMapETAToHUPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TrackingMapETAToHUPayload EventPayload = 4; */
|
|
if (message.EventPayload)
|
|
TrackingMapETAToHUPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.TrackingMapETAToHUPayload PreviousPayload = 5; */
|
|
if (message.PreviousPayload)
|
|
TrackingMapETAToHUPayload.internalBinaryWrite(message.PreviousPayload, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.TrackingMapETAToHU
|
|
*/
|
|
export const TrackingMapETAToHU = new TrackingMapETAToHU$Type();
|