// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "itemInput.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 { ResponseHeader } from "./shared";
import { RequestProjectHeader } from "./shared";
import { EntityID } from "./shared";
import { EventHeader } from "./shared";
import { LogisticVariant } from "./repositoryShared";
import { TradeItemDescriptions } from "./repositoryShared";
import { ExpiryConstraint } from "./repositoryShared";
import { MetadataElement } from "./shared";
// 
// Messages for Created  Event
// Only through API server => No Command message

/**
 * Event Payload
 *
 * @generated from protobuf message api.ItemCreatedPayload
 */
export interface ItemCreatedPayload {
    /**
     * Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)
     *
     * @generated from protobuf field: repeated api.MetadataElement MetaData = 1 [json_name = "MetaData"];
     */
    metaData: MetadataElement[];
    /**
     * Item components
     *
     * @generated from protobuf field: api.ExpiryConstraint ExpiryConstraint = 6 [json_name = "ExpiryConstraint"];
     */
    expiryConstraint?: ExpiryConstraint;
    /**
     * @generated from protobuf field: string PhotoURI = 7 [json_name = "PhotoURI"];
     */
    photoURI: string;
    /**
     * @generated from protobuf field: repeated api.TradeItemDescriptions DescriptionsByLanguage = 3 [json_name = "DescriptionsByLanguage"];
     */
    descriptionsByLanguage: TradeItemDescriptions[]; // @option language
    /**
     * @generated from protobuf field: repeated api.LogisticVariant LogisticVariants = 4 [json_name = "LogisticVariants"];
     */
    logisticVariants: LogisticVariant[];
}
/**
 * Event message
 *
 * @generated from protobuf message api.ItemCreatedEvent
 */
