// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "movementInput.proto" (package "api", syntax proto3)
// tslint:disable
import { ServiceType } from "@protobuf-ts/runtime-rpc";
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import { WireType } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { AttachmentSummary } from "./shared";
import { ClaimSummary } from "./shared";
import { QuantityInLV } from "./warehousingShared";
import { ResponseHeader } from "./shared";
import { NoID } from "./shared";
import { RequestProjectHeader } from "./shared";
import { EntityID } from "./shared";
import { EventHeader } from "./shared";
import { StockMovement } from "./warehousingShared";
import { ActorPayload } from "./actor";
import { EnrichedGoods } from "./warehousingShared";
/**
 *
 * create the stock movement on the goods with the provided goods quantity.
 * This event is received from the WMS .
 *
 * This event is used when the Stock is physically moved from/into the warehouse to De/Increment the physical Stock counter of this goods.
 *
 * The ID part of the request is removed, because the Movement ID.RefID is built internally
 * A specific algorithm will be implemented on api-server and all actions which result this event.
 *
 * @generated from protobuf message api.MovementCreatedPayload
 */
export interface MovementCreatedPayload {
    /**
     * @generated from protobuf field: api.EnrichedGoods Goods = 1 [json_name = "Goods"];
     */
    goods?: EnrichedGoods;
    /**
     * @generated from protobuf field: string ActorID = 2 [json_name = "ActorID"];
     */
    actorID: string;
    /**
     * @generated from protobuf field: api.ActorPayload Actor = 3 [json_name = "Actor"];
     */
    actor?: ActorPayload;
    /**
     * @generated from protobuf field: api.StockMovement Movement = 4 [json_name = "Movement"];
     */
    movement?: StockMovement;
}
/**
 * @generated from protobuf message api.MovementCreatedEvent
 */
