// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "handlingunitAction.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 { DateTime } from "./shared";
import { ETA } from "./tradeShared";
import { EntityID } from "./shared";
import { CommandHeader } from "./shared";
import { QuantifiedDatedGoodsByExeflow } from "./warehousingShared";
import { MetadataElement } from "./shared";
import { HandlingunitStatusStruct } from "./warehousingShared";
import { TrackingSummary } from "./transportShared";
import { QuantifiedGoodsByExeflow } from "./warehousingShared";
import { HandlingunitInformation } from "./warehousingShared";
// Action Summary
//   - MapContentToExecutionFlow :    Map entity content to ExecutionFlow entity                   > executionflow.HUContentUpdated
//   - MapTrackingToExecutionFlow :    Map entity status to ExecutionFlow entity                   > executionflow.HUTrackingUpdated
//   - PropagateTracking  :           Propagate tracking status on all included logistic units    > warehousing.handlingunit.TrackingUpdated
//   - PropagateETA  :                Propagate ETA status on all included logistic units         > warehousing.handlingunit.TrackingETAUpdated
//   - PropagateParentHU  :          Propagate ParentHU on all included HU                      > warehousing.handlingunit.ParentHUUpdated
//   - MoveStock :                    Substract the HU Content from the stock                     > warehousing.stock.Moved

/**
 *
 * HandlingunitMapContentToExecutionFlow : map the Handlingunit content to the corresponding Executionflow
 *
 * @generated from protobuf message api.HandlingunitMapContentToExecutionFlowPayload
 */
export interface HandlingunitMapContentToExecutionFlowPayload {
    /**
     * @generated from protobuf field: api.HandlingunitInformation Information = 1 [json_name = "Information"];
     */
    information?: HandlingunitInformation;
    /**
     * @generated from protobuf field: bool ContainsGoods = 2 [json_name = "ContainsGoods"];
     */
    containsGoods: boolean;
    /**
     * @generated from protobuf field: bool ContainsHUs = 3 [json_name = "ContainsHUs"];
     */
    containsHUs: boolean;
    /**
     * @generated from protobuf field: repeated api.QuantifiedGoodsByExeflow PreparedContents = 4 [json_name = "PreparedContents"];
     */
    preparedContents: QuantifiedGoodsByExeflow[];
    /**
     * @generated from protobuf field: repeated string IncludedHandlingunitIDs = 5 [json_name = "IncludedHandlingunitIDs"];
     */
    includedHandlingunitIDs: string[];
    /**
     * @generated from protobuf field: api.TrackingSummary CurrentTrackingSummary = 6 [json_name = "CurrentTrackingSummary"];
     */
    currentTrackingSummary?: TrackingSummary;
    /**
     * @generated from protobuf field: api.HandlingunitStatusStruct Status = 7 [json_name = "Status"];
     */
    status?: HandlingunitStatusStruct;
    /**
     * 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 = 8 [json_name = "MetaData"];
     */
    metaData: MetadataElement[];
    /**
     * @generated from protobuf field: repeated api.QuantifiedDatedGoodsByExeflow ReceivedContents = 9 [json_name = "ReceivedContents"];
     */
    receivedContents: QuantifiedDatedGoodsByExeflow[];
}
/**
 * @generated from protobuf message api.HandlingunitMapContentToExecutionFlow
 */
export interface HandlingunitMapContentToExecutionFlow {
    /**
     * @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
     */
    header?: CommandHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.HandlingunitMapContentToExecutionFlowPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: HandlingunitMapContentToExecutionFlowPayload;
    /**
     * @generated from protobuf field: api.HandlingunitMapContentToExecutionFlowPayload EventPayload = 4 [json_name = "EventPayload"];
     */
    eventPayload?: HandlingunitMapContentToExecutionFlowPayload;
    /**
     * @generated from protobuf field: api.HandlingunitMapContentToExecutionFlowPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
     */
    previousPayload?: HandlingunitMapContentToExecutionFlowPayload;
}
/**
 *
 * HandlingunitMapTrackingToExecutionFlow : map the Handlingunit Tracking status to the corresponding Executionflow
 *
 * @generated from protobuf message api.HandlingunitMapTrackingToExecutionFlowPayload
 */
export interface HandlingunitMapTrackingToExecutionFlowPayload {
    /**
     * @generated from protobuf field: api.TrackingSummary CurrentTrackingSummary = 1 [json_name = "CurrentTrackingSummary"];
     */
    currentTrackingSummary?: TrackingSummary;
    /**
     * @generated from protobuf field: api.HandlingunitStatusStruct Status = 2 [json_name = "Status"];
     */
    status?: HandlingunitStatusStruct;
    /**
     * @generated from protobuf field: repeated api.QuantifiedGoodsByExeflow PreparedContents = 3 [json_name = "PreparedContents"];
     */
    preparedContents: QuantifiedGoodsByExeflow[];
    /**
     * @generated from protobuf field: repeated api.QuantifiedDatedGoodsByExeflow ReceivedContents = 4 [json_name = "ReceivedContents"];
     */
    receivedContents: QuantifiedDatedGoodsByExeflow[];
    /**
     * @generated from protobuf field: repeated string TrackingIDs = 11 [json_name = "TrackingIDs"];
     */
    trackingIDs: string[];
}
/**
 * @generated from protobuf message api.HandlingunitMapTrackingToExecutionFlow
 */
export interface HandlingunitMapTrackingToExecutionFlow {
    /**
     * @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
     */
    header?: CommandHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.HandlingunitMapTrackingToExecutionFlowPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: HandlingunitMapTrackingToExecutionFlowPayload;
    /**
     * @generated from protobuf field: api.HandlingunitMapTrackingToExecutionFlowPayload EventPayload = 4 [json_name = "EventPayload"];
     */
    eventPayload?: HandlingunitMapTrackingToExecutionFlowPayload;
    /**
     * @generated from protobuf field: api.HandlingunitMapTrackingToExecutionFlowPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
     */
    previousPayload?: HandlingunitMapTrackingToExecutionFlowPayload;
}
/**
 *
 * HandlingunitMapETAToExecutionFlow : map the Handlingunit ETA to the corresponding Executionflow
 *
 * @generated from protobuf message api.HandlingunitMapETAToExecutionFlowPayload
 */
