Files
npm-core-sdk/tracking.ts
2025-12-09 11:20:34 +00:00

601 lines
31 KiB
TypeScript

// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
// @generated from protobuf file "tracking.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 { PartnerPayload } from "./partner";
import { ActorPayload } from "./actor";
import { EntityID } from "./shared";
import { EventHeader } from "./shared";
import { ETA } from "./tradeShared";
import { AttachmentSummary } from "./shared";
import { TradeTier } from "./tradeShared";
import { DateTime } from "./shared";
import { TrackingStatusStruct } from "./transportShared";
import { TrackingEvent } from "./transportShared";
//
// The main goal of this entity is to keep track of the link between the HandlingunitID and the Tracking number.
// It is usually initiated with the Dispatched event or may be created by the Switched event when a new tracking event applies to Handlingunit
//
// It also keep tracks of all the events received for the same tracking number (Notified events).
//
// When the tracking is transfered to a next tracking number, we have it here
//
// The Dispatched Date is kept here as it is an important information to be tranfered to the stock
// updated 2021/02/16
/**
* @generated from protobuf message api.TrackingPayload
*/
export interface TrackingPayload {
/**
* @generated from protobuf field: string HandlingunitID = 1
*/
HandlingunitID: string;
/**
* @generated from protobuf field: string TrackingURL = 2
*/
TrackingURL: string;
/**
* @generated from protobuf field: repeated api.TrackingEvent Events = 3
*/
Events: TrackingEvent[];
/**
* @generated from protobuf field: string NextTrackingID = 4
*/
NextTrackingID: string;
/**
* @generated from protobuf field: string NextTrackingURL = 5
*/
NextTrackingURL: string;
// repeated MetadataElement MetaData = 6
// [
// (metadata) = true, (aggKey) = "Key", (kpiExclude) = "[{\"entity\":\"Executionflow\"},{\"entity\":\"Stock\"}]"
// ];
/**
* @generated from protobuf field: api.TrackingStatusStruct Status = 7
*/
Status?: TrackingStatusStruct; // Status field is not accessible from APIs
/**
* @generated from protobuf field: api.DateTime DispatchedDateTime = 8
*/
DispatchedDateTime?: DateTime;
/**
* @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: api.TradeTier NextHUCarrier = 12
*/
NextHUCarrier?: TradeTier;
/**
* @generated from protobuf field: api.TradeTier NextHUShipFrom = 13
*/
NextHUShipFrom?: TradeTier;
/**
* @generated from protobuf field: api.TradeTier NextHUShipTo = 14
*/
NextHUShipTo?: TradeTier;
/**
* @generated from protobuf field: repeated api.AttachmentSummary Attachments = 15
*/
Attachments: AttachmentSummary[];
/**
* @generated from protobuf field: int32 AttachmentNumber = 16
*/
AttachmentNumber: number;
/**
* @generated from protobuf field: api.ETA TrackingETA = 19
*/
TrackingETA?: ETA;
}
/**
* @generated from protobuf message api.Tracking
*/
export interface Tracking {
/**
* @generated from protobuf field: api.EventHeader LastEventHeader = 1
*/
LastEventHeader?: EventHeader;
/**
* @generated from protobuf field: api.EntityID ID = 2
*/
ID?: EntityID;
/**
* @generated from protobuf field: api.TrackingPayload Payload = 3
*/
Payload?: TrackingPayload;
}
// Tracking Enrichment
/**
* @generated from protobuf message api.TrackingEnrichment
*/
export interface TrackingEnrichment {
/**
* @generated from protobuf field: string ParentEventID = 1
*/
ParentEventID: string;
/**
* @generated from protobuf field: string EntityName = 2
*/
EntityName: string;
/**
* @generated from protobuf field: string EntityRefID = 3
*/
EntityRefID: string;
/**
* @generated from protobuf field: string RefFilter = 4
*/
RefFilter: string;
/**
* @generated from protobuf field: string MergePath = 5
*/
MergePath: string;
/**
* @generated from protobuf oneof: Content
*/
Content: {
oneofKind: "Actor";
/**
* @generated from protobuf field: api.ActorPayload Actor = 11
*/
Actor: ActorPayload;
} | {
oneofKind: "Partner";
/**
* @generated from protobuf field: api.PartnerPayload Partner = 12
*/
Partner: PartnerPayload;
} | {
oneofKind: undefined;
};
/**
* @generated from protobuf field: string Project = 6
*/
Project: string;
/**
* @generated from protobuf field: string ParentEntityName = 7
*/
ParentEntityName: string;
/**
* @generated from protobuf field: string ParentEntityID = 8
*/
ParentEntityID: string;
}
/**
* @generated from protobuf message api.TrackingTriplet
*/
export interface TrackingTriplet {
/**
* @generated from protobuf field: api.Tracking Current = 1
*/
Current?: Tracking;
/**
* @generated from protobuf field: api.Tracking Previous = 2
*/
Previous?: Tracking;
/**
* @generated from protobuf field: api.Tracking LastEvent = 3
*/
LastEvent?: Tracking;
}
// @generated message type with reflection information, may provide speed optimized methods
class TrackingPayload$Type extends MessageType<TrackingPayload> {
constructor() {
super("api.TrackingPayload", [
{ no: 1, name: "HandlingunitID", kind: "scalar", localName: "HandlingunitID", jsonName: "HandlingunitID", T: 9 /*ScalarType.STRING*/, options: { "api.dataRestrictionKey": "Tracking", "api.indexationType": { Types: [{ Context: "*", Type: "generatedText,keyword" }] }, "api.kpiItems": { Items: [{ Context: "Tracking", Group: "tracking", Queryable: true }] }, "api.viewType": { Types: [{ Context: "*", Type: "shortKeyword" }] } } },
{ no: 2, name: "TrackingURL", kind: "scalar", localName: "TrackingURL", jsonName: "TrackingURL", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "Events", kind: "message", localName: "Events", jsonName: "Events", repeat: 2 /*RepeatType.UNPACKED*/, T: () => TrackingEvent, options: { "api.aggAppend": "Notified" } },
{ no: 4, name: "NextTrackingID", kind: "scalar", localName: "NextTrackingID", jsonName: "NextTrackingID", T: 9 /*ScalarType.STRING*/, options: { "api.indexationType": { Types: [{ Context: "*", Type: "generatedText,keyword" }] }, "api.viewType": { Types: [{ Context: "*", Type: "shortKeyword" }] } } },
{ no: 5, name: "NextTrackingURL", kind: "scalar", localName: "NextTrackingURL", jsonName: "NextTrackingURL", T: 9 /*ScalarType.STRING*/ },
{ no: 7, name: "Status", kind: "message", localName: "Status", jsonName: "Status", T: () => TrackingStatusStruct, options: { "validate.rules": { message: { unauthorized: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { readOnly: true } } },
{ no: 8, 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: "NextHUCarrier", kind: "message", localName: "NextHUCarrier", jsonName: "NextHUCarrier", T: () => TradeTier, options: { "api.kpiExclude": { Items: [{ Context: "Tracking", Group: "tracking" }] }, "api.extractRefExclude": "Tracking" } },
{ no: 13, name: "NextHUShipFrom", kind: "message", localName: "NextHUShipFrom", jsonName: "NextHUShipFrom", T: () => TradeTier, options: { "api.kpiExclude": { Items: [{ Context: "Tracking", Group: "tracking" }] }, "api.extractRefExclude": "Tracking" } },
{ no: 14, name: "NextHUShipTo", kind: "message", localName: "NextHUShipTo", jsonName: "NextHUShipTo", T: () => TradeTier, options: { "api.kpiExclude": { Items: [{ Context: "Tracking", Group: "tracking" }] }, "api.extractRefExclude": "Tracking" } },
{ no: 15, name: "Attachments", kind: "message", localName: "Attachments", jsonName: "Attachments", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AttachmentSummary, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Number of attachments per type" }, "api.aggSkip": "AttachmentAdded,AttachmentRemoved" } },
{ no: 16, name: "AttachmentNumber", kind: "scalar", localName: "AttachmentNumber", jsonName: "AttachmentNumber", T: 5 /*ScalarType.INT32*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Total number of attachments" } } },
{ no: 19, name: "TrackingETA", kind: "message", localName: "TrackingETA", jsonName: "TrackingETA", T: () => ETA, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Estimated Time of Arrival for the HandlingUnit(s) concerned by the trackingID" }, "api.aggSkip": "ETAUpdated" } }
]);
}
create(value?: PartialMessage<TrackingPayload>): TrackingPayload {
const message = globalThis.Object.create((this.messagePrototype!));
message.HandlingunitID = "";
message.TrackingURL = "";
message.Events = [];
message.NextTrackingID = "";
message.NextTrackingURL = "";
message.Attachments = [];
message.AttachmentNumber = 0;
if (value !== undefined)
reflectionMergePartial<TrackingPayload>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingPayload): TrackingPayload {
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 TrackingURL */ 2:
message.TrackingURL = reader.string();
break;
case /* repeated api.TrackingEvent Events */ 3:
message.Events.push(TrackingEvent.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* string NextTrackingID */ 4:
message.NextTrackingID = reader.string();
break;
case /* string NextTrackingURL */ 5:
message.NextTrackingURL = reader.string();
break;
case /* api.TrackingStatusStruct Status */ 7:
message.Status = TrackingStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.Status);
break;
case /* api.DateTime DispatchedDateTime */ 8:
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 /* api.TradeTier NextHUCarrier */ 12:
message.NextHUCarrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.NextHUCarrier);
break;
case /* api.TradeTier NextHUShipFrom */ 13:
message.NextHUShipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.NextHUShipFrom);
break;
case /* api.TradeTier NextHUShipTo */ 14:
message.NextHUShipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.NextHUShipTo);
break;
case /* repeated api.AttachmentSummary Attachments */ 15:
message.Attachments.push(AttachmentSummary.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* int32 AttachmentNumber */ 16:
message.AttachmentNumber = reader.int32();
break;
case /* api.ETA TrackingETA */ 19:
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: TrackingPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string HandlingunitID = 1; */
if (message.HandlingunitID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.HandlingunitID);
/* string TrackingURL = 2; */
if (message.TrackingURL !== "")
writer.tag(2, WireType.LengthDelimited).string(message.TrackingURL);
/* repeated api.TrackingEvent Events = 3; */
for (let i = 0; i < message.Events.length; i++)
TrackingEvent.internalBinaryWrite(message.Events[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* string NextTrackingID = 4; */
if (message.NextTrackingID !== "")
writer.tag(4, WireType.LengthDelimited).string(message.NextTrackingID);
/* string NextTrackingURL = 5; */
if (message.NextTrackingURL !== "")
writer.tag(5, WireType.LengthDelimited).string(message.NextTrackingURL);
/* api.TrackingStatusStruct Status = 7; */
if (message.Status)
TrackingStatusStruct.internalBinaryWrite(message.Status, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
/* api.DateTime DispatchedDateTime = 8; */
if (message.DispatchedDateTime)
DateTime.internalBinaryWrite(message.DispatchedDateTime, writer.tag(8, 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();
/* api.TradeTier NextHUCarrier = 12; */
if (message.NextHUCarrier)
TradeTier.internalBinaryWrite(message.NextHUCarrier, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier NextHUShipFrom = 13; */
if (message.NextHUShipFrom)
TradeTier.internalBinaryWrite(message.NextHUShipFrom, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
/* api.TradeTier NextHUShipTo = 14; */
if (message.NextHUShipTo)
TradeTier.internalBinaryWrite(message.NextHUShipTo, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
/* repeated api.AttachmentSummary Attachments = 15; */
for (let i = 0; i < message.Attachments.length; i++)
AttachmentSummary.internalBinaryWrite(message.Attachments[i], writer.tag(15, WireType.LengthDelimited).fork(), options).join();
/* int32 AttachmentNumber = 16; */
if (message.AttachmentNumber !== 0)
writer.tag(16, WireType.Varint).int32(message.AttachmentNumber);
/* api.ETA TrackingETA = 19; */
if (message.TrackingETA)
ETA.internalBinaryWrite(message.TrackingETA, writer.tag(19, 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.TrackingPayload
*/
export const TrackingPayload = new TrackingPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Tracking$Type extends MessageType<Tracking> {
constructor() {
super("api.Tracking", [
{ no: 1, name: "LastEventHeader", kind: "message", localName: "LastEventHeader", jsonName: "LastEventHeader", T: () => EventHeader },
{ no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID },
{ no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => TrackingPayload }
]);
}
create(value?: PartialMessage<Tracking>): Tracking {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<Tracking>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Tracking): Tracking {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.EventHeader LastEventHeader */ 1:
message.LastEventHeader = EventHeader.internalBinaryRead(reader, reader.uint32(), options, message.LastEventHeader);
break;
case /* api.EntityID ID */ 2:
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
break;
case /* api.TrackingPayload Payload */ 3:
message.Payload = TrackingPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
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: Tracking, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.EventHeader LastEventHeader = 1; */
if (message.LastEventHeader)
EventHeader.internalBinaryWrite(message.LastEventHeader, 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.TrackingPayload Payload = 3; */
if (message.Payload)
TrackingPayload.internalBinaryWrite(message.Payload, writer.tag(3, 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.Tracking
*/
export const Tracking = new Tracking$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingEnrichment$Type extends MessageType<TrackingEnrichment> {
constructor() {
super("api.TrackingEnrichment", [
{ no: 1, name: "ParentEventID", kind: "scalar", localName: "ParentEventID", jsonName: "ParentEventID", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "EntityName", kind: "scalar", localName: "EntityName", jsonName: "EntityName", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "EntityRefID", kind: "scalar", localName: "EntityRefID", jsonName: "EntityRefID", T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "RefFilter", kind: "scalar", localName: "RefFilter", jsonName: "RefFilter", T: 9 /*ScalarType.STRING*/ },
{ no: 5, name: "MergePath", kind: "scalar", localName: "MergePath", jsonName: "MergePath", T: 9 /*ScalarType.STRING*/ },
{ no: 11, name: "Actor", kind: "message", localName: "Actor", jsonName: "Actor", oneof: "Content", T: () => ActorPayload },
{ no: 12, name: "Partner", kind: "message", localName: "Partner", jsonName: "Partner", oneof: "Content", T: () => PartnerPayload },
{ no: 6, name: "Project", kind: "scalar", localName: "Project", jsonName: "Project", T: 9 /*ScalarType.STRING*/ },
{ no: 7, name: "ParentEntityName", kind: "scalar", localName: "ParentEntityName", jsonName: "ParentEntityName", T: 9 /*ScalarType.STRING*/ },
{ no: 8, name: "ParentEntityID", kind: "scalar", localName: "ParentEntityID", jsonName: "ParentEntityID", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<TrackingEnrichment>): TrackingEnrichment {
const message = globalThis.Object.create((this.messagePrototype!));
message.ParentEventID = "";
message.EntityName = "";
message.EntityRefID = "";
message.RefFilter = "";
message.MergePath = "";
message.Content = { oneofKind: undefined };
message.Project = "";
message.ParentEntityName = "";
message.ParentEntityID = "";
if (value !== undefined)
reflectionMergePartial<TrackingEnrichment>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingEnrichment): TrackingEnrichment {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ParentEventID */ 1:
message.ParentEventID = reader.string();
break;
case /* string EntityName */ 2:
message.EntityName = reader.string();
break;
case /* string EntityRefID */ 3:
message.EntityRefID = reader.string();
break;
case /* string RefFilter */ 4:
message.RefFilter = reader.string();
break;
case /* string MergePath */ 5:
message.MergePath = reader.string();
break;
case /* api.ActorPayload Actor */ 11:
message.Content = {
oneofKind: "Actor",
Actor: ActorPayload.internalBinaryRead(reader, reader.uint32(), options, (message.Content as any).Actor)
};
break;
case /* api.PartnerPayload Partner */ 12:
message.Content = {
oneofKind: "Partner",
Partner: PartnerPayload.internalBinaryRead(reader, reader.uint32(), options, (message.Content as any).Partner)
};
break;
case /* string Project */ 6:
message.Project = reader.string();
break;
case /* string ParentEntityName */ 7:
message.ParentEntityName = reader.string();
break;
case /* string ParentEntityID */ 8:
message.ParentEntityID = reader.string();
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: TrackingEnrichment, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ParentEventID = 1; */
if (message.ParentEventID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.ParentEventID);
/* string EntityName = 2; */
if (message.EntityName !== "")
writer.tag(2, WireType.LengthDelimited).string(message.EntityName);
/* string EntityRefID = 3; */
if (message.EntityRefID !== "")
writer.tag(3, WireType.LengthDelimited).string(message.EntityRefID);
/* string RefFilter = 4; */
if (message.RefFilter !== "")
writer.tag(4, WireType.LengthDelimited).string(message.RefFilter);
/* string MergePath = 5; */
if (message.MergePath !== "")
writer.tag(5, WireType.LengthDelimited).string(message.MergePath);
/* string Project = 6; */
if (message.Project !== "")
writer.tag(6, WireType.LengthDelimited).string(message.Project);
/* string ParentEntityName = 7; */
if (message.ParentEntityName !== "")
writer.tag(7, WireType.LengthDelimited).string(message.ParentEntityName);
/* string ParentEntityID = 8; */
if (message.ParentEntityID !== "")
writer.tag(8, WireType.LengthDelimited).string(message.ParentEntityID);
/* api.ActorPayload Actor = 11; */
if (message.Content.oneofKind === "Actor")
ActorPayload.internalBinaryWrite(message.Content.Actor, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
/* api.PartnerPayload Partner = 12; */
if (message.Content.oneofKind === "Partner")
PartnerPayload.internalBinaryWrite(message.Content.Partner, writer.tag(12, 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.TrackingEnrichment
*/
export const TrackingEnrichment = new TrackingEnrichment$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingTriplet$Type extends MessageType<TrackingTriplet> {
constructor() {
super("api.TrackingTriplet", [
{ no: 1, name: "Current", kind: "message", localName: "Current", jsonName: "Current", T: () => Tracking },
{ no: 2, name: "Previous", kind: "message", localName: "Previous", jsonName: "Previous", T: () => Tracking },
{ no: 3, name: "LastEvent", kind: "message", localName: "LastEvent", jsonName: "LastEvent", T: () => Tracking }
]);
}
create(value?: PartialMessage<TrackingTriplet>): TrackingTriplet {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<TrackingTriplet>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingTriplet): TrackingTriplet {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.Tracking Current */ 1:
message.Current = Tracking.internalBinaryRead(reader, reader.uint32(), options, message.Current);
break;
case /* api.Tracking Previous */ 2:
message.Previous = Tracking.internalBinaryRead(reader, reader.uint32(), options, message.Previous);
break;
case /* api.Tracking LastEvent */ 3:
message.LastEvent = Tracking.internalBinaryRead(reader, reader.uint32(), options, message.LastEvent);
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: TrackingTriplet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.Tracking Current = 1; */
if (message.Current)
Tracking.internalBinaryWrite(message.Current, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* api.Tracking Previous = 2; */
if (message.Previous)
Tracking.internalBinaryWrite(message.Previous, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
/* api.Tracking LastEvent = 3; */
if (message.LastEvent)
Tracking.internalBinaryWrite(message.LastEvent, writer.tag(3, 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.TrackingTriplet
*/
export const TrackingTriplet = new TrackingTriplet$Type();