export interface MovementCreatedEvent {
    /**
     * @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.MovementCreatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: MovementCreatedPayload;
}
/**
 * @generated from protobuf message api.MovementCreatedRequest
 */
export interface MovementCreatedRequest {
    /**
     * Header of the event request
     *
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: api.NoID ID = 4 [json_name = "ID"];
     */
    iD?: NoID;
    /**
     * Content of the event request
     *
     * @generated from protobuf field: api.MovementCreatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: MovementCreatedPayload;
}
/**
 * @generated from protobuf message api.MovementCreatedResponse
 */
export interface MovementCreatedResponse {
    /**
     * Header of the response
     *
     * @generated from protobuf field: api.ResponseHeader Header = 1 [json_name = "Header"];
     */
    header?: ResponseHeader;
    /**
     * Identifier of the movement the request event was applied on
     *
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
}
/**
 *
 * create the movement on the goods with the provided goods quantity.
 * This event is received internally
 *
 * This event is used when the Stock is physically moved from/into the warehouse to De/Increment the physical Stock counter of this goods.
 *
 * The ID part of the request is removed, because the Movement ID.RefID is built internally
 * A specific algorithm will be implemented on api-server and all actions which result this event.
 *
 * @generated from protobuf message api.MovementGeneratedPayload
 */
export interface MovementGeneratedPayload {
    /**
     * @generated from protobuf field: api.EnrichedGoods Goods = 1 [json_name = "Goods"];
     */
    goods?: EnrichedGoods;
    /**
     * @generated from protobuf field: string ActorID = 2 [json_name = "ActorID"];
     */
    actorID: string;
    /**
     * @generated from protobuf field: api.ActorPayload Actor = 3 [json_name = "Actor"];
     */
    actor?: ActorPayload;
    /**
     * @generated from protobuf field: api.StockMovement Movement = 4 [json_name = "Movement"];
     */
    movement?: StockMovement;
    /**
     * @generated from protobuf field: api.QuantityInLV QuantityInBaseLV = 8 [json_name = "QuantityInBaseLV"];
     */
    quantityInBaseLV?: QuantityInLV;
}
/**
 * @generated from protobuf message api.MovementGeneratedEvent
 */
export interface MovementGeneratedEvent {
    /**
     * @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.MovementGeneratedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: MovementGeneratedPayload;
}
/**
 * @generated from protobuf message api.MovementGeneratedRequest
 */
export interface MovementGeneratedRequest {
    /**
     * Header of the event request
     *
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    /**
     * @generated from protobuf field: api.NoID ID = 4 [json_name = "ID"];
     */
    iD?: NoID;
    /**
     * Content of the event request
     *
     * @generated from protobuf field: api.MovementGeneratedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: MovementGeneratedPayload;
}
/**
 * @generated from protobuf message api.MovementGeneratedResponse
 */
export interface MovementGeneratedResponse {
    /**
     * Header of the response
     *
     * @generated from protobuf field: api.ResponseHeader Header = 1 [json_name = "Header"];
     */
    header?: ResponseHeader;
    /**
     * Identifier of the movement the request event was applied on
     *
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
}
/**
 *
 * StockValueUpdated : this message tells what the stock value was just after the movement is registered
 *
 * @generated from protobuf message api.MovementStockValueUpdatedPayload
 */
export interface MovementStockValueUpdatedPayload {
    /**
     * @generated from protobuf field: api.QuantityInLV QuantityInBaseLV = 1 [json_name = "QuantityInBaseLV"];
     */
    quantityInBaseLV?: QuantityInLV; // Stock value juste after the movement was applied
}
/**
 * @generated from protobuf message api.MovementStockValueUpdatedEvent
 */
export interface MovementStockValueUpdatedEvent {
    /**
     * @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.MovementStockValueUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: MovementStockValueUpdatedPayload;
}
/**
 * @generated from protobuf message api.MovementStockValueUpdatedRequest
 */
export interface MovementStockValueUpdatedRequest {
    /**
     * @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.MovementStockValueUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: MovementStockValueUpdatedPayload;
}
/**
 * @generated from protobuf message api.MovementStockValueUpdatedResponse
 */
export interface MovementStockValueUpdatedResponse {
    /**
     * @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 movement  (stock move)

/**
 * @generated from protobuf message api.MovementClaimAddedPayload
 */
export interface MovementClaimAddedPayload {
    /**
     * @generated from protobuf field: repeated api.ClaimSummary Claims = 1 [json_name = "Claims"];
     */
    claims: ClaimSummary[];
}
/**
 * @generated from protobuf message api.MovementClaimAddedEvent
 */
export interface MovementClaimAddedEvent {
    /**
     * @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.MovementClaimAddedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: MovementClaimAddedPayload;
}
/**
 * @generated from protobuf message api.MovementClaimAddedRequest
 */
export interface MovementClaimAddedRequest {
    /**
     * @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.MovementClaimAddedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: MovementClaimAddedPayload;
}
/**
 * @generated from protobuf message api.MovementClaimAddedResponse
 */
export interface MovementClaimAddedResponse {
    /**
     * @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.MovementAttachmentAddedPayload
 */
export interface MovementAttachmentAddedPayload {
    /**
     * @generated from protobuf field: repeated api.AttachmentSummary Attachments = 1 [json_name = "Attachments"];
     */
    attachments: AttachmentSummary[];
}
/**
 * @generated from protobuf message api.MovementAttachmentAddedEvent
 */
export interface MovementAttachmentAddedEvent {
    /**
     * @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.MovementAttachmentAddedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: MovementAttachmentAddedPayload;
}
/**
 * @generated from protobuf message api.MovementAttachmentAddedRequest
 */
export interface MovementAttachmentAddedRequest {
    /**
     * @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.MovementAttachmentAddedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: MovementAttachmentAddedPayload;
}
/**
 * @generated from protobuf message api.MovementAttachmentAddedResponse
 */
export interface MovementAttachmentAddedResponse {
    /**
     * @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.MovementAttachmentRemovedPayload
 */
export interface MovementAttachmentRemovedPayload {
    /**
     * @generated from protobuf field: repeated api.AttachmentSummary Attachments = 1 [json_name = "Attachments"];
     */
    attachments: AttachmentSummary[];
}
/**
 * @generated from protobuf message api.MovementAttachmentRemovedEvent
 */
export interface MovementAttachmentRemovedEvent {
    /**
     * @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.MovementAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: MovementAttachmentRemovedPayload;
}
/**
 * @generated from protobuf message api.MovementAttachmentRemovedRequest
 */
export interface MovementAttachmentRemovedRequest {
    /**
     * @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.MovementAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: MovementAttachmentRemovedPayload;
}
/**
 * @generated from protobuf message api.MovementAttachmentRemovedResponse
 */
export interface MovementAttachmentRemovedResponse {
    /**
     * @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.MovementDeletedPayload
 */
export interface MovementDeletedPayload {
}
/**
 * Event message
 *
 * @generated from protobuf message api.MovementDeletedEvent
 */
export interface MovementDeletedEvent {
    /**
     * @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.MovementDeletedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: MovementDeletedPayload;
}
/**
 * API Request
 *
 * @generated from protobuf message api.MovementDeletedRequest
 */
export interface MovementDeletedRequest {
    /**
     * @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.MovementDeletedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: MovementDeletedPayload;
}
/**
 * API Response
 *
 * @generated from protobuf message api.MovementDeletedResponse
 */
export interface MovementDeletedResponse {
    /**
     * @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 MovementCreatedPayload$Type extends MessageType<MovementCreatedPayload> {
    constructor() {
        super("api.MovementCreatedPayload", [
            { no: 1, name: "Goods", kind: "message", jsonName: "Goods", T: () => EnrichedGoods, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ActorID", kind: "scalar", jsonName: "ActorID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "api.entityRef": "Actor" } },
            { no: 3, name: "Actor", kind: "message", jsonName: "Actor", T: () => ActorPayload, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { readOnly: true } } },
            { no: 4, name: "Movement", kind: "message", jsonName: "Movement", T: () => StockMovement, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Describe the goods movement with the provided goods quantity", required: ["Goods", "ActorID", "Movement"] } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Created", "api.postAggMethods": "computeMovementQuantity,quantityByBranchLVs", "api.preAggMethods": "filterMovement", "api.idGenMethod": "genMoveCreatedId" });
    }
    create(value?: PartialMessage<MovementCreatedPayload>): MovementCreatedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.actorID = "";
        if (value !== undefined)
            reflectionMergePartial<MovementCreatedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementCreatedPayload): MovementCreatedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.EnrichedGoods Goods = 1 [json_name = "Goods"];*/ 1:
                    message.goods = EnrichedGoods.internalBinaryRead(reader, reader.uint32(), options, message.goods);
                    break;
                case /* string ActorID = 2 [json_name = "ActorID"];*/ 2:
                    message.actorID = reader.string();
                    break;
                case /* api.ActorPayload Actor = 3 [json_name = "Actor"];*/ 3:
                    message.actor = ActorPayload.internalBinaryRead(reader, reader.uint32(), options, message.actor);
                    break;
                case /* api.StockMovement Movement = 4 [json_name = "Movement"];*/ 4:
                    message.movement = StockMovement.internalBinaryRead(reader, reader.uint32(), options, message.movement);
                    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: MovementCreatedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.EnrichedGoods Goods = 1 [json_name = "Goods"]; */
        if (message.goods)
            EnrichedGoods.internalBinaryWrite(message.goods, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* string ActorID = 2 [json_name = "ActorID"]; */
        if (message.actorID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.actorID);
        /* api.ActorPayload Actor = 3 [json_name = "Actor"]; */
        if (message.actor)
            ActorPayload.internalBinaryWrite(message.actor, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.StockMovement Movement = 4 [json_name = "Movement"]; */
        if (message.movement)
            StockMovement.internalBinaryWrite(message.movement, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.MovementCreatedPayload
 */
export const MovementCreatedPayload = new MovementCreatedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementCreatedEvent$Type extends MessageType<MovementCreatedEvent> {
    constructor() {
        super("api.MovementCreatedEvent", [
            { 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: () => MovementCreatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "Created" });
    }
    create(value?: PartialMessage<MovementCreatedEvent>): MovementCreatedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementCreatedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementCreatedEvent): MovementCreatedEvent {
        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.MovementCreatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = MovementCreatedPayload.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: MovementCreatedEvent, 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.MovementCreatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            MovementCreatedPayload.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.MovementCreatedEvent
 */
export const MovementCreatedEvent = new MovementCreatedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementCreatedRequest$Type extends MessageType<MovementCreatedRequest> {
    constructor() {
        super("api.MovementCreatedRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Header of the event request" } } },
            { no: 4, name: "ID", kind: "message", jsonName: "ID", T: () => NoID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => MovementCreatedPayload, options: { "validate.rules": { message: { required: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Content of the event request" } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "Created" });
    }
    create(value?: PartialMessage<MovementCreatedRequest>): MovementCreatedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementCreatedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementCreatedRequest): MovementCreatedRequest {
        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.NoID ID = 4 [json_name = "ID"];*/ 4:
                    message.iD = NoID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
                    break;
                case /* api.MovementCreatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = MovementCreatedPayload.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: MovementCreatedRequest, 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.NoID ID = 4 [json_name = "ID"]; */
        if (message.iD)
            NoID.internalBinaryWrite(message.iD, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.MovementCreatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            MovementCreatedPayload.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.MovementCreatedRequest
 */
export const MovementCreatedRequest = new MovementCreatedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementCreatedResponse$Type extends MessageType<MovementCreatedResponse> {
    constructor() {
        super("api.MovementCreatedResponse", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResponseHeader, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Header of the response" } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the movement the request event was applied on" } } }
        ], { "api.messageType": "Response", "api.inputEvent": "Created" });
    }
    create(value?: PartialMessage<MovementCreatedResponse>): MovementCreatedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementCreatedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementCreatedResponse): MovementCreatedResponse {
        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: MovementCreatedResponse, 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.MovementCreatedResponse
 */
export const MovementCreatedResponse = new MovementCreatedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementGeneratedPayload$Type extends MessageType<MovementGeneratedPayload> {
    constructor() {
        super("api.MovementGeneratedPayload", [
            { no: 1, name: "Goods", kind: "message", jsonName: "Goods", T: () => EnrichedGoods, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "ActorID", kind: "scalar", jsonName: "ActorID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "api.entityRef": "Actor" } },
            { no: 3, name: "Actor", kind: "message", jsonName: "Actor", T: () => ActorPayload, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { readOnly: true } } },
            { no: 4, name: "Movement", kind: "message", jsonName: "Movement", T: () => StockMovement, options: { "validate.rules": { message: { required: true } } } },
            { no: 8, name: "QuantityInBaseLV", kind: "message", jsonName: "QuantityInBaseLV", T: () => QuantityInLV }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Describe the goods movement with the provided goods quantity", required: ["Goods", "ActorID", "Movement"] } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Generated", "api.postAggMethods": "computeMovementQuantity,quantityByBranchLVs", "api.preAggMethods": "filterMovement", "api.idGenMethod": "genMoveGeneratedId" });
    }
    create(value?: PartialMessage<MovementGeneratedPayload>): MovementGeneratedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.actorID = "";
        if (value !== undefined)
            reflectionMergePartial<MovementGeneratedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementGeneratedPayload): MovementGeneratedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.EnrichedGoods Goods = 1 [json_name = "Goods"];*/ 1:
                    message.goods = EnrichedGoods.internalBinaryRead(reader, reader.uint32(), options, message.goods);
                    break;
                case /* string ActorID = 2 [json_name = "ActorID"];*/ 2:
                    message.actorID = reader.string();
                    break;
                case /* api.ActorPayload Actor = 3 [json_name = "Actor"];*/ 3:
                    message.actor = ActorPayload.internalBinaryRead(reader, reader.uint32(), options, message.actor);
                    break;
                case /* api.StockMovement Movement = 4 [json_name = "Movement"];*/ 4:
                    message.movement = StockMovement.internalBinaryRead(reader, reader.uint32(), options, message.movement);
                    break;
                case /* api.QuantityInLV QuantityInBaseLV = 8 [json_name = "QuantityInBaseLV"];*/ 8:
                    message.quantityInBaseLV = QuantityInLV.internalBinaryRead(reader, reader.uint32(), options, message.quantityInBaseLV);
                    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: MovementGeneratedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.EnrichedGoods Goods = 1 [json_name = "Goods"]; */
        if (message.goods)
            EnrichedGoods.internalBinaryWrite(message.goods, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* string ActorID = 2 [json_name = "ActorID"]; */
        if (message.actorID !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.actorID);
        /* api.ActorPayload Actor = 3 [json_name = "Actor"]; */
        if (message.actor)
            ActorPayload.internalBinaryWrite(message.actor, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* api.StockMovement Movement = 4 [json_name = "Movement"]; */
        if (message.movement)
            StockMovement.internalBinaryWrite(message.movement, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.QuantityInLV QuantityInBaseLV = 8 [json_name = "QuantityInBaseLV"]; */
        if (message.quantityInBaseLV)
            QuantityInLV.internalBinaryWrite(message.quantityInBaseLV, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.MovementGeneratedPayload
 */
export const MovementGeneratedPayload = new MovementGeneratedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementGeneratedEvent$Type extends MessageType<MovementGeneratedEvent> {
    constructor() {
        super("api.MovementGeneratedEvent", [
            { 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: () => MovementGeneratedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "Generated" });
    }
    create(value?: PartialMessage<MovementGeneratedEvent>): MovementGeneratedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementGeneratedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementGeneratedEvent): MovementGeneratedEvent {
        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.MovementGeneratedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = MovementGeneratedPayload.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: MovementGeneratedEvent, 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.MovementGeneratedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            MovementGeneratedPayload.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.MovementGeneratedEvent
 */
export const MovementGeneratedEvent = new MovementGeneratedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementGeneratedRequest$Type extends MessageType<MovementGeneratedRequest> {
    constructor() {
        super("api.MovementGeneratedRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Header of the event request" } } },
            { no: 4, name: "ID", kind: "message", jsonName: "ID", T: () => NoID },
            { no: 3, name: "Payload", kind: "message", jsonName: "Payload", T: () => MovementGeneratedPayload, options: { "validate.rules": { message: { required: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Content of the event request" } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "Generated" });
    }
    create(value?: PartialMessage<MovementGeneratedRequest>): MovementGeneratedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementGeneratedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementGeneratedRequest): MovementGeneratedRequest {
        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.NoID ID = 4 [json_name = "ID"];*/ 4:
                    message.iD = NoID.internalBinaryRead(reader, reader.uint32(), options, message.iD);
                    break;
                case /* api.MovementGeneratedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = MovementGeneratedPayload.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: MovementGeneratedRequest, 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.NoID ID = 4 [json_name = "ID"]; */
        if (message.iD)
            NoID.internalBinaryWrite(message.iD, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* api.MovementGeneratedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            MovementGeneratedPayload.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.MovementGeneratedRequest
 */
export const MovementGeneratedRequest = new MovementGeneratedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementGeneratedResponse$Type extends MessageType<MovementGeneratedResponse> {
    constructor() {
        super("api.MovementGeneratedResponse", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResponseHeader, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Header of the response" } } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the movement the request event was applied on" } } }
        ], { "api.messageType": "Response", "api.inputEvent": "Generated" });
    }
    create(value?: PartialMessage<MovementGeneratedResponse>): MovementGeneratedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementGeneratedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementGeneratedResponse): MovementGeneratedResponse {
        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: MovementGeneratedResponse, 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.MovementGeneratedResponse
 */
export const MovementGeneratedResponse = new MovementGeneratedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementStockValueUpdatedPayload$Type extends MessageType<MovementStockValueUpdatedPayload> {
    constructor() {
        super("api.MovementStockValueUpdatedPayload", [
            { no: 1, name: "QuantityInBaseLV", kind: "message", jsonName: "QuantityInBaseLV", T: () => QuantityInLV, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "StockValueUpdated" });
    }
    create(value?: PartialMessage<MovementStockValueUpdatedPayload>): MovementStockValueUpdatedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementStockValueUpdatedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementStockValueUpdatedPayload): MovementStockValueUpdatedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.QuantityInLV QuantityInBaseLV = 1 [json_name = "QuantityInBaseLV"];*/ 1:
                    message.quantityInBaseLV = QuantityInLV.internalBinaryRead(reader, reader.uint32(), options, message.quantityInBaseLV);
                    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: MovementStockValueUpdatedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.QuantityInLV QuantityInBaseLV = 1 [json_name = "QuantityInBaseLV"]; */
        if (message.quantityInBaseLV)
            QuantityInLV.internalBinaryWrite(message.quantityInBaseLV, 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.MovementStockValueUpdatedPayload
 */
export const MovementStockValueUpdatedPayload = new MovementStockValueUpdatedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementStockValueUpdatedEvent$Type extends MessageType<MovementStockValueUpdatedEvent> {
    constructor() {
        super("api.MovementStockValueUpdatedEvent", [
            { 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: () => MovementStockValueUpdatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "StockValueUpdated" });
    }
    create(value?: PartialMessage<MovementStockValueUpdatedEvent>): MovementStockValueUpdatedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementStockValueUpdatedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementStockValueUpdatedEvent): MovementStockValueUpdatedEvent {
        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.MovementStockValueUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = MovementStockValueUpdatedPayload.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: MovementStockValueUpdatedEvent, 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.MovementStockValueUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            MovementStockValueUpdatedPayload.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.MovementStockValueUpdatedEvent
 */
export const MovementStockValueUpdatedEvent = new MovementStockValueUpdatedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementStockValueUpdatedRequest$Type extends MessageType<MovementStockValueUpdatedRequest> {
    constructor() {
        super("api.MovementStockValueUpdatedRequest", [
            { 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: () => MovementStockValueUpdatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "StockValueUpdated" });
    }
    create(value?: PartialMessage<MovementStockValueUpdatedRequest>): MovementStockValueUpdatedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementStockValueUpdatedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementStockValueUpdatedRequest): MovementStockValueUpdatedRequest {
        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.MovementStockValueUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = MovementStockValueUpdatedPayload.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: MovementStockValueUpdatedRequest, 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.MovementStockValueUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            MovementStockValueUpdatedPayload.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.MovementStockValueUpdatedRequest
 */
export const MovementStockValueUpdatedRequest = new MovementStockValueUpdatedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementStockValueUpdatedResponse$Type extends MessageType<MovementStockValueUpdatedResponse> {
    constructor() {
        super("api.MovementStockValueUpdatedResponse", [
            { 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": "StockValueUpdated" });
    }
    create(value?: PartialMessage<MovementStockValueUpdatedResponse>): MovementStockValueUpdatedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementStockValueUpdatedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementStockValueUpdatedResponse): MovementStockValueUpdatedResponse {
        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: MovementStockValueUpdatedResponse, 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.MovementStockValueUpdatedResponse
 */
export const MovementStockValueUpdatedResponse = new MovementStockValueUpdatedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementClaimAddedPayload$Type extends MessageType<MovementClaimAddedPayload> {
    constructor() {
        super("api.MovementClaimAddedPayload", [
            { 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<MovementClaimAddedPayload>): MovementClaimAddedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.claims = [];
        if (value !== undefined)
            reflectionMergePartial<MovementClaimAddedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementClaimAddedPayload): MovementClaimAddedPayload {
        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: MovementClaimAddedPayload, 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.MovementClaimAddedPayload
 */
export const MovementClaimAddedPayload = new MovementClaimAddedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementClaimAddedEvent$Type extends MessageType<MovementClaimAddedEvent> {
    constructor() {
        super("api.MovementClaimAddedEvent", [
            { 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: () => MovementClaimAddedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "ClaimAdded", "api.preAggMethods": "addClaim" });
    }
    create(value?: PartialMessage<MovementClaimAddedEvent>): MovementClaimAddedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementClaimAddedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementClaimAddedEvent): MovementClaimAddedEvent {
        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.MovementClaimAddedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = MovementClaimAddedPayload.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: MovementClaimAddedEvent, 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.MovementClaimAddedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            MovementClaimAddedPayload.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.MovementClaimAddedEvent
 */
export const MovementClaimAddedEvent = new MovementClaimAddedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementClaimAddedRequest$Type extends MessageType<MovementClaimAddedRequest> {
    constructor() {
        super("api.MovementClaimAddedRequest", [
            { 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: () => MovementClaimAddedPayload, 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<MovementClaimAddedRequest>): MovementClaimAddedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementClaimAddedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementClaimAddedRequest): MovementClaimAddedRequest {
        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.MovementClaimAddedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = MovementClaimAddedPayload.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: MovementClaimAddedRequest, 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.MovementClaimAddedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            MovementClaimAddedPayload.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.MovementClaimAddedRequest
 */
export const MovementClaimAddedRequest = new MovementClaimAddedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementClaimAddedResponse$Type extends MessageType<MovementClaimAddedResponse> {
    constructor() {
        super("api.MovementClaimAddedResponse", [
            { 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<MovementClaimAddedResponse>): MovementClaimAddedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementClaimAddedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementClaimAddedResponse): MovementClaimAddedResponse {
        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: MovementClaimAddedResponse, 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.MovementClaimAddedResponse
 */
export const MovementClaimAddedResponse = new MovementClaimAddedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementAttachmentAddedPayload$Type extends MessageType<MovementAttachmentAddedPayload> {
    constructor() {
        super("api.MovementAttachmentAddedPayload", [
            { 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", "api.preAggMethods": "addAttachment" });
    }
    create(value?: PartialMessage<MovementAttachmentAddedPayload>): MovementAttachmentAddedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.attachments = [];
        if (value !== undefined)
            reflectionMergePartial<MovementAttachmentAddedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementAttachmentAddedPayload): MovementAttachmentAddedPayload {
        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: MovementAttachmentAddedPayload, 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.MovementAttachmentAddedPayload
 */
export const MovementAttachmentAddedPayload = new MovementAttachmentAddedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementAttachmentAddedEvent$Type extends MessageType<MovementAttachmentAddedEvent> {
    constructor() {
        super("api.MovementAttachmentAddedEvent", [
            { 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: () => MovementAttachmentAddedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "AttachmentAdded" });
    }
    create(value?: PartialMessage<MovementAttachmentAddedEvent>): MovementAttachmentAddedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementAttachmentAddedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementAttachmentAddedEvent): MovementAttachmentAddedEvent {
        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.MovementAttachmentAddedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = MovementAttachmentAddedPayload.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: MovementAttachmentAddedEvent, 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.MovementAttachmentAddedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            MovementAttachmentAddedPayload.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.MovementAttachmentAddedEvent
 */
export const MovementAttachmentAddedEvent = new MovementAttachmentAddedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementAttachmentAddedRequest$Type extends MessageType<MovementAttachmentAddedRequest> {
    constructor() {
        super("api.MovementAttachmentAddedRequest", [
            { 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: () => MovementAttachmentAddedPayload, 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<MovementAttachmentAddedRequest>): MovementAttachmentAddedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementAttachmentAddedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementAttachmentAddedRequest): MovementAttachmentAddedRequest {
        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.MovementAttachmentAddedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = MovementAttachmentAddedPayload.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: MovementAttachmentAddedRequest, 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.MovementAttachmentAddedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            MovementAttachmentAddedPayload.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.MovementAttachmentAddedRequest
 */
export const MovementAttachmentAddedRequest = new MovementAttachmentAddedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementAttachmentAddedResponse$Type extends MessageType<MovementAttachmentAddedResponse> {
    constructor() {
        super("api.MovementAttachmentAddedResponse", [
            { 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<MovementAttachmentAddedResponse>): MovementAttachmentAddedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementAttachmentAddedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementAttachmentAddedResponse): MovementAttachmentAddedResponse {
        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: MovementAttachmentAddedResponse, 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.MovementAttachmentAddedResponse
 */
export const MovementAttachmentAddedResponse = new MovementAttachmentAddedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementAttachmentRemovedPayload$Type extends MessageType<MovementAttachmentRemovedPayload> {
    constructor() {
        super("api.MovementAttachmentRemovedPayload", [
            { 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", "api.preAggMethods": "removeAttachment" });
    }
    create(value?: PartialMessage<MovementAttachmentRemovedPayload>): MovementAttachmentRemovedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.attachments = [];
        if (value !== undefined)
            reflectionMergePartial<MovementAttachmentRemovedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementAttachmentRemovedPayload): MovementAttachmentRemovedPayload {
        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: MovementAttachmentRemovedPayload, 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.MovementAttachmentRemovedPayload
 */
export const MovementAttachmentRemovedPayload = new MovementAttachmentRemovedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementAttachmentRemovedEvent$Type extends MessageType<MovementAttachmentRemovedEvent> {
    constructor() {
        super("api.MovementAttachmentRemovedEvent", [
            { 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: () => MovementAttachmentRemovedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "AttachmentRemoved" });
    }
    create(value?: PartialMessage<MovementAttachmentRemovedEvent>): MovementAttachmentRemovedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementAttachmentRemovedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementAttachmentRemovedEvent): MovementAttachmentRemovedEvent {
        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.MovementAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = MovementAttachmentRemovedPayload.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: MovementAttachmentRemovedEvent, 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.MovementAttachmentRemovedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            MovementAttachmentRemovedPayload.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.MovementAttachmentRemovedEvent
 */
export const MovementAttachmentRemovedEvent = new MovementAttachmentRemovedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementAttachmentRemovedRequest$Type extends MessageType<MovementAttachmentRemovedRequest> {
    constructor() {
        super("api.MovementAttachmentRemovedRequest", [
            { 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: () => MovementAttachmentRemovedPayload, 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<MovementAttachmentRemovedRequest>): MovementAttachmentRemovedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementAttachmentRemovedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementAttachmentRemovedRequest): MovementAttachmentRemovedRequest {
        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.MovementAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = MovementAttachmentRemovedPayload.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: MovementAttachmentRemovedRequest, 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.MovementAttachmentRemovedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            MovementAttachmentRemovedPayload.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.MovementAttachmentRemovedRequest
 */
export const MovementAttachmentRemovedRequest = new MovementAttachmentRemovedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementAttachmentRemovedResponse$Type extends MessageType<MovementAttachmentRemovedResponse> {
    constructor() {
        super("api.MovementAttachmentRemovedResponse", [
            { 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<MovementAttachmentRemovedResponse>): MovementAttachmentRemovedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementAttachmentRemovedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementAttachmentRemovedResponse): MovementAttachmentRemovedResponse {
        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: MovementAttachmentRemovedResponse, 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.MovementAttachmentRemovedResponse
 */
export const MovementAttachmentRemovedResponse = new MovementAttachmentRemovedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementDeletedPayload$Type extends MessageType<MovementDeletedPayload> {
    constructor() {
        super("api.MovementDeletedPayload", [], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Event Payload" } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Deleted" });
    }
    create(value?: PartialMessage<MovementDeletedPayload>): MovementDeletedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementDeletedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementDeletedPayload): MovementDeletedPayload {
        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: MovementDeletedPayload, 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.MovementDeletedPayload
 */
export const MovementDeletedPayload = new MovementDeletedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementDeletedEvent$Type extends MessageType<MovementDeletedEvent> {
    constructor() {
        super("api.MovementDeletedEvent", [
            { 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: () => MovementDeletedPayload }
        ], { "api.messageType": "Event", "api.inputEvent": "Deleted" });
    }
    create(value?: PartialMessage<MovementDeletedEvent>): MovementDeletedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementDeletedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementDeletedEvent): MovementDeletedEvent {
        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.MovementDeletedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = MovementDeletedPayload.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: MovementDeletedEvent, 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.MovementDeletedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            MovementDeletedPayload.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.MovementDeletedEvent
 */
export const MovementDeletedEvent = new MovementDeletedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementDeletedRequest$Type extends MessageType<MovementDeletedRequest> {
    constructor() {
        super("api.MovementDeletedRequest", [
            { 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: () => MovementDeletedPayload }
        ], { "api.messageType": "Request", "api.inputEvent": "Deleted" });
    }
    create(value?: PartialMessage<MovementDeletedRequest>): MovementDeletedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementDeletedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementDeletedRequest): MovementDeletedRequest {
        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.MovementDeletedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = MovementDeletedPayload.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: MovementDeletedRequest, 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.MovementDeletedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            MovementDeletedPayload.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.MovementDeletedRequest
 */
export const MovementDeletedRequest = new MovementDeletedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MovementDeletedResponse$Type extends MessageType<MovementDeletedResponse> {
    constructor() {
        super("api.MovementDeletedResponse", [
            { 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<MovementDeletedResponse>): MovementDeletedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<MovementDeletedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MovementDeletedResponse): MovementDeletedResponse {
        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: MovementDeletedResponse, 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.MovementDeletedResponse
 */
export const MovementDeletedResponse = new MovementDeletedResponse$Type();
/**
 * @generated ServiceType for protobuf service api.MovementInputAPI
 */
export const MovementInputAPI = new ServiceType("api.MovementInputAPI", [
    { name: "Created", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Movement Inputs"], description: "A stock has been moved. Called directly from WMS for requalification or fix." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: MovementCreatedRequest, O: MovementCreatedResponse },
    { name: "Generated", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Movement Inputs"], description: "A stock has been moved. Called internally only, from outbound and inbound and stock" }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: MovementGeneratedRequest, O: MovementGeneratedResponse },
    { name: "StockValueUpdated", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Movement Inputs"], description: "The stock value (after the movement is applied) is updated on the movement" }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: MovementStockValueUpdatedRequest, O: MovementStockValueUpdatedResponse },
    { name: "ClaimAdded", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Movement Inputs"], description: "A claim is added for the Stock movement." }, "api.rscType": "Project", "api.roles": "Platform.Project-Claim", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: MovementClaimAddedRequest, O: MovementClaimAddedResponse },
    { name: "AttachmentAdded", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Movement Inputs"], description: "An attachment is added for the Movement." }, "api.rscType": "Project", "api.roles": "Platform.Project-Attachment", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: MovementAttachmentAddedRequest, O: MovementAttachmentAddedResponse },
    { name: "AttachmentRemoved", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Movement Inputs"], description: "An attachment is removed for the Movement." }, "api.rscType": "Project", "api.roles": "Platform.Project-Attachment", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: MovementAttachmentRemovedRequest, O: MovementAttachmentRemovedResponse },
    { name: "Deleted", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Movement Inputs"], description: "An Movement has been deleted. This is called from Reflex Platform Admin service to share the Organisation Movements." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: MovementDeletedRequest, O: MovementDeletedResponse }
], { "api.serviceType": "Api", "api.k8sService": "api-server" });
