// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "trackingInput.proto" (package "api", syntax proto3)
// tslint:disable
import { ServiceType } from "@protobuf-ts/runtime-rpc";
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 { AttachmentSummary } from "./shared";
import { ETA } from "./tradeShared";
import { TradeTier } from "./tradeShared";
import { DateTime } from "./shared";
import { ResponseHeader } from "./shared";
import { RequestProjectHeader } from "./shared";
import { EntityID } from "./shared";
import { EventHeader } from "./shared";
import { TrackingEvent } from "./transportShared";
// Notified

// 
// This message provides Tracking event
// 
// 
// updated 2021/02/16 

/**
 * @generated from protobuf message api.TrackingNotifiedPayload
 */
export interface TrackingNotifiedPayload {
    /**
     * @generated from protobuf field: repeated api.TrackingEvent Events = 1 [json_name = "Events"];
     */
    events: TrackingEvent[];
}
/**
 * @generated from protobuf message api.TrackingNotifiedEvent
 */
export interface TrackingNotifiedEvent {
    /**
     * @generated from protobuf field: api.EventHeader Header = 1 [json_name = "Header"];
     */
    header?: EventHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingNotifiedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingNotifiedPayload;
}
/**
 * @generated from protobuf message api.TrackingNotifiedRequest
 */
export interface TrackingNotifiedRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingNotifiedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingNotifiedPayload;
}
/**
 * @generated from protobuf message api.TrackingNotifiedResponse
 */
export interface TrackingNotifiedResponse {
    /**
     * @generated from protobuf field: api.ResponseHeader Header = 1 [json_name = "Header"];
     */
    header?: ResponseHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
}
// Dispatched    (DEPRECATED)

// 
// The main goal of this message is to provide the first link between the HandlingunitID and the Tracking number
// the moment the Handlingunit is dispatched.
// 
// Also provides the first tracking event
// 
// updated 2021/02/16 

/**
 * @generated from protobuf message api.TrackingDispatchedPayload
 */
export interface TrackingDispatchedPayload {
    /**
     * @generated from protobuf field: string HandlingunitID = 1 [json_name = "HandlingunitID"];
     */
    handlingunitID: string;
    /**
     * @generated from protobuf field: string TrackingURL = 2 [json_name = "TrackingURL"];
     */
    trackingURL: string;
    // repeated TrackingEvent Events = 3;  // Initial Event when dispatched
    // repeated base.MetadataElement MetaData = 4 
    //    [
    //         (base.metadata) = true, (base.aggKey) = "Key" 
    //    ];

    /**
     * This date should be the same as the date in the header
     *
     * @generated from protobuf field: api.DateTime DispatchedDateTime = 5 [json_name = "DispatchedDateTime"];
     */
    dispatchedDateTime?: DateTime;
    /**
     * @generated from protobuf field: api.TradeTier HUCarrier = 6 [json_name = "HUCarrier"];
     */
    hUCarrier?: TradeTier;
    /**
     * @generated from protobuf field: api.TradeTier HUShipFrom = 7 [json_name = "HUShipFrom"];
     */
    hUShipFrom?: TradeTier;
    /**
     * @generated from protobuf field: api.TradeTier HUShipTo = 8 [json_name = "HUShipTo"];
     */
    hUShipTo?: TradeTier;
}
/**
 * @generated from protobuf message api.TrackingDispatchedEvent
 */
export interface TrackingDispatchedEvent {
    /**
     * @generated from protobuf field: api.EventHeader Header = 1 [json_name = "Header"];
     */
    header?: EventHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingDispatchedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingDispatchedPayload;
}
/**
 * @generated from protobuf message api.TrackingDispatchedRequest
 */
export interface TrackingDispatchedRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingDispatchedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingDispatchedPayload;
}
/**
 * @generated from protobuf message api.TrackingDispatchedResponse
 */
export interface TrackingDispatchedResponse {
    /**
     * @generated from protobuf field: api.ResponseHeader Header = 1 [json_name = "Header"];
     */
    header?: ResponseHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
}
// HULabeled

// 
// The main goal of this message is to provide the first link between the HandlingunitID and the Tracking number
// It will not trigger the stock move when arrinving on the HU
// 
// Also provides the first tracking event
// 
// updated 2021/02/16 

/**
 * @generated from protobuf message api.TrackingHULabeledPayload
 */
export interface TrackingHULabeledPayload {
    /**
     * @generated from protobuf field: string HandlingunitID = 1 [json_name = "HandlingunitID"];
     */
    handlingunitID: string;
    /**
     * @generated from protobuf field: string TrackingURL = 2 [json_name = "TrackingURL"];
     */
    trackingURL: string;
    /**
     * @generated from protobuf field: api.TradeTier HUCarrier = 6 [json_name = "HUCarrier"];
     */
    hUCarrier?: TradeTier;
    /**
     * @generated from protobuf field: api.TradeTier HUShipFrom = 7 [json_name = "HUShipFrom"];
     */
    hUShipFrom?: TradeTier;
    /**
     * @generated from protobuf field: api.TradeTier HUShipTo = 8 [json_name = "HUShipTo"];
     */
    hUShipTo?: TradeTier;
}
/**
 * @generated from protobuf message api.TrackingHULabeledEvent
 */
export interface TrackingHULabeledEvent {
    /**
     * @generated from protobuf field: api.EventHeader Header = 1 [json_name = "Header"];
     */
    header?: EventHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingHULabeledPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingHULabeledPayload;
}
/**
 * @generated from protobuf message api.TrackingHULabeledRequest
 */
export interface TrackingHULabeledRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingHULabeledPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingHULabeledPayload;
}
/**
 * @generated from protobuf message api.TrackingHULabeledResponse
 */
export interface TrackingHULabeledResponse {
    /**
     * @generated from protobuf field: api.ResponseHeader Header = 1 [json_name = "Header"];
     */
    header?: ResponseHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
}
// Switched

