// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "claimQuery.proto" (package "api", syntax proto3)
// tslint:disable
import { CountLinesResult } from "./shared";
import { CountLinesQuery } from "./shared";
import { GetKPIDataResult } from "./clickhouse";
import { GetKPIDataQuery } from "./clickhouse";
import { ExtractResult } from "./shared";
import { ExtractQuery } from "./shared";
import { ElementByMatchResult } from "./shared";
import { ElementByMatchQuery } from "./shared";
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 { User } from "./user";
import { RequestProjectHeader } from "./shared";
import { MatchFieldResult } from "./shared";
import { MatchField } from "./shared";
import { BlockFilter } from "./shared";
import { Claim } from "./claim";
import { ResultHeader } from "./shared";
import { EntityID } from "./shared";
import { QueryProjectHeader } from "./shared";
// 
// Query-server services

/**
 * @generated from protobuf message api.ClaimByIdQuery
 */
export interface ClaimByIdQuery {
    /**
     * @generated from protobuf field: api.QueryProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: QueryProjectHeader;
    /**
     * @generated from protobuf field: repeated api.EntityID IDs = 2 [json_name = "IDs"];
     */
    iDs: EntityID[];
}
/**
 * @generated from protobuf message api.ClaimByIdResult
 */
export interface ClaimByIdResult {
    /**
     * @generated from protobuf field: api.ResultHeader Header = 1 [json_name = "Header"];
     */
    header?: ResultHeader;
    /**
     * @generated from protobuf field: repeated api.Claim Objects = 2 [json_name = "Objects"];
     */
    objects: Claim[];
}
/**
 * @generated from protobuf message api.ClaimByFilterQuery
 */
export interface ClaimByFilterQuery {
    /**
     * @generated from protobuf field: api.QueryProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: QueryProjectHeader;
    /**
     * Number of maximum result
     *
     * @generated from protobuf field: string limitFilter = 4;
     */
    limitFilter: string;
    /**
     * @generated from protobuf field: string queryContext = 5;
     */
    queryContext: string;
    /**
     * list of blockFilters structure for Find query, each element (BlockFilter) in the list is an "OR" part of the query, if not empty, simpleFilters (deprecated) & rangeFilters (deprecated) will be ignored
     *
     * @generated from protobuf field: repeated api.BlockFilter BlockFilters = 6 [json_name = "BlockFilters"];
     */
    blockFilters: BlockFilter[];
}
/**
 * @generated from protobuf message api.ClaimByFilterResult
 */
export interface ClaimByFilterResult {
    /**
     * @generated from protobuf field: api.ResultHeader Header = 1 [json_name = "Header"];
     */
    header?: ResultHeader;
    /**
     * @generated from protobuf field: repeated api.Claim Objects = 2 [json_name = "Objects"];
     */
    objects: Claim[];
    /**
     * @generated from protobuf field: string queryContext = 3;
     */
    queryContext: string;
}
/**
 * @generated from protobuf message api.ClaimByMatchQuery
 */
export interface ClaimByMatchQuery {
    /**
     * @generated from protobuf field: api.QueryProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: QueryProjectHeader;
    /**
     * list of blockFilters structure for Find query, each element (BlockFilter) in the list is an "OR" part of the query, if not empty, simpleFilters (deprecated) & rangeFilters (deprecated) will be ignored
     *
     * @generated from protobuf field: repeated api.BlockFilter BlockFilters = 5 [json_name = "BlockFilters"];
     */
    blockFilters: BlockFilter[];
    /**
     * MatchField list structure, for FindMatching query
     *
     * @generated from protobuf field: repeated api.MatchField MatchFields = 6 [json_name = "MatchFields"];
     */
    matchFields: MatchField[];
}
/**
 * @generated from protobuf message api.ClaimByMatchResult
 */
export interface ClaimByMatchResult {
    /**
     * @generated from protobuf field: repeated api.MatchFieldResult MatchResults = 2 [json_name = "MatchResults"];
     */
    matchResults: MatchFieldResult[];
}
/**
 * @generated from protobuf message api.ClaimGetRoomQuery
 */
