// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "orderInput.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 { ClaimSummary } from "./shared";
import { AttachmentSummary } from "./shared";
import { ETAbyExecutionflow } from "./tradeShared";
import { ExecutionflowSummary } from "./tradeShared";
import { ResponseHeader } from "./shared";
import { RequestProjectHeader } from "./shared";
import { EntityID } from "./shared";
import { EventHeader } from "./shared";
import { OrderLine } from "./tradeShared";
import { OrderRequestedMilestones } from "./tradeShared";
import { TradeTier } from "./tradeShared";
import { MetadataElement } from "./shared";
import { ReferencedID } from "./tradeShared";
import { DateTime } from "./shared";
// 
// This  message is coming from the ERP to initiate the information of the Order.
// - TradeTier may be sent by RefID or by Value
// - Items in Goods may be sent by RefID or by value.
// 
// Comments updated 2021/02/17

/**
 * @generated from protobuf message api.OrderCreatedPayload
 */
export interface OrderCreatedPayload {
    /**
     * @generated from protobuf field: api.DateTime CreationDateTime = 1 [json_name = "CreationDateTime"];
     */
    creationDateTime?: DateTime; // Mandatory
    /**
     * @generated from protobuf field: api.ReferencedID ParentOrder = 2 [json_name = "ParentOrder"];
     */
    parentOrder?: ReferencedID; // Optional : Reference to a parent order (with reason)
    /**
     * @generated from protobuf field: string LanguageCodeISO6391 = 3 [json_name = "LanguageCodeISO6391"];
     */
    languageCodeISO6391: string;
    /**
     * Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)
     *
     * @generated from protobuf field: repeated api.MetadataElement MetaData = 4 [json_name = "MetaData"];
     */
    metaData: MetadataElement[];
    /**
     * @generated from protobuf field: api.TradeTier Buyer = 5 [json_name = "Buyer"];
     */
    buyer?: TradeTier; // Mandatory : definition of the order buyer
    /**
     * @generated from protobuf field: api.TradeTier Seller = 6 [json_name = "Seller"];
     */
    seller?: TradeTier;
    /**
     * Where to ship the order from
     *
     * @generated from protobuf field: api.TradeTier ShipFrom = 7 [json_name = "ShipFrom"];
     */
    shipFrom?: TradeTier;
    /**
     * Where to ship the order to
     *
     * @generated from protobuf field: api.TradeTier ShipTo = 8 [json_name = "ShipTo"];
     */
    shipTo?: TradeTier;
    /**
     * Definition of the order carrier
     *
     * @generated from protobuf field: api.TradeTier Carrier = 9 [json_name = "Carrier"];
     */
    carrier?: TradeTier;
    /**
     * Type of carrier service
     *
     * @generated from protobuf field: string CarrierService = 12 [json_name = "CarrierService"];
     */
    carrierService: string;
    /**
     * @generated from protobuf field: api.OrderRequestedMilestones RequestedMilestones = 10 [json_name = "RequestedMilestones"];
     */
    requestedMilestones?: OrderRequestedMilestones;
    /**
     * Lines of the order
     *
     * @generated from protobuf field: repeated api.OrderLine Lines = 11 [json_name = "Lines"];
     */
    lines: OrderLine[];
}
/**
 * @generated from protobuf message api.OrderCreatedEvent
 */
export interface OrderCreatedEvent {
    /**
     * @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.OrderCreatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderCreatedPayload;
}
/**
 * @generated from protobuf message api.OrderCreatedRequest
 */
export interface OrderCreatedRequest {
    /**
     * @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.OrderCreatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderCreatedPayload;
}
/**
 * @generated from protobuf message api.OrderCreatedResponse
 */
export interface OrderCreatedResponse {
    /**
     * @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;
}
// 
// This  message is coming from the platform to initiate an Order from a detected executionflow.
// - TradeTier may be sent by RefID or by Value
// - Items in Goods may be sent by RefID or by value.

/**
 * @generated from protobuf message api.OrderExecutionflowDetectedPayload
 */
export interface OrderExecutionflowDetectedPayload {
    /**
     * @generated from protobuf field: api.DateTime CreationDateTime = 1 [json_name = "CreationDateTime"];
     */
    creationDateTime?: DateTime; // Mandatory
    // string LanguageCodeISO6391 = 3 
    //    [
    //        (validate.rules).string = {min_len: 2, max_len: 2}, (validate.rules).string.languageIso6391 = true
    //    ]; // Short codes (2 characters) to define order main language. Refers to  https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

    /**
     * Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)
     *
     * @generated from protobuf field: repeated api.MetadataElement MetaData = 4 [json_name = "MetaData"];
     */
    metaData: MetadataElement[];
    // TradeTier Buyer = 5 
    //    [
    //        (validate.rules).message.required = true
    //    ];   // Mandatory : definition of the order buyer
    // TradeTier Seller = 6;   // Optional : definition of the order seller

