// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "claimAction.proto" (package "api", syntax proto3)
// tslint:disable
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import { WireType } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { EntityID } from "./shared";
import { CommandHeader } from "./shared";
import { MetadataElement } from "./shared";
import { ClaimEntityType } from "./shared";
import { ClaimClosure } from "./shared";
import { ClaimCriticality } from "./shared";
import { Amount } from "./shared";
import { ClaimStatusStruct } from "./collabShared";
// Action Summary
//   - Notify :  Push the claim event to notification
//   - PropagateActor :  Propagate the created claim on actor
//   - PropagateHandlingunit :  Propagate the created claim on handlingunit
//   - PropagateOrder :  Propagate the created claim on order
//   - PropagateExecutionflow :  Propagate the created claim on executionflow
//   - PropagateStockMove :  Propagate the created claim on stock movement
// 

/**
 *
 * Notify : Push the claim event to notification
 *
 * @generated from protobuf message api.ClaimNotifyPayload
 */
export interface ClaimNotifyPayload {
    /**
     * @generated from protobuf field: repeated string Assignees = 1 [json_name = "Assignees"];
     */
    assignees: string[];
    /**
     * @generated from protobuf field: api.ClaimStatusStruct Status = 2 [json_name = "Status"];
     */
    status?: ClaimStatusStruct;
    /**
     * @generated from protobuf field: repeated string RemovedAssignees = 3 [json_name = "RemovedAssignees"];
     */
    removedAssignees: string[];
    /**
     * @generated from protobuf field: api.Amount Amount = 4 [json_name = "Amount"];
     */
    amount?: Amount;
    /**
     * @generated from protobuf field: api.ClaimCriticality Criticality = 5 [json_name = "Criticality"];
     */
    criticality: ClaimCriticality;
    /**
     * @generated from protobuf field: string EndComment = 6 [json_name = "EndComment"];
     */
    endComment: string;
    /**
     * @generated from protobuf field: api.ClaimClosure Closure = 7 [json_name = "Closure"];
     */
    closure?: ClaimClosure;
    /**
     * @generated from protobuf field: repeated string AddedAssignees = 8 [json_name = "AddedAssignees"];
     */
    addedAssignees: string[];
    /**
     * @generated from protobuf field: string Reason = 9 [json_name = "Reason"];
     */
    reason: string;
    /**
     * @generated from protobuf field: api.ClaimEntityType EntityType = 10 [json_name = "EntityType"];
     */
    entityType: ClaimEntityType;
    /**
     * @generated from protobuf field: string EntityID = 11 [json_name = "EntityID"];
     */
    entityID: string;
    /**
     * @generated from protobuf field: string Title = 12 [json_name = "Title"];
     */
    title: string;
    /**
     * @generated from protobuf field: repeated api.MetadataElement MetaData = 13 [json_name = "MetaData"];
     */
    metaData: MetadataElement[];
    /**
     * @generated from protobuf field: string DisplayID = 14 [json_name = "DisplayID"];
     */
    displayID: string;
}
/**
 * @generated from protobuf message api.ClaimNotify
 */
export interface ClaimNotify {
    /**
     * @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
     */
    header?: CommandHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.ClaimNotifyPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ClaimNotifyPayload;
    /**
     * @generated from protobuf field: api.ClaimNotifyPayload EventPayload = 4 [json_name = "EventPayload"];
     */
    eventPayload?: ClaimNotifyPayload;
    /**
     * @generated from protobuf field: api.ClaimNotifyPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
     */
    previousPayload?: ClaimNotifyPayload;
}
/**
 *
 * PropagateActor : Propagate the created claim on actor
 *
 * @generated from protobuf message api.ClaimPropagateActorPayload
 */
export interface ClaimPropagateActorPayload {
    /**
     * Identifier of the Actor
     *
     * @generated from protobuf field: string EntityID = 1 [json_name = "EntityID"];
     */
    entityID: string;
    /**
     * Identifier of the claim type
     *
     * @generated from protobuf field: string ClaimTypeID = 2 [json_name = "ClaimTypeID"];
     */
    claimTypeID: string;
    /**
     * @generated from protobuf field: string Reason = 3 [json_name = "Reason"];
     */
    reason: string;
    /**
     * @generated from protobuf field: api.ClaimEntityType EntityType = 4 [json_name = "EntityType"];
     */
    entityType: ClaimEntityType;
}
/**
 * @generated from protobuf message api.ClaimPropagateActor
 */
export interface ClaimPropagateActor {
    /**
     * @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
     */
    header?: CommandHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.ClaimPropagateActorPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ClaimPropagateActorPayload;
    /**
     * @generated from protobuf field: api.ClaimPropagateActorPayload EventPayload = 4 [json_name = "EventPayload"];
     */
    eventPayload?: ClaimPropagateActorPayload;
    /**
     * @generated from protobuf field: api.ClaimPropagateActorPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
     */
    previousPayload?: ClaimPropagateActorPayload;
}
/**
 *
 * PropagateHandlingunit : Propagate the created claim on actor
 *
 * @generated from protobuf message api.ClaimPropagateHandlingunitPayload
 */