export interface ItemCreatedEvent {
    /**
     * @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.ItemCreatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemCreatedPayload;
}
/**
 * API Request
 *
 * @generated from protobuf message api.ItemCreatedRequest
 */
export interface ItemCreatedRequest {
    /**
     * @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.ItemCreatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemCreatedPayload;
}
/**
 * API Response
 *
 * @generated from protobuf message api.ItemCreatedResponse
 */
export interface ItemCreatedResponse {
    /**
     * @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.ItemMetaDataUpdatedPayload
 */
export interface ItemMetaDataUpdatedPayload {
    /**
     * Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)
     *
     * @generated from protobuf field: repeated api.MetadataElement MetaData = 4 [json_name = "MetaData"];
     */
    metaData: MetadataElement[];
}
/**
 * Event message
 *
 * @generated from protobuf message api.ItemMetaDataUpdatedEvent
 */
export interface ItemMetaDataUpdatedEvent {
    /**
     * @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.ItemMetaDataUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemMetaDataUpdatedPayload;
}
/**
 * API Request
 *
 * @generated from protobuf message api.ItemMetaDataUpdatedRequest
 */
export interface ItemMetaDataUpdatedRequest {
    /**
     * @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.ItemMetaDataUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemMetaDataUpdatedPayload;
}
/**
 * API Response
 *
 * @generated from protobuf message api.ItemMetaDataUpdatedResponse
 */
export interface ItemMetaDataUpdatedResponse {
    /**
     * @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;
}
// 
// Messages for updating LogisticVariant on item

/**
 * Event Payload
 *
 * @generated from protobuf message api.ItemLogisticVariantUpdatedPayload
 */
export interface ItemLogisticVariantUpdatedPayload {
    /**
     * @generated from protobuf field: repeated api.LogisticVariant LogisticVariants = 1 [json_name = "LogisticVariants"];
     */
    logisticVariants: LogisticVariant[];
}
/**
 * Event message
 *
 * @generated from protobuf message api.ItemLogisticVariantUpdatedEvent
 */
export interface ItemLogisticVariantUpdatedEvent {
    /**
     * @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.ItemLogisticVariantUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemLogisticVariantUpdatedPayload;
}
/**
 * API Request
 *
 * @generated from protobuf message api.ItemLogisticVariantUpdatedRequest
 */
export interface ItemLogisticVariantUpdatedRequest {
    /**
     * @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.ItemLogisticVariantUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemLogisticVariantUpdatedPayload;
}
/**
 * API Response
 *
 * @generated from protobuf message api.ItemLogisticVariantUpdatedResponse
 */
export interface ItemLogisticVariantUpdatedResponse {
    /**
     * @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;
}
// 
// Messages for removing LogisticVariant on item

/**
 * Event Payload
 *
 * @generated from protobuf message api.ItemLogisticVariantRemovedPayload
 */
export interface ItemLogisticVariantRemovedPayload {
    /**
     * @generated from protobuf field: repeated string RemovedLogisticVariantIDs = 1 [json_name = "RemovedLogisticVariantIDs"];
     */
    removedLogisticVariantIDs: string[];
}
/**
 * Event message
 *
 * @generated from protobuf message api.ItemLogisticVariantRemovedEvent
 */
export interface ItemLogisticVariantRemovedEvent {
    /**
     * @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.ItemLogisticVariantRemovedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemLogisticVariantRemovedPayload;
}
/**
 * API Request
 *
 * @generated from protobuf message api.ItemLogisticVariantRemovedRequest
 */
export interface ItemLogisticVariantRemovedRequest {
    /**
     * @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.ItemLogisticVariantRemovedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemLogisticVariantRemovedPayload;
}
/**
 * API Response
 *
 * @generated from protobuf message api.ItemLogisticVariantRemovedResponse
 */
export interface ItemLogisticVariantRemovedResponse {
    /**
     * @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;
}
// 
// Messages for Deleted Business Event
// Only through API server => No Command message

/**
 * Event Payload
 *
 * @generated from protobuf message api.ItemDeletedPayload
 */
export interface ItemDeletedPayload {
}
/**
 * Event message
 *
 * @generated from protobuf message api.ItemDeletedEvent
 */
export interface ItemDeletedEvent {
    /**
     * @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.ItemDeletedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemDeletedPayload;
}
/**
 * API Request
 *
 * @generated from protobuf message api.ItemDeletedRequest
 */
export interface ItemDeletedRequest {
    /**
     * @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.ItemDeletedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemDeletedPayload;
}
/**
 * API Response
 *
 * @generated from protobuf message api.ItemDeletedResponse
 */
export interface ItemDeletedResponse {
    /**
     * @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;
}
// 
// Messages for Deleted Business Event
// Only through API server => No Command message

/**
 * Event Payload
 *
 * @generated from protobuf message api.ItemDescriptionUpdatedPayload
 */
export interface ItemDescriptionUpdatedPayload {
    /**
     * @generated from protobuf field: repeated api.TradeItemDescriptions DescriptionsByLanguage = 3 [json_name = "DescriptionsByLanguage"];
     */
    descriptionsByLanguage: TradeItemDescriptions[]; // @option language
}
/**
 * Event message
 *
 * @generated from protobuf message api.ItemDescriptionUpdatedEvent
 */
export interface ItemDescriptionUpdatedEvent {
    /**
     * @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.ItemDescriptionUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemDescriptionUpdatedPayload;
}
/**
 * API Request
 *
 * @generated from protobuf message api.ItemDescriptionUpdatedRequest
 */
export interface ItemDescriptionUpdatedRequest {
    /**
     * @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.ItemDescriptionUpdatedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemDescriptionUpdatedPayload;
}
/**
 * API Response
 *
 * @generated from protobuf message api.ItemDescriptionUpdatedResponse
 */
export interface ItemDescriptionUpdatedResponse {
    /**
     * @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.ItemAttachmentAddedPayload
 */
export interface ItemAttachmentAddedPayload {
    /**
     * @generated from protobuf field: repeated api.AttachmentSummary Attachments = 1 [json_name = "Attachments"];
     */
    attachments: AttachmentSummary[];
}
/**
 * @generated from protobuf message api.ItemAttachmentAddedEvent
 */
export interface ItemAttachmentAddedEvent {
    /**
     * @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.ItemAttachmentAddedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemAttachmentAddedPayload;
}
/**
 * @generated from protobuf message api.ItemAttachmentAddedRequest
 */
export interface ItemAttachmentAddedRequest {
    /**
     * @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.ItemAttachmentAddedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemAttachmentAddedPayload;
}
/**
 * @generated from protobuf message api.ItemAttachmentAddedResponse
 */
export interface ItemAttachmentAddedResponse {
    /**
     * @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.ItemAttachmentRemovedPayload
 */
export interface ItemAttachmentRemovedPayload {
    /**
     * @generated from protobuf field: repeated api.AttachmentSummary Attachments = 1 [json_name = "Attachments"];
     */
    attachments: AttachmentSummary[];
}
/**
 * @generated from protobuf message api.ItemAttachmentRemovedEvent
 */
export interface ItemAttachmentRemovedEvent {
    /**
     * @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.ItemAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemAttachmentRemovedPayload;
}
/**
 * @generated from protobuf message api.ItemAttachmentRemovedRequest
 */
export interface ItemAttachmentRemovedRequest {
    /**
     * @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.ItemAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];
     */
    payload?: ItemAttachmentRemovedPayload;
}
/**
 * @generated from protobuf message api.ItemAttachmentRemovedResponse
 */
export interface ItemAttachmentRemovedResponse {
    /**
     * @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 ItemCreatedPayload$Type extends MessageType<ItemCreatedPayload> {
    constructor() {
        super("api.ItemCreatedPayload", [
            { no: 1, name: "MetaData", kind: "message", jsonName: "MetaData", repeat: 1 /*RepeatType.PACKED*/, T: () => MetadataElement, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)" }, "api.metadata": true, "api.aggKey": "Key" } },
            { no: 6, name: "ExpiryConstraint", kind: "message", jsonName: "ExpiryConstraint", T: () => ExpiryConstraint, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Item components" } } },
            { no: 7, name: "PhotoURI", kind: "scalar", jsonName: "PhotoURI", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"https://reflex-visibility-forever.jpg\"" }, "api.viewType": { Types: [{ Context: "*", Type: "image" }] } } },
            { no: 3, name: "DescriptionsByLanguage", kind: "message", jsonName: "DescriptionsByLanguage", repeat: 1 /*RepeatType.PACKED*/, T: () => TradeItemDescriptions, options: { "api.language": true, "api.aggKey": "LanguageCodeISO6391" } },
            { no: 4, name: "LogisticVariants", kind: "message", jsonName: "LogisticVariants", repeat: 1 /*RepeatType.PACKED*/, T: () => LogisticVariant, options: { "validate.rules": { repeated: { uniqueBaseLV: true, knownRefLV: true } }, "api.aggKey": "LVID" } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Event Payload" } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Created" });
    }
    create(value?: PartialMessage<ItemCreatedPayload>): ItemCreatedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.metaData = [];
        message.photoURI = "";
        message.descriptionsByLanguage = [];
        message.logisticVariants = [];
        if (value !== undefined)
            reflectionMergePartial<ItemCreatedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemCreatedPayload): ItemCreatedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.MetadataElement MetaData = 1 [json_name = "MetaData"];*/ 1:
                    message.metaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* api.ExpiryConstraint ExpiryConstraint = 6 [json_name = "ExpiryConstraint"];*/ 6:
                    message.expiryConstraint = ExpiryConstraint.internalBinaryRead(reader, reader.uint32(), options, message.expiryConstraint);
                    break;
                case /* string PhotoURI = 7 [json_name = "PhotoURI"];*/ 7:
                    message.photoURI = reader.string();
                    break;
                case /* repeated api.TradeItemDescriptions DescriptionsByLanguage = 3 [json_name = "DescriptionsByLanguage"];*/ 3:
                    message.descriptionsByLanguage.push(TradeItemDescriptions.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated api.LogisticVariant LogisticVariants = 4 [json_name = "LogisticVariants"];*/ 4:
                    message.logisticVariants.push(LogisticVariant.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: ItemCreatedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.MetadataElement MetaData = 1 [json_name = "MetaData"]; */
        for (let i = 0; i < message.metaData.length; i++)
            MetadataElement.internalBinaryWrite(message.metaData[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* api.ExpiryConstraint ExpiryConstraint = 6 [json_name = "ExpiryConstraint"]; */
        if (message.expiryConstraint)
            ExpiryConstraint.internalBinaryWrite(message.expiryConstraint, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
        /* string PhotoURI = 7 [json_name = "PhotoURI"]; */
        if (message.photoURI !== "")
            writer.tag(7, WireType.LengthDelimited).string(message.photoURI);
        /* repeated api.TradeItemDescriptions DescriptionsByLanguage = 3 [json_name = "DescriptionsByLanguage"]; */
        for (let i = 0; i < message.descriptionsByLanguage.length; i++)
            TradeItemDescriptions.internalBinaryWrite(message.descriptionsByLanguage[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.LogisticVariant LogisticVariants = 4 [json_name = "LogisticVariants"]; */
        for (let i = 0; i < message.logisticVariants.length; i++)
            LogisticVariant.internalBinaryWrite(message.logisticVariants[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ItemCreatedPayload
 */
export const ItemCreatedPayload = new ItemCreatedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemCreatedEvent$Type extends MessageType<ItemCreatedEvent> {
    constructor() {
        super("api.ItemCreatedEvent", [
            { 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: () => ItemCreatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "Created", "api.postAggMethods": "computeEquivalentLVBaseQuantity,defineExpiration,propagateLVBranches", "api.preAggMethods": "checkBaseLV" });
    }
    create(value?: PartialMessage<ItemCreatedEvent>): ItemCreatedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemCreatedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemCreatedEvent): ItemCreatedEvent {
        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.ItemCreatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemCreatedPayload.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: ItemCreatedEvent, 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.ItemCreatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemCreatedPayload.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.ItemCreatedEvent
 */
export const ItemCreatedEvent = new ItemCreatedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemCreatedRequest$Type extends MessageType<ItemCreatedRequest> {
    constructor() {
        super("api.ItemCreatedRequest", [
            { 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: () => ItemCreatedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "Created" });
    }
    create(value?: PartialMessage<ItemCreatedRequest>): ItemCreatedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemCreatedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemCreatedRequest): ItemCreatedRequest {
        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.ItemCreatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemCreatedPayload.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: ItemCreatedRequest, 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.ItemCreatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemCreatedPayload.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.ItemCreatedRequest
 */
export const ItemCreatedRequest = new ItemCreatedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemCreatedResponse$Type extends MessageType<ItemCreatedResponse> {
    constructor() {
        super("api.ItemCreatedResponse", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResponseHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID }
        ], { "api.messageType": "Response", "api.inputEvent": "Created" });
    }
    create(value?: PartialMessage<ItemCreatedResponse>): ItemCreatedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemCreatedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemCreatedResponse): ItemCreatedResponse {
        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: ItemCreatedResponse, 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.ItemCreatedResponse
 */
export const ItemCreatedResponse = new ItemCreatedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemMetaDataUpdatedPayload$Type extends MessageType<ItemMetaDataUpdatedPayload> {
    constructor() {
        super("api.ItemMetaDataUpdatedPayload", [
            { no: 4, name: "MetaData", kind: "message", jsonName: "MetaData", repeat: 1 /*RepeatType.PACKED*/, T: () => MetadataElement, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Metadata are characteristics specific to the project. They can be of several data form (string, integer, float, boolean or timestamp)" }, "api.metadata": true, "api.aggKey": "Key" } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "MetaDataUpdated" });
    }
    create(value?: PartialMessage<ItemMetaDataUpdatedPayload>): ItemMetaDataUpdatedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.metaData = [];
        if (value !== undefined)
            reflectionMergePartial<ItemMetaDataUpdatedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemMetaDataUpdatedPayload): ItemMetaDataUpdatedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.MetadataElement MetaData = 4 [json_name = "MetaData"];*/ 4:
                    message.metaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: ItemMetaDataUpdatedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.MetadataElement MetaData = 4 [json_name = "MetaData"]; */
        for (let i = 0; i < message.metaData.length; i++)
            MetadataElement.internalBinaryWrite(message.metaData[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ItemMetaDataUpdatedPayload
 */
export const ItemMetaDataUpdatedPayload = new ItemMetaDataUpdatedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemMetaDataUpdatedEvent$Type extends MessageType<ItemMetaDataUpdatedEvent> {
    constructor() {
        super("api.ItemMetaDataUpdatedEvent", [
            { 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: () => ItemMetaDataUpdatedPayload }
        ], { "api.messageType": "Event", "api.inputEvent": "MetaDataUpdated" });
    }
    create(value?: PartialMessage<ItemMetaDataUpdatedEvent>): ItemMetaDataUpdatedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemMetaDataUpdatedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemMetaDataUpdatedEvent): ItemMetaDataUpdatedEvent {
        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.ItemMetaDataUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemMetaDataUpdatedPayload.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: ItemMetaDataUpdatedEvent, 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.ItemMetaDataUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemMetaDataUpdatedPayload.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.ItemMetaDataUpdatedEvent
 */
export const ItemMetaDataUpdatedEvent = new ItemMetaDataUpdatedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemMetaDataUpdatedRequest$Type extends MessageType<ItemMetaDataUpdatedRequest> {
    constructor() {
        super("api.ItemMetaDataUpdatedRequest", [
            { 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: () => ItemMetaDataUpdatedPayload }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "MetaDataUpdated" });
    }
    create(value?: PartialMessage<ItemMetaDataUpdatedRequest>): ItemMetaDataUpdatedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemMetaDataUpdatedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemMetaDataUpdatedRequest): ItemMetaDataUpdatedRequest {
        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.ItemMetaDataUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemMetaDataUpdatedPayload.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: ItemMetaDataUpdatedRequest, 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.ItemMetaDataUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemMetaDataUpdatedPayload.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.ItemMetaDataUpdatedRequest
 */
export const ItemMetaDataUpdatedRequest = new ItemMetaDataUpdatedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemMetaDataUpdatedResponse$Type extends MessageType<ItemMetaDataUpdatedResponse> {
    constructor() {
        super("api.ItemMetaDataUpdatedResponse", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResponseHeader },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID }
        ], { "api.messageType": "Response", "api.inputEvent": "MetaDataUpdated" });
    }
    create(value?: PartialMessage<ItemMetaDataUpdatedResponse>): ItemMetaDataUpdatedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemMetaDataUpdatedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemMetaDataUpdatedResponse): ItemMetaDataUpdatedResponse {
        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: ItemMetaDataUpdatedResponse, 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.ItemMetaDataUpdatedResponse
 */
export const ItemMetaDataUpdatedResponse = new ItemMetaDataUpdatedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemLogisticVariantUpdatedPayload$Type extends MessageType<ItemLogisticVariantUpdatedPayload> {
    constructor() {
        super("api.ItemLogisticVariantUpdatedPayload", [
            { no: 1, name: "LogisticVariants", kind: "message", jsonName: "LogisticVariants", repeat: 1 /*RepeatType.PACKED*/, T: () => LogisticVariant, options: { "api.aggKey": "LVID" } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "LogisticVariantUpdated" });
    }
    create(value?: PartialMessage<ItemLogisticVariantUpdatedPayload>): ItemLogisticVariantUpdatedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.logisticVariants = [];
        if (value !== undefined)
            reflectionMergePartial<ItemLogisticVariantUpdatedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemLogisticVariantUpdatedPayload): ItemLogisticVariantUpdatedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.LogisticVariant LogisticVariants = 1 [json_name = "LogisticVariants"];*/ 1:
                    message.logisticVariants.push(LogisticVariant.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: ItemLogisticVariantUpdatedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.LogisticVariant LogisticVariants = 1 [json_name = "LogisticVariants"]; */
        for (let i = 0; i < message.logisticVariants.length; i++)
            LogisticVariant.internalBinaryWrite(message.logisticVariants[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.ItemLogisticVariantUpdatedPayload
 */
export const ItemLogisticVariantUpdatedPayload = new ItemLogisticVariantUpdatedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemLogisticVariantUpdatedEvent$Type extends MessageType<ItemLogisticVariantUpdatedEvent> {
    constructor() {
        super("api.ItemLogisticVariantUpdatedEvent", [
            { 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: () => ItemLogisticVariantUpdatedPayload }
        ], { "api.messageType": "Event", "api.inputEvent": "LogisticVariantUpdated", "api.postAggMethods": "computeEquivalentLVBaseQuantity,propagateLVBranches", "api.preAggMethods": "checkBaseLV" });
    }
    create(value?: PartialMessage<ItemLogisticVariantUpdatedEvent>): ItemLogisticVariantUpdatedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemLogisticVariantUpdatedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemLogisticVariantUpdatedEvent): ItemLogisticVariantUpdatedEvent {
        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.ItemLogisticVariantUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemLogisticVariantUpdatedPayload.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: ItemLogisticVariantUpdatedEvent, 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.ItemLogisticVariantUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemLogisticVariantUpdatedPayload.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.ItemLogisticVariantUpdatedEvent
 */
export const ItemLogisticVariantUpdatedEvent = new ItemLogisticVariantUpdatedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemLogisticVariantUpdatedRequest$Type extends MessageType<ItemLogisticVariantUpdatedRequest> {
    constructor() {
        super("api.ItemLogisticVariantUpdatedRequest", [
            { 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: () => ItemLogisticVariantUpdatedPayload }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "LogisticVariantUpdated" });
    }
    create(value?: PartialMessage<ItemLogisticVariantUpdatedRequest>): ItemLogisticVariantUpdatedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemLogisticVariantUpdatedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemLogisticVariantUpdatedRequest): ItemLogisticVariantUpdatedRequest {
        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.ItemLogisticVariantUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemLogisticVariantUpdatedPayload.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: ItemLogisticVariantUpdatedRequest, 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.ItemLogisticVariantUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemLogisticVariantUpdatedPayload.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.ItemLogisticVariantUpdatedRequest
 */
export const ItemLogisticVariantUpdatedRequest = new ItemLogisticVariantUpdatedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemLogisticVariantUpdatedResponse$Type extends MessageType<ItemLogisticVariantUpdatedResponse> {
    constructor() {
        super("api.ItemLogisticVariantUpdatedResponse", [
            { 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": "LogisticVariantUpdated" });
    }
    create(value?: PartialMessage<ItemLogisticVariantUpdatedResponse>): ItemLogisticVariantUpdatedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemLogisticVariantUpdatedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemLogisticVariantUpdatedResponse): ItemLogisticVariantUpdatedResponse {
        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: ItemLogisticVariantUpdatedResponse, 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.ItemLogisticVariantUpdatedResponse
 */
export const ItemLogisticVariantUpdatedResponse = new ItemLogisticVariantUpdatedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemLogisticVariantRemovedPayload$Type extends MessageType<ItemLogisticVariantRemovedPayload> {
    constructor() {
        super("api.ItemLogisticVariantRemovedPayload", [
            { no: 1, name: "RemovedLogisticVariantIDs", kind: "scalar", jsonName: "RemovedLogisticVariantIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "LogisticVariantRemoved", "api.postAggMethods": "computeEquivalentLVBaseQuantity,propagateLVBranches" });
    }
    create(value?: PartialMessage<ItemLogisticVariantRemovedPayload>): ItemLogisticVariantRemovedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.removedLogisticVariantIDs = [];
        if (value !== undefined)
            reflectionMergePartial<ItemLogisticVariantRemovedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemLogisticVariantRemovedPayload): ItemLogisticVariantRemovedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated string RemovedLogisticVariantIDs = 1 [json_name = "RemovedLogisticVariantIDs"];*/ 1:
                    message.removedLogisticVariantIDs.push(reader.string());
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: ItemLogisticVariantRemovedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated string RemovedLogisticVariantIDs = 1 [json_name = "RemovedLogisticVariantIDs"]; */
        for (let i = 0; i < message.removedLogisticVariantIDs.length; i++)
            writer.tag(1, WireType.LengthDelimited).string(message.removedLogisticVariantIDs[i]);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ItemLogisticVariantRemovedPayload
 */
export const ItemLogisticVariantRemovedPayload = new ItemLogisticVariantRemovedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemLogisticVariantRemovedEvent$Type extends MessageType<ItemLogisticVariantRemovedEvent> {
    constructor() {
        super("api.ItemLogisticVariantRemovedEvent", [
            { 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: () => ItemLogisticVariantRemovedPayload }
        ], { "api.messageType": "Event", "api.inputEvent": "LogisticVariantRemoved", "api.preAggMethods": "removeLVs" });
    }
    create(value?: PartialMessage<ItemLogisticVariantRemovedEvent>): ItemLogisticVariantRemovedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemLogisticVariantRemovedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemLogisticVariantRemovedEvent): ItemLogisticVariantRemovedEvent {
        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.ItemLogisticVariantRemovedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemLogisticVariantRemovedPayload.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: ItemLogisticVariantRemovedEvent, 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.ItemLogisticVariantRemovedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemLogisticVariantRemovedPayload.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.ItemLogisticVariantRemovedEvent
 */
export const ItemLogisticVariantRemovedEvent = new ItemLogisticVariantRemovedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemLogisticVariantRemovedRequest$Type extends MessageType<ItemLogisticVariantRemovedRequest> {
    constructor() {
        super("api.ItemLogisticVariantRemovedRequest", [
            { 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: () => ItemLogisticVariantRemovedPayload }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "LogisticVariantRemoved" });
    }
    create(value?: PartialMessage<ItemLogisticVariantRemovedRequest>): ItemLogisticVariantRemovedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemLogisticVariantRemovedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemLogisticVariantRemovedRequest): ItemLogisticVariantRemovedRequest {
        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.ItemLogisticVariantRemovedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemLogisticVariantRemovedPayload.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: ItemLogisticVariantRemovedRequest, 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.ItemLogisticVariantRemovedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemLogisticVariantRemovedPayload.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.ItemLogisticVariantRemovedRequest
 */
export const ItemLogisticVariantRemovedRequest = new ItemLogisticVariantRemovedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemLogisticVariantRemovedResponse$Type extends MessageType<ItemLogisticVariantRemovedResponse> {
    constructor() {
        super("api.ItemLogisticVariantRemovedResponse", [
            { 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": "LogisticVariantRemoved" });
    }
    create(value?: PartialMessage<ItemLogisticVariantRemovedResponse>): ItemLogisticVariantRemovedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemLogisticVariantRemovedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemLogisticVariantRemovedResponse): ItemLogisticVariantRemovedResponse {
        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: ItemLogisticVariantRemovedResponse, 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.ItemLogisticVariantRemovedResponse
 */
export const ItemLogisticVariantRemovedResponse = new ItemLogisticVariantRemovedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemDeletedPayload$Type extends MessageType<ItemDeletedPayload> {
    constructor() {
        super("api.ItemDeletedPayload", [], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Deleted" });
    }
    create(value?: PartialMessage<ItemDeletedPayload>): ItemDeletedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemDeletedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemDeletedPayload): ItemDeletedPayload {
        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: ItemDeletedPayload, 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.ItemDeletedPayload
 */
export const ItemDeletedPayload = new ItemDeletedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemDeletedEvent$Type extends MessageType<ItemDeletedEvent> {
    constructor() {
        super("api.ItemDeletedEvent", [
            { 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: () => ItemDeletedPayload }
        ], { "api.messageType": "Event", "api.inputEvent": "Deleted" });
    }
    create(value?: PartialMessage<ItemDeletedEvent>): ItemDeletedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemDeletedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemDeletedEvent): ItemDeletedEvent {
        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.ItemDeletedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemDeletedPayload.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: ItemDeletedEvent, 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.ItemDeletedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemDeletedPayload.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.ItemDeletedEvent
 */
export const ItemDeletedEvent = new ItemDeletedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemDeletedRequest$Type extends MessageType<ItemDeletedRequest> {
    constructor() {
        super("api.ItemDeletedRequest", [
            { 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: () => ItemDeletedPayload }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "Deleted" });
    }
    create(value?: PartialMessage<ItemDeletedRequest>): ItemDeletedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemDeletedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemDeletedRequest): ItemDeletedRequest {
        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.ItemDeletedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemDeletedPayload.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: ItemDeletedRequest, 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.ItemDeletedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemDeletedPayload.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.ItemDeletedRequest
 */
export const ItemDeletedRequest = new ItemDeletedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemDeletedResponse$Type extends MessageType<ItemDeletedResponse> {
    constructor() {
        super("api.ItemDeletedResponse", [
            { 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<ItemDeletedResponse>): ItemDeletedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemDeletedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemDeletedResponse): ItemDeletedResponse {
        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: ItemDeletedResponse, 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.ItemDeletedResponse
 */
export const ItemDeletedResponse = new ItemDeletedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemDescriptionUpdatedPayload$Type extends MessageType<ItemDescriptionUpdatedPayload> {
    constructor() {
        super("api.ItemDescriptionUpdatedPayload", [
            { no: 3, name: "DescriptionsByLanguage", kind: "message", jsonName: "DescriptionsByLanguage", repeat: 1 /*RepeatType.PACKED*/, T: () => TradeItemDescriptions, options: { "api.language": true, "api.aggKey": "LanguageCodeISO6391" } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "DescriptionUpdated" });
    }
    create(value?: PartialMessage<ItemDescriptionUpdatedPayload>): ItemDescriptionUpdatedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.descriptionsByLanguage = [];
        if (value !== undefined)
            reflectionMergePartial<ItemDescriptionUpdatedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemDescriptionUpdatedPayload): ItemDescriptionUpdatedPayload {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.TradeItemDescriptions DescriptionsByLanguage = 3 [json_name = "DescriptionsByLanguage"];*/ 3:
                    message.descriptionsByLanguage.push(TradeItemDescriptions.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: ItemDescriptionUpdatedPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.TradeItemDescriptions DescriptionsByLanguage = 3 [json_name = "DescriptionsByLanguage"]; */
        for (let i = 0; i < message.descriptionsByLanguage.length; i++)
            TradeItemDescriptions.internalBinaryWrite(message.descriptionsByLanguage[i], 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.ItemDescriptionUpdatedPayload
 */
export const ItemDescriptionUpdatedPayload = new ItemDescriptionUpdatedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemDescriptionUpdatedEvent$Type extends MessageType<ItemDescriptionUpdatedEvent> {
    constructor() {
        super("api.ItemDescriptionUpdatedEvent", [
            { 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: () => ItemDescriptionUpdatedPayload }
        ], { "api.messageType": "Event", "api.inputEvent": "DescriptionUpdated" });
    }
    create(value?: PartialMessage<ItemDescriptionUpdatedEvent>): ItemDescriptionUpdatedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemDescriptionUpdatedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemDescriptionUpdatedEvent): ItemDescriptionUpdatedEvent {
        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.ItemDescriptionUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemDescriptionUpdatedPayload.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: ItemDescriptionUpdatedEvent, 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.ItemDescriptionUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemDescriptionUpdatedPayload.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.ItemDescriptionUpdatedEvent
 */
export const ItemDescriptionUpdatedEvent = new ItemDescriptionUpdatedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemDescriptionUpdatedRequest$Type extends MessageType<ItemDescriptionUpdatedRequest> {
    constructor() {
        super("api.ItemDescriptionUpdatedRequest", [
            { 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: () => ItemDescriptionUpdatedPayload }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Payload"] } }, "api.messageType": "Request", "api.inputEvent": "DescriptionUpdated" });
    }
    create(value?: PartialMessage<ItemDescriptionUpdatedRequest>): ItemDescriptionUpdatedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemDescriptionUpdatedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemDescriptionUpdatedRequest): ItemDescriptionUpdatedRequest {
        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.ItemDescriptionUpdatedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemDescriptionUpdatedPayload.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: ItemDescriptionUpdatedRequest, 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.ItemDescriptionUpdatedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemDescriptionUpdatedPayload.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.ItemDescriptionUpdatedRequest
 */
export const ItemDescriptionUpdatedRequest = new ItemDescriptionUpdatedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemDescriptionUpdatedResponse$Type extends MessageType<ItemDescriptionUpdatedResponse> {
    constructor() {
        super("api.ItemDescriptionUpdatedResponse", [
            { 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": "DescriptionUpdated" });
    }
    create(value?: PartialMessage<ItemDescriptionUpdatedResponse>): ItemDescriptionUpdatedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemDescriptionUpdatedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemDescriptionUpdatedResponse): ItemDescriptionUpdatedResponse {
        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: ItemDescriptionUpdatedResponse, 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.ItemDescriptionUpdatedResponse
 */
export const ItemDescriptionUpdatedResponse = new ItemDescriptionUpdatedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemAttachmentAddedPayload$Type extends MessageType<ItemAttachmentAddedPayload> {
    constructor() {
        super("api.ItemAttachmentAddedPayload", [
            { no: 1, name: "Attachments", kind: "message", jsonName: "Attachments", repeat: 1 /*RepeatType.PACKED*/, T: () => AttachmentSummary, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Number of attachments added per type" } } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "AttachmentAdded" });
    }
    create(value?: PartialMessage<ItemAttachmentAddedPayload>): ItemAttachmentAddedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.attachments = [];
        if (value !== undefined)
            reflectionMergePartial<ItemAttachmentAddedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemAttachmentAddedPayload): ItemAttachmentAddedPayload {
        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: ItemAttachmentAddedPayload, 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.ItemAttachmentAddedPayload
 */
export const ItemAttachmentAddedPayload = new ItemAttachmentAddedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemAttachmentAddedEvent$Type extends MessageType<ItemAttachmentAddedEvent> {
    constructor() {
        super("api.ItemAttachmentAddedEvent", [
            { 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: () => ItemAttachmentAddedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "AttachmentAdded", "api.preAggMethods": "addAttachment" });
    }
    create(value?: PartialMessage<ItemAttachmentAddedEvent>): ItemAttachmentAddedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemAttachmentAddedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemAttachmentAddedEvent): ItemAttachmentAddedEvent {
        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.ItemAttachmentAddedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemAttachmentAddedPayload.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: ItemAttachmentAddedEvent, 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.ItemAttachmentAddedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemAttachmentAddedPayload.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.ItemAttachmentAddedEvent
 */
export const ItemAttachmentAddedEvent = new ItemAttachmentAddedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemAttachmentAddedRequest$Type extends MessageType<ItemAttachmentAddedRequest> {
    constructor() {
        super("api.ItemAttachmentAddedRequest", [
            { 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: () => ItemAttachmentAddedPayload, 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<ItemAttachmentAddedRequest>): ItemAttachmentAddedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemAttachmentAddedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemAttachmentAddedRequest): ItemAttachmentAddedRequest {
        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.ItemAttachmentAddedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemAttachmentAddedPayload.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: ItemAttachmentAddedRequest, 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.ItemAttachmentAddedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemAttachmentAddedPayload.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.ItemAttachmentAddedRequest
 */
export const ItemAttachmentAddedRequest = new ItemAttachmentAddedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemAttachmentAddedResponse$Type extends MessageType<ItemAttachmentAddedResponse> {
    constructor() {
        super("api.ItemAttachmentAddedResponse", [
            { 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<ItemAttachmentAddedResponse>): ItemAttachmentAddedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemAttachmentAddedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemAttachmentAddedResponse): ItemAttachmentAddedResponse {
        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: ItemAttachmentAddedResponse, 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.ItemAttachmentAddedResponse
 */
export const ItemAttachmentAddedResponse = new ItemAttachmentAddedResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemAttachmentRemovedPayload$Type extends MessageType<ItemAttachmentRemovedPayload> {
    constructor() {
        super("api.ItemAttachmentRemovedPayload", [
            { no: 1, name: "Attachments", kind: "message", jsonName: "Attachments", repeat: 1 /*RepeatType.PACKED*/, T: () => AttachmentSummary, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Number of attachments removed per type" } } }
        ], { "api.messageType": "Event", "api.payload": true, "api.inputEvent": "AttachmentRemoved" });
    }
    create(value?: PartialMessage<ItemAttachmentRemovedPayload>): ItemAttachmentRemovedPayload {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.attachments = [];
        if (value !== undefined)
            reflectionMergePartial<ItemAttachmentRemovedPayload>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemAttachmentRemovedPayload): ItemAttachmentRemovedPayload {
        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: ItemAttachmentRemovedPayload, 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.ItemAttachmentRemovedPayload
 */
export const ItemAttachmentRemovedPayload = new ItemAttachmentRemovedPayload$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemAttachmentRemovedEvent$Type extends MessageType<ItemAttachmentRemovedEvent> {
    constructor() {
        super("api.ItemAttachmentRemovedEvent", [
            { 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: () => ItemAttachmentRemovedPayload, options: { "validate.rules": { message: { required: true } } } }
        ], { "api.messageType": "Event", "api.inputEvent": "AttachmentRemoved", "api.preAggMethods": "removeAttachment" });
    }
    create(value?: PartialMessage<ItemAttachmentRemovedEvent>): ItemAttachmentRemovedEvent {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemAttachmentRemovedEvent>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemAttachmentRemovedEvent): ItemAttachmentRemovedEvent {
        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.ItemAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemAttachmentRemovedPayload.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: ItemAttachmentRemovedEvent, 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.ItemAttachmentRemovedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemAttachmentRemovedPayload.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.ItemAttachmentRemovedEvent
 */
export const ItemAttachmentRemovedEvent = new ItemAttachmentRemovedEvent$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemAttachmentRemovedRequest$Type extends MessageType<ItemAttachmentRemovedRequest> {
    constructor() {
        super("api.ItemAttachmentRemovedRequest", [
            { 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: () => ItemAttachmentRemovedPayload, 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<ItemAttachmentRemovedRequest>): ItemAttachmentRemovedRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemAttachmentRemovedRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemAttachmentRemovedRequest): ItemAttachmentRemovedRequest {
        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.ItemAttachmentRemovedPayload Payload = 3 [json_name = "Payload"];*/ 3:
                    message.payload = ItemAttachmentRemovedPayload.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: ItemAttachmentRemovedRequest, 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.ItemAttachmentRemovedPayload Payload = 3 [json_name = "Payload"]; */
        if (message.payload)
            ItemAttachmentRemovedPayload.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.ItemAttachmentRemovedRequest
 */
export const ItemAttachmentRemovedRequest = new ItemAttachmentRemovedRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ItemAttachmentRemovedResponse$Type extends MessageType<ItemAttachmentRemovedResponse> {
    constructor() {
        super("api.ItemAttachmentRemovedResponse", [
            { 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<ItemAttachmentRemovedResponse>): ItemAttachmentRemovedResponse {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ItemAttachmentRemovedResponse>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemAttachmentRemovedResponse): ItemAttachmentRemovedResponse {
        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: ItemAttachmentRemovedResponse, 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.ItemAttachmentRemovedResponse
 */
export const ItemAttachmentRemovedResponse = new ItemAttachmentRemovedResponse$Type();
/**
 * @generated ServiceType for protobuf service api.ItemInputAPI
 */
export const ItemInputAPI = new ServiceType("api.ItemInputAPI", [
    { name: "Created", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Item Inputs"], description: "An item has been created. This is typically called from ERP or WMS." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ItemCreatedRequest, O: ItemCreatedResponse },
    { name: "LogisticVariantUpdated", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Item Inputs"], description: "Some logistic variants have been updated on an item. This is typically called from ERP or WMS." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ItemLogisticVariantUpdatedRequest, O: ItemLogisticVariantUpdatedResponse },
    { name: "LogisticVariantRemoved", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Item Inputs"], description: "Some logistic variants have been removed on an item. This is typically called from ERP or WMS." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ItemLogisticVariantRemovedRequest, O: ItemLogisticVariantRemovedResponse },
    { name: "MetaDataUpdated", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Item Inputs"], description: "Some metadata have been updated on an item. This is typically called from ERP or WMS." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ItemMetaDataUpdatedRequest, O: ItemMetaDataUpdatedResponse },
    { name: "Deleted", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Item Inputs"], description: "An item has been deleted. This is typically called from ERP or WMS." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ItemDeletedRequest, O: ItemDeletedResponse },
    { name: "DescriptionUpdated", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Item Inputs"], description: "Some description have been updated on an item. This is typically called from ERP or WMS." }, "api.rscType": "Project", "api.roles": "Platform.Project-Input", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ItemDescriptionUpdatedRequest, O: ItemDescriptionUpdatedResponse },
    { name: "AttachmentAdded", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Item Inputs"], description: "An attachment is added for the Item." }, "api.rscType": "Project", "api.roles": "Platform.Project-Attachment", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: ItemAttachmentAddedRequest, O: ItemAttachmentAddedResponse },
    { name: "AttachmentRemoved", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Item Inputs"], description: "An attachment is removed for the Item." }, "api.rscType": "Project", "api.roles": "Platform.Project-Attachment", "api.platformReserved": true, "google.api.method_visibility": { restriction: "INTERNAL" } }, I: ItemAttachmentRemovedRequest, O: ItemAttachmentRemovedResponse }
], { "api.serviceType": "Api", "api.k8sService": "api-server" });