export interface ClaimGetRoomQuery {
    /**
     * @generated from protobuf field: api.QueryProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: QueryProjectHeader;
    /**
     * @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
     */
    iD?: EntityID;
}
/**
 * @generated from protobuf message api.ClaimGetRoomResult
 */
export interface ClaimGetRoomResult {
    /**
     * @generated from protobuf field: string RoomName = 1 [json_name = "RoomName"];
     */
    roomName: string;
}
/**
 * @generated from protobuf message api.ClaimGetAvailableContactsQuery
 */
export interface ClaimGetAvailableContactsQuery {
    /**
     * @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; // Claim ID to get available contacts for
    /**
     * @generated from protobuf field: repeated string PartnerIDs = 3 [json_name = "PartnerIDs"];
     */
    partnerIDs: string[]; // List of Partner IDs the contacts must be attached to
}
/**
 * @generated from protobuf message api.ClaimGetAvailableContactsResult
 */
export interface ClaimGetAvailableContactsResult {
    /**
     * @generated from protobuf field: repeated api.User Contacts = 1 [json_name = "Contacts"];
     */
    contacts: User[];
}
// @generated message type with reflection information, may provide speed optimized methods
class ClaimByIdQuery$Type extends MessageType<ClaimByIdQuery> {
    constructor() {
        super("api.ClaimByIdQuery", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => QueryProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "IDs", kind: "message", jsonName: "IDs", repeat: 1 /*RepeatType.PACKED*/, T: () => EntityID, options: { "validate.rules": { repeated: { minItems: "1" } } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "IDs"] } }, "api.messageType": "Query" });
    }
    create(value?: PartialMessage<ClaimByIdQuery>): ClaimByIdQuery {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.iDs = [];
        if (value !== undefined)
            reflectionMergePartial<ClaimByIdQuery>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimByIdQuery): ClaimByIdQuery {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.QueryProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = QueryProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* repeated api.EntityID IDs = 2 [json_name = "IDs"];*/ 2:
                    message.iDs.push(EntityID.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: ClaimByIdQuery, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.QueryProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            QueryProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.EntityID IDs = 2 [json_name = "IDs"]; */
        for (let i = 0; i < message.iDs.length; i++)
            EntityID.internalBinaryWrite(message.iDs[i], 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.ClaimByIdQuery
 */
export const ClaimByIdQuery = new ClaimByIdQuery$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimByIdResult$Type extends MessageType<ClaimByIdResult> {
    constructor() {
        super("api.ClaimByIdResult", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResultHeader },
            { no: 2, name: "Objects", kind: "message", jsonName: "Objects", repeat: 1 /*RepeatType.PACKED*/, T: () => Claim }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: {} }, "api.messageType": "Result" });
    }
    create(value?: PartialMessage<ClaimByIdResult>): ClaimByIdResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.objects = [];
        if (value !== undefined)
            reflectionMergePartial<ClaimByIdResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimByIdResult): ClaimByIdResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.ResultHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = ResultHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* repeated api.Claim Objects = 2 [json_name = "Objects"];*/ 2:
                    message.objects.push(Claim.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: ClaimByIdResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.ResultHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            ResultHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.Claim Objects = 2 [json_name = "Objects"]; */
        for (let i = 0; i < message.objects.length; i++)
            Claim.internalBinaryWrite(message.objects[i], 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.ClaimByIdResult
 */
export const ClaimByIdResult = new ClaimByIdResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimByFilterQuery$Type extends MessageType<ClaimByFilterQuery> {
    constructor() {
        super("api.ClaimByFilterQuery", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => QueryProjectHeader, options: { "validate.rules": { message: { required: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": {} } },
            { no: 4, name: "limitFilter", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Number of maximum result", example: "\"500\"" } } },
            { no: 5, name: "queryContext", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
            { no: 6, name: "BlockFilters", kind: "message", jsonName: "BlockFilters", repeat: 1 /*RepeatType.PACKED*/, T: () => BlockFilter }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
    }
    create(value?: PartialMessage<ClaimByFilterQuery>): ClaimByFilterQuery {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.limitFilter = "";
        message.queryContext = "";
        message.blockFilters = [];
        if (value !== undefined)
            reflectionMergePartial<ClaimByFilterQuery>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimByFilterQuery): ClaimByFilterQuery {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.QueryProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = QueryProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* string limitFilter */ 4:
                    message.limitFilter = reader.string();
                    break;
                case /* string queryContext */ 5:
                    message.queryContext = reader.string();
                    break;
                case /* repeated api.BlockFilter BlockFilters = 6 [json_name = "BlockFilters"];*/ 6:
                    message.blockFilters.push(BlockFilter.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: ClaimByFilterQuery, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.QueryProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            QueryProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* string limitFilter = 4; */
        if (message.limitFilter !== "")
            writer.tag(4, WireType.LengthDelimited).string(message.limitFilter);
        /* string queryContext = 5; */
        if (message.queryContext !== "")
            writer.tag(5, WireType.LengthDelimited).string(message.queryContext);
        /* repeated api.BlockFilter BlockFilters = 6 [json_name = "BlockFilters"]; */
        for (let i = 0; i < message.blockFilters.length; i++)
            BlockFilter.internalBinaryWrite(message.blockFilters[i], writer.tag(6, 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.ClaimByFilterQuery
 */
export const ClaimByFilterQuery = new ClaimByFilterQuery$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimByFilterResult$Type extends MessageType<ClaimByFilterResult> {
    constructor() {
        super("api.ClaimByFilterResult", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => ResultHeader },
            { no: 2, name: "Objects", kind: "message", jsonName: "Objects", repeat: 1 /*RepeatType.PACKED*/, T: () => Claim },
            { no: 3, name: "queryContext", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<ClaimByFilterResult>): ClaimByFilterResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.objects = [];
        message.queryContext = "";
        if (value !== undefined)
            reflectionMergePartial<ClaimByFilterResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimByFilterResult): ClaimByFilterResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.ResultHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = ResultHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* repeated api.Claim Objects = 2 [json_name = "Objects"];*/ 2:
                    message.objects.push(Claim.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* string queryContext */ 3:
                    message.queryContext = 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: ClaimByFilterResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.ResultHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            ResultHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.Claim Objects = 2 [json_name = "Objects"]; */
        for (let i = 0; i < message.objects.length; i++)
            Claim.internalBinaryWrite(message.objects[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
        /* string queryContext = 3; */
        if (message.queryContext !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.queryContext);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ClaimByFilterResult
 */
export const ClaimByFilterResult = new ClaimByFilterResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimByMatchQuery$Type extends MessageType<ClaimByMatchQuery> {
    constructor() {
        super("api.ClaimByMatchQuery", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => QueryProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 5, name: "BlockFilters", kind: "message", jsonName: "BlockFilters", repeat: 1 /*RepeatType.PACKED*/, T: () => BlockFilter },
            { no: 6, name: "MatchFields", kind: "message", jsonName: "MatchFields", repeat: 1 /*RepeatType.PACKED*/, T: () => MatchField, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "MatchField list structure, for FindMatching query" } } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
    }
    create(value?: PartialMessage<ClaimByMatchQuery>): ClaimByMatchQuery {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.blockFilters = [];
        message.matchFields = [];
        if (value !== undefined)
            reflectionMergePartial<ClaimByMatchQuery>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimByMatchQuery): ClaimByMatchQuery {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.QueryProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = QueryProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
                    break;
                case /* repeated api.BlockFilter BlockFilters = 5 [json_name = "BlockFilters"];*/ 5:
                    message.blockFilters.push(BlockFilter.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated api.MatchField MatchFields = 6 [json_name = "MatchFields"];*/ 6:
                    message.matchFields.push(MatchField.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: ClaimByMatchQuery, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.QueryProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            QueryProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.BlockFilter BlockFilters = 5 [json_name = "BlockFilters"]; */
        for (let i = 0; i < message.blockFilters.length; i++)
            BlockFilter.internalBinaryWrite(message.blockFilters[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
        /* repeated api.MatchField MatchFields = 6 [json_name = "MatchFields"]; */
        for (let i = 0; i < message.matchFields.length; i++)
            MatchField.internalBinaryWrite(message.matchFields[i], writer.tag(6, 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.ClaimByMatchQuery
 */
export const ClaimByMatchQuery = new ClaimByMatchQuery$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimByMatchResult$Type extends MessageType<ClaimByMatchResult> {
    constructor() {
        super("api.ClaimByMatchResult", [
            { no: 2, name: "MatchResults", kind: "message", jsonName: "MatchResults", repeat: 1 /*RepeatType.PACKED*/, T: () => MatchFieldResult }
        ]);
    }
    create(value?: PartialMessage<ClaimByMatchResult>): ClaimByMatchResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.matchResults = [];
        if (value !== undefined)
            reflectionMergePartial<ClaimByMatchResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimByMatchResult): ClaimByMatchResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.MatchFieldResult MatchResults = 2 [json_name = "MatchResults"];*/ 2:
                    message.matchResults.push(MatchFieldResult.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: ClaimByMatchResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.MatchFieldResult MatchResults = 2 [json_name = "MatchResults"]; */
        for (let i = 0; i < message.matchResults.length; i++)
            MatchFieldResult.internalBinaryWrite(message.matchResults[i], 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.ClaimByMatchResult
 */
export const ClaimByMatchResult = new ClaimByMatchResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimGetRoomQuery$Type extends MessageType<ClaimGetRoomQuery> {
    constructor() {
        super("api.ClaimGetRoomQuery", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => QueryProjectHeader, options: { "validate.rules": { message: { required: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": {} } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": {} } }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID"] } } });
    }
    create(value?: PartialMessage<ClaimGetRoomQuery>): ClaimGetRoomQuery {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ClaimGetRoomQuery>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimGetRoomQuery): ClaimGetRoomQuery {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* api.QueryProjectHeader Header = 1 [json_name = "Header"];*/ 1:
                    message.header = QueryProjectHeader.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: ClaimGetRoomQuery, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* api.QueryProjectHeader Header = 1 [json_name = "Header"]; */
        if (message.header)
            QueryProjectHeader.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.ClaimGetRoomQuery
 */
export const ClaimGetRoomQuery = new ClaimGetRoomQuery$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimGetRoomResult$Type extends MessageType<ClaimGetRoomResult> {
    constructor() {
        super("api.ClaimGetRoomResult", [
            { no: 1, name: "RoomName", kind: "scalar", jsonName: "RoomName", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<ClaimGetRoomResult>): ClaimGetRoomResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.roomName = "";
        if (value !== undefined)
            reflectionMergePartial<ClaimGetRoomResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimGetRoomResult): ClaimGetRoomResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string RoomName = 1 [json_name = "RoomName"];*/ 1:
                    message.roomName = 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: ClaimGetRoomResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string RoomName = 1 [json_name = "RoomName"]; */
        if (message.roomName !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.roomName);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ClaimGetRoomResult
 */
export const ClaimGetRoomResult = new ClaimGetRoomResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimGetAvailableContactsQuery$Type extends MessageType<ClaimGetAvailableContactsQuery> {
    constructor() {
        super("api.ClaimGetAvailableContactsQuery", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": {} } },
            { no: 2, name: "ID", kind: "message", jsonName: "ID", T: () => EntityID, options: { "validate.rules": { message: { required: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": {} } },
            { no: 3, name: "PartnerIDs", kind: "scalar", jsonName: "PartnerIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID"] } } });
    }
    create(value?: PartialMessage<ClaimGetAvailableContactsQuery>): ClaimGetAvailableContactsQuery {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.partnerIDs = [];
        if (value !== undefined)
            reflectionMergePartial<ClaimGetAvailableContactsQuery>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimGetAvailableContactsQuery): ClaimGetAvailableContactsQuery {
        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 /* repeated string PartnerIDs = 3 [json_name = "PartnerIDs"];*/ 3:
                    message.partnerIDs.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: ClaimGetAvailableContactsQuery, 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();
        /* repeated string PartnerIDs = 3 [json_name = "PartnerIDs"]; */
        for (let i = 0; i < message.partnerIDs.length; i++)
            writer.tag(3, WireType.LengthDelimited).string(message.partnerIDs[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.ClaimGetAvailableContactsQuery
 */
export const ClaimGetAvailableContactsQuery = new ClaimGetAvailableContactsQuery$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClaimGetAvailableContactsResult$Type extends MessageType<ClaimGetAvailableContactsResult> {
    constructor() {
        super("api.ClaimGetAvailableContactsResult", [
            { no: 1, name: "Contacts", kind: "message", jsonName: "Contacts", repeat: 1 /*RepeatType.PACKED*/, T: () => User }
        ]);
    }
    create(value?: PartialMessage<ClaimGetAvailableContactsResult>): ClaimGetAvailableContactsResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.contacts = [];
        if (value !== undefined)
            reflectionMergePartial<ClaimGetAvailableContactsResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClaimGetAvailableContactsResult): ClaimGetAvailableContactsResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.User Contacts = 1 [json_name = "Contacts"];*/ 1:
                    message.contacts.push(User.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: ClaimGetAvailableContactsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.User Contacts = 1 [json_name = "Contacts"]; */
        for (let i = 0; i < message.contacts.length; i++)
            User.internalBinaryWrite(message.contacts[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.ClaimGetAvailableContactsResult
 */
export const ClaimGetAvailableContactsResult = new ClaimGetAvailableContactsResult$Type();
/**
 * @generated ServiceType for protobuf service api.ClaimQuery
 */
export const ClaimQuery = new ServiceType("api.ClaimQuery", [
    { name: "GetByIds", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Claim Query"], description: "Get Claims from Ids" }, "api.rscType": "Project", "api.roles": "Platform.Project-Query", "api.moduleID": "claim", "api.tableName": "claimById", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ClaimByIdQuery, O: ClaimByIdResult },
    { name: "Find", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Claim Query"], description: "Find Claims using search criterias" }, "api.customQuery": true, "api.rscType": "Project", "api.roles": "Platform.Project-Query", "api.moduleID": "claim", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ClaimByFilterQuery, O: ClaimByFilterResult },
    { name: "FindMatchingFieldValues", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Claim Query"], description: "Using search criteria & a main field word, find the list of fields containing the searched word (used for auto completion purposes ...) " }, "api.customQuery": true, "api.rscType": "Project", "api.roles": "", "api.moduleID": "claim", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ClaimByMatchQuery, O: ClaimByMatchResult },
    { name: "FindMatchingFieldElements", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Claim Query"], description: "using search criteria & a main field word, find the list of field elements containing the searched word (used for auto completion purposes ...) " }, "api.rscType": "Project", "api.roles": "", "api.moduleID": "claim", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ElementByMatchQuery, O: ElementByMatchResult },
    { name: "Extract", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Claim Query"], description: "Schedule a data extraction" }, "api.rscType": "Project", "api.roles": "", "api.moduleID": "claim", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ExtractQuery, O: ExtractResult },
    { name: "GetKPIData", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Claim Query"], description: "Get Claim KPI data" }, "api.rscType": "Project", "api.roles": "", "api.moduleID": "claim", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: GetKPIDataQuery, O: GetKPIDataResult },
    { name: "GetRoom", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Claim Query"], description: "Get room for a claim" }, "api.rscType": "Project", "api.roles": "", "api.moduleID": "claim", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ClaimGetRoomQuery, O: ClaimGetRoomResult },
    { name: "CountLines", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Claim Query"], description: "Count lines in database for project" }, "api.rscType": "Platform", "api.roles": "Platform.Project-Query", "api.moduleID": "claim", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: CountLinesQuery, O: CountLinesResult },
    { name: "GetAvailableContacts", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Claim Query"], description: "Get available contacts for a claim" }, "api.customQuery": true, "api.rscType": "Project", "api.roles": "", "api.moduleID": "claim", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ClaimGetAvailableContactsQuery, O: ClaimGetAvailableContactsResult }
], { "api.serviceType": "Query", "api.k8sService": "collab-query-server" });
