// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix // @generated from protobuf file "handlingunit.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 { ItemPayload } from "./item"; import { EntityID } from "./shared"; import { EventHeader } from "./shared"; import { ETA } from "./tradeShared"; import { ClaimSummary } from "./shared"; import { AttachmentSummary } from "./shared"; import { DateTime } from "./shared"; import { QuantifiedDatedGoodsByExeflow } from "./warehousingShared"; import { QuantifiedGoodsByExeflow } from "./warehousingShared"; import { HandlingunitStatusStruct } from "./warehousingShared"; import { MetadataElement } from "./shared"; import { TrackingSummary } from "./transportShared"; import { HandlingunitInformation } from "./warehousingShared"; // // This entity represents the content of a logisticUnit and its links to the corresponding executionFlows. // (a logisticUnit may contain goods from many ExecutionFlows). // // A Handlingunit may contain simultaneously Goods and other Handlingunits. // // When a Handlingunit contains Goods, the reference to an ExecutionFlow & LineID is mandatory // // A Handlingunit is composed of : // - general information about the Handlingunit. (type, dimensions, weight) // - boolean to describe if it contains other HUs // - boolean to describe if it contains some Goods // - List of Goods included (for each Goods, with reference to ExecutionFlow, lineID and quantity) // - List of Goods received (for each Goods, with reference to ExecutionFlow, lineID and quantity) // - List of other HandlingUnits included (only the refID) // - Tracking summary, coming from the tracking entity. // - Metadata () // - ETA received from Tracking // - ETA sent directly on HU // // // Comments updated 2024/01/09 /** * @generated from protobuf message api.HandlingunitPayload */ export interface HandlingunitPayload { /** * @generated from protobuf field: api.HandlingunitInformation Information = 1 */ Information?: HandlingunitInformation; /** * @generated from protobuf field: bool ContainsGoods = 2 */ ContainsGoods: boolean; /** * @generated from protobuf field: bool ContainsHUs = 3 */ ContainsHUs: boolean; /** * @generated from protobuf field: repeated string IncludedHandlingunitIDs = 4 */ IncludedHandlingunitIDs: string[]; /** * @generated from protobuf field: api.TrackingSummary CurrentTrackingSummary = 5 */ CurrentTrackingSummary?: TrackingSummary; /** * Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp) * * @generated from protobuf field: repeated api.MetadataElement MetaData = 6 */ MetaData: MetadataElement[]; /** * @generated from protobuf field: api.HandlingunitStatusStruct Status = 7 */ Status?: HandlingunitStatusStruct; // Status field is not accessible from APIs /** * @generated from protobuf field: repeated api.QuantifiedGoodsByExeflow PreparedContents = 8 */ PreparedContents: QuantifiedGoodsByExeflow[]; /** * @generated from protobuf field: repeated api.QuantifiedDatedGoodsByExeflow ReceivedContents = 9 */ ReceivedContents: QuantifiedDatedGoodsByExeflow[]; /** * @generated from protobuf field: api.DateTime DispatchedDateTime = 10 */ DispatchedDateTime?: DateTime; /** * @generated from protobuf field: repeated string TrackingIDs = 11 */ TrackingIDs: string[]; /** * @generated from protobuf field: repeated api.AttachmentSummary Attachments = 12 */ Attachments: AttachmentSummary[]; /** * @generated from protobuf field: int32 AttachmentNumber = 13 */ AttachmentNumber: number; /** * @generated from protobuf field: repeated api.ClaimSummary Claims = 14 */ Claims: ClaimSummary[]; /** * @generated from protobuf field: int32 ClaimNumber = 15 */ ClaimNumber: number; /** * @generated from protobuf field: api.ETA HandlingunitETA = 16 */ HandlingunitETA?: ETA; /** * @generated from protobuf field: api.ETA TrackingETA = 17 */ TrackingETA?: ETA; /** * @generated from protobuf field: string ParentHU = 18 */ ParentHU: string; } // // Handlingunit entity structure /** * @generated from protobuf message api.Handlingunit */ export interface Handlingunit { /** * @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.HandlingunitPayload Payload = 3 */ Payload?: HandlingunitPayload; } // Handlingunit Enrichment /** * @generated from protobuf message api.HandlingunitEnrichment */ export interface HandlingunitEnrichment { /** * @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: "Item"; /** * @generated from protobuf field: api.ItemPayload Item = 10 */ Item: ItemPayload; } | { 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.HandlingunitTriplet */ export interface HandlingunitTriplet { /** * @generated from protobuf field: api.Handlingunit Current = 1 */ Current?: Handlingunit; /** * @generated from protobuf field: api.Handlingunit Previous = 2 */ Previous?: Handlingunit; /** * @generated from protobuf field: api.Handlingunit LastEvent = 3 */ LastEvent?: Handlingunit; } // @generated message type with reflection information, may provide speed optimized methods class HandlingunitPayload$Type extends MessageType { constructor() { super("api.HandlingunitPayload", [ { no: 1, name: "Information", kind: "message", localName: "Information", jsonName: "Information", T: () => HandlingunitInformation }, { no: 2, name: "ContainsGoods", kind: "scalar", localName: "ContainsGoods", jsonName: "ContainsGoods", T: 8 /*ScalarType.BOOL*/, options: { "api.dataRestrictionKey": "Handlingunit", "api.kpiItems": { Items: [{ Context: "Handlingunit", Group: "handlingunit", Queryable: true }] } } }, { no: 3, name: "ContainsHUs", kind: "scalar", localName: "ContainsHUs", jsonName: "ContainsHUs", T: 8 /*ScalarType.BOOL*/, options: { "api.dataRestrictionKey": "Handlingunit", "api.kpiItems": { Items: [{ Context: "Handlingunit", Group: "handlingunit", Queryable: true }] } } }, { no: 4, name: "IncludedHandlingunitIDs", kind: "scalar", localName: "IncludedHandlingunitIDs", jsonName: "IncludedHandlingunitIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "api.kpiExclude": { Items: [{ Context: "Handlingunit", Group: "handlingunit" }] }, "api.aggAppend": "HUsAdded", "api.indexationType": { Types: [{ Context: "*", Type: "generatedText,keyword" }] }, "api.viewType": { Types: [{ Context: "*", Type: "shortKeyword" }] } } }, { no: 5, name: "CurrentTrackingSummary", kind: "message", localName: "CurrentTrackingSummary", jsonName: "CurrentTrackingSummary", T: () => TrackingSummary, options: { "api.aggSkip": "TrackingUpdated" } }, { no: 6, name: "MetaData", kind: "message", localName: "MetaData", jsonName: "MetaData", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataElement, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)" }, "api.metadata": true, "api.aggKey": "Key", "api.parentEntity": "Handlingunit", "api.aggAppend": "HUsAdded,MetaDataUpdated,GoodsPrepared" } }, { no: 7, name: "Status", kind: "message", localName: "Status", jsonName: "Status", T: () => HandlingunitStatusStruct, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { readOnly: true }, "validate.rules": { message: { unauthorized: true } } } }, { no: 8, name: "PreparedContents", kind: "message", localName: "PreparedContents", jsonName: "PreparedContents", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QuantifiedGoodsByExeflow, options: { "api.kpiExclude": { Items: [{ Context: "Handlingunit", Group: "handlingunit" }] }, "api.aggAppend": "GoodsPrepared" } }, { no: 9, name: "ReceivedContents", kind: "message", localName: "ReceivedContents", jsonName: "ReceivedContents", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QuantifiedDatedGoodsByExeflow, options: { "api.kpiExclude": { Items: [{ Context: "Handlingunit", Group: "handlingunit" }] }, "api.aggAppend": "GoodsReceived" } }, { no: 10, name: "DispatchedDateTime", kind: "message", localName: "DispatchedDateTime", jsonName: "DispatchedDateTime", T: () => DateTime, options: { "api.aggSkip": "TrackingUpdated", "api.kpiExclude": { Items: [{ Context: "Handlingunit", Group: "handlingunit" }] } } }, { no: 11, name: "TrackingIDs", kind: "scalar", localName: "TrackingIDs", jsonName: "TrackingIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "api.aggAppend": "TrackingUpdated", "api.indexationType": { Types: [{ Context: "*", Type: "generatedText,keyword" }] }, "api.viewType": { Types: [{ Context: "*", Type: "shortKeyword" }] } } }, { no: 12, 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: 13, 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: 14, name: "Claims", kind: "message", localName: "Claims", jsonName: "Claims", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ClaimSummary, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Number of claims per type" }, "api.aggKey": "ClaimTypeID", "api.aggSkip": "ClaimAdded" } }, { no: 15, name: "ClaimNumber", kind: "scalar", localName: "ClaimNumber", jsonName: "ClaimNumber", T: 5 /*ScalarType.INT32*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Total number of claims" } } }, { no: 16, name: "HandlingunitETA", kind: "message", localName: "HandlingunitETA", jsonName: "HandlingunitETA", T: () => ETA, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Estimated Time of Arrival for the HandlingUnit" }, "api.aggSkip": "ETAUpdated" } }, { no: 17, 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 received from Tracking" }, "api.aggSkip": "TrackingETAUpdated", "api.kpiExclude": { Items: [{ Context: "Handlingunit", Group: "handlingunit" }] } } }, { no: 18, name: "ParentHU", kind: "scalar", localName: "ParentHU", jsonName: "ParentHU", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "HU parent for this HU" } } } ]); } create(value?: PartialMessage): HandlingunitPayload { const message = globalThis.Object.create((this.messagePrototype!)); message.ContainsGoods = false; message.ContainsHUs = false; message.IncludedHandlingunitIDs = []; message.MetaData = []; message.PreparedContents = []; message.ReceivedContents = []; message.TrackingIDs = []; message.Attachments = []; message.AttachmentNumber = 0; message.Claims = []; message.ClaimNumber = 0; message.ParentHU = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitPayload): HandlingunitPayload { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* api.HandlingunitInformation Information */ 1: message.Information = HandlingunitInformation.internalBinaryRead(reader, reader.uint32(), options, message.Information); break; case /* bool ContainsGoods */ 2: message.ContainsGoods = reader.bool(); break; case /* bool ContainsHUs */ 3: message.ContainsHUs = reader.bool(); break; case /* repeated string IncludedHandlingunitIDs */ 4: message.IncludedHandlingunitIDs.push(reader.string()); break; case /* api.TrackingSummary CurrentTrackingSummary */ 5: message.CurrentTrackingSummary = TrackingSummary.internalBinaryRead(reader, reader.uint32(), options, message.CurrentTrackingSummary); break; case /* repeated api.MetadataElement MetaData */ 6: message.MetaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options)); break; case /* api.HandlingunitStatusStruct Status */ 7: message.Status = HandlingunitStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.Status); break; case /* repeated api.QuantifiedGoodsByExeflow PreparedContents */ 8: message.PreparedContents.push(QuantifiedGoodsByExeflow.internalBinaryRead(reader, reader.uint32(), options)); break; case /* repeated api.QuantifiedDatedGoodsByExeflow ReceivedContents */ 9: message.ReceivedContents.push(QuantifiedDatedGoodsByExeflow.internalBinaryRead(reader, reader.uint32(), options)); break; case /* api.DateTime DispatchedDateTime */ 10: message.DispatchedDateTime = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.DispatchedDateTime); break; case /* repeated string TrackingIDs */ 11: message.TrackingIDs.push(reader.string()); break; case /* repeated api.AttachmentSummary Attachments */ 12: message.Attachments.push(AttachmentSummary.internalBinaryRead(reader, reader.uint32(), options)); break; case /* int32 AttachmentNumber */ 13: message.AttachmentNumber = reader.int32(); break; case /* repeated api.ClaimSummary Claims */ 14: message.Claims.push(ClaimSummary.internalBinaryRead(reader, reader.uint32(), options)); break; case /* int32 ClaimNumber */ 15: message.ClaimNumber = reader.int32(); break; case /* api.ETA HandlingunitETA */ 16: message.HandlingunitETA = ETA.internalBinaryRead(reader, reader.uint32(), options, message.HandlingunitETA); break; case /* api.ETA TrackingETA */ 17: message.TrackingETA = ETA.internalBinaryRead(reader, reader.uint32(), options, message.TrackingETA); break; case /* string ParentHU */ 18: message.ParentHU = 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: HandlingunitPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.HandlingunitInformation Information = 1; */ if (message.Information) HandlingunitInformation.internalBinaryWrite(message.Information, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); /* bool ContainsGoods = 2; */ if (message.ContainsGoods !== false) writer.tag(2, WireType.Varint).bool(message.ContainsGoods); /* bool ContainsHUs = 3; */ if (message.ContainsHUs !== false) writer.tag(3, WireType.Varint).bool(message.ContainsHUs); /* repeated string IncludedHandlingunitIDs = 4; */ for (let i = 0; i < message.IncludedHandlingunitIDs.length; i++) writer.tag(4, WireType.LengthDelimited).string(message.IncludedHandlingunitIDs[i]); /* api.TrackingSummary CurrentTrackingSummary = 5; */ if (message.CurrentTrackingSummary) TrackingSummary.internalBinaryWrite(message.CurrentTrackingSummary, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); /* repeated api.MetadataElement MetaData = 6; */ for (let i = 0; i < message.MetaData.length; i++) MetadataElement.internalBinaryWrite(message.MetaData[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join(); /* api.HandlingunitStatusStruct Status = 7; */ if (message.Status) HandlingunitStatusStruct.internalBinaryWrite(message.Status, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); /* repeated api.QuantifiedGoodsByExeflow PreparedContents = 8; */ for (let i = 0; i < message.PreparedContents.length; i++) QuantifiedGoodsByExeflow.internalBinaryWrite(message.PreparedContents[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join(); /* repeated api.QuantifiedDatedGoodsByExeflow ReceivedContents = 9; */ for (let i = 0; i < message.ReceivedContents.length; i++) QuantifiedDatedGoodsByExeflow.internalBinaryWrite(message.ReceivedContents[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join(); /* api.DateTime DispatchedDateTime = 10; */ if (message.DispatchedDateTime) DateTime.internalBinaryWrite(message.DispatchedDateTime, writer.tag(10, WireType.LengthDelimited).fork(), options).join(); /* repeated string TrackingIDs = 11; */ for (let i = 0; i < message.TrackingIDs.length; i++) writer.tag(11, WireType.LengthDelimited).string(message.TrackingIDs[i]); /* repeated api.AttachmentSummary Attachments = 12; */ for (let i = 0; i < message.Attachments.length; i++) AttachmentSummary.internalBinaryWrite(message.Attachments[i], writer.tag(12, WireType.LengthDelimited).fork(), options).join(); /* int32 AttachmentNumber = 13; */ if (message.AttachmentNumber !== 0) writer.tag(13, WireType.Varint).int32(message.AttachmentNumber); /* repeated api.ClaimSummary Claims = 14; */ for (let i = 0; i < message.Claims.length; i++) ClaimSummary.internalBinaryWrite(message.Claims[i], writer.tag(14, WireType.LengthDelimited).fork(), options).join(); /* int32 ClaimNumber = 15; */ if (message.ClaimNumber !== 0) writer.tag(15, WireType.Varint).int32(message.ClaimNumber); /* api.ETA HandlingunitETA = 16; */ if (message.HandlingunitETA) ETA.internalBinaryWrite(message.HandlingunitETA, writer.tag(16, WireType.LengthDelimited).fork(), options).join(); /* api.ETA TrackingETA = 17; */ if (message.TrackingETA) ETA.internalBinaryWrite(message.TrackingETA, writer.tag(17, WireType.LengthDelimited).fork(), options).join(); /* string ParentHU = 18; */ if (message.ParentHU !== "") writer.tag(18, WireType.LengthDelimited).string(message.ParentHU); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.HandlingunitPayload */ export const HandlingunitPayload = new HandlingunitPayload$Type(); // @generated message type with reflection information, may provide speed optimized methods class Handlingunit$Type extends MessageType { constructor() { super("api.Handlingunit", [ { 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: () => HandlingunitPayload } ]); } create(value?: PartialMessage): Handlingunit { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Handlingunit): Handlingunit { 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.HandlingunitPayload Payload */ 3: message.Payload = HandlingunitPayload.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: Handlingunit, 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.HandlingunitPayload Payload = 3; */ if (message.Payload) HandlingunitPayload.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.Handlingunit */ export const Handlingunit = new Handlingunit$Type(); // @generated message type with reflection information, may provide speed optimized methods class HandlingunitEnrichment$Type extends MessageType { constructor() { super("api.HandlingunitEnrichment", [ { 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: 10, name: "Item", kind: "message", localName: "Item", jsonName: "Item", oneof: "Content", T: () => ItemPayload }, { 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): HandlingunitEnrichment { 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(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitEnrichment): HandlingunitEnrichment { 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.ItemPayload Item */ 10: message.Content = { oneofKind: "Item", Item: ItemPayload.internalBinaryRead(reader, reader.uint32(), options, (message.Content as any).Item) }; 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: HandlingunitEnrichment, 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.ItemPayload Item = 10; */ if (message.Content.oneofKind === "Item") ItemPayload.internalBinaryWrite(message.Content.Item, writer.tag(10, 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.HandlingunitEnrichment */ export const HandlingunitEnrichment = new HandlingunitEnrichment$Type(); // @generated message type with reflection information, may provide speed optimized methods class HandlingunitTriplet$Type extends MessageType { constructor() { super("api.HandlingunitTriplet", [ { no: 1, name: "Current", kind: "message", localName: "Current", jsonName: "Current", T: () => Handlingunit }, { no: 2, name: "Previous", kind: "message", localName: "Previous", jsonName: "Previous", T: () => Handlingunit }, { no: 3, name: "LastEvent", kind: "message", localName: "LastEvent", jsonName: "LastEvent", T: () => Handlingunit } ]); } create(value?: PartialMessage): HandlingunitTriplet { const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitTriplet): HandlingunitTriplet { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* api.Handlingunit Current */ 1: message.Current = Handlingunit.internalBinaryRead(reader, reader.uint32(), options, message.Current); break; case /* api.Handlingunit Previous */ 2: message.Previous = Handlingunit.internalBinaryRead(reader, reader.uint32(), options, message.Previous); break; case /* api.Handlingunit LastEvent */ 3: message.LastEvent = Handlingunit.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: HandlingunitTriplet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.Handlingunit Current = 1; */ if (message.Current) Handlingunit.internalBinaryWrite(message.Current, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); /* api.Handlingunit Previous = 2; */ if (message.Previous) Handlingunit.internalBinaryWrite(message.Previous, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); /* api.Handlingunit LastEvent = 3; */ if (message.LastEvent) Handlingunit.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.HandlingunitTriplet */ export const HandlingunitTriplet = new HandlingunitTriplet$Type();