export interface ClaimPropagateHandlingunitPayload {
    /**
     * Identifier of the Handlingunit
     *
     * @generated from protobuf field: string EntityID = 1 [json_name = "EntityID"];
     */
    entityID: string;
    /**
     * Identifier of the claim type
     *
     * @generated from protobuf field: string ClaimTypeID = 2 [json_name = "ClaimTypeID"];
     */
    claimTypeID: string;
    /**
     * @generated from protobuf field: string Reason = 3 [json_name = "Reason"];
     */
    reason: string;
    /**
     * @generated from protobuf field: api.ClaimEntityType EntityType = 4 [json_name = "EntityType"];
     */
    entityType: ClaimEntityType;
}
/**
 * @generated from protobuf message api.ClaimPropagateHandlingunit
 */
export interface ClaimPropagateHandlingunit {
    /**
     * @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
     */
    header?: CommandHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.ClaimPropagateHandlingunitPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ClaimPropagateHandlingunitPayload;
    /**
     * @generated from protobuf field: api.ClaimPropagateHandlingunitPayload EventPayload = 4 [json_name = "EventPayload"];
     */
    eventPayload?: ClaimPropagateHandlingunitPayload;
    /**
     * @generated from protobuf field: api.ClaimPropagateHandlingunitPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
     */
    previousPayload?: ClaimPropagateHandlingunitPayload;
}
/**
 *
 * PropagateOrder : Propagate the created claim on actor
 *
 * @generated from protobuf message api.ClaimPropagateOrderPayload
 */
export interface ClaimPropagateOrderPayload {
    /**
     * Identifier of the Order
     *
     * @generated from protobuf field: string EntityID = 1 [json_name = "EntityID"];
     */
    entityID: string;
    /**
     * Identifier of the claim type
     *
     * @generated from protobuf field: string ClaimTypeID = 2 [json_name = "ClaimTypeID"];
     */
    claimTypeID: string;
    /**
     * @generated from protobuf field: string Reason = 3 [json_name = "Reason"];
     */
    reason: string;
    /**
     * @generated from protobuf field: api.ClaimEntityType EntityType = 4 [json_name = "EntityType"];
     */
    entityType: ClaimEntityType;
}
/**
 * @generated from protobuf message api.ClaimPropagateOrder
 */
export interface ClaimPropagateOrder {
    /**
     * @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
     */
    header?: CommandHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.ClaimPropagateOrderPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ClaimPropagateOrderPayload;
    /**
     * @generated from protobuf field: api.ClaimPropagateOrderPayload EventPayload = 4 [json_name = "EventPayload"];
     */
    eventPayload?: ClaimPropagateOrderPayload;
    /**
     * @generated from protobuf field: api.ClaimPropagateOrderPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
     */
    previousPayload?: ClaimPropagateOrderPayload;
}
/**
 *
 * PropagateExecutionflow : Propagate the created claim on Executionflow
 *
 * @generated from protobuf message api.ClaimPropagateExecutionflowPayload
 */
export interface ClaimPropagateExecutionflowPayload {
    /**
     * Identifier of the Executionflow
     *
     * @generated from protobuf field: string EntityID = 1 [json_name = "EntityID"];
     */
    entityID: string;
    /**
     * Identifier of the claim type
     *
     * @generated from protobuf field: string ClaimTypeID = 2 [json_name = "ClaimTypeID"];
     */
    claimTypeID: string;
    /**
     * @generated from protobuf field: string Reason = 3 [json_name = "Reason"];
     */
    reason: string;
    /**
     * @generated from protobuf field: api.ClaimEntityType EntityType = 4 [json_name = "EntityType"];
     */
    entityType: ClaimEntityType;
}
/**
 * @generated from protobuf message api.ClaimPropagateExecutionflow
 */
export interface ClaimPropagateExecutionflow {
    /**
     * @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
     */
    header?: CommandHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.ClaimPropagateExecutionflowPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ClaimPropagateExecutionflowPayload;
    /**
     * @generated from protobuf field: api.ClaimPropagateExecutionflowPayload EventPayload = 4 [json_name = "EventPayload"];
     */
    eventPayload?: ClaimPropagateExecutionflowPayload;
    /**
     * @generated from protobuf field: api.ClaimPropagateExecutionflowPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
     */
    previousPayload?: ClaimPropagateExecutionflowPayload;
}
/**
 *
 * PropagateMovement : Propagate the created claim on actor
 *
 * @generated from protobuf message api.ClaimPropagateMovementPayload
 */
export interface ClaimPropagateMovementPayload {
    /**
     * Identifier of the StockMove
     *
     * @generated from protobuf field: string EntityID = 1 [json_name = "EntityID"];
     */
    entityID: string;
    /**
     * Identifier of the claim type
     *
     * @generated from protobuf field: string ClaimTypeID = 2 [json_name = "ClaimTypeID"];
     */
    claimTypeID: string;
    /**
     * @generated from protobuf field: string Reason = 3 [json_name = "Reason"];
     */
    reason: string;
    /**
     * @generated from protobuf field: api.ClaimEntityType EntityType = 4 [json_name = "EntityType"];
     */
    entityType: ClaimEntityType;
}
/**
 * @generated from protobuf message api.ClaimPropagateMovement
 */