// 
// The message is used when a new tracking number (NextTrackingID) will be used to track the Handlingunit.
// Here we do not need to know the Handlingunit number as we will use the HandlingunitID saved in the entity.
// 
// Do not use any tracking event
// 
// updated 2021/02/16 

/**
 * @generated from protobuf message api.TrackingSwitchedPayload
 */
export interface TrackingSwitchedPayload {
    /**
     * @generated from protobuf field: string NextTrackingID = 1 [json_name = "NextTrackingID"];
     */
    nextTrackingID: string;
    /**
     * @generated from protobuf field: string NextTrackingURL = 2 [json_name = "NextTrackingURL"];
     */
    nextTrackingURL: string;
    /**
     * @generated from protobuf field: api.TradeTier NextHUCarrier = 3 [json_name = "NextHUCarrier"];
     */
    nextHUCarrier?: TradeTier;
    /**
     * @generated from protobuf field: api.TradeTier NextHUShipFrom = 4 [json_name = "NextHUShipFrom"];
     */
    nextHUShipFrom?: TradeTier;
    /**
     * @generated from protobuf field: api.TradeTier NextHUShipTo = 5 [json_name = "NextHUShipTo"];
     */
    nextHUShipTo?: TradeTier;
}
/**
 * @generated from protobuf message api.TrackingSwitchedEvent
 */
export interface TrackingSwitchedEvent {
    /**
     * @generated from protobuf field: api.EventHeader Header = 1 [json_name = "Header"];
     */
    header?: EventHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingSwitchedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingSwitchedPayload;
}
/**
 * @generated from protobuf message api.TrackingSwitchedRequest
 */
export interface TrackingSwitchedRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingSwitchedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingSwitchedPayload;
}
/**
 * @generated from protobuf message api.TrackingSwitchedResponse
 */
export interface TrackingSwitchedResponse {
    /**
     * @generated from protobuf field: api.ResponseHeader Header = 1 [json_name = "Header"];
     */
    header?: ResponseHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
}
/**
 *
 * trackingETAUpdated
 *
 * @generated from protobuf message api.TrackingETAUpdatedPayload
 */
export interface TrackingETAUpdatedPayload {
    /**
     * The ETA for the tracked HU
     *
     * @generated from protobuf field: api.ETA TrackingETA = 1 [json_name = "TrackingETA"];
     */
    trackingETA?: ETA;
}
/**
 * @generated from protobuf message api.TrackingETAUpdatedEvent
 */
export interface TrackingETAUpdatedEvent {
    /**
     * @generated from protobuf field: api.EventHeader Header = 1 [json_name = "Header"];
     */
    header?: EventHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingETAUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingETAUpdatedPayload;
}
/**
 * @generated from protobuf message api.TrackingETAUpdatedRequest
 */
export interface TrackingETAUpdatedRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingETAUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingETAUpdatedPayload;
}
/**
 * @generated from protobuf message api.TrackingETAUpdatedResponse
 */
export interface TrackingETAUpdatedResponse {
    /**
     * @generated from protobuf field: api.ResponseHeader Header = 1 [json_name = "Header"];
     */
    header?: ResponseHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
}
// 
// AttachmentAdded : this message tells that an attachment is added for the handlingUnit

/**
 * @generated from protobuf message api.TrackingAttachmentAddedPayload
 */
export interface TrackingAttachmentAddedPayload {
    /**
     * @generated from protobuf field: repeated api.AttachmentSummary Attachments = 1 [json_name = "Attachments"];
     */
    attachments: AttachmentSummary[];
}
/**
 * @generated from protobuf message api.TrackingAttachmentAddedEvent
 */
export interface TrackingAttachmentAddedEvent {
    /**
     * @generated from protobuf field: api.EventHeader Header = 1 [json_name = "Header"];
     */
    header?: EventHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingAttachmentAddedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingAttachmentAddedPayload;
}
/**
 * @generated from protobuf message api.TrackingAttachmentAddedRequest
 */
export interface TrackingAttachmentAddedRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingAttachmentAddedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingAttachmentAddedPayload;
}
/**
 * @generated from protobuf message api.TrackingAttachmentAddedResponse
 */
export interface TrackingAttachmentAddedResponse {
    /**
     * @generated from protobuf field: api.ResponseHeader Header = 1 [json_name = "Header"];
     */
    header?: ResponseHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
}
// 
// AttachmentRemoved : this message tells that an attachment is removed for the handlingUnit

/**
 * @generated from protobuf message api.TrackingAttachmentRemovedPayload
 */
export interface TrackingAttachmentRemovedPayload {
    /**
     * @generated from protobuf field: repeated api.AttachmentSummary Attachments = 1 [json_name = "Attachments"];
     */
    attachments: AttachmentSummary[];
}
/**
 * @generated from protobuf message api.TrackingAttachmentRemovedEvent
 */
export interface TrackingAttachmentRemovedEvent {
    /**
     * @generated from protobuf field: api.EventHeader Header = 1 [json_name = "Header"];
     */
    header?: EventHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingAttachmentRemovedPayload;
}
/**
 * @generated from protobuf message api.TrackingAttachmentRemovedRequest
 */
export interface TrackingAttachmentRemovedRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingAttachmentRemovedPayload;
}
/**
 * @generated from protobuf message api.TrackingAttachmentRemovedResponse
 */
export interface TrackingAttachmentRemovedResponse {
    /**
     * @generated from protobuf field: api.ResponseHeader Header = 1 [json_name = "Header"];
     */
    header?: ResponseHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
}
/**
 * Event Payload
 *
 * @generated from protobuf message api.TrackingDeletedPayload
 */
export interface TrackingDeletedPayload {
}
/**
 * Event message
 *
 * @generated from protobuf message api.TrackingDeletedEvent
 */