export interface HandlingunitMapETAToExecutionFlowPayload {
    /**
     * @generated from protobuf field: api.ETA HandlingunitETA = 1 [json_name = "HandlingunitETA"];
     */
    handlingunitETA?: ETA;
    /**
     * @generated from protobuf field: repeated api.QuantifiedGoodsByExeflow PreparedContents = 3 [json_name = "PreparedContents"];
     */
    preparedContents: QuantifiedGoodsByExeflow[];
    /**
     * @generated from protobuf field: repeated api.QuantifiedDatedGoodsByExeflow ReceivedContents = 4 [json_name = "ReceivedContents"];
     */
    receivedContents: QuantifiedDatedGoodsByExeflow[];
}
/**
 * @generated from protobuf message api.HandlingunitMapETAToExecutionFlow
 */
export interface HandlingunitMapETAToExecutionFlow {
    /**
     * @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
     */
    header?: CommandHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.HandlingunitMapETAToExecutionFlowPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: HandlingunitMapETAToExecutionFlowPayload;
    /**
     * @generated from protobuf field: api.HandlingunitMapETAToExecutionFlowPayload EventPayload = 4 [json_name = "EventPayload"];
     */
    eventPayload?: HandlingunitMapETAToExecutionFlowPayload;
    /**
     * @generated from protobuf field: api.HandlingunitMapETAToExecutionFlowPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
     */
    previousPayload?: HandlingunitMapETAToExecutionFlowPayload;
}
/**
 *
 * PropagateTracking : replicate tracking status on all included logistic units
 *
 * @generated from protobuf message api.HandlingunitPropagateTrackingPayload
 */
export interface HandlingunitPropagateTrackingPayload {
    /**
     * @generated from protobuf field: bool ContainsHUs = 1 [json_name = "ContainsHUs"];
     */
    containsHUs: boolean;
    /**
     * @generated from protobuf field: repeated string IncludedHandlingunitIDs = 2 [json_name = "IncludedHandlingunitIDs"];
     */
    includedHandlingunitIDs: string[];
    /**
     * @generated from protobuf field: api.TrackingSummary CurrentTrackingSummary = 3 [json_name = "CurrentTrackingSummary"];
     */
    currentTrackingSummary?: TrackingSummary;
    /**
     * @generated from protobuf field: api.DateTime DispatchedDateTime = 4 [json_name = "DispatchedDateTime"];
     */
    dispatchedDateTime?: DateTime;
}
/**
 * @generated from protobuf message api.HandlingunitPropagateTracking
 */
export interface HandlingunitPropagateTracking {
    /**
     * @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
     */
    header?: CommandHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.HandlingunitPropagateTrackingPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: HandlingunitPropagateTrackingPayload;
    /**
     * @generated from protobuf field: api.HandlingunitPropagateTrackingPayload EventPayload = 4 [json_name = "EventPayload"];
     */
    eventPayload?: HandlingunitPropagateTrackingPayload;
    /**
     * @generated from protobuf field: api.HandlingunitPropagateTrackingPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
     */
    previousPayload?: HandlingunitPropagateTrackingPayload;
}
/**
 *
 * PropagateETA : replicate ETA on all included logistic units
 *
 * @generated from protobuf message api.HandlingunitPropagateETAPayload
 */
export interface HandlingunitPropagateETAPayload {
    /**
     * @generated from protobuf field: api.ETA HandlingunitETA = 1 [json_name = "HandlingunitETA"];
     */
    handlingunitETA?: ETA;
    /**
     * @generated from protobuf field: repeated string IncludedHandlingunitIDs = 2 [json_name = "IncludedHandlingunitIDs"];
     */
    includedHandlingunitIDs: string[];
    /**
     * @generated from protobuf field: bool ContainsHUs = 3 [json_name = "ContainsHUs"];
     */
    containsHUs: boolean;
}
/**
 * @generated from protobuf message api.HandlingunitPropagateETA
 */
export interface HandlingunitPropagateETA {
    /**
     * @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
     */
    header?: CommandHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.HandlingunitPropagateETAPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: HandlingunitPropagateETAPayload;
    /**
     * @generated from protobuf field: api.HandlingunitPropagateETAPayload EventPayload = 4 [json_name = "EventPayload"];
     */
    eventPayload?: HandlingunitPropagateETAPayload;
    /**
     * @generated from protobuf field: api.HandlingunitPropagateETAPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
     */
    previousPayload?: HandlingunitPropagateETAPayload;
}
/**
 *
 * PropagateParentHU : Propagate ParentHU on all included logistic units
 *
 * @generated from protobuf message api.HandlingunitPropagateParentHUPayload
 */
export interface HandlingunitPropagateParentHUPayload {
    /**
     * @generated from protobuf field: bool ContainsHUs = 1 [json_name = "ContainsHUs"];
     */
    containsHUs: boolean;
    /**
     * @generated from protobuf field: repeated string IncludedHandlingunitIDs = 2 [json_name = "IncludedHandlingunitIDs"];
     */
    includedHandlingunitIDs: string[];
}
/**
 * @generated from protobuf message api.HandlingunitPropagateParentHU
 */
export interface HandlingunitPropagateParentHU {
    /**
     * @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
     */
    header?: CommandHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.HandlingunitPropagateParentHUPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: HandlingunitPropagateParentHUPayload;
    /**
     * @generated from protobuf field: api.HandlingunitPropagateParentHUPayload EventPayload = 4 [json_name = "EventPayload"];
     */
    eventPayload?: HandlingunitPropagateParentHUPayload;
    /**
     * @generated from protobuf field: api.HandlingunitPropagateParentHUPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
     */
    previousPayload?: HandlingunitPropagateParentHUPayload;
}
/**
 *
 * MoveStock : Send a 'moved' event to the stock to decrement the content of the HU
 *
 * @generated from protobuf message api.HandlingunitMoveStockPayload
 */
export interface HandlingunitMoveStockPayload {
    /**
     * @generated from protobuf field: repeated api.QuantifiedGoodsByExeflow PreparedContents = 1 [json_name = "PreparedContents"];
     */
    preparedContents: QuantifiedGoodsByExeflow[];
    /**
     * @generated from protobuf field: repeated api.QuantifiedDatedGoodsByExeflow ReceivedContents = 2 [json_name = "ReceivedContents"];
     */
    receivedContents: QuantifiedDatedGoodsByExeflow[];
    /**
     * @generated from protobuf field: api.HandlingunitStatusStruct Status = 8 [json_name = "Status"];
     */
    status?: HandlingunitStatusStruct;
    /**
     * @generated from protobuf field: api.DateTime DispatchedDateTime = 9 [json_name = "DispatchedDateTime"];
     */
    dispatchedDateTime?: DateTime;
}
/**
 * @generated from protobuf message api.HandlingunitMoveStock
 */