export interface ClaimPropagateMovement {
    /**
     * @generated from protobuf field: api.CommandHeader Header = 1 [json_name = "Header"];
     */
    header?: CommandHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
    /**
     * @generated from protobuf field: api.ClaimPropagateMovementPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ClaimPropagateMovementPayload;
    /**
     * @generated from protobuf field: api.ClaimPropagateMovementPayload EventPayload = 4 [json_name = "EventPayload"];
     */
    eventPayload?: ClaimPropagateMovementPayload;
    /**
     * @generated from protobuf field: api.ClaimPropagateMovementPayload PreviousPayload = 5 [json_name = "PreviousPayload"];
     */
    previousPayload?: ClaimPropagateMovementPayload;
}
// @generated message type with reflection information, may provide speed optimized methods
class ClaimNotifyPayload$Type extends MessageType<ClaimNotifyPayload> {
    constructor() {
        super("api.ClaimNotifyPayload", [
            { no: 1, name: "Assignees", kind: "scalar", jsonName: "Assignees", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "Status", kind: "message", jsonName: "Status", T: () => ClaimStatusStruct },
            { no: 3, name: "RemovedAssignees", kind: "scalar", jsonName: "RemovedAssignees", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "Amount", kind: "message", jsonName: "Amount", T: () => Amount },
            { no: 5, name: "Criticality", kind: "enum", jsonName: "Criticality", T: () => ["api.ClaimCriticality", ClaimCriticality, "CLAIM_CRITICALITY_"] },
            { no: 6, name: "EndComment", kind: "scalar", jsonName: "EndComment", T: 9 /*ScalarType.STRING*/ },
            { no: 7, name: "Closure", kind: "message", jsonName: "Closure", T: () => ClaimClosure },
            { no: 8, name: "AddedAssignees", kind: "scalar", jsonName: "AddedAssignees", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
            { no: 9, name: "Reason", kind: "scalar", jsonName: "Reason", T: 9 /*ScalarType.STRING*/ },
            { no: 10, name: "EntityType", kind: "enum", jsonName: "EntityType", T: () => ["api.ClaimEntityType", ClaimEntityType, "CLAIM_ENTITY_TYPE_"] },
            { no: 11, name: "EntityID", kind: "scalar", jsonName: "EntityID", T: 9 /*ScalarType.STRING*/ },
            { no: 12, name: "Title", kind: "scalar", jsonName: "Title", T: 9 /*ScalarType.STRING*/ },
            { no: 13, name: "MetaData", kind: "message", jsonName: "MetaData", repeat: 1 /*RepeatType.PACKED*/, T: () => MetadataElement },
            { no: 14, name: "DisplayID", kind: "scalar", jsonName: "DisplayID", T: 9 /*ScalarType.STRING*/ }
        ], { "api.messageType": "Command", "api.payload": true, "api.action": "Notify" });
    }
    create(value?: PartialMessage<ClaimNotifyPayload>): ClaimNotifyPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.assignees = [];
        message.removedAssignees = [];
        message.criticality = 0;
        message.endComment = "";
        message.addedAssignees = [];
        message.reason = "";
        message.entityType = 0;
        message.entityID = "";
        message.title = "";
        message.metaData = [];
        message.displayID = "";
        if (value !== undefined)
            reflectionMergePartial<ClaimNotifyPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimNotifyPayload): ClaimNotifyPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated string Assignees = 1 [json_name = "Assignees"];*/ 1:
                    message.assignees.push(reader.string());
                    break;
                case /* api.ClaimStatusStruct Status = 2 [json_name = "Status"];*/ 2:
                    message.status = ClaimStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.status);
                    break;
                case /* repeated string RemovedAssignees = 3 [json_name = "RemovedAssignees"];*/ 3:
                    message.removedAssignees.push(reader.string());
                    break;
                case /* api.Amount Amount = 4 [json_name = "Amount"];*/ 4:
                    message.amount = Amount.internalBinaryRead(reader, reader.uint32(), options, message.amount);
                    break;
                case /* api.ClaimCriticality Criticality = 5 [json_name = "Criticality"];*/ 5:
                    message.criticality = reader.int32();
                    break;
                case /* string EndComment = 6 [json_name = "EndComment"];*/ 6:
                    message.endComment = reader.string();
                    break;
                case /* api.ClaimClosure Closure = 7 [json_name = "Closure"];*/ 7:
                    message.closure = ClaimClosure.internalBinaryRead(reader, reader.uint32(), options, message.closure);
                    break;
                case /* repeated string AddedAssignees = 8 [json_name = "AddedAssignees"];*/ 8:
                    message.addedAssignees.push(reader.string());
                    break;
                case /* string Reason = 9 [json_name = "Reason"];*/ 9:
                    message.reason = reader.string();
                    break;
                case /* api.ClaimEntityType EntityType = 10 [json_name = "EntityType"];*/ 10:
                    message.entityType = reader.int32();
                    break;
                case /* string EntityID = 11 [json_name = "EntityID"];*/ 11:
                    message.entityID = reader.string();
                    break;
                case /* string Title = 12 [json_name = "Title"];*/ 12:
                    message.title = reader.string();
                    break;
                case /* repeated api.MetadataElement MetaData = 13 [json_name = "MetaData"];*/ 13:
                    message.metaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* string DisplayID = 14 [json_name = "DisplayID"];*/ 14:
                    message.displayID = 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: ClaimNotifyPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated string Assignees = 1 [json_name = "Assignees"]; */
        for (let i = 0; i < message.assignees.length; i++)
            writer.tag(1, WireType.LengthDelimited).string(message.assignees[i]);
        /* api.ClaimStatusStruct Status = 2 [json_name = "Status"]; */
        if (message.status)
            ClaimStatusStruct.internalBinaryWrite(message.status, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* repeated string RemovedAssignees = 3 [json_name = "RemovedAssignees"]; */
        for (let i = 0; i < message.removedAssignees.length; i++)
            writer.tag(3, WireType.LengthDelimited).string(message.removedAssignees[i]);
        /* api.Amount Amount = 4 [json_name = "Amount"]; */
        if (message.amount)
            Amount.internalBinaryWrite(message.amount, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimCriticality Criticality = 5 [json_name = "Criticality"]; */
        if (message.criticality !== 0)
            writer.tag(5, WireType.Varint).int32(message.criticality);
        /* string EndComment = 6 [json_name = "EndComment"]; */
        if (message.endComment !== "")
            writer.tag(6, WireType.LengthDelimited).string(message.endComment);
        /* api.ClaimClosure Closure = 7 [json_name = "Closure"]; */
        if (message.closure)
            ClaimClosure.internalBinaryWrite(message.closure, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
        /* repeated string AddedAssignees = 8 [json_name = "AddedAssignees"]; */
        for (let i = 0; i < message.addedAssignees.length; i++)
            writer.tag(8, WireType.LengthDelimited).string(message.addedAssignees[i]);
        /* string Reason = 9 [json_name = "Reason"]; */
        if (message.reason !== "")
            writer.tag(9, WireType.LengthDelimited).string(message.reason);
        /* api.ClaimEntityType EntityType = 10 [json_name = "EntityType"]; */
        if (message.entityType !== 0)
            writer.tag(10, WireType.Varint).int32(message.entityType);
        /* string EntityID = 11 [json_name = "EntityID"]; */
        if (message.entityID !== "")
            writer.tag(11, WireType.LengthDelimited).string(message.entityID);
        /* string Title = 12 [json_name = "Title"]; */
        if (message.title !== "")
            writer.tag(12, WireType.LengthDelimited).string(message.title);
        /* repeated api.MetadataElement MetaData = 13 [json_name = "MetaData"]; */
        for (let i = 0; i < message.metaData.length; i++)
            MetadataElement.internalBinaryWrite(message.metaData[i], writer.tag(13, WireType.LengthDelimited).fork(), options).join();
        /* string DisplayID = 14 [json_name = "DisplayID"]; */
        if (message.displayID !== "")
            writer.tag(14, WireType.LengthDelimited).string(message.displayID);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ClaimNotifyPayload
 */
export const ClaimNotifyPayload = new ClaimNotifyPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimNotify$Type extends MessageType<ClaimNotify> {
    constructor() {
        super("api.ClaimNotify", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => ClaimNotifyPayload },
            { no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => ClaimNotifyPayload },
            { no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => ClaimNotifyPayload }
        ], { "api.messageType": "Command", "api.action": "Notify", "api.resultingEvent": "collab.notif.Created" });
    }
    create(value?: PartialMessage<ClaimNotify>): ClaimNotify {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ClaimNotify>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimNotify): ClaimNotify {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.CommandHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
                    message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
                    break;
                case /* api.ClaimNotifyPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ClaimNotifyPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
                    break;
                case /* api.ClaimNotifyPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
                    message.eventPayload = ClaimNotifyPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
                    break;
                case /* api.ClaimNotifyPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
                    message.previousPayload = ClaimNotifyPayload.internalBinaryRead(reader, reader.uint32(), options, message.previousPayload);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: ClaimNotify, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.CommandHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.EntityID ID = 2 [json_name = "ID"]; */
        if (message.iD)
            EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimNotifyPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ClaimNotifyPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimNotifyPayload EventPayload = 4 [json_name = "EventPayload"]; */
        if (message.eventPayload)
            ClaimNotifyPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimNotifyPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
        if (message.previousPayload)
            ClaimNotifyPayload.internalBinaryWrite(message.previousPayload, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ClaimNotify
 */
export const ClaimNotify = new ClaimNotify$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimPropagateActorPayload$Type extends MessageType<ClaimPropagateActorPayload> {
    constructor() {
        super("api.ClaimPropagateActorPayload", [
            { no: 1, name: "EntityID", kind: "scalar", jsonName: "EntityID", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "ClaimTypeID", kind: "scalar", jsonName: "ClaimTypeID", T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "Reason", kind: "scalar", jsonName: "Reason", T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "EntityType", kind: "enum", jsonName: "EntityType", T: () => ["api.ClaimEntityType", ClaimEntityType, "CLAIM_ENTITY_TYPE_"] }
        ], { "api.messageType": "Command", "api.payload": true, "api.action": "PropagateActor" });
    }
    create(value?: PartialMessage<ClaimPropagateActorPayload>): ClaimPropagateActorPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.entityID = "";
        message.claimTypeID = "";
        message.reason = "";
        message.entityType = 0;
        if (value !== undefined)
            reflectionMergePartial<ClaimPropagateActorPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimPropagateActorPayload): ClaimPropagateActorPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string EntityID = 1 [json_name = "EntityID"];*/ 1:
                    message.entityID = reader.string();
                    break;
                case /* string ClaimTypeID = 2 [json_name = "ClaimTypeID"];*/ 2:
                    message.claimTypeID = reader.string();
                    break;
                case /* string Reason = 3 [json_name = "Reason"];*/ 3:
                    message.reason = reader.string();
                    break;
                case /* api.ClaimEntityType EntityType = 4 [json_name = "EntityType"];*/ 4:
                    message.entityType = reader.int32();
                    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: ClaimPropagateActorPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string EntityID = 1 [json_name = "EntityID"]; */
        if (message.entityID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.entityID);
        /* string ClaimTypeID = 2 [json_name = "ClaimTypeID"]; */
        if (message.claimTypeID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.claimTypeID);
        /* string Reason = 3 [json_name = "Reason"]; */
        if (message.reason !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.reason);
        /* api.ClaimEntityType EntityType = 4 [json_name = "EntityType"]; */
        if (message.entityType !== 0)
            writer.tag(4, WireType.Varint).int32(message.entityType);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ClaimPropagateActorPayload
 */
export const ClaimPropagateActorPayload = new ClaimPropagateActorPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimPropagateActor$Type extends MessageType<ClaimPropagateActor> {
    constructor() {
        super("api.ClaimPropagateActor", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => ClaimPropagateActorPayload },
            { no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => ClaimPropagateActorPayload },
            { no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => ClaimPropagateActorPayload }
        ], { "api.messageType": "Command", "api.action": "PropagateActor", "api.resultingEvent": "trade.actor.ClaimAdded", "api.triggerEventFilters": "Created" });
    }
    create(value?: PartialMessage<ClaimPropagateActor>): ClaimPropagateActor {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ClaimPropagateActor>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimPropagateActor): ClaimPropagateActor {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.CommandHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
                    message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
                    break;
                case /* api.ClaimPropagateActorPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ClaimPropagateActorPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
                    break;
                case /* api.ClaimPropagateActorPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
                    message.eventPayload = ClaimPropagateActorPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
                    break;
                case /* api.ClaimPropagateActorPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
                    message.previousPayload = ClaimPropagateActorPayload.internalBinaryRead(reader, reader.uint32(), options, message.previousPayload);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: ClaimPropagateActor, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.CommandHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.EntityID ID = 2 [json_name = "ID"]; */
        if (message.iD)
            EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimPropagateActorPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ClaimPropagateActorPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimPropagateActorPayload EventPayload = 4 [json_name = "EventPayload"]; */
        if (message.eventPayload)
            ClaimPropagateActorPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimPropagateActorPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
        if (message.previousPayload)
            ClaimPropagateActorPayload.internalBinaryWrite(message.previousPayload, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ClaimPropagateActor
 */
export const ClaimPropagateActor = new ClaimPropagateActor$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimPropagateHandlingunitPayload$Type extends MessageType<ClaimPropagateHandlingunitPayload> {
    constructor() {
        super("api.ClaimPropagateHandlingunitPayload", [
            { no: 1, name: "EntityID", kind: "scalar", jsonName: "EntityID", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "ClaimTypeID", kind: "scalar", jsonName: "ClaimTypeID", T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "Reason", kind: "scalar", jsonName: "Reason", T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "EntityType", kind: "enum", jsonName: "EntityType", T: () => ["api.ClaimEntityType", ClaimEntityType, "CLAIM_ENTITY_TYPE_"] }
        ], { "api.messageType": "Command", "api.payload": true, "api.action": "PropagateHandlingunit" });
    }
    create(value?: PartialMessage<ClaimPropagateHandlingunitPayload>): ClaimPropagateHandlingunitPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.entityID = "";
        message.claimTypeID = "";
        message.reason = "";
        message.entityType = 0;
        if (value !== undefined)
            reflectionMergePartial<ClaimPropagateHandlingunitPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimPropagateHandlingunitPayload): ClaimPropagateHandlingunitPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string EntityID = 1 [json_name = "EntityID"];*/ 1:
                    message.entityID = reader.string();
                    break;
                case /* string ClaimTypeID = 2 [json_name = "ClaimTypeID"];*/ 2:
                    message.claimTypeID = reader.string();
                    break;
                case /* string Reason = 3 [json_name = "Reason"];*/ 3:
                    message.reason = reader.string();
                    break;
                case /* api.ClaimEntityType EntityType = 4 [json_name = "EntityType"];*/ 4:
                    message.entityType = reader.int32();
                    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: ClaimPropagateHandlingunitPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string EntityID = 1 [json_name = "EntityID"]; */
        if (message.entityID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.entityID);
        /* string ClaimTypeID = 2 [json_name = "ClaimTypeID"]; */
        if (message.claimTypeID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.claimTypeID);
        /* string Reason = 3 [json_name = "Reason"]; */
        if (message.reason !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.reason);
        /* api.ClaimEntityType EntityType = 4 [json_name = "EntityType"]; */
        if (message.entityType !== 0)
            writer.tag(4, WireType.Varint).int32(message.entityType);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ClaimPropagateHandlingunitPayload
 */
export const ClaimPropagateHandlingunitPayload = new ClaimPropagateHandlingunitPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimPropagateHandlingunit$Type extends MessageType<ClaimPropagateHandlingunit> {
    constructor() {
        super("api.ClaimPropagateHandlingunit", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => ClaimPropagateHandlingunitPayload },
            { no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => ClaimPropagateHandlingunitPayload },
            { no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => ClaimPropagateHandlingunitPayload }
        ], { "api.messageType": "Command", "api.action": "PropagateHandlingunit", "api.resultingEvent": "trade.handlingunit.ClaimAdded", "api.triggerEventFilters": "Created" });
    }
    create(value?: PartialMessage<ClaimPropagateHandlingunit>): ClaimPropagateHandlingunit {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ClaimPropagateHandlingunit>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimPropagateHandlingunit): ClaimPropagateHandlingunit {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.CommandHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
                    message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
                    break;
                case /* api.ClaimPropagateHandlingunitPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ClaimPropagateHandlingunitPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
                    break;
                case /* api.ClaimPropagateHandlingunitPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
                    message.eventPayload = ClaimPropagateHandlingunitPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
                    break;
                case /* api.ClaimPropagateHandlingunitPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
                    message.previousPayload = ClaimPropagateHandlingunitPayload.internalBinaryRead(reader, reader.uint32(), options, message.previousPayload);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: ClaimPropagateHandlingunit, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.CommandHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.EntityID ID = 2 [json_name = "ID"]; */
        if (message.iD)
            EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimPropagateHandlingunitPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ClaimPropagateHandlingunitPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimPropagateHandlingunitPayload EventPayload = 4 [json_name = "EventPayload"]; */
        if (message.eventPayload)
            ClaimPropagateHandlingunitPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimPropagateHandlingunitPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
        if (message.previousPayload)
            ClaimPropagateHandlingunitPayload.internalBinaryWrite(message.previousPayload, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ClaimPropagateHandlingunit
 */
export const ClaimPropagateHandlingunit = new ClaimPropagateHandlingunit$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimPropagateOrderPayload$Type extends MessageType<ClaimPropagateOrderPayload> {
    constructor() {
        super("api.ClaimPropagateOrderPayload", [
            { no: 1, name: "EntityID", kind: "scalar", jsonName: "EntityID", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "ClaimTypeID", kind: "scalar", jsonName: "ClaimTypeID", T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "Reason", kind: "scalar", jsonName: "Reason", T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "EntityType", kind: "enum", jsonName: "EntityType", T: () => ["api.ClaimEntityType", ClaimEntityType, "CLAIM_ENTITY_TYPE_"] }
        ], { "api.messageType": "Command", "api.payload": true, "api.action": "PropagateOrder" });
    }
    create(value?: PartialMessage<ClaimPropagateOrderPayload>): ClaimPropagateOrderPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.entityID = "";
        message.claimTypeID = "";
        message.reason = "";
        message.entityType = 0;
        if (value !== undefined)
            reflectionMergePartial<ClaimPropagateOrderPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimPropagateOrderPayload): ClaimPropagateOrderPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string EntityID = 1 [json_name = "EntityID"];*/ 1:
                    message.entityID = reader.string();
                    break;
                case /* string ClaimTypeID = 2 [json_name = "ClaimTypeID"];*/ 2:
                    message.claimTypeID = reader.string();
                    break;
                case /* string Reason = 3 [json_name = "Reason"];*/ 3:
                    message.reason = reader.string();
                    break;
                case /* api.ClaimEntityType EntityType = 4 [json_name = "EntityType"];*/ 4:
                    message.entityType = reader.int32();
                    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: ClaimPropagateOrderPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string EntityID = 1 [json_name = "EntityID"]; */
        if (message.entityID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.entityID);
        /* string ClaimTypeID = 2 [json_name = "ClaimTypeID"]; */
        if (message.claimTypeID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.claimTypeID);
        /* string Reason = 3 [json_name = "Reason"]; */
        if (message.reason !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.reason);
        /* api.ClaimEntityType EntityType = 4 [json_name = "EntityType"]; */
        if (message.entityType !== 0)
            writer.tag(4, WireType.Varint).int32(message.entityType);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ClaimPropagateOrderPayload
 */
export const ClaimPropagateOrderPayload = new ClaimPropagateOrderPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimPropagateOrder$Type extends MessageType<ClaimPropagateOrder> {
    constructor() {
        super("api.ClaimPropagateOrder", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => ClaimPropagateOrderPayload },
            { no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => ClaimPropagateOrderPayload },
            { no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => ClaimPropagateOrderPayload }
        ], { "api.messageType": "Command", "api.action": "PropagateOrder", "api.resultingEvent": "trade.order.ClaimAdded", "api.triggerEventFilters": "Created" });
    }
    create(value?: PartialMessage<ClaimPropagateOrder>): ClaimPropagateOrder {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ClaimPropagateOrder>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimPropagateOrder): ClaimPropagateOrder {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.CommandHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
                    message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
                    break;
                case /* api.ClaimPropagateOrderPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ClaimPropagateOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
                    break;
                case /* api.ClaimPropagateOrderPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
                    message.eventPayload = ClaimPropagateOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
                    break;
                case /* api.ClaimPropagateOrderPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
                    message.previousPayload = ClaimPropagateOrderPayload.internalBinaryRead(reader, reader.uint32(), options, message.previousPayload);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: ClaimPropagateOrder, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.CommandHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.EntityID ID = 2 [json_name = "ID"]; */
        if (message.iD)
            EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimPropagateOrderPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ClaimPropagateOrderPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimPropagateOrderPayload EventPayload = 4 [json_name = "EventPayload"]; */
        if (message.eventPayload)
            ClaimPropagateOrderPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimPropagateOrderPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
        if (message.previousPayload)
            ClaimPropagateOrderPayload.internalBinaryWrite(message.previousPayload, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ClaimPropagateOrder
 */
export const ClaimPropagateOrder = new ClaimPropagateOrder$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimPropagateExecutionflowPayload$Type extends MessageType<ClaimPropagateExecutionflowPayload> {
    constructor() {
        super("api.ClaimPropagateExecutionflowPayload", [
            { no: 1, name: "EntityID", kind: "scalar", jsonName: "EntityID", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "ClaimTypeID", kind: "scalar", jsonName: "ClaimTypeID", T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "Reason", kind: "scalar", jsonName: "Reason", T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "EntityType", kind: "enum", jsonName: "EntityType", T: () => ["api.ClaimEntityType", ClaimEntityType, "CLAIM_ENTITY_TYPE_"] }
        ], { "api.messageType": "Command", "api.payload": true, "api.action": "PropagateExecutionflow" });
    }
    create(value?: PartialMessage<ClaimPropagateExecutionflowPayload>): ClaimPropagateExecutionflowPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.entityID = "";
        message.claimTypeID = "";
        message.reason = "";
        message.entityType = 0;
        if (value !== undefined)
            reflectionMergePartial<ClaimPropagateExecutionflowPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimPropagateExecutionflowPayload): ClaimPropagateExecutionflowPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string EntityID = 1 [json_name = "EntityID"];*/ 1:
                    message.entityID = reader.string();
                    break;
                case /* string ClaimTypeID = 2 [json_name = "ClaimTypeID"];*/ 2:
                    message.claimTypeID = reader.string();
                    break;
                case /* string Reason = 3 [json_name = "Reason"];*/ 3:
                    message.reason = reader.string();
                    break;
                case /* api.ClaimEntityType EntityType = 4 [json_name = "EntityType"];*/ 4:
                    message.entityType = reader.int32();
                    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: ClaimPropagateExecutionflowPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string EntityID = 1 [json_name = "EntityID"]; */
        if (message.entityID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.entityID);
        /* string ClaimTypeID = 2 [json_name = "ClaimTypeID"]; */
        if (message.claimTypeID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.claimTypeID);
        /* string Reason = 3 [json_name = "Reason"]; */
        if (message.reason !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.reason);
        /* api.ClaimEntityType EntityType = 4 [json_name = "EntityType"]; */
        if (message.entityType !== 0)
            writer.tag(4, WireType.Varint).int32(message.entityType);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ClaimPropagateExecutionflowPayload
 */
export const ClaimPropagateExecutionflowPayload = new ClaimPropagateExecutionflowPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimPropagateExecutionflow$Type extends MessageType<ClaimPropagateExecutionflow> {
    constructor() {
        super("api.ClaimPropagateExecutionflow", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => ClaimPropagateExecutionflowPayload },
            { no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => ClaimPropagateExecutionflowPayload },
            { no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => ClaimPropagateExecutionflowPayload }
        ], { "api.messageType": "Command", "api.action": "PropagateExecutionflow", "api.resultingEvent": "trade.executionflow.ClaimAdded", "api.triggerEventFilters": "Created" });
    }
    create(value?: PartialMessage<ClaimPropagateExecutionflow>): ClaimPropagateExecutionflow {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ClaimPropagateExecutionflow>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimPropagateExecutionflow): ClaimPropagateExecutionflow {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.CommandHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
                    message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
                    break;
                case /* api.ClaimPropagateExecutionflowPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ClaimPropagateExecutionflowPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
                    break;
                case /* api.ClaimPropagateExecutionflowPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
                    message.eventPayload = ClaimPropagateExecutionflowPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
                    break;
                case /* api.ClaimPropagateExecutionflowPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
                    message.previousPayload = ClaimPropagateExecutionflowPayload.internalBinaryRead(reader, reader.uint32(), options, message.previousPayload);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: ClaimPropagateExecutionflow, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.CommandHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.EntityID ID = 2 [json_name = "ID"]; */
        if (message.iD)
            EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimPropagateExecutionflowPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ClaimPropagateExecutionflowPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimPropagateExecutionflowPayload EventPayload = 4 [json_name = "EventPayload"]; */
        if (message.eventPayload)
            ClaimPropagateExecutionflowPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimPropagateExecutionflowPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
        if (message.previousPayload)
            ClaimPropagateExecutionflowPayload.internalBinaryWrite(message.previousPayload, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ClaimPropagateExecutionflow
 */
export const ClaimPropagateExecutionflow = new ClaimPropagateExecutionflow$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimPropagateMovementPayload$Type extends MessageType<ClaimPropagateMovementPayload> {
    constructor() {
        super("api.ClaimPropagateMovementPayload", [
            { no: 1, name: "EntityID", kind: "scalar", jsonName: "EntityID", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "ClaimTypeID", kind: "scalar", jsonName: "ClaimTypeID", T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "Reason", kind: "scalar", jsonName: "Reason", T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "EntityType", kind: "enum", jsonName: "EntityType", T: () => ["api.ClaimEntityType", ClaimEntityType, "CLAIM_ENTITY_TYPE_"] }
        ], { "api.messageType": "Command", "api.payload": true, "api.action": "PropagateMovement" });
    }
    create(value?: PartialMessage<ClaimPropagateMovementPayload>): ClaimPropagateMovementPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.entityID = "";
        message.claimTypeID = "";
        message.reason = "";
        message.entityType = 0;
        if (value !== undefined)
            reflectionMergePartial<ClaimPropagateMovementPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimPropagateMovementPayload): ClaimPropagateMovementPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string EntityID = 1 [json_name = "EntityID"];*/ 1:
                    message.entityID = reader.string();
                    break;
                case /* string ClaimTypeID = 2 [json_name = "ClaimTypeID"];*/ 2:
                    message.claimTypeID = reader.string();
                    break;
                case /* string Reason = 3 [json_name = "Reason"];*/ 3:
                    message.reason = reader.string();
                    break;
                case /* api.ClaimEntityType EntityType = 4 [json_name = "EntityType"];*/ 4:
                    message.entityType = reader.int32();
                    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: ClaimPropagateMovementPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string EntityID = 1 [json_name = "EntityID"]; */
        if (message.entityID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.entityID);
        /* string ClaimTypeID = 2 [json_name = "ClaimTypeID"]; */
        if (message.claimTypeID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.claimTypeID);
        /* string Reason = 3 [json_name = "Reason"]; */
        if (message.reason !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.reason);
        /* api.ClaimEntityType EntityType = 4 [json_name = "EntityType"]; */
        if (message.entityType !== 0)
            writer.tag(4, WireType.Varint).int32(message.entityType);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ClaimPropagateMovementPayload
 */
export const ClaimPropagateMovementPayload = new ClaimPropagateMovementPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimPropagateMovement$Type extends MessageType<ClaimPropagateMovement> {
    constructor() {
        super("api.ClaimPropagateMovement", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => CommandHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => ClaimPropagateMovementPayload },
            { no: 4, name: "EventPayload", kind: "message", jsonName: "EventPayload", T: () => ClaimPropagateMovementPayload },
            { no: 5, name: "PreviousPayload", kind: "message", jsonName: "PreviousPayload", T: () => ClaimPropagateMovementPayload }
        ], { "api.messageType": "Command", "api.action": "PropagateMovement", "api.resultingEvent": "trade.movement.ClaimAdded", "api.triggerEventFilters": "Created" });
    }
    create(value?: PartialMessage<ClaimPropagateMovement>): ClaimPropagateMovement {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ClaimPropagateMovement>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimPropagateMovement): ClaimPropagateMovement {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.CommandHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
                    message.iD = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
                    break;
                case /* api.ClaimPropagateMovementPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ClaimPropagateMovementPayload.internalBinaryRead(reader, reader.uint32(), options, message.payload);
                    break;
                case /* api.ClaimPropagateMovementPayload EventPayload = 4 [json_name = "EventPayload"];*/ 4:
                    message.eventPayload = ClaimPropagateMovementPayload.internalBinaryRead(reader, reader.uint32(), options, message.eventPayload);
                    break;
                case /* api.ClaimPropagateMovementPayload PreviousPayload = 5 [json_name = "PreviousPayload"];*/ 5:
                    message.previousPayload = ClaimPropagateMovementPayload.internalBinaryRead(reader, reader.uint32(), options, message.previousPayload);
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: ClaimPropagateMovement, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.CommandHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            CommandHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.EntityID ID = 2 [json_name = "ID"]; */
        if (message.iD)
            EntityID.internalBinaryWrite(message.iD, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimPropagateMovementPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ClaimPropagateMovementPayload.internalBinaryWrite(message.payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimPropagateMovementPayload EventPayload = 4 [json_name = "EventPayload"]; */
        if (message.eventPayload)
            ClaimPropagateMovementPayload.internalBinaryWrite(message.eventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.ClaimPropagateMovementPayload PreviousPayload = 5 [json_name = "PreviousPayload"]; */
        if (message.previousPayload)
            ClaimPropagateMovementPayload.internalBinaryWrite(message.previousPayload, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ClaimPropagateMovement
 */
export const ClaimPropagateMovement = new ClaimPropagateMovement$Type();