export interface TrackingDeletedEvent {
    /**
     * @generated from protobuf field: api.EventHeader Header = 1 [json_name = "Header"];
     */
    header?: EventHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingDeletedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingDeletedPayload;
}
/**
 * API Request
 *
 * @generated from protobuf message api.TrackingDeletedRequest
 */
export interface TrackingDeletedRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.TrackingDeletedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: TrackingDeletedPayload;
}
/**
 * API Response
 *
 * @generated from protobuf message api.TrackingDeletedResponse
 */
export interface TrackingDeletedResponse {
    /**
     * @generated from protobuf field: api.ResponseHeader Header = 1 [json_name = "Header"];
     */
    header?: ResponseHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
}
// @generated message type with reflection information, may provide speed optimized methods
class TrackingNotifiedPayload$Type extends MessageType<TrackingNotifiedPayload> {
    constructor() {
        super("api.TrackingNotifiedPayload", [
            { no: 1, name: "Events", kind: "message", jsonName: "Events", repeat: 1 /*RepeatType.PACKED*/, T: () => TrackingEvent, options: { "validate.rules": { repeated: { minItems: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Notified events on the tracking" } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Events"] } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Notified" });
    }
    create(value?: PartialMessage<TrackingNotifiedPayload>): TrackingNotifiedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.events = [];
        if (value !== undefined)
            reflectionMergePartial<TrackingNotifiedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingNotifiedPayload): TrackingNotifiedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.TrackingEvent Events = 1 [json_name = "Events"];*/ 1:
                    message.events.push(TrackingEvent.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: TrackingNotifiedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.TrackingEvent Events = 1 [json_name = "Events"]; */
        for (let i = 0; i < message.events.length; i++)
            TrackingEvent.internalBinaryWrite(message.events[i], writer.tag(1, 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.TrackingNotifiedPayload
 */
export const TrackingNotifiedPayload = new TrackingNotifiedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingNotifiedEvent$Type extends MessageType<TrackingNotifiedEvent> {
    constructor() {
        super("api.TrackingNotifiedEvent", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => EventHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingNotifiedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "Notified" });
    }
    create(value?: PartialMessage<TrackingNotifiedEvent>): TrackingNotifiedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingNotifiedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingNotifiedEvent): TrackingNotifiedEvent {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.EventHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = EventHeader.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.TrackingNotifiedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingNotifiedPayload.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: TrackingNotifiedEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.EventHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            EventHeader.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.TrackingNotifiedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingNotifiedPayload.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.TrackingNotifiedEvent
 */
export const TrackingNotifiedEvent = new TrackingNotifiedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingNotifiedRequest$Type extends MessageType<TrackingNotifiedRequest> {
    constructor() {
        super("api.TrackingNotifiedRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingNotifiedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["HandlingunitID", "DispatchedDateTime"] } }, "api.messageType": "Request", "api.inputEvent": "Notified" });
    }
    create(value?: PartialMessage<TrackingNotifiedRequest>): TrackingNotifiedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingNotifiedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingNotifiedRequest): TrackingNotifiedRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.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.TrackingNotifiedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingNotifiedPayload.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: TrackingNotifiedRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.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.TrackingNotifiedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingNotifiedPayload.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.TrackingNotifiedRequest
 */
export const TrackingNotifiedRequest = new TrackingNotifiedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingNotifiedResponse$Type extends MessageType<TrackingNotifiedResponse> {
    constructor() {
        super("api.TrackingNotifiedResponse", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResponseHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID }
        ], { "api.messageType": "Response", "api.inputEvent": "Notified" });
    }
    create(value?: PartialMessage<TrackingNotifiedResponse>): TrackingNotifiedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingNotifiedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingNotifiedResponse): TrackingNotifiedResponse {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.ResponseHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = ResponseHeader.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;
                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: TrackingNotifiedResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.ResponseHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            ResponseHeader.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();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.TrackingNotifiedResponse
 */
export const TrackingNotifiedResponse = new TrackingNotifiedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingDispatchedPayload$Type extends MessageType<TrackingDispatchedPayload> {
    constructor() {
        super("api.TrackingDispatchedPayload", [
            { no: 1, name: "HandlingunitID", kind: "scalar", jsonName: "HandlingunitID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The Handling unit ID which is tracked" } } },
            { no: 2, name: "TrackingURL", kind: "scalar", jsonName: "TrackingURL", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The tracking URL" } } },
            { no: 5, name: "DispatchedDateTime", kind: "message", jsonName: "DispatchedDateTime", T: () => DateTime, options: { "validate.rules": { message: { required: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "This date will be applied to the stock move. it should be the same as the date in the header" } } },
            { no: 6, name: "HUCarrier", kind: "message", jsonName: "HUCarrier", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The carrier which tracks the Handling unit" } } },
            { no: 7, name: "HUShipFrom", kind: "message", jsonName: "HUShipFrom", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where the Handling unit is shipped from" } } },
            { no: 8, name: "HUShipTo", kind: "message", jsonName: "HUShipTo", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where the Handling unit is shipped to" } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["HandlingunitID", "DispatchedDateTime"] } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Dispatched" });
    }
    create(value?: PartialMessage<TrackingDispatchedPayload>): TrackingDispatchedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.handlingunitID = "";
        message.trackingURL = "";
        if (value !== undefined)
            reflectionMergePartial<TrackingDispatchedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingDispatchedPayload): TrackingDispatchedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string HandlingunitID = 1 [json_name = "HandlingunitID"];*/ 1:
                    message.handlingunitID = reader.string();
                    break;
                case /* string TrackingURL = 2 [json_name = "TrackingURL"];*/ 2:
                    message.trackingURL = reader.string();
                    break;
                case /* api.DateTime DispatchedDateTime = 5 [json_name = "DispatchedDateTime"];*/ 5:
                    message.dispatchedDateTime = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.dispatchedDateTime);
                    break;
                case /* api.TradeTier HUCarrier = 6 [json_name = "HUCarrier"];*/ 6:
                    message.hUCarrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.hUCarrier);
                    break;
                case /* api.TradeTier HUShipFrom = 7 [json_name = "HUShipFrom"];*/ 7:
                    message.hUShipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.hUShipFrom);
                    break;
                case /* api.TradeTier HUShipTo = 8 [json_name = "HUShipTo"];*/ 8:
                    message.hUShipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.hUShipTo);
                    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: TrackingDispatchedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string HandlingunitID = 1 [json_name = "HandlingunitID"]; */
        if (message.handlingunitID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.handlingunitID);
        /* string TrackingURL = 2 [json_name = "TrackingURL"]; */
        if (message.trackingURL !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.trackingURL);
        /* api.DateTime DispatchedDateTime = 5 [json_name = "DispatchedDateTime"]; */
        if (message.dispatchedDateTime)
            DateTime.internalBinaryWrite(message.dispatchedDateTime, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
        /* api.TradeTier HUCarrier = 6 [json_name = "HUCarrier"]; */
        if (message.hUCarrier)
            TradeTier.internalBinaryWrite(message.hUCarrier, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
        /* api.TradeTier HUShipFrom = 7 [json_name = "HUShipFrom"]; */
        if (message.hUShipFrom)
            TradeTier.internalBinaryWrite(message.hUShipFrom, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
        /* api.TradeTier HUShipTo = 8 [json_name = "HUShipTo"]; */
        if (message.hUShipTo)
            TradeTier.internalBinaryWrite(message.hUShipTo, writer.tag(8, 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.TrackingDispatchedPayload
 */
export const TrackingDispatchedPayload = new TrackingDispatchedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingDispatchedEvent$Type extends MessageType<TrackingDispatchedEvent> {
    constructor() {
        super("api.TrackingDispatchedEvent", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => EventHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingDispatchedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "Dispatched", "api.preAggMethods": "verifyActorPartner" });
    }
    create(value?: PartialMessage<TrackingDispatchedEvent>): TrackingDispatchedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingDispatchedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingDispatchedEvent): TrackingDispatchedEvent {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.EventHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = EventHeader.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.TrackingDispatchedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingDispatchedPayload.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: TrackingDispatchedEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.EventHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            EventHeader.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.TrackingDispatchedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingDispatchedPayload.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.TrackingDispatchedEvent
 */
export const TrackingDispatchedEvent = new TrackingDispatchedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingDispatchedRequest$Type extends MessageType<TrackingDispatchedRequest> {
    constructor() {
        super("api.TrackingDispatchedRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingDispatchedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "Dispatched" });
    }
    create(value?: PartialMessage<TrackingDispatchedRequest>): TrackingDispatchedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingDispatchedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingDispatchedRequest): TrackingDispatchedRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.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.TrackingDispatchedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingDispatchedPayload.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: TrackingDispatchedRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.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.TrackingDispatchedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingDispatchedPayload.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.TrackingDispatchedRequest
 */
export const TrackingDispatchedRequest = new TrackingDispatchedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingDispatchedResponse$Type extends MessageType<TrackingDispatchedResponse> {
    constructor() {
        super("api.TrackingDispatchedResponse", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResponseHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID }
        ], { "api.messageType": "Response", "api.inputEvent": "Dispatched" });
    }
    create(value?: PartialMessage<TrackingDispatchedResponse>): TrackingDispatchedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingDispatchedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingDispatchedResponse): TrackingDispatchedResponse {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.ResponseHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = ResponseHeader.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;
                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: TrackingDispatchedResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.ResponseHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            ResponseHeader.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();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.TrackingDispatchedResponse
 */
export const TrackingDispatchedResponse = new TrackingDispatchedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingHULabeledPayload$Type extends MessageType<TrackingHULabeledPayload> {
    constructor() {
        super("api.TrackingHULabeledPayload", [
            { no: 1, name: "HandlingunitID", kind: "scalar", jsonName: "HandlingunitID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The Handling unit ID which is tracked" } } },
            { no: 2, name: "TrackingURL", kind: "scalar", jsonName: "TrackingURL", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The tracking URL" } } },
            { no: 6, name: "HUCarrier", kind: "message", jsonName: "HUCarrier", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The carrier which tracks the Handling unit" } } },
            { no: 7, name: "HUShipFrom", kind: "message", jsonName: "HUShipFrom", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where the Handling unit is shipped from" } } },
            { no: 8, name: "HUShipTo", kind: "message", jsonName: "HUShipTo", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where the Handling unit is shipped to" } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["HandlingunitID", "DispatchedDateTime"] } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "HULabeled" });
    }
    create(value?: PartialMessage<TrackingHULabeledPayload>): TrackingHULabeledPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.handlingunitID = "";
        message.trackingURL = "";
        if (value !== undefined)
            reflectionMergePartial<TrackingHULabeledPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingHULabeledPayload): TrackingHULabeledPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string HandlingunitID = 1 [json_name = "HandlingunitID"];*/ 1:
                    message.handlingunitID = reader.string();
                    break;
                case /* string TrackingURL = 2 [json_name = "TrackingURL"];*/ 2:
                    message.trackingURL = reader.string();
                    break;
                case /* api.TradeTier HUCarrier = 6 [json_name = "HUCarrier"];*/ 6:
                    message.hUCarrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.hUCarrier);
                    break;
                case /* api.TradeTier HUShipFrom = 7 [json_name = "HUShipFrom"];*/ 7:
                    message.hUShipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.hUShipFrom);
                    break;
                case /* api.TradeTier HUShipTo = 8 [json_name = "HUShipTo"];*/ 8:
                    message.hUShipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.hUShipTo);
                    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: TrackingHULabeledPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string HandlingunitID = 1 [json_name = "HandlingunitID"]; */
        if (message.handlingunitID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.handlingunitID);
        /* string TrackingURL = 2 [json_name = "TrackingURL"]; */
        if (message.trackingURL !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.trackingURL);
        /* api.TradeTier HUCarrier = 6 [json_name = "HUCarrier"]; */
        if (message.hUCarrier)
            TradeTier.internalBinaryWrite(message.hUCarrier, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
        /* api.TradeTier HUShipFrom = 7 [json_name = "HUShipFrom"]; */
        if (message.hUShipFrom)
            TradeTier.internalBinaryWrite(message.hUShipFrom, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
        /* api.TradeTier HUShipTo = 8 [json_name = "HUShipTo"]; */
        if (message.hUShipTo)
            TradeTier.internalBinaryWrite(message.hUShipTo, writer.tag(8, 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.TrackingHULabeledPayload
 */
export const TrackingHULabeledPayload = new TrackingHULabeledPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingHULabeledEvent$Type extends MessageType<TrackingHULabeledEvent> {
    constructor() {
        super("api.TrackingHULabeledEvent", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => EventHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingHULabeledPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "HULabeled", "api.preAggMethods": "verifyActorPartner" });
    }
    create(value?: PartialMessage<TrackingHULabeledEvent>): TrackingHULabeledEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingHULabeledEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingHULabeledEvent): TrackingHULabeledEvent {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.EventHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = EventHeader.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.TrackingHULabeledPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingHULabeledPayload.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: TrackingHULabeledEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.EventHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            EventHeader.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.TrackingHULabeledPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingHULabeledPayload.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.TrackingHULabeledEvent
 */
export const TrackingHULabeledEvent = new TrackingHULabeledEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingHULabeledRequest$Type extends MessageType<TrackingHULabeledRequest> {
    constructor() {
        super("api.TrackingHULabeledRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingHULabeledPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "HULabeled" });
    }
    create(value?: PartialMessage<TrackingHULabeledRequest>): TrackingHULabeledRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingHULabeledRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingHULabeledRequest): TrackingHULabeledRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.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.TrackingHULabeledPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingHULabeledPayload.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: TrackingHULabeledRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.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.TrackingHULabeledPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingHULabeledPayload.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.TrackingHULabeledRequest
 */
export const TrackingHULabeledRequest = new TrackingHULabeledRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingHULabeledResponse$Type extends MessageType<TrackingHULabeledResponse> {
    constructor() {
        super("api.TrackingHULabeledResponse", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResponseHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID }
        ], { "api.messageType": "Response", "api.inputEvent": "HULabeled" });
    }
    create(value?: PartialMessage<TrackingHULabeledResponse>): TrackingHULabeledResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingHULabeledResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingHULabeledResponse): TrackingHULabeledResponse {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.ResponseHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = ResponseHeader.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;
                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: TrackingHULabeledResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.ResponseHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            ResponseHeader.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();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.TrackingHULabeledResponse
 */
export const TrackingHULabeledResponse = new TrackingHULabeledResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingSwitchedPayload$Type extends MessageType<TrackingSwitchedPayload> {
    constructor() {
        super("api.TrackingSwitchedPayload", [
            { no: 1, name: "NextTrackingID", kind: "scalar", jsonName: "NextTrackingID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The new tracking ID" } } },
            { no: 2, name: "NextTrackingURL", kind: "scalar", jsonName: "NextTrackingURL", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The new tracking URL" } } },
            { no: 3, name: "NextHUCarrier", kind: "message", jsonName: "NextHUCarrier", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The new carrier which will track the Handling unit" } } },
            { no: 4, name: "NextHUShipFrom", kind: "message", jsonName: "NextHUShipFrom", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where the Handling unit will be shipped from" } } },
            { no: 5, name: "NextHUShipTo", kind: "message", jsonName: "NextHUShipTo", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where the Handling unit will be shipped to" } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["NextTrackingID"] } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Switched" });
    }
    create(value?: PartialMessage<TrackingSwitchedPayload>): TrackingSwitchedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.nextTrackingID = "";
        message.nextTrackingURL = "";
        if (value !== undefined)
            reflectionMergePartial<TrackingSwitchedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingSwitchedPayload): TrackingSwitchedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string NextTrackingID = 1 [json_name = "NextTrackingID"];*/ 1:
                    message.nextTrackingID = reader.string();
                    break;
                case /* string NextTrackingURL = 2 [json_name = "NextTrackingURL"];*/ 2:
                    message.nextTrackingURL = reader.string();
                    break;
                case /* api.TradeTier NextHUCarrier = 3 [json_name = "NextHUCarrier"];*/ 3:
                    message.nextHUCarrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.nextHUCarrier);
                    break;
                case /* api.TradeTier NextHUShipFrom = 4 [json_name = "NextHUShipFrom"];*/ 4:
                    message.nextHUShipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.nextHUShipFrom);
                    break;
                case /* api.TradeTier NextHUShipTo = 5 [json_name = "NextHUShipTo"];*/ 5:
                    message.nextHUShipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.nextHUShipTo);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: TrackingSwitchedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string NextTrackingID = 1 [json_name = "NextTrackingID"]; */
        if (message.nextTrackingID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.nextTrackingID);
        /* string NextTrackingURL = 2 [json_name = "NextTrackingURL"]; */
        if (message.nextTrackingURL !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.nextTrackingURL);
        /* api.TradeTier NextHUCarrier = 3 [json_name = "NextHUCarrier"]; */
        if (message.nextHUCarrier)
            TradeTier.internalBinaryWrite(message.nextHUCarrier, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.TradeTier NextHUShipFrom = 4 [json_name = "NextHUShipFrom"]; */
        if (message.nextHUShipFrom)
            TradeTier.internalBinaryWrite(message.nextHUShipFrom, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.TradeTier NextHUShipTo = 5 [json_name = "NextHUShipTo"]; */
        if (message.nextHUShipTo)
            TradeTier.internalBinaryWrite(message.nextHUShipTo, 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.TrackingSwitchedPayload
 */
export const TrackingSwitchedPayload = new TrackingSwitchedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingSwitchedEvent$Type extends MessageType<TrackingSwitchedEvent> {
    constructor() {
        super("api.TrackingSwitchedEvent", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => EventHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingSwitchedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["HandlingunitID", "DispatchedDateTime"] } }, "api.messageType": "Event", "api.inputEvent": "Switched", "api.preAggMethods": "verifyActorPartner" });
    }
    create(value?: PartialMessage<TrackingSwitchedEvent>): TrackingSwitchedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingSwitchedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingSwitchedEvent): TrackingSwitchedEvent {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.EventHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = EventHeader.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.TrackingSwitchedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingSwitchedPayload.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: TrackingSwitchedEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.EventHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            EventHeader.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.TrackingSwitchedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingSwitchedPayload.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.TrackingSwitchedEvent
 */
export const TrackingSwitchedEvent = new TrackingSwitchedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingSwitchedRequest$Type extends MessageType<TrackingSwitchedRequest> {
    constructor() {
        super("api.TrackingSwitchedRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingSwitchedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["HandlingunitID", "DispatchedDateTime"] } }, "api.messageType": "Request", "api.inputEvent": "Switched" });
    }
    create(value?: PartialMessage<TrackingSwitchedRequest>): TrackingSwitchedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingSwitchedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingSwitchedRequest): TrackingSwitchedRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.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.TrackingSwitchedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingSwitchedPayload.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: TrackingSwitchedRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.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.TrackingSwitchedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingSwitchedPayload.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.TrackingSwitchedRequest
 */
export const TrackingSwitchedRequest = new TrackingSwitchedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingSwitchedResponse$Type extends MessageType<TrackingSwitchedResponse> {
    constructor() {
        super("api.TrackingSwitchedResponse", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResponseHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID }
        ], { "api.messageType": "Response", "api.inputEvent": "Switched" });
    }
    create(value?: PartialMessage<TrackingSwitchedResponse>): TrackingSwitchedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingSwitchedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingSwitchedResponse): TrackingSwitchedResponse {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.ResponseHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = ResponseHeader.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;
                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: TrackingSwitchedResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.ResponseHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            ResponseHeader.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();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.TrackingSwitchedResponse
 */
export const TrackingSwitchedResponse = new TrackingSwitchedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingETAUpdatedPayload$Type extends MessageType<TrackingETAUpdatedPayload> {
    constructor() {
        super("api.TrackingETAUpdatedPayload", [
            { no: 1, name: "TrackingETA", kind: "message", jsonName: "TrackingETA", T: () => ETA, options: { "validate.rules": { message: { required: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The ETA for the tracked HU" } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["TrackingETA"] } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "ETAUpdated" });
    }
    create(value?: PartialMessage<TrackingETAUpdatedPayload>): TrackingETAUpdatedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingETAUpdatedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingETAUpdatedPayload): TrackingETAUpdatedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.ETA TrackingETA = 1 [json_name = "TrackingETA"];*/ 1:
                    message.trackingETA = ETA.internalBinaryRead(reader, reader.uint32(), options, message.trackingETA);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: TrackingETAUpdatedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.ETA TrackingETA = 1 [json_name = "TrackingETA"]; */
        if (message.trackingETA)
            ETA.internalBinaryWrite(message.trackingETA, writer.tag(1, 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.TrackingETAUpdatedPayload
 */
export const TrackingETAUpdatedPayload = new TrackingETAUpdatedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingETAUpdatedEvent$Type extends MessageType<TrackingETAUpdatedEvent> {
    constructor() {
        super("api.TrackingETAUpdatedEvent", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => EventHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingETAUpdatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["TrackingETA"] } }, "api.messageType": "Event", "api.inputEvent": "ETAUpdated", "api.preAggMethods": "setETAActualDate" });
    }
    create(value?: PartialMessage<TrackingETAUpdatedEvent>): TrackingETAUpdatedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingETAUpdatedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingETAUpdatedEvent): TrackingETAUpdatedEvent {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.EventHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = EventHeader.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.TrackingETAUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingETAUpdatedPayload.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: TrackingETAUpdatedEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.EventHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            EventHeader.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.TrackingETAUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingETAUpdatedPayload.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.TrackingETAUpdatedEvent
 */
export const TrackingETAUpdatedEvent = new TrackingETAUpdatedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingETAUpdatedRequest$Type extends MessageType<TrackingETAUpdatedRequest> {
    constructor() {
        super("api.TrackingETAUpdatedRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingETAUpdatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["TrackingETA"] } }, "api.messageType": "Request", "api.inputEvent": "ETAUpdated" });
    }
    create(value?: PartialMessage<TrackingETAUpdatedRequest>): TrackingETAUpdatedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingETAUpdatedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingETAUpdatedRequest): TrackingETAUpdatedRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.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.TrackingETAUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingETAUpdatedPayload.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: TrackingETAUpdatedRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.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.TrackingETAUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingETAUpdatedPayload.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.TrackingETAUpdatedRequest
 */
export const TrackingETAUpdatedRequest = new TrackingETAUpdatedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingETAUpdatedResponse$Type extends MessageType<TrackingETAUpdatedResponse> {
    constructor() {
        super("api.TrackingETAUpdatedResponse", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResponseHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID }
        ], { "api.messageType": "Response", "api.inputEvent": "ETAUpdated" });
    }
    create(value?: PartialMessage<TrackingETAUpdatedResponse>): TrackingETAUpdatedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingETAUpdatedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingETAUpdatedResponse): TrackingETAUpdatedResponse {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.ResponseHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = ResponseHeader.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;
                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: TrackingETAUpdatedResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.ResponseHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            ResponseHeader.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();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.TrackingETAUpdatedResponse
 */
export const TrackingETAUpdatedResponse = new TrackingETAUpdatedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingAttachmentAddedPayload$Type extends MessageType<TrackingAttachmentAddedPayload> {
    constructor() {
        super("api.TrackingAttachmentAddedPayload", [
            { no: 1, name: "Attachments", kind: "message", jsonName: "Attachments", repeat: 1 /*RepeatType.PACKED*/, T: () => AttachmentSummary, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Number of attachments added per type" } } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "AttachmentAdded" });
    }
    create(value?: PartialMessage<TrackingAttachmentAddedPayload>): TrackingAttachmentAddedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.attachments = [];
        if (value !== undefined)
            reflectionMergePartial<TrackingAttachmentAddedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingAttachmentAddedPayload): TrackingAttachmentAddedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.AttachmentSummary Attachments = 1 [json_name = "Attachments"];*/ 1:
                    message.attachments.push(AttachmentSummary.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: TrackingAttachmentAddedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.AttachmentSummary Attachments = 1 [json_name = "Attachments"]; */
        for (let i = 0; i < message.attachments.length; i++)
            AttachmentSummary.internalBinaryWrite(message.attachments[i], writer.tag(1, 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.TrackingAttachmentAddedPayload
 */
export const TrackingAttachmentAddedPayload = new TrackingAttachmentAddedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingAttachmentAddedEvent$Type extends MessageType<TrackingAttachmentAddedEvent> {
    constructor() {
        super("api.TrackingAttachmentAddedEvent", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => EventHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingAttachmentAddedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "AttachmentAdded", "api.preAggMethods": "addAttachment" });
    }
    create(value?: PartialMessage<TrackingAttachmentAddedEvent>): TrackingAttachmentAddedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingAttachmentAddedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingAttachmentAddedEvent): TrackingAttachmentAddedEvent {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.EventHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = EventHeader.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.TrackingAttachmentAddedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingAttachmentAddedPayload.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: TrackingAttachmentAddedEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.EventHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            EventHeader.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.TrackingAttachmentAddedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingAttachmentAddedPayload.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.TrackingAttachmentAddedEvent
 */
export const TrackingAttachmentAddedEvent = new TrackingAttachmentAddedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingAttachmentAddedRequest$Type extends MessageType<TrackingAttachmentAddedRequest> {
    constructor() {
        super("api.TrackingAttachmentAddedRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingAttachmentAddedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "AttachmentAdded" });
    }
    create(value?: PartialMessage<TrackingAttachmentAddedRequest>): TrackingAttachmentAddedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingAttachmentAddedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingAttachmentAddedRequest): TrackingAttachmentAddedRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.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.TrackingAttachmentAddedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingAttachmentAddedPayload.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: TrackingAttachmentAddedRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.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.TrackingAttachmentAddedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingAttachmentAddedPayload.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.TrackingAttachmentAddedRequest
 */
export const TrackingAttachmentAddedRequest = new TrackingAttachmentAddedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingAttachmentAddedResponse$Type extends MessageType<TrackingAttachmentAddedResponse> {
    constructor() {
        super("api.TrackingAttachmentAddedResponse", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResponseHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID }
        ], { "api.messageType": "Response", "api.inputEvent": "AttachmentAdded" });
    }
    create(value?: PartialMessage<TrackingAttachmentAddedResponse>): TrackingAttachmentAddedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingAttachmentAddedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingAttachmentAddedResponse): TrackingAttachmentAddedResponse {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.ResponseHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = ResponseHeader.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;
                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: TrackingAttachmentAddedResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.ResponseHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            ResponseHeader.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();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.TrackingAttachmentAddedResponse
 */
export const TrackingAttachmentAddedResponse = new TrackingAttachmentAddedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingAttachmentRemovedPayload$Type extends MessageType<TrackingAttachmentRemovedPayload> {
    constructor() {
        super("api.TrackingAttachmentRemovedPayload", [
            { no: 1, name: "Attachments", kind: "message", jsonName: "Attachments", repeat: 1 /*RepeatType.PACKED*/, T: () => AttachmentSummary, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Number of attachments removed per type" } } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "AttachmentRemoved" });
    }
    create(value?: PartialMessage<TrackingAttachmentRemovedPayload>): TrackingAttachmentRemovedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.attachments = [];
        if (value !== undefined)
            reflectionMergePartial<TrackingAttachmentRemovedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingAttachmentRemovedPayload): TrackingAttachmentRemovedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.AttachmentSummary Attachments = 1 [json_name = "Attachments"];*/ 1:
                    message.attachments.push(AttachmentSummary.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: TrackingAttachmentRemovedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.AttachmentSummary Attachments = 1 [json_name = "Attachments"]; */
        for (let i = 0; i < message.attachments.length; i++)
            AttachmentSummary.internalBinaryWrite(message.attachments[i], writer.tag(1, 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.TrackingAttachmentRemovedPayload
 */
export const TrackingAttachmentRemovedPayload = new TrackingAttachmentRemovedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingAttachmentRemovedEvent$Type extends MessageType<TrackingAttachmentRemovedEvent> {
    constructor() {
        super("api.TrackingAttachmentRemovedEvent", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => EventHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingAttachmentRemovedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "AttachmentRemoved", "api.preAggMethods": "removeAttachment" });
    }
    create(value?: PartialMessage<TrackingAttachmentRemovedEvent>): TrackingAttachmentRemovedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingAttachmentRemovedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingAttachmentRemovedEvent): TrackingAttachmentRemovedEvent {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.EventHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = EventHeader.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.TrackingAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingAttachmentRemovedPayload.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: TrackingAttachmentRemovedEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.EventHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            EventHeader.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.TrackingAttachmentRemovedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingAttachmentRemovedPayload.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.TrackingAttachmentRemovedEvent
 */
export const TrackingAttachmentRemovedEvent = new TrackingAttachmentRemovedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingAttachmentRemovedRequest$Type extends MessageType<TrackingAttachmentRemovedRequest> {
    constructor() {
        super("api.TrackingAttachmentRemovedRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } } } },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingAttachmentRemovedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "AttachmentRemoved" });
    }
    create(value?: PartialMessage<TrackingAttachmentRemovedRequest>): TrackingAttachmentRemovedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingAttachmentRemovedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingAttachmentRemovedRequest): TrackingAttachmentRemovedRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.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.TrackingAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingAttachmentRemovedPayload.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: TrackingAttachmentRemovedRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.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.TrackingAttachmentRemovedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingAttachmentRemovedPayload.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.TrackingAttachmentRemovedRequest
 */
export const TrackingAttachmentRemovedRequest = new TrackingAttachmentRemovedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingAttachmentRemovedResponse$Type extends MessageType<TrackingAttachmentRemovedResponse> {
    constructor() {
        super("api.TrackingAttachmentRemovedResponse", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResponseHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID }
        ], { "api.messageType": "Response", "api.inputEvent": "AttachmentRemoved" });
    }
    create(value?: PartialMessage<TrackingAttachmentRemovedResponse>): TrackingAttachmentRemovedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingAttachmentRemovedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingAttachmentRemovedResponse): TrackingAttachmentRemovedResponse {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.ResponseHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = ResponseHeader.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;
                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: TrackingAttachmentRemovedResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.ResponseHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            ResponseHeader.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();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.TrackingAttachmentRemovedResponse
 */
export const TrackingAttachmentRemovedResponse = new TrackingAttachmentRemovedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingDeletedPayload$Type extends MessageType<TrackingDeletedPayload> {
    constructor() {
        super("api.TrackingDeletedPayload", [], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Event Payload" } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Deleted" });
    }
    create(value?: PartialMessage<TrackingDeletedPayload>): TrackingDeletedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingDeletedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingDeletedPayload): TrackingDeletedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                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: TrackingDeletedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.TrackingDeletedPayload
 */
export const TrackingDeletedPayload = new TrackingDeletedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingDeletedEvent$Type extends MessageType<TrackingDeletedEvent> {
    constructor() {
        super("api.TrackingDeletedEvent", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => EventHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingDeletedPayload }
        ], { "api.messageType": "Event", "api.inputEvent": "Deleted" });
    }
    create(value?: PartialMessage<TrackingDeletedEvent>): TrackingDeletedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingDeletedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingDeletedEvent): TrackingDeletedEvent {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.EventHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = EventHeader.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.TrackingDeletedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingDeletedPayload.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: TrackingDeletedEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.EventHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            EventHeader.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.TrackingDeletedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingDeletedPayload.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.TrackingDeletedEvent
 */
export const TrackingDeletedEvent = new TrackingDeletedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingDeletedRequest$Type extends MessageType<TrackingDeletedRequest> {
    constructor() {
        super("api.TrackingDeletedRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => TrackingDeletedPayload }
        ], { "api.messageType": "Request", "api.inputEvent": "Deleted" });
    }
    create(value?: PartialMessage<TrackingDeletedRequest>): TrackingDeletedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingDeletedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingDeletedRequest): TrackingDeletedRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = RequestProjectHeader.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.TrackingDeletedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = TrackingDeletedPayload.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: TrackingDeletedRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            RequestProjectHeader.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.TrackingDeletedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            TrackingDeletedPayload.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.TrackingDeletedRequest
 */
export const TrackingDeletedRequest = new TrackingDeletedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class TrackingDeletedResponse$Type extends MessageType<TrackingDeletedResponse> {
    constructor() {
        super("api.TrackingDeletedResponse", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResponseHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID }
        ], { "api.messageType": "Response", "api.inputEvent": "Deleted" });
    }
    create(value?: PartialMessage<TrackingDeletedResponse>): TrackingDeletedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<TrackingDeletedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackingDeletedResponse): TrackingDeletedResponse {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.ResponseHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = ResponseHeader.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;
                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: TrackingDeletedResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.ResponseHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            ResponseHeader.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();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.TrackingDeletedResponse
 */
export const TrackingDeletedResponse = new TrackingDeletedResponse$Type();
/**
 * @generated ServiceType for protobuf service api.TrackingInputAPI
 */
export const TrackingInputAPI = new ServiceType("api.TrackingInputAPI", [
    { name: "Notified", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Tracking Inputs"], description: "A tracking event has been notified. This is typically called from a Transport app." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: TrackingNotifiedRequest, O: TrackingNotifiedResponse },
    { name: "ETAUpdated", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Tracking Inputs"], description: "A tracking event for ETA update has been notified. This is typically called from a Transport app." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: TrackingETAUpdatedRequest, O: TrackingETAUpdatedResponse },
    { name: "Dispatched", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Tracking Inputs"], description: "deprecated from 1.6 : A Handling Unit has been dispatched with this tracking. This is typically called from a WMS." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: TrackingDispatchedRequest, O: TrackingDispatchedResponse },
    { name: "HULabeled", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Tracking Inputs"], description: "A Handling Unit has been linked/labelled with this tracking. This is called from a WMS or a transport app." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: TrackingHULabeledRequest, O: TrackingHULabeledResponse },
    { name: "Switched", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Tracking Inputs"], description: "A tracking has been switched. This is typically called from a Transport app." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: TrackingSwitchedRequest, O: TrackingSwitchedResponse },
    { name: "AttachmentAdded", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Tracking Inputs"], description: "An attachment is added for the Tracking." }, "api.rscType": "Project", "api.roles": "Platform.Project-Attachment", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: TrackingAttachmentAddedRequest, O: TrackingAttachmentAddedResponse },
    { name: "AttachmentRemoved", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Tracking Inputs"], description: "An attachment is removed for the Tracking." }, "api.rscType": "Project", "api.roles": "Platform.Project-Attachment", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: TrackingAttachmentRemovedRequest, O: TrackingAttachmentRemovedResponse },
    { name: "Deleted", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Tracking Inputs"], description: "An Tracking has been deleted. This is called from Reflex Platform Admin service to share the Organisation Trackings." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: TrackingDeletedRequest, O: TrackingDeletedResponse }
], { "api.serviceType": "Api", "api.k8sService": "api-server" });