    /**
     * Where to ship the order from
     *
     * @generated from protobuf field: api.TradeTier ShipFrom = 7 [json_name = "ShipFrom"];
     */
    shipFrom?: TradeTier;
    /**
     * Where to ship the order to
     *
     * @generated from protobuf field: api.TradeTier ShipTo = 8 [json_name = "ShipTo"];
     */
    shipTo?: TradeTier;
    /**
     * Definition of the order carrier
     *
     * @generated from protobuf field: api.TradeTier Carrier = 9 [json_name = "Carrier"];
     */
    carrier?: TradeTier;
    /**
     * Type of carrier service
     *
     * @generated from protobuf field: string CarrierService = 12 [json_name = "CarrierService"];
     */
    carrierService: string;
    /**
     * @generated from protobuf field: api.OrderRequestedMilestones RequestedMilestones = 10 [json_name = "RequestedMilestones"];
     */
    requestedMilestones?: OrderRequestedMilestones;
    /**
     * Lines of the order
     *
     * @generated from protobuf field: repeated api.OrderLine Lines = 11 [json_name = "Lines"];
     */
    lines: OrderLine[];
    /**
     * @generated from protobuf field: repeated api.ExecutionflowSummary ExecutionflowSummary = 13 [json_name = "ExecutionflowSummary"];
     */
    executionflowSummary: ExecutionflowSummary[];
}
/**
 * @generated from protobuf message api.OrderExecutionflowDetectedEvent
 */
export interface OrderExecutionflowDetectedEvent {
    /**
     * @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.OrderExecutionflowDetectedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderExecutionflowDetectedPayload;
}
/**
 * @generated from protobuf message api.OrderExecutionflowDetectedRequest
 */
export interface OrderExecutionflowDetectedRequest {
    /**
     * @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.OrderExecutionflowDetectedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderExecutionflowDetectedPayload;
}
/**
 * @generated from protobuf message api.OrderExecutionflowDetectedResponse
 */
export interface OrderExecutionflowDetectedResponse {
    /**
     * @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;
}
// 
// Order is Cancelled when no other event is likely to happen.
// 
// will be used to clean the flink state
// 
// Comments updated 2021/02/17

/**
 * @generated from protobuf message api.OrderCancelledPayload
 */
export interface OrderCancelledPayload {
}
/**
 * @generated from protobuf message api.OrderCancelledEvent
 */
export interface OrderCancelledEvent {
    /**
     * @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.OrderCancelledPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderCancelledPayload;
}
/**
 * @generated from protobuf message api.OrderCancelledRequest
 */
export interface OrderCancelledRequest {
    /**
     * @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.OrderCancelledPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderCancelledPayload;
}
/**
 * @generated from protobuf message api.OrderCancelledResponse
 */
export interface OrderCancelledResponse {
    /**
     * @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 from protobuf message api.OrderAnonymisedPayload
 */
export interface OrderAnonymisedPayload {
}
/**
 * @generated from protobuf message api.OrderAnonymisedEvent
 */
export interface OrderAnonymisedEvent {
    /**
     * @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.OrderAnonymisedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderAnonymisedPayload;
}
/**
 * @generated from protobuf message api.OrderAnonymisedRequest
 */
export interface OrderAnonymisedRequest {
    /**
     * @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.OrderAnonymisedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderAnonymisedPayload;
}
/**
 * @generated from protobuf message api.OrderAnonymisedResponse
 */
export interface OrderAnonymisedResponse {
    /**
     * @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;
}
// ShipperAssigned

/**
 * @generated from protobuf message api.OrderShipperAssignedPayload
 */
export interface OrderShipperAssignedPayload {
    /**
     * Where to ship the order from
     *
     * @generated from protobuf field: api.TradeTier ShipFrom = 1 [json_name = "ShipFrom"];
     */
    shipFrom?: TradeTier;
}
/**
 * @generated from protobuf message api.OrderShipperAssignedEvent
 */
export interface OrderShipperAssignedEvent {
    /**
     * @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.OrderShipperAssignedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderShipperAssignedPayload;
}
/**
 * @generated from protobuf message api.OrderShipperAssignedRequest
 */
export interface OrderShipperAssignedRequest {
    /**
     * @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.OrderShipperAssignedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderShipperAssignedPayload;
}
/**
 * @generated from protobuf message api.OrderShipperAssignedResponse
 */
export interface OrderShipperAssignedResponse {
    /**
     * @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;
}
// OrderPartiallyCompleted

/**
 * @generated from protobuf message api.OrderPartiallyCompletedPayload
 */
export interface OrderPartiallyCompletedPayload {
}
/**
 * @generated from protobuf message api.OrderPartiallyCompletedEvent
 */
export interface OrderPartiallyCompletedEvent {
    /**
     * @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.OrderPartiallyCompletedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderPartiallyCompletedPayload;
}
/**
 * @generated from protobuf message api.OrderPartiallyCompletedRequest
 */
export interface OrderPartiallyCompletedRequest {
    /**
     * @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.OrderPartiallyCompletedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderPartiallyCompletedPayload;
}
/**
 * @generated from protobuf message api.OrderPartiallyCompletedResponse
 */
export interface OrderPartiallyCompletedResponse {
    /**
     * @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;
}
// RequestedDeliveryDateDefined

/**
 * @generated from protobuf message api.OrderRequestedDeliveryDateDefinedPayload
 */
export interface OrderRequestedDeliveryDateDefinedPayload {
    /**
     * @generated from protobuf field: api.DateTime RequestedDeliveryDateTime = 1 [json_name = "RequestedDeliveryDateTime"];
     */
    requestedDeliveryDateTime?: DateTime;
}
/**
 * @generated from protobuf message api.OrderRequestedDeliveryDateDefinedEvent
 */
export interface OrderRequestedDeliveryDateDefinedEvent {
    /**
     * @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.OrderRequestedDeliveryDateDefinedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderRequestedDeliveryDateDefinedPayload;
}
/**
 * @generated from protobuf message api.OrderRequestedDeliveryDateDefinedRequest
 */
export interface OrderRequestedDeliveryDateDefinedRequest {
    /**
     * @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.OrderRequestedDeliveryDateDefinedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderRequestedDeliveryDateDefinedPayload;
}
/**
 * @generated from protobuf message api.OrderRequestedDeliveryDateDefinedResponse
 */
export interface OrderRequestedDeliveryDateDefinedResponse {
    /**
     * @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;
}
// /*   ETAUpdated
// - Inform the order about the ETA updated directly on the order
// */
// 
// message OrderETAUpdatedPayload
// {
//    option (payload) = true;
//    option (inputEvent) = "ETAUpdated";
//    option (messageType) = "Event";
//    ETA OrderETA = 1;
// }
// message OrderETAUpdatedEvent
// {
//    option (inputEvent) = "ETAUpdated";
//    option (messageType) = "Event";
//    option (postAggMethods) = "computeETAs"; // Here are listed the post aggregation methods to call when event message is aggregated
//    EventHeader Header = 1
//    [
//        (validate.rules).message.required = true
//    ];
//    EntityID ID = 2
//    [
//        (validate.rules).message.required = true
//    ];
//    OrderETAUpdatedPayload Payload = 3
//    [
//        (validate.rules).message.required = true
//    ];
// }
// message OrderETAUpdatedRequest
// {
//    option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
//        json_schema: {
//            required: ["Header", "ID", "Payload"]
//        }
//    };
//    option (inputEvent) = "ETAUpdated";
//    option (messageType) = "Request";
//    RequestProjectHeader Header = 1
//    [
//        (validate.rules).message.required = true
//    ];
//    EntityID ID = 2
//    [
//        (validate.rules).message.required = true
//    ];
//    OrderETAUpdatedPayload Payload = 3
//    [
//        (validate.rules).message.required = true
//    ];
// }
// message OrderETAUpdatedResponse {
//    option (inputEvent) = "ETAUpdated";
//    option (messageType) = "Response";
//    ResponseHeader Header = 1;
//    EntityID ID = 2;
// }

//   ExecutionflowETAUpdated
// - Inform the order about the ETA updated on the executionflow attached

/**
 * @generated from protobuf message api.OrderExecutionflowETAUpdatedPayload
 */
export interface OrderExecutionflowETAUpdatedPayload {
    /**
     * @generated from protobuf field: repeated api.ETAbyExecutionflow ExecutionflowETAs = 1 [json_name = "ExecutionflowETAs"];
     */
    executionflowETAs: ETAbyExecutionflow[];
}
/**
 * @generated from protobuf message api.OrderExecutionflowETAUpdatedEvent
 */
export interface OrderExecutionflowETAUpdatedEvent {
    /**
     * @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.OrderExecutionflowETAUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderExecutionflowETAUpdatedPayload;
}
/**
 * @generated from protobuf message api.OrderExecutionflowETAUpdatedRequest
 */
export interface OrderExecutionflowETAUpdatedRequest {
    /**
     * @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.OrderExecutionflowETAUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderExecutionflowETAUpdatedPayload;
}
/**
 * @generated from protobuf message api.OrderExecutionflowETAUpdatedResponse
 */
export interface OrderExecutionflowETAUpdatedResponse {
    /**
     * @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;
}
// OrderCompleted

/**
 * @generated from protobuf message api.OrderCompletedPayload
 */
export interface OrderCompletedPayload {
    /**
     * @generated from protobuf field: api.DateTime ActualCompletionDateTime = 1 [json_name = "ActualCompletionDateTime"];
     */
    actualCompletionDateTime?: DateTime; // Mandatory
}
/**
 * @generated from protobuf message api.OrderCompletedEvent
 */
export interface OrderCompletedEvent {
    /**
     * @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.OrderCompletedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderCompletedPayload;
}
/**
 * @generated from protobuf message api.OrderCompletedRequest
 */
export interface OrderCompletedRequest {
    /**
     * @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.OrderCompletedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderCompletedPayload;
}
/**
 * @generated from protobuf message api.OrderCompletedResponse
 */
export interface OrderCompletedResponse {
    /**
     * @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;
}
// 
// ExecutionflowUpdated
// - Inform the order about the Executionflow instance status.
// 
// Comments updated 2021/02/17

/**
 * @generated from protobuf message api.OrderExecutionflowUpdatedPayload
 */
export interface OrderExecutionflowUpdatedPayload {
    /**
     * @generated from protobuf field: repeated api.ExecutionflowSummary ExecutionflowSummary = 1 [json_name = "ExecutionflowSummary"];
     */
    executionflowSummary: ExecutionflowSummary[];
}
/**
 * @generated from protobuf message api.OrderExecutionflowUpdatedEvent
 */
export interface OrderExecutionflowUpdatedEvent {
    /**
     * @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.OrderExecutionflowUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderExecutionflowUpdatedPayload;
}
/**
 * @generated from protobuf message api.OrderExecutionflowUpdatedRequest
 */
export interface OrderExecutionflowUpdatedRequest {
    /**
     * @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.OrderExecutionflowUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderExecutionflowUpdatedPayload;
}
/**
 * @generated from protobuf message api.OrderExecutionflowUpdatedResponse
 */
export interface OrderExecutionflowUpdatedResponse {
    /**
     * @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;
}
// 
// MetaDataUpdated
// - Inform the order about a metadata update.
// 
// Comments updated 2022/10/19

/**
 * @generated from protobuf message api.OrderMetaDataUpdatedPayload
 */
export interface OrderMetaDataUpdatedPayload {
    /**
     * Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)
     *
     * @generated from protobuf field: repeated api.MetadataElement MetaData = 1 [json_name = "MetaData"];
     */
    metaData: MetadataElement[];
}
/**
 * @generated from protobuf message api.OrderMetaDataUpdatedEvent
 */
export interface OrderMetaDataUpdatedEvent {
    /**
     * @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.OrderMetaDataUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderMetaDataUpdatedPayload;
}
/**
 * @generated from protobuf message api.OrderMetaDataUpdatedRequest
 */
export interface OrderMetaDataUpdatedRequest {
    /**
     * @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.OrderMetaDataUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderMetaDataUpdatedPayload;
}
/**
 * @generated from protobuf message api.OrderMetaDataUpdatedResponse
 */
export interface OrderMetaDataUpdatedResponse {
    /**
     * @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;
}
// 
// CarrierUpdated
// 
// Comments updated 2022/10/19

/**
 * @generated from protobuf message api.OrderCarrierUpdatedPayload
 */
export interface OrderCarrierUpdatedPayload {
    /**
     * Definition of the order carrier
     *
     * @generated from protobuf field: api.TradeTier Carrier = 1 [json_name = "Carrier"];
     */
    carrier?: TradeTier;
    /**
     * Type of carrier service
     *
     * @generated from protobuf field: string CarrierService = 2 [json_name = "CarrierService"];
     */
    carrierService: string;
}
/**
 * @generated from protobuf message api.OrderCarrierUpdatedEvent
 */
export interface OrderCarrierUpdatedEvent {
    /**
     * @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.OrderCarrierUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderCarrierUpdatedPayload;
}
/**
 * @generated from protobuf message api.OrderCarrierUpdatedRequest
 */
export interface OrderCarrierUpdatedRequest {
    /**
     * @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.OrderCarrierUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderCarrierUpdatedPayload;
}
/**
 * @generated from protobuf message api.OrderCarrierUpdatedResponse
 */
export interface OrderCarrierUpdatedResponse {
    /**
     * @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.OrderAttachmentAddedPayload
 */
export interface OrderAttachmentAddedPayload {
    /**
     * @generated from protobuf field: repeated api.AttachmentSummary Attachments = 1 [json_name = "Attachments"];
     */
    attachments: AttachmentSummary[];
}
/**
 * @generated from protobuf message api.OrderAttachmentAddedEvent
 */
export interface OrderAttachmentAddedEvent {
    /**
     * @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.OrderAttachmentAddedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderAttachmentAddedPayload;
}
/**
 * @generated from protobuf message api.OrderAttachmentAddedRequest
 */
export interface OrderAttachmentAddedRequest {
    /**
     * @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.OrderAttachmentAddedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderAttachmentAddedPayload;
}
/**
 * @generated from protobuf message api.OrderAttachmentAddedResponse
 */
export interface OrderAttachmentAddedResponse {
    /**
     * @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.OrderAttachmentRemovedPayload
 */
export interface OrderAttachmentRemovedPayload {
    /**
     * @generated from protobuf field: repeated api.AttachmentSummary Attachments = 1 [json_name = "Attachments"];
     */
    attachments: AttachmentSummary[];
}
/**
 * @generated from protobuf message api.OrderAttachmentRemovedEvent
 */
export interface OrderAttachmentRemovedEvent {
    /**
     * @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.OrderAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderAttachmentRemovedPayload;
}
/**
 * @generated from protobuf message api.OrderAttachmentRemovedRequest
 */
export interface OrderAttachmentRemovedRequest {
    /**
     * @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.OrderAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderAttachmentRemovedPayload;
}
/**
 * @generated from protobuf message api.OrderAttachmentRemovedResponse
 */
export interface OrderAttachmentRemovedResponse {
    /**
     * @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;
}
// 
// ClaimAdded : this message tells that a claim is added for the order

/**
 * @generated from protobuf message api.OrderClaimAddedPayload
 */
export interface OrderClaimAddedPayload {
    /**
     * @generated from protobuf field: repeated api.ClaimSummary Claims = 1 [json_name = "Claims"];
     */
    claims: ClaimSummary[];
}
/**
 * @generated from protobuf message api.OrderClaimAddedEvent
 */
export interface OrderClaimAddedEvent {
    /**
     * @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.OrderClaimAddedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderClaimAddedPayload;
}
/**
 * @generated from protobuf message api.OrderClaimAddedRequest
 */
export interface OrderClaimAddedRequest {
    /**
     * @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.OrderClaimAddedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderClaimAddedPayload;
}
/**
 * @generated from protobuf message api.OrderClaimAddedResponse
 */
export interface OrderClaimAddedResponse {
    /**
     * @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.OrderDeletedPayload
 */
export interface OrderDeletedPayload {
}
/**
 * Event message
 *
 * @generated from protobuf message api.OrderDeletedEvent
 */
export interface OrderDeletedEvent {
    /**
     * @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.OrderDeletedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderDeletedPayload;
}
/**
 * API Request
 *
 * @generated from protobuf message api.OrderDeletedRequest
 */
export interface OrderDeletedRequest {
    /**
     * @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.OrderDeletedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: OrderDeletedPayload;
}
/**
 * API Response
 *
 * @generated from protobuf message api.OrderDeletedResponse
 */
export interface OrderDeletedResponse {
    /**
     * @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 OrderCreatedPayload$Type extends MessageType<OrderCreatedPayload> {
    constructor() {
        super("api.OrderCreatedPayload", [
            { no: 1, name: "CreationDateTime", kind: "message", jsonName: "CreationDateTime", T: () => DateTime, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ParentOrder", kind: "message", jsonName: "ParentOrder", T: () => ReferencedID },
            { no: 3, name: "LanguageCodeISO6391", kind: "scalar", jsonName: "LanguageCodeISO6391", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "2", maxLen: "3", languageIso639: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "<a href='https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes'>ISO 639 code</a> message language", example: "\"en\"" } } },
            { no: 4, name: "MetaData", kind: "message", jsonName: "MetaData", repeat: 1 /*RepeatType.PACKED*/, T: () => MetadataElement, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)" }, "api.metadata": true, "api.aggKey": "Key" } },
            { no: 5, name: "Buyer", kind: "message", jsonName: "Buyer", T: () => TradeTier, options: { "validate.rules": { message: { required: true } } } },
            { no: 6, name: "Seller", kind: "message", jsonName: "Seller", T: () => TradeTier },
            { no: 7, name: "ShipFrom", kind: "message", jsonName: "ShipFrom", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where to ship the order from" } } },
            { no: 8, name: "ShipTo", kind: "message", jsonName: "ShipTo", T: () => TradeTier, options: { "validate.rules": { message: { required: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where to ship the order to" } } },
            { no: 9, name: "Carrier", kind: "message", jsonName: "Carrier", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Definition of the order carrier" } } },
            { no: 12, name: "CarrierService", kind: "scalar", jsonName: "CarrierService", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Type of carrier service" } } },
            { no: 10, name: "RequestedMilestones", kind: "message", jsonName: "RequestedMilestones", T: () => OrderRequestedMilestones },
            { no: 11, name: "Lines", kind: "message", jsonName: "Lines", repeat: 1 /*RepeatType.PACKED*/, T: () => OrderLine, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Lines of the order" }, "api.aggKey": "LineID" } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["CreationDateTime", "Buyer", "ShipTo"] } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Created", "api.postAggMethods": "computeEquivalentLVBaseQuantity" });
    }
    create(value?: PartialMessage<OrderCreatedPayload>): OrderCreatedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.languageCodeISO6391 = "";
        message.metaData = [];
        message.carrierService = "";
        message.lines = [];
        if (value !== undefined)
            reflectionMergePartial<OrderCreatedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCreatedPayload): OrderCreatedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.DateTime CreationDateTime = 1 [json_name = "CreationDateTime"];*/ 1:
                    message.creationDateTime = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.creationDateTime);
                    break;
                case /* api.ReferencedID ParentOrder = 2 [json_name = "ParentOrder"];*/ 2:
                    message.parentOrder = ReferencedID.internalBinaryRead(reader, reader.uint32(), options, message.parentOrder);
                    break;
                case /* string LanguageCodeISO6391 = 3 [json_name = "LanguageCodeISO6391"];*/ 3:
                    message.languageCodeISO6391 = reader.string();
                    break;
                case /* repeated api.MetadataElement MetaData = 4 [json_name = "MetaData"];*/ 4:
                    message.metaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* api.TradeTier Buyer = 5 [json_name = "Buyer"];*/ 5:
                    message.buyer = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.buyer);
                    break;
                case /* api.TradeTier Seller = 6 [json_name = "Seller"];*/ 6:
                    message.seller = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.seller);
                    break;
                case /* api.TradeTier ShipFrom = 7 [json_name = "ShipFrom"];*/ 7:
                    message.shipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.shipFrom);
                    break;
                case /* api.TradeTier ShipTo = 8 [json_name = "ShipTo"];*/ 8:
                    message.shipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.shipTo);
                    break;
                case /* api.TradeTier Carrier = 9 [json_name = "Carrier"];*/ 9:
                    message.carrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.carrier);
                    break;
                case /* string CarrierService = 12 [json_name = "CarrierService"];*/ 12:
                    message.carrierService = reader.string();
                    break;
                case /* api.OrderRequestedMilestones RequestedMilestones = 10 [json_name = "RequestedMilestones"];*/ 10:
                    message.requestedMilestones = OrderRequestedMilestones.internalBinaryRead(reader, reader.uint32(), options, message.requestedMilestones);
                    break;
                case /* repeated api.OrderLine Lines = 11 [json_name = "Lines"];*/ 11:
                    message.lines.push(OrderLine.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: OrderCreatedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.DateTime CreationDateTime = 1 [json_name = "CreationDateTime"]; */
        if (message.creationDateTime)
            DateTime.internalBinaryWrite(message.creationDateTime, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.ReferencedID ParentOrder = 2 [json_name = "ParentOrder"]; */
        if (message.parentOrder)
            ReferencedID.internalBinaryWrite(message.parentOrder, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* string LanguageCodeISO6391 = 3 [json_name = "LanguageCodeISO6391"]; */
        if (message.languageCodeISO6391 !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.languageCodeISO6391);
        /* repeated api.MetadataElement MetaData = 4 [json_name = "MetaData"]; */
        for (let i = 0; i < message.metaData.length; i++)
            MetadataElement.internalBinaryWrite(message.metaData[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.TradeTier Buyer = 5 [json_name = "Buyer"]; */
        if (message.buyer)
            TradeTier.internalBinaryWrite(message.buyer, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
        /* api.TradeTier Seller = 6 [json_name = "Seller"]; */
        if (message.seller)
            TradeTier.internalBinaryWrite(message.seller, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
        /* api.TradeTier ShipFrom = 7 [json_name = "ShipFrom"]; */
        if (message.shipFrom)
            TradeTier.internalBinaryWrite(message.shipFrom, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
        /* api.TradeTier ShipTo = 8 [json_name = "ShipTo"]; */
        if (message.shipTo)
            TradeTier.internalBinaryWrite(message.shipTo, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
        /* api.TradeTier Carrier = 9 [json_name = "Carrier"]; */
        if (message.carrier)
            TradeTier.internalBinaryWrite(message.carrier, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
        /* string CarrierService = 12 [json_name = "CarrierService"]; */
        if (message.carrierService !== "")
            writer.tag(12, WireType.LengthDelimited).string(message.carrierService);
        /* api.OrderRequestedMilestones RequestedMilestones = 10 [json_name = "RequestedMilestones"]; */
        if (message.requestedMilestones)
            OrderRequestedMilestones.internalBinaryWrite(message.requestedMilestones, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.OrderLine Lines = 11 [json_name = "Lines"]; */
        for (let i = 0; i < message.lines.length; i++)
            OrderLine.internalBinaryWrite(message.lines[i], writer.tag(11, 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.OrderCreatedPayload
 */
export const OrderCreatedPayload = new OrderCreatedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderCreatedEvent$Type extends MessageType<OrderCreatedEvent> {
    constructor() {
        super("api.OrderCreatedEvent", [
            { 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: () => OrderCreatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "Created", "api.postAggMethods": "computeEquivalentLVBaseQuantity", "api.preAggMethods": "verifyActorPartner" });
    }
    create(value?: PartialMessage<OrderCreatedEvent>): OrderCreatedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderCreatedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCreatedEvent): OrderCreatedEvent {
        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.OrderCreatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderCreatedPayload.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: OrderCreatedEvent, 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.OrderCreatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderCreatedPayload.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.OrderCreatedEvent
 */
export const OrderCreatedEvent = new OrderCreatedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderCreatedRequest$Type extends MessageType<OrderCreatedRequest> {
    constructor() {
        super("api.OrderCreatedRequest", [
            { 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: () => OrderCreatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "Created" });
    }
    create(value?: PartialMessage<OrderCreatedRequest>): OrderCreatedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderCreatedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCreatedRequest): OrderCreatedRequest {
        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.OrderCreatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderCreatedPayload.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: OrderCreatedRequest, 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.OrderCreatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderCreatedPayload.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.OrderCreatedRequest
 */
export const OrderCreatedRequest = new OrderCreatedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderCreatedResponse$Type extends MessageType<OrderCreatedResponse> {
    constructor() {
        super("api.OrderCreatedResponse", [
            { 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": "Created" });
    }
    create(value?: PartialMessage<OrderCreatedResponse>): OrderCreatedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderCreatedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCreatedResponse): OrderCreatedResponse {
        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: OrderCreatedResponse, 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.OrderCreatedResponse
 */
export const OrderCreatedResponse = new OrderCreatedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderExecutionflowDetectedPayload$Type extends MessageType<OrderExecutionflowDetectedPayload> {
    constructor() {
        super("api.OrderExecutionflowDetectedPayload", [
            { no: 1, name: "CreationDateTime", kind: "message", jsonName: "CreationDateTime", T: () => DateTime, options: { "validate.rules": { message: { required: true } } } },
            { no: 4, name: "MetaData", kind: "message", jsonName: "MetaData", repeat: 1 /*RepeatType.PACKED*/, T: () => MetadataElement, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)" }, "api.metadata": true, "api.aggKey": "Key" } },
            { no: 7, name: "ShipFrom", kind: "message", jsonName: "ShipFrom", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where to ship the order from" } } },
            { no: 8, name: "ShipTo", kind: "message", jsonName: "ShipTo", T: () => TradeTier, options: { "validate.rules": { message: { required: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where to ship the order to" } } },
            { no: 9, name: "Carrier", kind: "message", jsonName: "Carrier", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Definition of the order carrier" } } },
            { no: 12, name: "CarrierService", kind: "scalar", jsonName: "CarrierService", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Type of carrier service" } } },
            { no: 10, name: "RequestedMilestones", kind: "message", jsonName: "RequestedMilestones", T: () => OrderRequestedMilestones },
            { no: 11, name: "Lines", kind: "message", jsonName: "Lines", repeat: 1 /*RepeatType.PACKED*/, T: () => OrderLine, options: { "validate.rules": { repeated: { minItems: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Lines of the order" }, "api.aggKey": "LineID" } },
            { no: 13, name: "ExecutionflowSummary", kind: "message", jsonName: "ExecutionflowSummary", repeat: 1 /*RepeatType.PACKED*/, T: () => ExecutionflowSummary, options: { "api.aggKey": "ExecutionflowID" } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["CreationDateTime", "ShipTo"] } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "ExecutionflowDetected", "api.postAggMethods": "computeEquivalentLVBaseQuantity" });
    }
    create(value?: PartialMessage<OrderExecutionflowDetectedPayload>): OrderExecutionflowDetectedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.metaData = [];
        message.carrierService = "";
        message.lines = [];
        message.executionflowSummary = [];
        if (value !== undefined)
            reflectionMergePartial<OrderExecutionflowDetectedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderExecutionflowDetectedPayload): OrderExecutionflowDetectedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.DateTime CreationDateTime = 1 [json_name = "CreationDateTime"];*/ 1:
                    message.creationDateTime = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.creationDateTime);
                    break;
                case /* repeated api.MetadataElement MetaData = 4 [json_name = "MetaData"];*/ 4:
                    message.metaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* api.TradeTier ShipFrom = 7 [json_name = "ShipFrom"];*/ 7:
                    message.shipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.shipFrom);
                    break;
                case /* api.TradeTier ShipTo = 8 [json_name = "ShipTo"];*/ 8:
                    message.shipTo = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.shipTo);
                    break;
                case /* api.TradeTier Carrier = 9 [json_name = "Carrier"];*/ 9:
                    message.carrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.carrier);
                    break;
                case /* string CarrierService = 12 [json_name = "CarrierService"];*/ 12:
                    message.carrierService = reader.string();
                    break;
                case /* api.OrderRequestedMilestones RequestedMilestones = 10 [json_name = "RequestedMilestones"];*/ 10:
                    message.requestedMilestones = OrderRequestedMilestones.internalBinaryRead(reader, reader.uint32(), options, message.requestedMilestones);
                    break;
                case /* repeated api.OrderLine Lines = 11 [json_name = "Lines"];*/ 11:
                    message.lines.push(OrderLine.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated api.ExecutionflowSummary ExecutionflowSummary = 13 [json_name = "ExecutionflowSummary"];*/ 13:
                    message.executionflowSummary.push(ExecutionflowSummary.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: OrderExecutionflowDetectedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.DateTime CreationDateTime = 1 [json_name = "CreationDateTime"]; */
        if (message.creationDateTime)
            DateTime.internalBinaryWrite(message.creationDateTime, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.MetadataElement MetaData = 4 [json_name = "MetaData"]; */
        for (let i = 0; i < message.metaData.length; i++)
            MetadataElement.internalBinaryWrite(message.metaData[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.TradeTier ShipFrom = 7 [json_name = "ShipFrom"]; */
        if (message.shipFrom)
            TradeTier.internalBinaryWrite(message.shipFrom, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
        /* api.TradeTier ShipTo = 8 [json_name = "ShipTo"]; */
        if (message.shipTo)
            TradeTier.internalBinaryWrite(message.shipTo, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
        /* api.TradeTier Carrier = 9 [json_name = "Carrier"]; */
        if (message.carrier)
            TradeTier.internalBinaryWrite(message.carrier, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
        /* string CarrierService = 12 [json_name = "CarrierService"]; */
        if (message.carrierService !== "")
            writer.tag(12, WireType.LengthDelimited).string(message.carrierService);
        /* api.OrderRequestedMilestones RequestedMilestones = 10 [json_name = "RequestedMilestones"]; */
        if (message.requestedMilestones)
            OrderRequestedMilestones.internalBinaryWrite(message.requestedMilestones, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.OrderLine Lines = 11 [json_name = "Lines"]; */
        for (let i = 0; i < message.lines.length; i++)
            OrderLine.internalBinaryWrite(message.lines[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.ExecutionflowSummary ExecutionflowSummary = 13 [json_name = "ExecutionflowSummary"]; */
        for (let i = 0; i < message.executionflowSummary.length; i++)
            ExecutionflowSummary.internalBinaryWrite(message.executionflowSummary[i], writer.tag(13, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.OrderExecutionflowDetectedPayload
 */
export const OrderExecutionflowDetectedPayload = new OrderExecutionflowDetectedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderExecutionflowDetectedEvent$Type extends MessageType<OrderExecutionflowDetectedEvent> {
    constructor() {
        super("api.OrderExecutionflowDetectedEvent", [
            { 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: () => OrderExecutionflowDetectedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "ExecutionflowDetected", "api.postAggMethods": "computeEquivalentLVBaseQuantity", "api.preAggMethods": "verifyActorPartner" });
    }
    create(value?: PartialMessage<OrderExecutionflowDetectedEvent>): OrderExecutionflowDetectedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderExecutionflowDetectedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderExecutionflowDetectedEvent): OrderExecutionflowDetectedEvent {
        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.OrderExecutionflowDetectedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderExecutionflowDetectedPayload.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: OrderExecutionflowDetectedEvent, 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.OrderExecutionflowDetectedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderExecutionflowDetectedPayload.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.OrderExecutionflowDetectedEvent
 */
export const OrderExecutionflowDetectedEvent = new OrderExecutionflowDetectedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderExecutionflowDetectedRequest$Type extends MessageType<OrderExecutionflowDetectedRequest> {
    constructor() {
        super("api.OrderExecutionflowDetectedRequest", [
            { 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: () => OrderExecutionflowDetectedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "ExecutionflowDetected" });
    }
    create(value?: PartialMessage<OrderExecutionflowDetectedRequest>): OrderExecutionflowDetectedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderExecutionflowDetectedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderExecutionflowDetectedRequest): OrderExecutionflowDetectedRequest {
        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.OrderExecutionflowDetectedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderExecutionflowDetectedPayload.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: OrderExecutionflowDetectedRequest, 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.OrderExecutionflowDetectedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderExecutionflowDetectedPayload.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.OrderExecutionflowDetectedRequest
 */
export const OrderExecutionflowDetectedRequest = new OrderExecutionflowDetectedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderExecutionflowDetectedResponse$Type extends MessageType<OrderExecutionflowDetectedResponse> {
    constructor() {
        super("api.OrderExecutionflowDetectedResponse", [
            { 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": "ExecutionflowDetected" });
    }
    create(value?: PartialMessage<OrderExecutionflowDetectedResponse>): OrderExecutionflowDetectedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderExecutionflowDetectedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderExecutionflowDetectedResponse): OrderExecutionflowDetectedResponse {
        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: OrderExecutionflowDetectedResponse, 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.OrderExecutionflowDetectedResponse
 */
export const OrderExecutionflowDetectedResponse = new OrderExecutionflowDetectedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderCancelledPayload$Type extends MessageType<OrderCancelledPayload> {
    constructor() {
        super("api.OrderCancelledPayload", [], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Cancelled" });
    }
    create(value?: PartialMessage<OrderCancelledPayload>): OrderCancelledPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderCancelledPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCancelledPayload): OrderCancelledPayload {
        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: OrderCancelledPayload, 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.OrderCancelledPayload
 */
export const OrderCancelledPayload = new OrderCancelledPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderCancelledEvent$Type extends MessageType<OrderCancelledEvent> {
    constructor() {
        super("api.OrderCancelledEvent", [
            { 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: () => OrderCancelledPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "Cancelled" });
    }
    create(value?: PartialMessage<OrderCancelledEvent>): OrderCancelledEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderCancelledEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCancelledEvent): OrderCancelledEvent {
        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.OrderCancelledPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderCancelledPayload.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: OrderCancelledEvent, 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.OrderCancelledPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderCancelledPayload.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.OrderCancelledEvent
 */
export const OrderCancelledEvent = new OrderCancelledEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderCancelledRequest$Type extends MessageType<OrderCancelledRequest> {
    constructor() {
        super("api.OrderCancelledRequest", [
            { 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: () => OrderCancelledPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "Cancelled" });
    }
    create(value?: PartialMessage<OrderCancelledRequest>): OrderCancelledRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderCancelledRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCancelledRequest): OrderCancelledRequest {
        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.OrderCancelledPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderCancelledPayload.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: OrderCancelledRequest, 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.OrderCancelledPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderCancelledPayload.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.OrderCancelledRequest
 */
export const OrderCancelledRequest = new OrderCancelledRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderCancelledResponse$Type extends MessageType<OrderCancelledResponse> {
    constructor() {
        super("api.OrderCancelledResponse", [
            { 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": "Cancelled" });
    }
    create(value?: PartialMessage<OrderCancelledResponse>): OrderCancelledResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderCancelledResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCancelledResponse): OrderCancelledResponse {
        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: OrderCancelledResponse, 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.OrderCancelledResponse
 */
export const OrderCancelledResponse = new OrderCancelledResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderAnonymisedPayload$Type extends MessageType<OrderAnonymisedPayload> {
    constructor() {
        super("api.OrderAnonymisedPayload", [], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Anonymised" });
    }
    create(value?: PartialMessage<OrderAnonymisedPayload>): OrderAnonymisedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderAnonymisedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderAnonymisedPayload): OrderAnonymisedPayload {
        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: OrderAnonymisedPayload, 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.OrderAnonymisedPayload
 */
export const OrderAnonymisedPayload = new OrderAnonymisedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderAnonymisedEvent$Type extends MessageType<OrderAnonymisedEvent> {
    constructor() {
        super("api.OrderAnonymisedEvent", [
            { 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: () => OrderAnonymisedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "Anonymised", "api.postAggMethods": "anonymise" });
    }
    create(value?: PartialMessage<OrderAnonymisedEvent>): OrderAnonymisedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderAnonymisedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderAnonymisedEvent): OrderAnonymisedEvent {
        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.OrderAnonymisedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderAnonymisedPayload.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: OrderAnonymisedEvent, 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.OrderAnonymisedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderAnonymisedPayload.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.OrderAnonymisedEvent
 */
export const OrderAnonymisedEvent = new OrderAnonymisedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderAnonymisedRequest$Type extends MessageType<OrderAnonymisedRequest> {
    constructor() {
        super("api.OrderAnonymisedRequest", [
            { 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: () => OrderAnonymisedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "Anonymised" });
    }
    create(value?: PartialMessage<OrderAnonymisedRequest>): OrderAnonymisedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderAnonymisedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderAnonymisedRequest): OrderAnonymisedRequest {
        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.OrderAnonymisedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderAnonymisedPayload.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: OrderAnonymisedRequest, 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.OrderAnonymisedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderAnonymisedPayload.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.OrderAnonymisedRequest
 */
export const OrderAnonymisedRequest = new OrderAnonymisedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderAnonymisedResponse$Type extends MessageType<OrderAnonymisedResponse> {
    constructor() {
        super("api.OrderAnonymisedResponse", [
            { 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": "Anonymised" });
    }
    create(value?: PartialMessage<OrderAnonymisedResponse>): OrderAnonymisedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderAnonymisedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderAnonymisedResponse): OrderAnonymisedResponse {
        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: OrderAnonymisedResponse, 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.OrderAnonymisedResponse
 */
export const OrderAnonymisedResponse = new OrderAnonymisedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderShipperAssignedPayload$Type extends MessageType<OrderShipperAssignedPayload> {
    constructor() {
        super("api.OrderShipperAssignedPayload", [
            { no: 1, name: "ShipFrom", kind: "message", jsonName: "ShipFrom", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Where to ship the order from" } } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "ShipperAssigned" });
    }
    create(value?: PartialMessage<OrderShipperAssignedPayload>): OrderShipperAssignedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderShipperAssignedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderShipperAssignedPayload): OrderShipperAssignedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.TradeTier ShipFrom = 1 [json_name = "ShipFrom"];*/ 1:
                    message.shipFrom = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.shipFrom);
                    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: OrderShipperAssignedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.TradeTier ShipFrom = 1 [json_name = "ShipFrom"]; */
        if (message.shipFrom)
            TradeTier.internalBinaryWrite(message.shipFrom, 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.OrderShipperAssignedPayload
 */
export const OrderShipperAssignedPayload = new OrderShipperAssignedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderShipperAssignedEvent$Type extends MessageType<OrderShipperAssignedEvent> {
    constructor() {
        super("api.OrderShipperAssignedEvent", [
            { 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: () => OrderShipperAssignedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "ShipperAssigned", "api.preAggMethods": "verifyActorPartner" });
    }
    create(value?: PartialMessage<OrderShipperAssignedEvent>): OrderShipperAssignedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderShipperAssignedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderShipperAssignedEvent): OrderShipperAssignedEvent {
        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.OrderShipperAssignedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderShipperAssignedPayload.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: OrderShipperAssignedEvent, 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.OrderShipperAssignedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderShipperAssignedPayload.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.OrderShipperAssignedEvent
 */
export const OrderShipperAssignedEvent = new OrderShipperAssignedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderShipperAssignedRequest$Type extends MessageType<OrderShipperAssignedRequest> {
    constructor() {
        super("api.OrderShipperAssignedRequest", [
            { 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: () => OrderShipperAssignedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "ShipperAssigned" });
    }
    create(value?: PartialMessage<OrderShipperAssignedRequest>): OrderShipperAssignedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderShipperAssignedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderShipperAssignedRequest): OrderShipperAssignedRequest {
        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.OrderShipperAssignedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderShipperAssignedPayload.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: OrderShipperAssignedRequest, 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.OrderShipperAssignedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderShipperAssignedPayload.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.OrderShipperAssignedRequest
 */
export const OrderShipperAssignedRequest = new OrderShipperAssignedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderShipperAssignedResponse$Type extends MessageType<OrderShipperAssignedResponse> {
    constructor() {
        super("api.OrderShipperAssignedResponse", [
            { 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": "ShipperAssigned" });
    }
    create(value?: PartialMessage<OrderShipperAssignedResponse>): OrderShipperAssignedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderShipperAssignedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderShipperAssignedResponse): OrderShipperAssignedResponse {
        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: OrderShipperAssignedResponse, 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.OrderShipperAssignedResponse
 */
export const OrderShipperAssignedResponse = new OrderShipperAssignedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderPartiallyCompletedPayload$Type extends MessageType<OrderPartiallyCompletedPayload> {
    constructor() {
        super("api.OrderPartiallyCompletedPayload", [], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "PartiallyCompleted" });
    }
    create(value?: PartialMessage<OrderPartiallyCompletedPayload>): OrderPartiallyCompletedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderPartiallyCompletedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderPartiallyCompletedPayload): OrderPartiallyCompletedPayload {
        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: OrderPartiallyCompletedPayload, 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.OrderPartiallyCompletedPayload
 */
export const OrderPartiallyCompletedPayload = new OrderPartiallyCompletedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderPartiallyCompletedEvent$Type extends MessageType<OrderPartiallyCompletedEvent> {
    constructor() {
        super("api.OrderPartiallyCompletedEvent", [
            { 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: () => OrderPartiallyCompletedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "PartiallyCompleted" });
    }
    create(value?: PartialMessage<OrderPartiallyCompletedEvent>): OrderPartiallyCompletedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderPartiallyCompletedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderPartiallyCompletedEvent): OrderPartiallyCompletedEvent {
        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.OrderPartiallyCompletedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderPartiallyCompletedPayload.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: OrderPartiallyCompletedEvent, 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.OrderPartiallyCompletedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderPartiallyCompletedPayload.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.OrderPartiallyCompletedEvent
 */
export const OrderPartiallyCompletedEvent = new OrderPartiallyCompletedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderPartiallyCompletedRequest$Type extends MessageType<OrderPartiallyCompletedRequest> {
    constructor() {
        super("api.OrderPartiallyCompletedRequest", [
            { 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: () => OrderPartiallyCompletedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "PartiallyCompleted" });
    }
    create(value?: PartialMessage<OrderPartiallyCompletedRequest>): OrderPartiallyCompletedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderPartiallyCompletedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderPartiallyCompletedRequest): OrderPartiallyCompletedRequest {
        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.OrderPartiallyCompletedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderPartiallyCompletedPayload.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: OrderPartiallyCompletedRequest, 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.OrderPartiallyCompletedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderPartiallyCompletedPayload.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.OrderPartiallyCompletedRequest
 */
export const OrderPartiallyCompletedRequest = new OrderPartiallyCompletedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderPartiallyCompletedResponse$Type extends MessageType<OrderPartiallyCompletedResponse> {
    constructor() {
        super("api.OrderPartiallyCompletedResponse", [
            { 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": "PartiallyCompleted" });
    }
    create(value?: PartialMessage<OrderPartiallyCompletedResponse>): OrderPartiallyCompletedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderPartiallyCompletedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderPartiallyCompletedResponse): OrderPartiallyCompletedResponse {
        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: OrderPartiallyCompletedResponse, 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.OrderPartiallyCompletedResponse
 */
export const OrderPartiallyCompletedResponse = new OrderPartiallyCompletedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderRequestedDeliveryDateDefinedPayload$Type extends MessageType<OrderRequestedDeliveryDateDefinedPayload> {
    constructor() {
        super("api.OrderRequestedDeliveryDateDefinedPayload", [
            { no: 1, name: "RequestedDeliveryDateTime", kind: "message", jsonName: "RequestedDeliveryDateTime", T: () => DateTime, options: { "api.mapPath": "RequestedMilestones.RequestedDeliveryDateTime" } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "RequestedDeliveryDateDefined" });
    }
    create(value?: PartialMessage<OrderRequestedDeliveryDateDefinedPayload>): OrderRequestedDeliveryDateDefinedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderRequestedDeliveryDateDefinedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderRequestedDeliveryDateDefinedPayload): OrderRequestedDeliveryDateDefinedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.DateTime RequestedDeliveryDateTime = 1 [json_name = "RequestedDeliveryDateTime"];*/ 1:
                    message.requestedDeliveryDateTime = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.requestedDeliveryDateTime);
                    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: OrderRequestedDeliveryDateDefinedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.DateTime RequestedDeliveryDateTime = 1 [json_name = "RequestedDeliveryDateTime"]; */
        if (message.requestedDeliveryDateTime)
            DateTime.internalBinaryWrite(message.requestedDeliveryDateTime, 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.OrderRequestedDeliveryDateDefinedPayload
 */
export const OrderRequestedDeliveryDateDefinedPayload = new OrderRequestedDeliveryDateDefinedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderRequestedDeliveryDateDefinedEvent$Type extends MessageType<OrderRequestedDeliveryDateDefinedEvent> {
    constructor() {
        super("api.OrderRequestedDeliveryDateDefinedEvent", [
            { 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: () => OrderRequestedDeliveryDateDefinedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "RequestedDeliveryDateDefined" });
    }
    create(value?: PartialMessage<OrderRequestedDeliveryDateDefinedEvent>): OrderRequestedDeliveryDateDefinedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderRequestedDeliveryDateDefinedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderRequestedDeliveryDateDefinedEvent): OrderRequestedDeliveryDateDefinedEvent {
        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.OrderRequestedDeliveryDateDefinedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderRequestedDeliveryDateDefinedPayload.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: OrderRequestedDeliveryDateDefinedEvent, 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.OrderRequestedDeliveryDateDefinedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderRequestedDeliveryDateDefinedPayload.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.OrderRequestedDeliveryDateDefinedEvent
 */
export const OrderRequestedDeliveryDateDefinedEvent = new OrderRequestedDeliveryDateDefinedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderRequestedDeliveryDateDefinedRequest$Type extends MessageType<OrderRequestedDeliveryDateDefinedRequest> {
    constructor() {
        super("api.OrderRequestedDeliveryDateDefinedRequest", [
            { 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: () => OrderRequestedDeliveryDateDefinedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "RequestedDeliveryDateDefined" });
    }
    create(value?: PartialMessage<OrderRequestedDeliveryDateDefinedRequest>): OrderRequestedDeliveryDateDefinedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderRequestedDeliveryDateDefinedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderRequestedDeliveryDateDefinedRequest): OrderRequestedDeliveryDateDefinedRequest {
        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.OrderRequestedDeliveryDateDefinedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderRequestedDeliveryDateDefinedPayload.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: OrderRequestedDeliveryDateDefinedRequest, 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.OrderRequestedDeliveryDateDefinedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderRequestedDeliveryDateDefinedPayload.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.OrderRequestedDeliveryDateDefinedRequest
 */
export const OrderRequestedDeliveryDateDefinedRequest = new OrderRequestedDeliveryDateDefinedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderRequestedDeliveryDateDefinedResponse$Type extends MessageType<OrderRequestedDeliveryDateDefinedResponse> {
    constructor() {
        super("api.OrderRequestedDeliveryDateDefinedResponse", [
            { 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": "RequestedDeliveryDateDefined" });
    }
    create(value?: PartialMessage<OrderRequestedDeliveryDateDefinedResponse>): OrderRequestedDeliveryDateDefinedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderRequestedDeliveryDateDefinedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderRequestedDeliveryDateDefinedResponse): OrderRequestedDeliveryDateDefinedResponse {
        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: OrderRequestedDeliveryDateDefinedResponse, 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.OrderRequestedDeliveryDateDefinedResponse
 */
export const OrderRequestedDeliveryDateDefinedResponse = new OrderRequestedDeliveryDateDefinedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderExecutionflowETAUpdatedPayload$Type extends MessageType<OrderExecutionflowETAUpdatedPayload> {
    constructor() {
        super("api.OrderExecutionflowETAUpdatedPayload", [
            { no: 1, name: "ExecutionflowETAs", kind: "message", jsonName: "ExecutionflowETAs", repeat: 1 /*RepeatType.PACKED*/, T: () => ETAbyExecutionflow, options: { "validate.rules": { repeated: { minItems: "1" } }, "api.aggKey": "ExecutionflowID" } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "ExecutionflowETAUpdated" });
    }
    create(value?: PartialMessage<OrderExecutionflowETAUpdatedPayload>): OrderExecutionflowETAUpdatedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.executionflowETAs = [];
        if (value !== undefined)
            reflectionMergePartial<OrderExecutionflowETAUpdatedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderExecutionflowETAUpdatedPayload): OrderExecutionflowETAUpdatedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.ETAbyExecutionflow ExecutionflowETAs = 1 [json_name = "ExecutionflowETAs"];*/ 1:
                    message.executionflowETAs.push(ETAbyExecutionflow.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: OrderExecutionflowETAUpdatedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.ETAbyExecutionflow ExecutionflowETAs = 1 [json_name = "ExecutionflowETAs"]; */
        for (let i = 0; i < message.executionflowETAs.length; i++)
            ETAbyExecutionflow.internalBinaryWrite(message.executionflowETAs[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.OrderExecutionflowETAUpdatedPayload
 */
export const OrderExecutionflowETAUpdatedPayload = new OrderExecutionflowETAUpdatedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderExecutionflowETAUpdatedEvent$Type extends MessageType<OrderExecutionflowETAUpdatedEvent> {
    constructor() {
        super("api.OrderExecutionflowETAUpdatedEvent", [
            { 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: () => OrderExecutionflowETAUpdatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "ExecutionflowETAUpdated", "api.postAggMethods": "computeETAs", "api.preAggMethods": "setExecutionflowETAActualDate" });
    }
    create(value?: PartialMessage<OrderExecutionflowETAUpdatedEvent>): OrderExecutionflowETAUpdatedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderExecutionflowETAUpdatedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderExecutionflowETAUpdatedEvent): OrderExecutionflowETAUpdatedEvent {
        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.OrderExecutionflowETAUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderExecutionflowETAUpdatedPayload.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: OrderExecutionflowETAUpdatedEvent, 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.OrderExecutionflowETAUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderExecutionflowETAUpdatedPayload.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.OrderExecutionflowETAUpdatedEvent
 */
export const OrderExecutionflowETAUpdatedEvent = new OrderExecutionflowETAUpdatedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderExecutionflowETAUpdatedRequest$Type extends MessageType<OrderExecutionflowETAUpdatedRequest> {
    constructor() {
        super("api.OrderExecutionflowETAUpdatedRequest", [
            { 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: () => OrderExecutionflowETAUpdatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "ExecutionflowETAUpdated" });
    }
    create(value?: PartialMessage<OrderExecutionflowETAUpdatedRequest>): OrderExecutionflowETAUpdatedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderExecutionflowETAUpdatedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderExecutionflowETAUpdatedRequest): OrderExecutionflowETAUpdatedRequest {
        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.OrderExecutionflowETAUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderExecutionflowETAUpdatedPayload.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: OrderExecutionflowETAUpdatedRequest, 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.OrderExecutionflowETAUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderExecutionflowETAUpdatedPayload.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.OrderExecutionflowETAUpdatedRequest
 */
export const OrderExecutionflowETAUpdatedRequest = new OrderExecutionflowETAUpdatedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderExecutionflowETAUpdatedResponse$Type extends MessageType<OrderExecutionflowETAUpdatedResponse> {
    constructor() {
        super("api.OrderExecutionflowETAUpdatedResponse", [
            { 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": "ExecutionflowETAUpdated" });
    }
    create(value?: PartialMessage<OrderExecutionflowETAUpdatedResponse>): OrderExecutionflowETAUpdatedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderExecutionflowETAUpdatedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderExecutionflowETAUpdatedResponse): OrderExecutionflowETAUpdatedResponse {
        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: OrderExecutionflowETAUpdatedResponse, 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.OrderExecutionflowETAUpdatedResponse
 */
export const OrderExecutionflowETAUpdatedResponse = new OrderExecutionflowETAUpdatedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderCompletedPayload$Type extends MessageType<OrderCompletedPayload> {
    constructor() {
        super("api.OrderCompletedPayload", [
            { no: 1, name: "ActualCompletionDateTime", kind: "message", jsonName: "ActualCompletionDateTime", T: () => DateTime, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Completed" });
    }
    create(value?: PartialMessage<OrderCompletedPayload>): OrderCompletedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderCompletedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCompletedPayload): OrderCompletedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.DateTime ActualCompletionDateTime = 1 [json_name = "ActualCompletionDateTime"];*/ 1:
                    message.actualCompletionDateTime = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.actualCompletionDateTime);
                    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: OrderCompletedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.DateTime ActualCompletionDateTime = 1 [json_name = "ActualCompletionDateTime"]; */
        if (message.actualCompletionDateTime)
            DateTime.internalBinaryWrite(message.actualCompletionDateTime, 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.OrderCompletedPayload
 */
export const OrderCompletedPayload = new OrderCompletedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderCompletedEvent$Type extends MessageType<OrderCompletedEvent> {
    constructor() {
        super("api.OrderCompletedEvent", [
            { 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: () => OrderCompletedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "Completed" });
    }
    create(value?: PartialMessage<OrderCompletedEvent>): OrderCompletedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderCompletedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCompletedEvent): OrderCompletedEvent {
        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.OrderCompletedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderCompletedPayload.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: OrderCompletedEvent, 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.OrderCompletedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderCompletedPayload.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.OrderCompletedEvent
 */
export const OrderCompletedEvent = new OrderCompletedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderCompletedRequest$Type extends MessageType<OrderCompletedRequest> {
    constructor() {
        super("api.OrderCompletedRequest", [
            { 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: () => OrderCompletedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "Completed" });
    }
    create(value?: PartialMessage<OrderCompletedRequest>): OrderCompletedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderCompletedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCompletedRequest): OrderCompletedRequest {
        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.OrderCompletedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderCompletedPayload.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: OrderCompletedRequest, 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.OrderCompletedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderCompletedPayload.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.OrderCompletedRequest
 */
export const OrderCompletedRequest = new OrderCompletedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderCompletedResponse$Type extends MessageType<OrderCompletedResponse> {
    constructor() {
        super("api.OrderCompletedResponse", [
            { 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": "Completed" });
    }
    create(value?: PartialMessage<OrderCompletedResponse>): OrderCompletedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderCompletedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCompletedResponse): OrderCompletedResponse {
        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: OrderCompletedResponse, 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.OrderCompletedResponse
 */
export const OrderCompletedResponse = new OrderCompletedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderExecutionflowUpdatedPayload$Type extends MessageType<OrderExecutionflowUpdatedPayload> {
    constructor() {
        super("api.OrderExecutionflowUpdatedPayload", [
            { no: 1, name: "ExecutionflowSummary", kind: "message", jsonName: "ExecutionflowSummary", repeat: 1 /*RepeatType.PACKED*/, T: () => ExecutionflowSummary, options: { "api.aggKey": "ExecutionflowID" } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "ExecutionflowUpdated" });
    }
    create(value?: PartialMessage<OrderExecutionflowUpdatedPayload>): OrderExecutionflowUpdatedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.executionflowSummary = [];
        if (value !== undefined)
            reflectionMergePartial<OrderExecutionflowUpdatedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderExecutionflowUpdatedPayload): OrderExecutionflowUpdatedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.ExecutionflowSummary ExecutionflowSummary = 1 [json_name = "ExecutionflowSummary"];*/ 1:
                    message.executionflowSummary.push(ExecutionflowSummary.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: OrderExecutionflowUpdatedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.ExecutionflowSummary ExecutionflowSummary = 1 [json_name = "ExecutionflowSummary"]; */
        for (let i = 0; i < message.executionflowSummary.length; i++)
            ExecutionflowSummary.internalBinaryWrite(message.executionflowSummary[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.OrderExecutionflowUpdatedPayload
 */
export const OrderExecutionflowUpdatedPayload = new OrderExecutionflowUpdatedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderExecutionflowUpdatedEvent$Type extends MessageType<OrderExecutionflowUpdatedEvent> {
    constructor() {
        super("api.OrderExecutionflowUpdatedEvent", [
            { 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: () => OrderExecutionflowUpdatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "ExecutionflowUpdated", "api.postAggMethods": "computeCarrier" });
    }
    create(value?: PartialMessage<OrderExecutionflowUpdatedEvent>): OrderExecutionflowUpdatedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderExecutionflowUpdatedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderExecutionflowUpdatedEvent): OrderExecutionflowUpdatedEvent {
        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.OrderExecutionflowUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderExecutionflowUpdatedPayload.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: OrderExecutionflowUpdatedEvent, 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.OrderExecutionflowUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderExecutionflowUpdatedPayload.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.OrderExecutionflowUpdatedEvent
 */
export const OrderExecutionflowUpdatedEvent = new OrderExecutionflowUpdatedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderExecutionflowUpdatedRequest$Type extends MessageType<OrderExecutionflowUpdatedRequest> {
    constructor() {
        super("api.OrderExecutionflowUpdatedRequest", [
            { 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: () => OrderExecutionflowUpdatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "ExecutionflowUpdated" });
    }
    create(value?: PartialMessage<OrderExecutionflowUpdatedRequest>): OrderExecutionflowUpdatedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderExecutionflowUpdatedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderExecutionflowUpdatedRequest): OrderExecutionflowUpdatedRequest {
        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.OrderExecutionflowUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderExecutionflowUpdatedPayload.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: OrderExecutionflowUpdatedRequest, 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.OrderExecutionflowUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderExecutionflowUpdatedPayload.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.OrderExecutionflowUpdatedRequest
 */
export const OrderExecutionflowUpdatedRequest = new OrderExecutionflowUpdatedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderExecutionflowUpdatedResponse$Type extends MessageType<OrderExecutionflowUpdatedResponse> {
    constructor() {
        super("api.OrderExecutionflowUpdatedResponse", [
            { 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": "ExecutionflowUpdated" });
    }
    create(value?: PartialMessage<OrderExecutionflowUpdatedResponse>): OrderExecutionflowUpdatedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderExecutionflowUpdatedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderExecutionflowUpdatedResponse): OrderExecutionflowUpdatedResponse {
        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: OrderExecutionflowUpdatedResponse, 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.OrderExecutionflowUpdatedResponse
 */
export const OrderExecutionflowUpdatedResponse = new OrderExecutionflowUpdatedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderMetaDataUpdatedPayload$Type extends MessageType<OrderMetaDataUpdatedPayload> {
    constructor() {
        super("api.OrderMetaDataUpdatedPayload", [
            { no: 1, name: "MetaData", kind: "message", jsonName: "MetaData", repeat: 1 /*RepeatType.PACKED*/, T: () => MetadataElement, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)" }, "api.metadata": true, "api.aggKey": "Key" } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "MetaDataUpdated" });
    }
    create(value?: PartialMessage<OrderMetaDataUpdatedPayload>): OrderMetaDataUpdatedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.metaData = [];
        if (value !== undefined)
            reflectionMergePartial<OrderMetaDataUpdatedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderMetaDataUpdatedPayload): OrderMetaDataUpdatedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.MetadataElement MetaData = 1 [json_name = "MetaData"];*/ 1:
                    message.metaData.push(MetadataElement.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: OrderMetaDataUpdatedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.MetadataElement MetaData = 1 [json_name = "MetaData"]; */
        for (let i = 0; i < message.metaData.length; i++)
            MetadataElement.internalBinaryWrite(message.metaData[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.OrderMetaDataUpdatedPayload
 */
export const OrderMetaDataUpdatedPayload = new OrderMetaDataUpdatedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderMetaDataUpdatedEvent$Type extends MessageType<OrderMetaDataUpdatedEvent> {
    constructor() {
        super("api.OrderMetaDataUpdatedEvent", [
            { 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: () => OrderMetaDataUpdatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "MetaDataUpdated" });
    }
    create(value?: PartialMessage<OrderMetaDataUpdatedEvent>): OrderMetaDataUpdatedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderMetaDataUpdatedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderMetaDataUpdatedEvent): OrderMetaDataUpdatedEvent {
        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.OrderMetaDataUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderMetaDataUpdatedPayload.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: OrderMetaDataUpdatedEvent, 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.OrderMetaDataUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderMetaDataUpdatedPayload.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.OrderMetaDataUpdatedEvent
 */
export const OrderMetaDataUpdatedEvent = new OrderMetaDataUpdatedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderMetaDataUpdatedRequest$Type extends MessageType<OrderMetaDataUpdatedRequest> {
    constructor() {
        super("api.OrderMetaDataUpdatedRequest", [
            { 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: () => OrderMetaDataUpdatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "MetaDataUpdated" });
    }
    create(value?: PartialMessage<OrderMetaDataUpdatedRequest>): OrderMetaDataUpdatedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderMetaDataUpdatedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderMetaDataUpdatedRequest): OrderMetaDataUpdatedRequest {
        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.OrderMetaDataUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderMetaDataUpdatedPayload.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: OrderMetaDataUpdatedRequest, 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.OrderMetaDataUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderMetaDataUpdatedPayload.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.OrderMetaDataUpdatedRequest
 */
export const OrderMetaDataUpdatedRequest = new OrderMetaDataUpdatedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderMetaDataUpdatedResponse$Type extends MessageType<OrderMetaDataUpdatedResponse> {
    constructor() {
        super("api.OrderMetaDataUpdatedResponse", [
            { 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": "MetaDataUpdated" });
    }
    create(value?: PartialMessage<OrderMetaDataUpdatedResponse>): OrderMetaDataUpdatedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderMetaDataUpdatedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderMetaDataUpdatedResponse): OrderMetaDataUpdatedResponse {
        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: OrderMetaDataUpdatedResponse, 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.OrderMetaDataUpdatedResponse
 */
export const OrderMetaDataUpdatedResponse = new OrderMetaDataUpdatedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderCarrierUpdatedPayload$Type extends MessageType<OrderCarrierUpdatedPayload> {
    constructor() {
        super("api.OrderCarrierUpdatedPayload", [
            { no: 1, name: "Carrier", kind: "message", jsonName: "Carrier", T: () => TradeTier, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Definition of the order carrier" } } },
            { no: 2, name: "CarrierService", kind: "scalar", jsonName: "CarrierService", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Type of carrier service" } } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "CarrierUpdated" });
    }
    create(value?: PartialMessage<OrderCarrierUpdatedPayload>): OrderCarrierUpdatedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.carrierService = "";
        if (value !== undefined)
            reflectionMergePartial<OrderCarrierUpdatedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCarrierUpdatedPayload): OrderCarrierUpdatedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.TradeTier Carrier = 1 [json_name = "Carrier"];*/ 1:
                    message.carrier = TradeTier.internalBinaryRead(reader, reader.uint32(), options, message.carrier);
                    break;
                case /* string CarrierService = 2 [json_name = "CarrierService"];*/ 2:
                    message.carrierService = reader.string();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: OrderCarrierUpdatedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.TradeTier Carrier = 1 [json_name = "Carrier"]; */
        if (message.carrier)
            TradeTier.internalBinaryWrite(message.carrier, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* string CarrierService = 2 [json_name = "CarrierService"]; */
        if (message.carrierService !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.carrierService);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.OrderCarrierUpdatedPayload
 */
export const OrderCarrierUpdatedPayload = new OrderCarrierUpdatedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderCarrierUpdatedEvent$Type extends MessageType<OrderCarrierUpdatedEvent> {
    constructor() {
        super("api.OrderCarrierUpdatedEvent", [
            { 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: () => OrderCarrierUpdatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "CarrierUpdated", "api.preAggMethods": "verifyActorPartner" });
    }
    create(value?: PartialMessage<OrderCarrierUpdatedEvent>): OrderCarrierUpdatedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderCarrierUpdatedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCarrierUpdatedEvent): OrderCarrierUpdatedEvent {
        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.OrderCarrierUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderCarrierUpdatedPayload.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: OrderCarrierUpdatedEvent, 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.OrderCarrierUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderCarrierUpdatedPayload.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.OrderCarrierUpdatedEvent
 */
export const OrderCarrierUpdatedEvent = new OrderCarrierUpdatedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderCarrierUpdatedRequest$Type extends MessageType<OrderCarrierUpdatedRequest> {
    constructor() {
        super("api.OrderCarrierUpdatedRequest", [
            { 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: () => OrderCarrierUpdatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "CarrierUpdated" });
    }
    create(value?: PartialMessage<OrderCarrierUpdatedRequest>): OrderCarrierUpdatedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderCarrierUpdatedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCarrierUpdatedRequest): OrderCarrierUpdatedRequest {
        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.OrderCarrierUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderCarrierUpdatedPayload.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: OrderCarrierUpdatedRequest, 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.OrderCarrierUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderCarrierUpdatedPayload.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.OrderCarrierUpdatedRequest
 */
export const OrderCarrierUpdatedRequest = new OrderCarrierUpdatedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderCarrierUpdatedResponse$Type extends MessageType<OrderCarrierUpdatedResponse> {
    constructor() {
        super("api.OrderCarrierUpdatedResponse", [
            { 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": "CarrierUpdated" });
    }
    create(value?: PartialMessage<OrderCarrierUpdatedResponse>): OrderCarrierUpdatedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderCarrierUpdatedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderCarrierUpdatedResponse): OrderCarrierUpdatedResponse {
        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: OrderCarrierUpdatedResponse, 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.OrderCarrierUpdatedResponse
 */
export const OrderCarrierUpdatedResponse = new OrderCarrierUpdatedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderAttachmentAddedPayload$Type extends MessageType<OrderAttachmentAddedPayload> {
    constructor() {
        super("api.OrderAttachmentAddedPayload", [
            { 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<OrderAttachmentAddedPayload>): OrderAttachmentAddedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.attachments = [];
        if (value !== undefined)
            reflectionMergePartial<OrderAttachmentAddedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderAttachmentAddedPayload): OrderAttachmentAddedPayload {
        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: OrderAttachmentAddedPayload, 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.OrderAttachmentAddedPayload
 */
export const OrderAttachmentAddedPayload = new OrderAttachmentAddedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderAttachmentAddedEvent$Type extends MessageType<OrderAttachmentAddedEvent> {
    constructor() {
        super("api.OrderAttachmentAddedEvent", [
            { 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: () => OrderAttachmentAddedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "AttachmentAdded", "api.preAggMethods": "addAttachment" });
    }
    create(value?: PartialMessage<OrderAttachmentAddedEvent>): OrderAttachmentAddedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderAttachmentAddedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderAttachmentAddedEvent): OrderAttachmentAddedEvent {
        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.OrderAttachmentAddedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderAttachmentAddedPayload.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: OrderAttachmentAddedEvent, 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.OrderAttachmentAddedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderAttachmentAddedPayload.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.OrderAttachmentAddedEvent
 */
export const OrderAttachmentAddedEvent = new OrderAttachmentAddedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderAttachmentAddedRequest$Type extends MessageType<OrderAttachmentAddedRequest> {
    constructor() {
        super("api.OrderAttachmentAddedRequest", [
            { 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: () => OrderAttachmentAddedPayload, 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<OrderAttachmentAddedRequest>): OrderAttachmentAddedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderAttachmentAddedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderAttachmentAddedRequest): OrderAttachmentAddedRequest {
        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.OrderAttachmentAddedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderAttachmentAddedPayload.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: OrderAttachmentAddedRequest, 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.OrderAttachmentAddedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderAttachmentAddedPayload.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.OrderAttachmentAddedRequest
 */
export const OrderAttachmentAddedRequest = new OrderAttachmentAddedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderAttachmentAddedResponse$Type extends MessageType<OrderAttachmentAddedResponse> {
    constructor() {
        super("api.OrderAttachmentAddedResponse", [
            { 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<OrderAttachmentAddedResponse>): OrderAttachmentAddedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderAttachmentAddedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderAttachmentAddedResponse): OrderAttachmentAddedResponse {
        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: OrderAttachmentAddedResponse, 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.OrderAttachmentAddedResponse
 */
export const OrderAttachmentAddedResponse = new OrderAttachmentAddedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderAttachmentRemovedPayload$Type extends MessageType<OrderAttachmentRemovedPayload> {
    constructor() {
        super("api.OrderAttachmentRemovedPayload", [
            { 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<OrderAttachmentRemovedPayload>): OrderAttachmentRemovedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.attachments = [];
        if (value !== undefined)
            reflectionMergePartial<OrderAttachmentRemovedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderAttachmentRemovedPayload): OrderAttachmentRemovedPayload {
        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: OrderAttachmentRemovedPayload, 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.OrderAttachmentRemovedPayload
 */
export const OrderAttachmentRemovedPayload = new OrderAttachmentRemovedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderAttachmentRemovedEvent$Type extends MessageType<OrderAttachmentRemovedEvent> {
    constructor() {
        super("api.OrderAttachmentRemovedEvent", [
            { 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: () => OrderAttachmentRemovedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "AttachmentRemoved", "api.preAggMethods": "removeAttachment" });
    }
    create(value?: PartialMessage<OrderAttachmentRemovedEvent>): OrderAttachmentRemovedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderAttachmentRemovedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderAttachmentRemovedEvent): OrderAttachmentRemovedEvent {
        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.OrderAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderAttachmentRemovedPayload.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: OrderAttachmentRemovedEvent, 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.OrderAttachmentRemovedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderAttachmentRemovedPayload.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.OrderAttachmentRemovedEvent
 */
export const OrderAttachmentRemovedEvent = new OrderAttachmentRemovedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderAttachmentRemovedRequest$Type extends MessageType<OrderAttachmentRemovedRequest> {
    constructor() {
        super("api.OrderAttachmentRemovedRequest", [
            { 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: () => OrderAttachmentRemovedPayload, 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<OrderAttachmentRemovedRequest>): OrderAttachmentRemovedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderAttachmentRemovedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderAttachmentRemovedRequest): OrderAttachmentRemovedRequest {
        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.OrderAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderAttachmentRemovedPayload.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: OrderAttachmentRemovedRequest, 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.OrderAttachmentRemovedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderAttachmentRemovedPayload.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.OrderAttachmentRemovedRequest
 */
export const OrderAttachmentRemovedRequest = new OrderAttachmentRemovedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderAttachmentRemovedResponse$Type extends MessageType<OrderAttachmentRemovedResponse> {
    constructor() {
        super("api.OrderAttachmentRemovedResponse", [
            { 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<OrderAttachmentRemovedResponse>): OrderAttachmentRemovedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderAttachmentRemovedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderAttachmentRemovedResponse): OrderAttachmentRemovedResponse {
        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: OrderAttachmentRemovedResponse, 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.OrderAttachmentRemovedResponse
 */
export const OrderAttachmentRemovedResponse = new OrderAttachmentRemovedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderClaimAddedPayload$Type extends MessageType<OrderClaimAddedPayload> {
    constructor() {
        super("api.OrderClaimAddedPayload", [
            { no: 1, name: "Claims", kind: "message", jsonName: "Claims", repeat: 1 /*RepeatType.PACKED*/, T: () => ClaimSummary, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Number of claims added per type" }, "api.aggKey": "ClaimTypeID" } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "ClaimAdded" });
    }
    create(value?: PartialMessage<OrderClaimAddedPayload>): OrderClaimAddedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.claims = [];
        if (value !== undefined)
            reflectionMergePartial<OrderClaimAddedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderClaimAddedPayload): OrderClaimAddedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.ClaimSummary Claims = 1 [json_name = "Claims"];*/ 1:
                    message.claims.push(ClaimSummary.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: OrderClaimAddedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.ClaimSummary Claims = 1 [json_name = "Claims"]; */
        for (let i = 0; i < message.claims.length; i++)
            ClaimSummary.internalBinaryWrite(message.claims[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.OrderClaimAddedPayload
 */
export const OrderClaimAddedPayload = new OrderClaimAddedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderClaimAddedEvent$Type extends MessageType<OrderClaimAddedEvent> {
    constructor() {
        super("api.OrderClaimAddedEvent", [
            { 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: () => OrderClaimAddedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "ClaimAdded", "api.preAggMethods": "addClaim" });
    }
    create(value?: PartialMessage<OrderClaimAddedEvent>): OrderClaimAddedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderClaimAddedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderClaimAddedEvent): OrderClaimAddedEvent {
        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.OrderClaimAddedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderClaimAddedPayload.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: OrderClaimAddedEvent, 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.OrderClaimAddedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderClaimAddedPayload.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.OrderClaimAddedEvent
 */
export const OrderClaimAddedEvent = new OrderClaimAddedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderClaimAddedRequest$Type extends MessageType<OrderClaimAddedRequest> {
    constructor() {
        super("api.OrderClaimAddedRequest", [
            { 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: () => OrderClaimAddedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "ClaimAdded" });
    }
    create(value?: PartialMessage<OrderClaimAddedRequest>): OrderClaimAddedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderClaimAddedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderClaimAddedRequest): OrderClaimAddedRequest {
        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.OrderClaimAddedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderClaimAddedPayload.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: OrderClaimAddedRequest, 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.OrderClaimAddedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderClaimAddedPayload.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.OrderClaimAddedRequest
 */
export const OrderClaimAddedRequest = new OrderClaimAddedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderClaimAddedResponse$Type extends MessageType<OrderClaimAddedResponse> {
    constructor() {
        super("api.OrderClaimAddedResponse", [
            { 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": "ClaimAdded" });
    }
    create(value?: PartialMessage<OrderClaimAddedResponse>): OrderClaimAddedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderClaimAddedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderClaimAddedResponse): OrderClaimAddedResponse {
        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: OrderClaimAddedResponse, 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.OrderClaimAddedResponse
 */
export const OrderClaimAddedResponse = new OrderClaimAddedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderDeletedPayload$Type extends MessageType<OrderDeletedPayload> {
    constructor() {
        super("api.OrderDeletedPayload", [], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Event Payload" } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Deleted" });
    }
    create(value?: PartialMessage<OrderDeletedPayload>): OrderDeletedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderDeletedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderDeletedPayload): OrderDeletedPayload {
        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: OrderDeletedPayload, 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.OrderDeletedPayload
 */
export const OrderDeletedPayload = new OrderDeletedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderDeletedEvent$Type extends MessageType<OrderDeletedEvent> {
    constructor() {
        super("api.OrderDeletedEvent", [
            { 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: () => OrderDeletedPayload }
        ], { "api.messageType": "Event", "api.inputEvent": "Deleted" });
    }
    create(value?: PartialMessage<OrderDeletedEvent>): OrderDeletedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderDeletedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderDeletedEvent): OrderDeletedEvent {
        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.OrderDeletedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderDeletedPayload.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: OrderDeletedEvent, 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.OrderDeletedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderDeletedPayload.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.OrderDeletedEvent
 */
export const OrderDeletedEvent = new OrderDeletedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderDeletedRequest$Type extends MessageType<OrderDeletedRequest> {
    constructor() {
        super("api.OrderDeletedRequest", [
            { 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: () => OrderDeletedPayload }
        ], { "api.messageType": "Request", "api.inputEvent": "Deleted" });
    }
    create(value?: PartialMessage<OrderDeletedRequest>): OrderDeletedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderDeletedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderDeletedRequest): OrderDeletedRequest {
        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.OrderDeletedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = OrderDeletedPayload.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: OrderDeletedRequest, 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.OrderDeletedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            OrderDeletedPayload.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.OrderDeletedRequest
 */
export const OrderDeletedRequest = new OrderDeletedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class OrderDeletedResponse$Type extends MessageType<OrderDeletedResponse> {
    constructor() {
        super("api.OrderDeletedResponse", [
            { 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<OrderDeletedResponse>): OrderDeletedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<OrderDeletedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrderDeletedResponse): OrderDeletedResponse {
        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: OrderDeletedResponse, 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.OrderDeletedResponse
 */
export const OrderDeletedResponse = new OrderDeletedResponse$Type();
/**
 * @generated ServiceType for protobuf service api.OrderInputAPI
 */
export const OrderInputAPI = new ServiceType("api.OrderInputAPI", [
    { name: "Created", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "An Order has been created. This is typically called from an ERP. " }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: OrderCreatedRequest, O: OrderCreatedResponse },
    { name: "ExecutionflowDetected", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "An Order is created because an executionflow has been detected. This is called by the Platform. " }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: OrderExecutionflowDetectedRequest, O: OrderExecutionflowDetectedResponse },
    { name: "Cancelled", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "An Order has been cancelled. This is typically called from an ERP. " }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: OrderCancelledRequest, O: OrderCancelledResponse },
    { name: "Anonymised", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "An Order has been anonymised." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: OrderAnonymisedRequest, O: OrderAnonymisedResponse },
    { name: "ShipperAssigned", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "A shipper has been assigned to an Order. This is typically called from an OMS. Obsolete ?" }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: OrderShipperAssignedRequest, O: OrderShipperAssignedResponse },
    { name: "PartiallyCompleted", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "An Order has been partially completed. This is typically called from an ERP. Obsolete ?" }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: OrderPartiallyCompletedRequest, O: OrderPartiallyCompletedResponse },
    { name: "RequestedDeliveryDateDefined", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "A requested delivery date has been defined on an Order. This is typically called from an ERP." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: OrderRequestedDeliveryDateDefinedRequest, O: OrderRequestedDeliveryDateDefinedResponse },
    { name: "ExecutionflowETAUpdated", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "A ETA has been updated on an Executionflow attached to this order. This is internal call." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: OrderExecutionflowETAUpdatedRequest, O: OrderExecutionflowETAUpdatedResponse },
    { name: "Completed", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "An Order has been completed. This is typically called from an ERP." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: OrderCompletedRequest, O: OrderCompletedResponse },
    { name: "ExecutionflowUpdated", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "An executionflow status has been reported to an Order. This is called internally." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: OrderExecutionflowUpdatedRequest, O: OrderExecutionflowUpdatedResponse },
    { name: "MetaDataUpdated", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "Some metadata have been updated on an Order. This is typically called from OMS or ERP." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: OrderMetaDataUpdatedRequest, O: OrderMetaDataUpdatedResponse },
    { name: "CarrierUpdated", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "The carrier and/or carrier service has been updated for the Order. This is typically called from OMS or ERP." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: OrderCarrierUpdatedRequest, O: OrderCarrierUpdatedResponse },
    { name: "AttachmentAdded", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "An attachment is added for the Order." }, "api.rscType": "Project", "api.roles": "Platform.Project-Attachment", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: OrderAttachmentAddedRequest, O: OrderAttachmentAddedResponse },
    { name: "AttachmentRemoved", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "An attachment is removed for the Order." }, "api.rscType": "Project", "api.roles": "Platform.Project-Attachment", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: OrderAttachmentRemovedRequest, O: OrderAttachmentRemovedResponse },
    { name: "ClaimAdded", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "A claim is added for the Order." }, "api.rscType": "Project", "api.roles": "Platform.Project-Claim", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: OrderClaimAddedRequest, O: OrderClaimAddedResponse },
    { name: "Deleted", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Order Inputs"], description: "An Order has been deleted. This is called from Reflex Platform Admin service to share the Organisation Orders." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: OrderDeletedRequest, O: OrderDeletedResponse }
], { "api.serviceType": "Api", "api.k8sService": "api-server" });