export interface HandlingunitMoveStock {
    /**
     * @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
     */
    header?: CommandHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.HandlingunitMoveStockPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: HandlingunitMoveStockPayload;
    /**
     * @generated from protobuf field: api.HandlingunitMoveStockPayload EventPayload = 4 [json_name = "EventPayload"];
     */
    eventPayload?: HandlingunitMoveStockPayload;
    /**
     * @generated from protobuf field: api.HandlingunitMoveStockPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
     */
    previousPayload?: HandlingunitMoveStockPayload;
}
// @generated message type with reflection information, may provide speed optimized methods
class HandlingunitMapContentToExecutionFlowPayload$Type extends MessageType<HandlingunitMapContentToExecutionFlowPayload> {
    constructor() {
        super("api.HandlingunitMapContentToExecutionFlowPayload", [
            { no: 1, name: "Information", kind: "message", jsonName: "Information", T: () => HandlingunitInformation },
            { no: 2, name: "ContainsGoods", kind: "scalar", jsonName: "ContainsGoods", T: 8 /*ScalarType.BOOL*/ },
            { no: 3, name: "ContainsHUs", kind: "scalar", jsonName: "ContainsHUs", T: 8 /*ScalarType.BOOL*/ },
            { no: 4, name: "PreparedContents", kind: "message", jsonName: "PreparedContents", repeat: 1 /*RepeatType.PACKED*/, T: () => QuantifiedGoodsByExeflow },
            { no: 5, name: "IncludedHandlingunitIDs", kind: "scalar", jsonName: "IncludedHandlingunitIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
            { no: 6, name: "CurrentTrackingSummary", kind: "message", jsonName: "CurrentTrackingSummary", T: () => TrackingSummary },
            { no: 7, name: "Status", kind: "message", jsonName: "Status", T: () => HandlingunitStatusStruct },
            { no: 8, name: "MetaData", kind: "message", jsonName: "MetaData", repeat: 1 /*RepeatType.PACKED*/, 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" } },
            { no: 9, name: "ReceivedContents", kind: "message", jsonName: "ReceivedContents", repeat: 1 /*RepeatType.PACKED*/, T: () => QuantifiedDatedGoodsByExeflow }
        ], { "api.messageType": "Command", "api.payload": true, "api.action": "MapContentToExecutionFlow" });
    }
    create(value?: PartialMessage<HandlingunitMapContentToExecutionFlowPayload>): HandlingunitMapContentToExecutionFlowPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.containsGoods = false;
        message.containsHUs = false;
        message.preparedContents = [];
        message.includedHandlingunitIDs = [];
        message.metaData = [];
        message.receivedContents = [];
        if (value !== undefined)
            reflectionMergePartial<HandlingunitMapContentToExecutionFlowPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitMapContentToExecutionFlowPayload): HandlingunitMapContentToExecutionFlowPayload {
        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 [json_name = "Information"];*/ 1:
                    message.information = HandlingunitInformation.internalBinaryRead(reader, reader.uint32(), options, message.information);
                    break;
                case /* bool ContainsGoods = 2 [json_name = "ContainsGoods"];*/ 2:
                    message.containsGoods = reader.bool();
                    break;
                case /* bool ContainsHUs = 3 [json_name = "ContainsHUs"];*/ 3:
                    message.containsHUs = reader.bool();
                    break;
                case /* repeated api.QuantifiedGoodsByExeflow PreparedContents = 4 [json_name = "PreparedContents"];*/ 4:
                    message.preparedContents.push(QuantifiedGoodsByExeflow.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated string IncludedHandlingunitIDs = 5 [json_name = "IncludedHandlingunitIDs"];*/ 5:
                    message.includedHandlingunitIDs.push(reader.string());
                    break;
                case /* api.TrackingSummary CurrentTrackingSummary = 6 [json_name = "CurrentTrackingSummary"];*/ 6:
                    message.currentTrackingSummary = TrackingSummary.internalBinaryRead(reader, reader.uint32(), options, message.currentTrackingSummary);
                    break;
                case /* api.HandlingunitStatusStruct Status = 7 [json_name = "Status"];*/ 7:
                    message.status = HandlingunitStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.status);
                    break;
                case /* repeated api.MetadataElement MetaData = 8 [json_name = "MetaData"];*/ 8:
                    message.metaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated api.QuantifiedDatedGoodsByExeflow ReceivedContents = 9 [json_name = "ReceivedContents"];*/ 9:
                    message.receivedContents.push(QuantifiedDatedGoodsByExeflow.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: HandlingunitMapContentToExecutionFlowPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.HandlingunitInformation Information = 1 [json_name = "Information"]; */
        if (message.information)
            HandlingunitInformation.internalBinaryWrite(message.information, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* bool ContainsGoods = 2 [json_name = "ContainsGoods"]; */
        if (message.containsGoods !== false)
            writer.tag(2, WireType.Varint).bool(message.containsGoods);
        /* bool ContainsHUs = 3 [json_name = "ContainsHUs"]; */
        if (message.containsHUs !== false)
            writer.tag(3, WireType.Varint).bool(message.containsHUs);
        /* repeated api.QuantifiedGoodsByExeflow PreparedContents = 4 [json_name = "PreparedContents"]; */
        for (let i = 0; i < message.preparedContents.length; i++)
            QuantifiedGoodsByExeflow.internalBinaryWrite(message.preparedContents[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* repeated string IncludedHandlingunitIDs = 5 [json_name = "IncludedHandlingunitIDs"]; */
        for (let i = 0; i < message.includedHandlingunitIDs.length; i++)
            writer.tag(5, WireType.LengthDelimited).string(message.includedHandlingunitIDs[i]);
        /* api.TrackingSummary CurrentTrackingSummary = 6 [json_name = "CurrentTrackingSummary"]; */
        if (message.currentTrackingSummary)
            TrackingSummary.internalBinaryWrite(message.currentTrackingSummary, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitStatusStruct Status = 7 [json_name = "Status"]; */
        if (message.status)
            HandlingunitStatusStruct.internalBinaryWrite(message.status, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.MetadataElement MetaData = 8 [json_name = "MetaData"]; */
        for (let i = 0; i < message.metaData.length; i++)
            MetadataElement.internalBinaryWrite(message.metaData[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.QuantifiedDatedGoodsByExeflow ReceivedContents = 9 [json_name = "ReceivedContents"]; */
        for (let i = 0; i < message.receivedContents.length; i++)
            QuantifiedDatedGoodsByExeflow.internalBinaryWrite(message.receivedContents[i], writer.tag(9, 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.HandlingunitMapContentToExecutionFlowPayload
 */
export const HandlingunitMapContentToExecutionFlowPayload = new HandlingunitMapContentToExecutionFlowPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HandlingunitMapContentToExecutionFlow$Type extends MessageType<HandlingunitMapContentToExecutionFlow> {
    constructor() {
        super("api.HandlingunitMapContentToExecutionFlow", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => HandlingunitMapContentToExecutionFlowPayload },
            { no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => HandlingunitMapContentToExecutionFlowPayload },
            { no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => HandlingunitMapContentToExecutionFlowPayload }
        ], { "api.messageType": "Command", "api.action": "MapContentToExecutionFlow", "api.resultingEvent": "executionflow.HUContentUpdated", "api.triggerEventFilters": "GoodsPrepared,GoodsReceived", "api.windowMethod": "TumblingProcessingTimeWindows", "api.keyByExpression": "obj.getHeader().getProject()" });
    }
    create(value?: PartialMessage<HandlingunitMapContentToExecutionFlow>): HandlingunitMapContentToExecutionFlow {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<HandlingunitMapContentToExecutionFlow>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitMapContentToExecutionFlow): HandlingunitMapContentToExecutionFlow {
        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 [json_name = "Header"];*/ 1:
                    message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
                    message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
                    break;
                case /* api.HandlingunitMapContentToExecutionFlowPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = HandlingunitMapContentToExecutionFlowPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
                    break;
                case /* api.HandlingunitMapContentToExecutionFlowPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
                    message.eventPayload = HandlingunitMapContentToExecutionFlowPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
                    break;
                case /* api.HandlingunitMapContentToExecutionFlowPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
                    message.previousPayload = HandlingunitMapContentToExecutionFlowPayload.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: HandlingunitMapContentToExecutionFlow, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.CommandHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.EntityID ID = 2 [json_name = "ID"]; */
        if (message.iD)
            EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitMapContentToExecutionFlowPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            HandlingunitMapContentToExecutionFlowPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitMapContentToExecutionFlowPayload EventPayload = 4 [json_name = "EventPayload"]; */
        if (message.eventPayload)
            HandlingunitMapContentToExecutionFlowPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitMapContentToExecutionFlowPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
        if (message.previousPayload)
            HandlingunitMapContentToExecutionFlowPayload.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.HandlingunitMapContentToExecutionFlow
 */
export const HandlingunitMapContentToExecutionFlow = new HandlingunitMapContentToExecutionFlow$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HandlingunitMapTrackingToExecutionFlowPayload$Type extends MessageType<HandlingunitMapTrackingToExecutionFlowPayload> {
    constructor() {
        super("api.HandlingunitMapTrackingToExecutionFlowPayload", [
            { no: 1, name: "CurrentTrackingSummary", kind: "message", jsonName: "CurrentTrackingSummary", T: () => TrackingSummary },
            { no: 2, name: "Status", kind: "message", jsonName: "Status", T: () => HandlingunitStatusStruct },
            { no: 3, name: "PreparedContents", kind: "message", jsonName: "PreparedContents", repeat: 1 /*RepeatType.PACKED*/, T: () => QuantifiedGoodsByExeflow },
            { no: 4, name: "ReceivedContents", kind: "message", jsonName: "ReceivedContents", repeat: 1 /*RepeatType.PACKED*/, T: () => QuantifiedDatedGoodsByExeflow },
            { no: 11, name: "TrackingIDs", kind: "scalar", jsonName: "TrackingIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
        ], { "api.messageType": "Command", "api.payload": true, "api.action": "MapTrackingToExecutionFlow" });
    }
    create(value?: PartialMessage<HandlingunitMapTrackingToExecutionFlowPayload>): HandlingunitMapTrackingToExecutionFlowPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.preparedContents = [];
        message.receivedContents = [];
        message.trackingIDs = [];
        if (value !== undefined)
            reflectionMergePartial<HandlingunitMapTrackingToExecutionFlowPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitMapTrackingToExecutionFlowPayload): HandlingunitMapTrackingToExecutionFlowPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.TrackingSummary CurrentTrackingSummary = 1 [json_name = "CurrentTrackingSummary"];*/ 1:
                    message.currentTrackingSummary = TrackingSummary.internalBinaryRead(reader, reader.uint32(), options, message.currentTrackingSummary);
                    break;
                case /* api.HandlingunitStatusStruct Status = 2 [json_name = "Status"];*/ 2:
                    message.status = HandlingunitStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.status);
                    break;
                case /* repeated api.QuantifiedGoodsByExeflow PreparedContents = 3 [json_name = "PreparedContents"];*/ 3:
                    message.preparedContents.push(QuantifiedGoodsByExeflow.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated api.QuantifiedDatedGoodsByExeflow ReceivedContents = 4 [json_name = "ReceivedContents"];*/ 4:
                    message.receivedContents.push(QuantifiedDatedGoodsByExeflow.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated string TrackingIDs = 11 [json_name = "TrackingIDs"];*/ 11:
                    message.trackingIDs.push(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: HandlingunitMapTrackingToExecutionFlowPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.TrackingSummary CurrentTrackingSummary = 1 [json_name = "CurrentTrackingSummary"]; */
        if (message.currentTrackingSummary)
            TrackingSummary.internalBinaryWrite(message.currentTrackingSummary, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitStatusStruct Status = 2 [json_name = "Status"]; */
        if (message.status)
            HandlingunitStatusStruct.internalBinaryWrite(message.status, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.QuantifiedGoodsByExeflow PreparedContents = 3 [json_name = "PreparedContents"]; */
        for (let i = 0; i < message.preparedContents.length; i++)
            QuantifiedGoodsByExeflow.internalBinaryWrite(message.preparedContents[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.QuantifiedDatedGoodsByExeflow ReceivedContents = 4 [json_name = "ReceivedContents"]; */
        for (let i = 0; i < message.receivedContents.length; i++)
            QuantifiedDatedGoodsByExeflow.internalBinaryWrite(message.receivedContents[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* repeated string TrackingIDs = 11 [json_name = "TrackingIDs"]; */
        for (let i = 0; i < message.trackingIDs.length; i++)
            writer.tag(11, WireType.LengthDelimited).string(message.trackingIDs[i]);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.HandlingunitMapTrackingToExecutionFlowPayload
 */
export const HandlingunitMapTrackingToExecutionFlowPayload = new HandlingunitMapTrackingToExecutionFlowPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HandlingunitMapTrackingToExecutionFlow$Type extends MessageType<HandlingunitMapTrackingToExecutionFlow> {
    constructor() {
        super("api.HandlingunitMapTrackingToExecutionFlow", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => HandlingunitMapTrackingToExecutionFlowPayload },
            { no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => HandlingunitMapTrackingToExecutionFlowPayload },
            { no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => HandlingunitMapTrackingToExecutionFlowPayload }
        ], { "api.messageType": "Command", "api.action": "MapTrackingToExecutionFlow", "api.resultingEvent": "executionflow.HUTrackingUpdated", "api.triggerEventFilters": "TrackingUpdated,Dispatched,ReadyToBeCollected", "api.windowMethod": "TumblingProcessingTimeWindows", "api.keyByExpression": "obj.getHeader().getProject()" });
    }
    create(value?: PartialMessage<HandlingunitMapTrackingToExecutionFlow>): HandlingunitMapTrackingToExecutionFlow {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<HandlingunitMapTrackingToExecutionFlow>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitMapTrackingToExecutionFlow): HandlingunitMapTrackingToExecutionFlow {
        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 [json_name = "Header"];*/ 1:
                    message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
                    message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
                    break;
                case /* api.HandlingunitMapTrackingToExecutionFlowPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = HandlingunitMapTrackingToExecutionFlowPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
                    break;
                case /* api.HandlingunitMapTrackingToExecutionFlowPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
                    message.eventPayload = HandlingunitMapTrackingToExecutionFlowPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
                    break;
                case /* api.HandlingunitMapTrackingToExecutionFlowPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
                    message.previousPayload = HandlingunitMapTrackingToExecutionFlowPayload.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: HandlingunitMapTrackingToExecutionFlow, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.CommandHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.EntityID ID = 2 [json_name = "ID"]; */
        if (message.iD)
            EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitMapTrackingToExecutionFlowPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            HandlingunitMapTrackingToExecutionFlowPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitMapTrackingToExecutionFlowPayload EventPayload = 4 [json_name = "EventPayload"]; */
        if (message.eventPayload)
            HandlingunitMapTrackingToExecutionFlowPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitMapTrackingToExecutionFlowPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
        if (message.previousPayload)
            HandlingunitMapTrackingToExecutionFlowPayload.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.HandlingunitMapTrackingToExecutionFlow
 */
export const HandlingunitMapTrackingToExecutionFlow = new HandlingunitMapTrackingToExecutionFlow$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HandlingunitMapETAToExecutionFlowPayload$Type extends MessageType<HandlingunitMapETAToExecutionFlowPayload> {
    constructor() {
        super("api.HandlingunitMapETAToExecutionFlowPayload", [
            { no: 1, name: "HandlingunitETA", kind: "message", jsonName: "HandlingunitETA", T: () => ETA },
            { no: 3, name: "PreparedContents", kind: "message", jsonName: "PreparedContents", repeat: 1 /*RepeatType.PACKED*/, T: () => QuantifiedGoodsByExeflow },
            { no: 4, name: "ReceivedContents", kind: "message", jsonName: "ReceivedContents", repeat: 1 /*RepeatType.PACKED*/, T: () => QuantifiedDatedGoodsByExeflow }
        ], { "api.messageType": "Command", "api.payload": true, "api.action": "MapETAToExecutionFlow" });
    }
    create(value?: PartialMessage<HandlingunitMapETAToExecutionFlowPayload>): HandlingunitMapETAToExecutionFlowPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.preparedContents = [];
        message.receivedContents = [];
        if (value !== undefined)
            reflectionMergePartial<HandlingunitMapETAToExecutionFlowPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitMapETAToExecutionFlowPayload): HandlingunitMapETAToExecutionFlowPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.ETA HandlingunitETA = 1 [json_name = "HandlingunitETA"];*/ 1:
                    message.handlingunitETA = ETA.internalBinaryRead(reader, reader.uint32(), options, message.handlingunitETA);
                    break;
                case /* repeated api.QuantifiedGoodsByExeflow PreparedContents = 3 [json_name = "PreparedContents"];*/ 3:
                    message.preparedContents.push(QuantifiedGoodsByExeflow.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated api.QuantifiedDatedGoodsByExeflow ReceivedContents = 4 [json_name = "ReceivedContents"];*/ 4:
                    message.receivedContents.push(QuantifiedDatedGoodsByExeflow.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: HandlingunitMapETAToExecutionFlowPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.ETA HandlingunitETA = 1 [json_name = "HandlingunitETA"]; */
        if (message.handlingunitETA)
            ETA.internalBinaryWrite(message.handlingunitETA, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.QuantifiedGoodsByExeflow PreparedContents = 3 [json_name = "PreparedContents"]; */
        for (let i = 0; i < message.preparedContents.length; i++)
            QuantifiedGoodsByExeflow.internalBinaryWrite(message.preparedContents[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.QuantifiedDatedGoodsByExeflow ReceivedContents = 4 [json_name = "ReceivedContents"]; */
        for (let i = 0; i < message.receivedContents.length; i++)
            QuantifiedDatedGoodsByExeflow.internalBinaryWrite(message.receivedContents[i], writer.tag(4, 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.HandlingunitMapETAToExecutionFlowPayload
 */
export const HandlingunitMapETAToExecutionFlowPayload = new HandlingunitMapETAToExecutionFlowPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HandlingunitMapETAToExecutionFlow$Type extends MessageType<HandlingunitMapETAToExecutionFlow> {
    constructor() {
        super("api.HandlingunitMapETAToExecutionFlow", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => HandlingunitMapETAToExecutionFlowPayload },
            { no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => HandlingunitMapETAToExecutionFlowPayload },
            { no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => HandlingunitMapETAToExecutionFlowPayload }
        ], { "api.messageType": "Command", "api.action": "MapETAToExecutionFlow", "api.resultingEvent": "executionflow.HUETAUpdated", "api.triggerEventFilters": "ETAUpdated,TrackingETAUpdated,GoodsPrepared", "api.windowMethod": "TumblingProcessingTimeWindows", "api.keyByExpression": "obj.getHeader().getProject()" });
    }
    create(value?: PartialMessage<HandlingunitMapETAToExecutionFlow>): HandlingunitMapETAToExecutionFlow {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<HandlingunitMapETAToExecutionFlow>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitMapETAToExecutionFlow): HandlingunitMapETAToExecutionFlow {
        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 [json_name = "Header"];*/ 1:
                    message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
                    message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
                    break;
                case /* api.HandlingunitMapETAToExecutionFlowPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = HandlingunitMapETAToExecutionFlowPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
                    break;
                case /* api.HandlingunitMapETAToExecutionFlowPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
                    message.eventPayload = HandlingunitMapETAToExecutionFlowPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
                    break;
                case /* api.HandlingunitMapETAToExecutionFlowPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
                    message.previousPayload = HandlingunitMapETAToExecutionFlowPayload.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: HandlingunitMapETAToExecutionFlow, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.CommandHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.EntityID ID = 2 [json_name = "ID"]; */
        if (message.iD)
            EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitMapETAToExecutionFlowPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            HandlingunitMapETAToExecutionFlowPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitMapETAToExecutionFlowPayload EventPayload = 4 [json_name = "EventPayload"]; */
        if (message.eventPayload)
            HandlingunitMapETAToExecutionFlowPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitMapETAToExecutionFlowPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
        if (message.previousPayload)
            HandlingunitMapETAToExecutionFlowPayload.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.HandlingunitMapETAToExecutionFlow
 */
export const HandlingunitMapETAToExecutionFlow = new HandlingunitMapETAToExecutionFlow$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HandlingunitPropagateTrackingPayload$Type extends MessageType<HandlingunitPropagateTrackingPayload> {
    constructor() {
        super("api.HandlingunitPropagateTrackingPayload", [
            { no: 1, name: "ContainsHUs", kind: "scalar", jsonName: "ContainsHUs", T: 8 /*ScalarType.BOOL*/ },
            { no: 2, name: "IncludedHandlingunitIDs", kind: "scalar", jsonName: "IncludedHandlingunitIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "CurrentTrackingSummary", kind: "message", jsonName: "CurrentTrackingSummary", T: () => TrackingSummary },
            { no: 4, name: "DispatchedDateTime", kind: "message", jsonName: "DispatchedDateTime", T: () => DateTime }
        ], { "api.messageType": "Command", "api.payload": true, "api.action": "PropagateTracking" });
    }
    create(value?: PartialMessage<HandlingunitPropagateTrackingPayload>): HandlingunitPropagateTrackingPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.containsHUs = false;
        message.includedHandlingunitIDs = [];
        if (value !== undefined)
            reflectionMergePartial<HandlingunitPropagateTrackingPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitPropagateTrackingPayload): HandlingunitPropagateTrackingPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* bool ContainsHUs = 1 [json_name = "ContainsHUs"];*/ 1:
                    message.containsHUs = reader.bool();
                    break;
                case /* repeated string IncludedHandlingunitIDs = 2 [json_name = "IncludedHandlingunitIDs"];*/ 2:
                    message.includedHandlingunitIDs.push(reader.string());
                    break;
                case /* api.TrackingSummary CurrentTrackingSummary = 3 [json_name = "CurrentTrackingSummary"];*/ 3:
                    message.currentTrackingSummary = TrackingSummary.internalBinaryRead(reader, reader.uint32(), options, message.currentTrackingSummary);
                    break;
                case /* api.DateTime DispatchedDateTime = 4 [json_name = "DispatchedDateTime"];*/ 4:
                    message.dispatchedDateTime = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.dispatchedDateTime);
                    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: HandlingunitPropagateTrackingPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* bool ContainsHUs = 1 [json_name = "ContainsHUs"]; */
        if (message.containsHUs !== false)
            writer.tag(1, WireType.Varint).bool(message.containsHUs);
        /* repeated string IncludedHandlingunitIDs = 2 [json_name = "IncludedHandlingunitIDs"]; */
        for (let i = 0; i < message.includedHandlingunitIDs.length; i++)
            writer.tag(2, WireType.LengthDelimited).string(message.includedHandlingunitIDs[i]);
        /* api.TrackingSummary CurrentTrackingSummary = 3 [json_name = "CurrentTrackingSummary"]; */
        if (message.currentTrackingSummary)
            TrackingSummary.internalBinaryWrite(message.currentTrackingSummary, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.DateTime DispatchedDateTime = 4 [json_name = "DispatchedDateTime"]; */
        if (message.dispatchedDateTime)
            DateTime.internalBinaryWrite(message.dispatchedDateTime, writer.tag(4, 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.HandlingunitPropagateTrackingPayload
 */
export const HandlingunitPropagateTrackingPayload = new HandlingunitPropagateTrackingPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HandlingunitPropagateTracking$Type extends MessageType<HandlingunitPropagateTracking> {
    constructor() {
        super("api.HandlingunitPropagateTracking", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => HandlingunitPropagateTrackingPayload },
            { no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => HandlingunitPropagateTrackingPayload },
            { no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => HandlingunitPropagateTrackingPayload }
        ], { "api.messageType": "Command", "api.action": "PropagateTracking", "api.resultingEvent": "TrackingUpdated", "api.triggerEventFilters": "TrackingUpdated" });
    }
    create(value?: PartialMessage<HandlingunitPropagateTracking>): HandlingunitPropagateTracking {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<HandlingunitPropagateTracking>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitPropagateTracking): HandlingunitPropagateTracking {
        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 [json_name = "Header"];*/ 1:
                    message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
                    message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
                    break;
                case /* api.HandlingunitPropagateTrackingPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = HandlingunitPropagateTrackingPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
                    break;
                case /* api.HandlingunitPropagateTrackingPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
                    message.eventPayload = HandlingunitPropagateTrackingPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
                    break;
                case /* api.HandlingunitPropagateTrackingPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
                    message.previousPayload = HandlingunitPropagateTrackingPayload.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: HandlingunitPropagateTracking, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.CommandHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.EntityID ID = 2 [json_name = "ID"]; */
        if (message.iD)
            EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitPropagateTrackingPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            HandlingunitPropagateTrackingPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitPropagateTrackingPayload EventPayload = 4 [json_name = "EventPayload"]; */
        if (message.eventPayload)
            HandlingunitPropagateTrackingPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitPropagateTrackingPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
        if (message.previousPayload)
            HandlingunitPropagateTrackingPayload.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.HandlingunitPropagateTracking
 */
export const HandlingunitPropagateTracking = new HandlingunitPropagateTracking$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HandlingunitPropagateETAPayload$Type extends MessageType<HandlingunitPropagateETAPayload> {
    constructor() {
        super("api.HandlingunitPropagateETAPayload", [
            { no: 1, name: "HandlingunitETA", kind: "message", jsonName: "HandlingunitETA", T: () => ETA },
            { no: 2, name: "IncludedHandlingunitIDs", kind: "scalar", jsonName: "IncludedHandlingunitIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "ContainsHUs", kind: "scalar", jsonName: "ContainsHUs", T: 8 /*ScalarType.BOOL*/ }
        ], { "api.messageType": "Command", "api.payload": true, "api.action": "PropagateETA" });
    }
    create(value?: PartialMessage<HandlingunitPropagateETAPayload>): HandlingunitPropagateETAPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.includedHandlingunitIDs = [];
        message.containsHUs = false;
        if (value !== undefined)
            reflectionMergePartial<HandlingunitPropagateETAPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitPropagateETAPayload): HandlingunitPropagateETAPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.ETA HandlingunitETA = 1 [json_name = "HandlingunitETA"];*/ 1:
                    message.handlingunitETA = ETA.internalBinaryRead(reader, reader.uint32(), options, message.handlingunitETA);
                    break;
                case /* repeated string IncludedHandlingunitIDs = 2 [json_name = "IncludedHandlingunitIDs"];*/ 2:
                    message.includedHandlingunitIDs.push(reader.string());
                    break;
                case /* bool ContainsHUs = 3 [json_name = "ContainsHUs"];*/ 3:
                    message.containsHUs = reader.bool();
                    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: HandlingunitPropagateETAPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.ETA HandlingunitETA = 1 [json_name = "HandlingunitETA"]; */
        if (message.handlingunitETA)
            ETA.internalBinaryWrite(message.handlingunitETA, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* repeated string IncludedHandlingunitIDs = 2 [json_name = "IncludedHandlingunitIDs"]; */
        for (let i = 0; i < message.includedHandlingunitIDs.length; i++)
            writer.tag(2, WireType.LengthDelimited).string(message.includedHandlingunitIDs[i]);
        /* bool ContainsHUs = 3 [json_name = "ContainsHUs"]; */
        if (message.containsHUs !== false)
            writer.tag(3, WireType.Varint).bool(message.containsHUs);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.HandlingunitPropagateETAPayload
 */
export const HandlingunitPropagateETAPayload = new HandlingunitPropagateETAPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HandlingunitPropagateETA$Type extends MessageType<HandlingunitPropagateETA> {
    constructor() {
        super("api.HandlingunitPropagateETA", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => HandlingunitPropagateETAPayload },
            { no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => HandlingunitPropagateETAPayload },
            { no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => HandlingunitPropagateETAPayload }
        ], { "api.messageType": "Command", "api.action": "PropagateETA", "api.resultingEvent": "TrackingETAUpdated", "api.triggerEventFilters": "ETAUpdated,TrackingETAUpdated" });
    }
    create(value?: PartialMessage<HandlingunitPropagateETA>): HandlingunitPropagateETA {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<HandlingunitPropagateETA>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitPropagateETA): HandlingunitPropagateETA {
        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 [json_name = "Header"];*/ 1:
                    message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
                    message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
                    break;
                case /* api.HandlingunitPropagateETAPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = HandlingunitPropagateETAPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
                    break;
                case /* api.HandlingunitPropagateETAPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
                    message.eventPayload = HandlingunitPropagateETAPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
                    break;
                case /* api.HandlingunitPropagateETAPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
                    message.previousPayload = HandlingunitPropagateETAPayload.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: HandlingunitPropagateETA, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.CommandHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.EntityID ID = 2 [json_name = "ID"]; */
        if (message.iD)
            EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitPropagateETAPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            HandlingunitPropagateETAPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitPropagateETAPayload EventPayload = 4 [json_name = "EventPayload"]; */
        if (message.eventPayload)
            HandlingunitPropagateETAPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitPropagateETAPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
        if (message.previousPayload)
            HandlingunitPropagateETAPayload.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.HandlingunitPropagateETA
 */
export const HandlingunitPropagateETA = new HandlingunitPropagateETA$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HandlingunitPropagateParentHUPayload$Type extends MessageType<HandlingunitPropagateParentHUPayload> {
    constructor() {
        super("api.HandlingunitPropagateParentHUPayload", [
            { no: 1, name: "ContainsHUs", kind: "scalar", jsonName: "ContainsHUs", T: 8 /*ScalarType.BOOL*/ },
            { no: 2, name: "IncludedHandlingunitIDs", kind: "scalar", jsonName: "IncludedHandlingunitIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
        ], { "api.messageType": "Command", "api.payload": true, "api.action": "PropagateParentHU" });
    }
    create(value?: PartialMessage<HandlingunitPropagateParentHUPayload>): HandlingunitPropagateParentHUPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.containsHUs = false;
        message.includedHandlingunitIDs = [];
        if (value !== undefined)
            reflectionMergePartial<HandlingunitPropagateParentHUPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitPropagateParentHUPayload): HandlingunitPropagateParentHUPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* bool ContainsHUs = 1 [json_name = "ContainsHUs"];*/ 1:
                    message.containsHUs = reader.bool();
                    break;
                case /* repeated string IncludedHandlingunitIDs = 2 [json_name = "IncludedHandlingunitIDs"];*/ 2:
                    message.includedHandlingunitIDs.push(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: HandlingunitPropagateParentHUPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* bool ContainsHUs = 1 [json_name = "ContainsHUs"]; */
        if (message.containsHUs !== false)
            writer.tag(1, WireType.Varint).bool(message.containsHUs);
        /* repeated string IncludedHandlingunitIDs = 2 [json_name = "IncludedHandlingunitIDs"]; */
        for (let i = 0; i < message.includedHandlingunitIDs.length; i++)
            writer.tag(2, WireType.LengthDelimited).string(message.includedHandlingunitIDs[i]);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.HandlingunitPropagateParentHUPayload
 */
export const HandlingunitPropagateParentHUPayload = new HandlingunitPropagateParentHUPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HandlingunitPropagateParentHU$Type extends MessageType<HandlingunitPropagateParentHU> {
    constructor() {
        super("api.HandlingunitPropagateParentHU", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => HandlingunitPropagateParentHUPayload },
            { no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => HandlingunitPropagateParentHUPayload },
            { no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => HandlingunitPropagateParentHUPayload }
        ], { "api.messageType": "Command", "api.action": "PropagateParentHU", "api.resultingEvent": "ParentHUUpdated", "api.triggerEventFilters": "HUsAdded" });
    }
    create(value?: PartialMessage<HandlingunitPropagateParentHU>): HandlingunitPropagateParentHU {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<HandlingunitPropagateParentHU>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitPropagateParentHU): HandlingunitPropagateParentHU {
        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 [json_name = "Header"];*/ 1:
                    message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
                    message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
                    break;
                case /* api.HandlingunitPropagateParentHUPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = HandlingunitPropagateParentHUPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
                    break;
                case /* api.HandlingunitPropagateParentHUPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
                    message.eventPayload = HandlingunitPropagateParentHUPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
                    break;
                case /* api.HandlingunitPropagateParentHUPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
                    message.previousPayload = HandlingunitPropagateParentHUPayload.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: HandlingunitPropagateParentHU, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.CommandHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.EntityID ID = 2 [json_name = "ID"]; */
        if (message.iD)
            EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitPropagateParentHUPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            HandlingunitPropagateParentHUPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitPropagateParentHUPayload EventPayload = 4 [json_name = "EventPayload"]; */
        if (message.eventPayload)
            HandlingunitPropagateParentHUPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitPropagateParentHUPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
        if (message.previousPayload)
            HandlingunitPropagateParentHUPayload.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.HandlingunitPropagateParentHU
 */
export const HandlingunitPropagateParentHU = new HandlingunitPropagateParentHU$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HandlingunitMoveStockPayload$Type extends MessageType<HandlingunitMoveStockPayload> {
    constructor() {
        super("api.HandlingunitMoveStockPayload", [
            { no: 1, name: "PreparedContents", kind: "message", jsonName: "PreparedContents", repeat: 1 /*RepeatType.PACKED*/, T: () => QuantifiedGoodsByExeflow },
            { no: 2, name: "ReceivedContents", kind: "message", jsonName: "ReceivedContents", repeat: 1 /*RepeatType.PACKED*/, T: () => QuantifiedDatedGoodsByExeflow },
            { no: 8, name: "Status", kind: "message", jsonName: "Status", T: () => HandlingunitStatusStruct },
            { no: 9, name: "DispatchedDateTime", kind: "message", jsonName: "DispatchedDateTime", T: () => DateTime }
        ], { "api.messageType": "Command", "api.payload": true, "api.action": "MoveStock" });
    }
    create(value?: PartialMessage<HandlingunitMoveStockPayload>): HandlingunitMoveStockPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.preparedContents = [];
        message.receivedContents = [];
        if (value !== undefined)
            reflectionMergePartial<HandlingunitMoveStockPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitMoveStockPayload): HandlingunitMoveStockPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.QuantifiedGoodsByExeflow PreparedContents = 1 [json_name = "PreparedContents"];*/ 1:
                    message.preparedContents.push(QuantifiedGoodsByExeflow.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated api.QuantifiedDatedGoodsByExeflow ReceivedContents = 2 [json_name = "ReceivedContents"];*/ 2:
                    message.receivedContents.push(QuantifiedDatedGoodsByExeflow.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* api.HandlingunitStatusStruct Status = 8 [json_name = "Status"];*/ 8:
                    message.status = HandlingunitStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.status);
                    break;
                case /* api.DateTime DispatchedDateTime = 9 [json_name = "DispatchedDateTime"];*/ 9:
                    message.dispatchedDateTime = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.dispatchedDateTime);
                    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: HandlingunitMoveStockPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.QuantifiedGoodsByExeflow PreparedContents = 1 [json_name = "PreparedContents"]; */
        for (let i = 0; i < message.preparedContents.length; i++)
            QuantifiedGoodsByExeflow.internalBinaryWrite(message.preparedContents[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.QuantifiedDatedGoodsByExeflow ReceivedContents = 2 [json_name = "ReceivedContents"]; */
        for (let i = 0; i < message.receivedContents.length; i++)
            QuantifiedDatedGoodsByExeflow.internalBinaryWrite(message.receivedContents[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitStatusStruct Status = 8 [json_name = "Status"]; */
        if (message.status)
            HandlingunitStatusStruct.internalBinaryWrite(message.status, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
        /* api.DateTime DispatchedDateTime = 9 [json_name = "DispatchedDateTime"]; */
        if (message.dispatchedDateTime)
            DateTime.internalBinaryWrite(message.dispatchedDateTime, writer.tag(9, 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.HandlingunitMoveStockPayload
 */
export const HandlingunitMoveStockPayload = new HandlingunitMoveStockPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HandlingunitMoveStock$Type extends MessageType<HandlingunitMoveStock> {
    constructor() {
        super("api.HandlingunitMoveStock", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => HandlingunitMoveStockPayload },
            { no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => HandlingunitMoveStockPayload },
            { no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => HandlingunitMoveStockPayload }
        ], { "api.messageType": "Command", "api.action": "MoveStock", "api.resultingEvent": "movement.Generated", "api.triggerEventFilters": "TrackingUpdated,Dispatched,GoodsPrepared,GoodsReceived" });
    }
    create(value?: PartialMessage<HandlingunitMoveStock>): HandlingunitMoveStock {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<HandlingunitMoveStock>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HandlingunitMoveStock): HandlingunitMoveStock {
        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 [json_name = "Header"];*/ 1:
                    message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
                    message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
                    break;
                case /* api.HandlingunitMoveStockPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = HandlingunitMoveStockPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
                    break;
                case /* api.HandlingunitMoveStockPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
                    message.eventPayload = HandlingunitMoveStockPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
                    break;
                case /* api.HandlingunitMoveStockPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
                    message.previousPayload = HandlingunitMoveStockPayload.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: HandlingunitMoveStock, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.CommandHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.EntityID ID = 2 [json_name = "ID"]; */
        if (message.iD)
            EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitMoveStockPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            HandlingunitMoveStockPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitMoveStockPayload EventPayload = 4 [json_name = "EventPayload"]; */
        if (message.eventPayload)
            HandlingunitMoveStockPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.HandlingunitMoveStockPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
        if (message.previousPayload)
            HandlingunitMoveStockPayload.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.HandlingunitMoveStock
 */
export const HandlingunitMoveStock = new HandlingunitMoveStock$Type();
