// @generated by protobuf-ts 2.9.6
// @generated from protobuf file "kpi.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 { ModelDataSetEnum } from "./shared";
import { RequestProjectHeader } from "./shared";
/**
 * @generated from protobuf message api.Kpi
 */
export interface Kpi {
    /**
     * @generated from protobuf field: string Name = 1 [json_name = "Name"];
     */
    name: string;
    /**
     * @generated from protobuf field: string Level = 2 [json_name = "Level"];
     */
    level: string;
    // string Block = 3;

    /**
     * @generated from protobuf field: string DataType = 4 [json_name = "DataType"];
     */
    dataType: string;
    /**
     * @generated from protobuf field: string ContentType = 5 [json_name = "ContentType"];
     */
    contentType: string;
    /**
     * @generated from protobuf field: string EnumValues = 6 [json_name = "EnumValues"];
     */
    enumValues: string;
    /**
     * @generated from protobuf field: repeated api.KpiExpression Expressions = 7 [json_name = "Expressions"];
     */
    expressions: KpiExpression[];
    /**
     * @generated from protobuf field: string FullName = 8 [json_name = "FullName"];
     */
    fullName: string;
    /**
     * @generated from protobuf field: bool IsComputed = 9 [json_name = "IsComputed"];
     */
    isComputed: boolean;
    /**
     * repeated EntityCorrespondence EntityCorrespondences = 10;
     *
     * @generated from protobuf field: string GroupToJoin = 11 [json_name = "GroupToJoin"];
     */
    groupToJoin: string;
    /**
     * @generated from protobuf field: string ColumnType = 12 [json_name = "ColumnType"];
     */
    columnType: string;
    /**
     * @generated from protobuf field: bool IsQueryable = 13 [json_name = "IsQueryable"];
     */
    isQueryable: boolean;
}
/**
 * @generated from protobuf message api.KpiExpression
 */
export interface KpiExpression {
    /**
     * @generated from protobuf field: string Block = 1 [json_name = "Block"];
     */
    block: string;
    /**
     * @generated from protobuf field: string QueryType = 2 [json_name = "QueryType"];
     */
    queryType: string;
    /**
     * @generated from protobuf field: string Field = 3 [json_name = "Field"];
     */
    field: string;
    /**
     * @generated from protobuf field: string Query = 4 [json_name = "Query"];
     */
    query: string;
}
/**
 * @generated from protobuf message api.GetKpisRequest
 */
export interface GetKpisRequest {
    /**
     * @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
     */
    header?: RequestProjectHeader;
    // string Project = 1  
    //    [
    //        (validate.rules).string.min_len = 1
    //    ];

    /**
     * @generated from protobuf field: string Domain = 2 [json_name = "Domain"];
     */
    domain: string;
    /**
     * Widget analysis criterion, executionflow for Order and stock for Stock
     *
     * @generated from protobuf field: string Group = 3 [json_name = "Group"];
     */
    group: string;
    /**
     * @generated from protobuf field: bool isMetric = 4;
     */
    isMetric: boolean;
    /**
     * @generated from protobuf field: bool isDimension = 5;
     */
    isDimension: boolean;
    /**
     * @generated from protobuf field: bool isDate = 6;
     */
    isDate: boolean;
    /**
     * @generated from protobuf field: bool isCount = 7;
     */
    isCount: boolean;
    /**
     * @generated from protobuf field: bool OnlyQueryable = 8 [json_name = "OnlyQueryable"];
     */
    onlyQueryable: boolean;
}
/**
 * @generated from protobuf message api.GetKpisResult
 */
export interface GetKpisResult {
    /**
     * @generated from protobuf field: repeated api.Kpi Kpis = 1 [json_name = "Kpis"];
     */
    kpis: Kpi[];
}
/**
 * @generated from protobuf message api.GetKpiTableStructureRequest
 */
export interface GetKpiTableStructureRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
    // string Project = 1  
    //    [
    //        (validate.rules).string.min_len = 1
    //    ];

    /**
     * @generated from protobuf field: string Domain = 2 [json_name = "Domain"];
     */
    domain: string;
}
/**
 * @generated from protobuf message api.GetKpiTableStructureResult
 */
export interface GetKpiTableStructureResult {
    /**
     * @generated from protobuf field: repeated string Tables = 1 [json_name = "Tables"];
     */
    tables: string[];
}
/**
 * @generated from protobuf message api.UpdateKpiTableStructureRequest
 */
export interface UpdateKpiTableStructureRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
    // string Project = 1  
    //    [
    //        (validate.rules).string.min_len = 1
    //    ];

    /**
     * @generated from protobuf field: string Domain = 2 [json_name = "Domain"];
     */
    domain: string;
}
/**
 * @generated from protobuf message api.UpdateKpiTableStructureResult
 */
export interface UpdateKpiTableStructureResult {
}
/**
 * @generated from protobuf message api.GetKpiEntitiesRequest
 */
export interface GetKpiEntitiesRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
    // string Project = 1  
    //    [
    //        (validate.rules).string.min_len = 1
    //    ];

    /**
     * @generated from protobuf field: string Domain = 2 [json_name = "Domain"];
     */
    domain: string;
}
/**
 * @generated from protobuf message api.GetKpiEntitiesResult
 */
export interface GetKpiEntitiesResult {
    /**
     * @generated from protobuf field: repeated string Entities = 1 [json_name = "Entities"];
     */
    entities: string[];
}
/**
 * @generated from protobuf message api.ClearKpiEntityRequest
 */
export interface ClearKpiEntityRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
    /**
     * @generated from protobuf field: api.ModelDataSetEnum Entity = 2 [json_name = "Entity"];
     */
    entity: ModelDataSetEnum;
}
/**
 * @generated from protobuf message api.ClearKpiEntityResult
 */
export interface ClearKpiEntityResult {
}
/**
 * @generated from protobuf message api.CreateMVRequest
 */
export interface CreateMVRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
    /**
     * @generated from protobuf field: string Domain = 2 [json_name = "Domain"];
     */
    domain: string;
}
/**
 * @generated from protobuf message api.CreateMVResult
 */
export interface CreateMVResult {
}
/**
 * @generated from protobuf message api.DropMVRequest
 */
export interface DropMVRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
    /**
     * @generated from protobuf field: string Domain = 2 [json_name = "Domain"];
     */
    domain: string;
}
/**
 * @generated from protobuf message api.DropMVResult
 */
export interface DropMVResult {
}
/**
 * @generated from protobuf message api.PopulateMVRequest
 */
export interface PopulateMVRequest {
    /**
     * @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
     */
    projectID: string;
    /**
     * @generated from protobuf field: string Domain = 2 [json_name = "Domain"];
     */
    domain: string;
}
/**
 * @generated from protobuf message api.PopulateMVResult
 */
export interface PopulateMVResult {
}
/**
 * @generated from protobuf enum api.KPIGroupProperty
 */
export enum KPIGroupProperty {
    /**
     * Type of kpi group (Sink, Materialized, View)
     *
     * @generated from protobuf enum value: KPIGROUP_TYPE = 0;
     */
    KPIGROUP_TYPE = 0,
    /**
     * Table Orderby
     *
     * @generated from protobuf enum value: KPIGROUP_ORDERBY = 1;
     */
    KPIGROUP_ORDERBY = 1,
    /**
     * Table engine
     *
     * @generated from protobuf enum value: KPIGROUP_ENGINE = 2;
     */
    KPIGROUP_ENGINE = 2,
    /**
     * Table header columns
     *
     * @generated from protobuf enum value: KPIGROUP_HEADER_COLUMNS = 3;
     */
    KPIGROUP_HEADER_COLUMNS = 3,
    /**
     * Table PartitionBy
     *
     * @generated from protobuf enum value: KPIGROUP_PARTITIONBY = 4;
     */
    KPIGROUP_PARTITIONBY = 4
}
// @generated message type with reflection information, may provide speed optimized methods
class Kpi$Type extends MessageType<Kpi> {
    constructor() {
        super("api.Kpi", [
            { no: 1, name: "Name", kind: "scalar", jsonName: "Name", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "Level", kind: "scalar", jsonName: "Level", T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "DataType", kind: "scalar", jsonName: "DataType", T: 9 /*ScalarType.STRING*/ },
            { no: 5, name: "ContentType", kind: "scalar", jsonName: "ContentType", T: 9 /*ScalarType.STRING*/ },
            { no: 6, name: "EnumValues", kind: "scalar", jsonName: "EnumValues", T: 9 /*ScalarType.STRING*/ },
            { no: 7, name: "Expressions", kind: "message", jsonName: "Expressions", repeat: 1 /*RepeatType.PACKED*/, T: () => KpiExpression },
            { no: 8, name: "FullName", kind: "scalar", jsonName: "FullName", T: 9 /*ScalarType.STRING*/ },
            { no: 9, name: "IsComputed", kind: "scalar", jsonName: "IsComputed", T: 8 /*ScalarType.BOOL*/ },
            { no: 11, name: "GroupToJoin", kind: "scalar", jsonName: "GroupToJoin", T: 9 /*ScalarType.STRING*/ },
            { no: 12, name: "ColumnType", kind: "scalar", jsonName: "ColumnType", T: 9 /*ScalarType.STRING*/ },
            { no: 13, name: "IsQueryable", kind: "scalar", jsonName: "IsQueryable", T: 8 /*ScalarType.BOOL*/ }
        ]);
    }
    create(value?: PartialMessage<Kpi>): Kpi {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.name = "";
        message.level = "";
        message.dataType = "";
        message.contentType = "";
        message.enumValues = "";
        message.expressions = [];
        message.fullName = "";
        message.isComputed = false;
        message.groupToJoin = "";
        message.columnType = "";
        message.isQueryable = false;
        if (value !== undefined)
            reflectionMergePartial<Kpi>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Kpi): Kpi {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string Name = 1 [json_name = "Name"];*/ 1:
                    message.name = reader.string();
                    break;
                case /* string Level = 2 [json_name = "Level"];*/ 2:
                    message.level = reader.string();
                    break;
                case /* string DataType = 4 [json_name = "DataType"];*/ 4:
                    message.dataType = reader.string();
                    break;
                case /* string ContentType = 5 [json_name = "ContentType"];*/ 5:
                    message.contentType = reader.string();
                    break;
                case /* string EnumValues = 6 [json_name = "EnumValues"];*/ 6:
                    message.enumValues = reader.string();
                    break;
                case /* repeated api.KpiExpression Expressions = 7 [json_name = "Expressions"];*/ 7:
                    message.expressions.push(KpiExpression.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* string FullName = 8 [json_name = "FullName"];*/ 8:
                    message.fullName = reader.string();
                    break;
                case /* bool IsComputed = 9 [json_name = "IsComputed"];*/ 9:
                    message.isComputed = reader.bool();
                    break;
                case /* string GroupToJoin = 11 [json_name = "GroupToJoin"];*/ 11:
                    message.groupToJoin = reader.string();
                    break;
                case /* string ColumnType = 12 [json_name = "ColumnType"];*/ 12:
                    message.columnType = reader.string();
                    break;
                case /* bool IsQueryable = 13 [json_name = "IsQueryable"];*/ 13:
                    message.isQueryable = reader.bool();
                    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: Kpi, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string Name = 1 [json_name = "Name"]; */
        if (message.name !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.name);
        /* string Level = 2 [json_name = "Level"]; */
        if (message.level !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.level);
        /* string DataType = 4 [json_name = "DataType"]; */
        if (message.dataType !== "")
            writer.tag(4, WireType.LengthDelimited).string(message.dataType);
        /* string ContentType = 5 [json_name = "ContentType"]; */
        if (message.contentType !== "")
            writer.tag(5, WireType.LengthDelimited).string(message.contentType);
        /* string EnumValues = 6 [json_name = "EnumValues"]; */
        if (message.enumValues !== "")
            writer.tag(6, WireType.LengthDelimited).string(message.enumValues);
        /* repeated api.KpiExpression Expressions = 7 [json_name = "Expressions"]; */
        for (let i = 0; i < message.expressions.length; i++)
            KpiExpression.internalBinaryWrite(message.expressions[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join();
        /* string FullName = 8 [json_name = "FullName"]; */
        if (message.fullName !== "")
            writer.tag(8, WireType.LengthDelimited).string(message.fullName);
        /* bool IsComputed = 9 [json_name = "IsComputed"]; */
        if (message.isComputed !== false)
            writer.tag(9, WireType.Varint).bool(message.isComputed);
        /* string GroupToJoin = 11 [json_name = "GroupToJoin"]; */
        if (message.groupToJoin !== "")
            writer.tag(11, WireType.LengthDelimited).string(message.groupToJoin);
        /* string ColumnType = 12 [json_name = "ColumnType"]; */
        if (message.columnType !== "")
            writer.tag(12, WireType.LengthDelimited).string(message.columnType);
        /* bool IsQueryable = 13 [json_name = "IsQueryable"]; */
        if (message.isQueryable !== false)
            writer.tag(13, WireType.Varint).bool(message.isQueryable);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.Kpi
 */
export const Kpi = new Kpi$Type();
// @generated message type with reflection information, may provide speed optimized methods
class KpiExpression$Type extends MessageType<KpiExpression> {
    constructor() {
        super("api.KpiExpression", [
            { no: 1, name: "Block", kind: "scalar", jsonName: "Block", T: 9 /*ScalarType.STRING*/ },
            { no: 2, name: "QueryType", kind: "scalar", jsonName: "QueryType", T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "Field", kind: "scalar", jsonName: "Field", T: 9 /*ScalarType.STRING*/ },
            { no: 4, name: "Query", kind: "scalar", jsonName: "Query", T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<KpiExpression>): KpiExpression {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.block = "";
        message.queryType = "";
        message.field = "";
        message.query = "";
        if (value !== undefined)
            reflectionMergePartial<KpiExpression>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: KpiExpression): KpiExpression {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string Block = 1 [json_name = "Block"];*/ 1:
                    message.block = reader.string();
                    break;
                case /* string QueryType = 2 [json_name = "QueryType"];*/ 2:
                    message.queryType = reader.string();
                    break;
                case /* string Field = 3 [json_name = "Field"];*/ 3:
                    message.field = reader.string();
                    break;
                case /* string Query = 4 [json_name = "Query"];*/ 4:
                    message.query = 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: KpiExpression, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string Block = 1 [json_name = "Block"]; */
        if (message.block !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.block);
        /* string QueryType = 2 [json_name = "QueryType"]; */
        if (message.queryType !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.queryType);
        /* string Field = 3 [json_name = "Field"]; */
        if (message.field !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.field);
        /* string Query = 4 [json_name = "Query"]; */
        if (message.query !== "")
            writer.tag(4, WireType.LengthDelimited).string(message.query);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.KpiExpression
 */
export const KpiExpression = new KpiExpression$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetKpisRequest$Type extends MessageType<GetKpisRequest> {
    constructor() {
        super("api.GetKpisRequest", [
            { no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
            { no: 2, name: "Domain", kind: "scalar", jsonName: "Domain", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["trade", "collab"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { default: "trade" } } },
            { no: 3, name: "Group", kind: "scalar", jsonName: "Group", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["executionflow", "stock", "movement", "handlingunit", "actor", "item", "stock_extended", "claim"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Widget analysis criterion, executionflow, stock, movement or handlingunit", example: "\"executionflow\"" } } },
            { no: 4, name: "isMetric", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
            { no: 5, name: "isDimension", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
            { no: 6, name: "isDate", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
            { no: 7, name: "isCount", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
            { no: 8, name: "OnlyQueryable", kind: "scalar", jsonName: "OnlyQueryable", T: 8 /*ScalarType.BOOL*/ }
        ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
    }
    create(value?: PartialMessage<GetKpisRequest>): GetKpisRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.domain = "";
        message.group = "";
        message.isMetric = false;
        message.isDimension = false;
        message.isDate = false;
        message.isCount = false;
        message.onlyQueryable = false;
        if (value !== undefined)
            reflectionMergePartial<GetKpisRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetKpisRequest): GetKpisRequest {
        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 /* string Domain = 2 [json_name = "Domain"];*/ 2:
                    message.domain = reader.string();
                    break;
                case /* string Group = 3 [json_name = "Group"];*/ 3:
                    message.group = reader.string();
                    break;
                case /* bool isMetric */ 4:
                    message.isMetric = reader.bool();
                    break;
                case /* bool isDimension */ 5:
                    message.isDimension = reader.bool();
                    break;
                case /* bool isDate */ 6:
                    message.isDate = reader.bool();
                    break;
                case /* bool isCount */ 7:
                    message.isCount = reader.bool();
                    break;
                case /* bool OnlyQueryable = 8 [json_name = "OnlyQueryable"];*/ 8:
                    message.onlyQueryable = reader.bool();
                    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: GetKpisRequest, 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();
        /* string Domain = 2 [json_name = "Domain"]; */
        if (message.domain !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.domain);
        /* string Group = 3 [json_name = "Group"]; */
        if (message.group !== "")
            writer.tag(3, WireType.LengthDelimited).string(message.group);
        /* bool isMetric = 4; */
        if (message.isMetric !== false)
            writer.tag(4, WireType.Varint).bool(message.isMetric);
        /* bool isDimension = 5; */
        if (message.isDimension !== false)
            writer.tag(5, WireType.Varint).bool(message.isDimension);
        /* bool isDate = 6; */
        if (message.isDate !== false)
            writer.tag(6, WireType.Varint).bool(message.isDate);
        /* bool isCount = 7; */
        if (message.isCount !== false)
            writer.tag(7, WireType.Varint).bool(message.isCount);
        /* bool OnlyQueryable = 8 [json_name = "OnlyQueryable"]; */
        if (message.onlyQueryable !== false)
            writer.tag(8, WireType.Varint).bool(message.onlyQueryable);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.GetKpisRequest
 */
export const GetKpisRequest = new GetKpisRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetKpisResult$Type extends MessageType<GetKpisResult> {
    constructor() {
        super("api.GetKpisResult", [
            { no: 1, name: "Kpis", kind: "message", jsonName: "Kpis", repeat: 1 /*RepeatType.PACKED*/, T: () => Kpi }
        ]);
    }
    create(value?: PartialMessage<GetKpisResult>): GetKpisResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.kpis = [];
        if (value !== undefined)
            reflectionMergePartial<GetKpisResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetKpisResult): GetKpisResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated api.Kpi Kpis = 1 [json_name = "Kpis"];*/ 1:
                    message.kpis.push(Kpi.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: GetKpisResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated api.Kpi Kpis = 1 [json_name = "Kpis"]; */
        for (let i = 0; i < message.kpis.length; i++)
            Kpi.internalBinaryWrite(message.kpis[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.GetKpisResult
 */
export const GetKpisResult = new GetKpisResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetKpiTableStructureRequest$Type extends MessageType<GetKpiTableStructureRequest> {
    constructor() {
        super("api.GetKpiTableStructureRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "Domain", kind: "scalar", jsonName: "Domain", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["trade", "collab", "core"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { default: "trade" } } }
        ]);
    }
    create(value?: PartialMessage<GetKpiTableStructureRequest>): GetKpiTableStructureRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        message.domain = "";
        if (value !== undefined)
            reflectionMergePartial<GetKpiTableStructureRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetKpiTableStructureRequest): GetKpiTableStructureRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string ProjectID = 1 [json_name = "ProjectID"];*/ 1:
                    message.projectID = reader.string();
                    break;
                case /* string Domain = 2 [json_name = "Domain"];*/ 2:
                    message.domain = 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: GetKpiTableStructureRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ProjectID = 1 [json_name = "ProjectID"]; */
        if (message.projectID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.projectID);
        /* string Domain = 2 [json_name = "Domain"]; */
        if (message.domain !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.domain);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.GetKpiTableStructureRequest
 */
export const GetKpiTableStructureRequest = new GetKpiTableStructureRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetKpiTableStructureResult$Type extends MessageType<GetKpiTableStructureResult> {
    constructor() {
        super("api.GetKpiTableStructureResult", [
            { no: 1, name: "Tables", kind: "scalar", jsonName: "Tables", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<GetKpiTableStructureResult>): GetKpiTableStructureResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.tables = [];
        if (value !== undefined)
            reflectionMergePartial<GetKpiTableStructureResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetKpiTableStructureResult): GetKpiTableStructureResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated string Tables = 1 [json_name = "Tables"];*/ 1:
                    message.tables.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: GetKpiTableStructureResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated string Tables = 1 [json_name = "Tables"]; */
        for (let i = 0; i < message.tables.length; i++)
            writer.tag(1, WireType.LengthDelimited).string(message.tables[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.GetKpiTableStructureResult
 */
export const GetKpiTableStructureResult = new GetKpiTableStructureResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class UpdateKpiTableStructureRequest$Type extends MessageType<UpdateKpiTableStructureRequest> {
    constructor() {
        super("api.UpdateKpiTableStructureRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "Domain", kind: "scalar", jsonName: "Domain", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["trade", "collab"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { default: "trade" } } }
        ]);
    }
    create(value?: PartialMessage<UpdateKpiTableStructureRequest>): UpdateKpiTableStructureRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        message.domain = "";
        if (value !== undefined)
            reflectionMergePartial<UpdateKpiTableStructureRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateKpiTableStructureRequest): UpdateKpiTableStructureRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string ProjectID = 1 [json_name = "ProjectID"];*/ 1:
                    message.projectID = reader.string();
                    break;
                case /* string Domain = 2 [json_name = "Domain"];*/ 2:
                    message.domain = 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: UpdateKpiTableStructureRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ProjectID = 1 [json_name = "ProjectID"]; */
        if (message.projectID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.projectID);
        /* string Domain = 2 [json_name = "Domain"]; */
        if (message.domain !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.domain);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.UpdateKpiTableStructureRequest
 */
export const UpdateKpiTableStructureRequest = new UpdateKpiTableStructureRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class UpdateKpiTableStructureResult$Type extends MessageType<UpdateKpiTableStructureResult> {
    constructor() {
        super("api.UpdateKpiTableStructureResult", []);
    }
    create(value?: PartialMessage<UpdateKpiTableStructureResult>): UpdateKpiTableStructureResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<UpdateKpiTableStructureResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateKpiTableStructureResult): UpdateKpiTableStructureResult {
        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: UpdateKpiTableStructureResult, 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.UpdateKpiTableStructureResult
 */
export const UpdateKpiTableStructureResult = new UpdateKpiTableStructureResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetKpiEntitiesRequest$Type extends MessageType<GetKpiEntitiesRequest> {
    constructor() {
        super("api.GetKpiEntitiesRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "Domain", kind: "scalar", jsonName: "Domain", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["trade", "collab"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { default: "trade" } } }
        ]);
    }
    create(value?: PartialMessage<GetKpiEntitiesRequest>): GetKpiEntitiesRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        message.domain = "";
        if (value !== undefined)
            reflectionMergePartial<GetKpiEntitiesRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetKpiEntitiesRequest): GetKpiEntitiesRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string ProjectID = 1 [json_name = "ProjectID"];*/ 1:
                    message.projectID = reader.string();
                    break;
                case /* string Domain = 2 [json_name = "Domain"];*/ 2:
                    message.domain = 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: GetKpiEntitiesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ProjectID = 1 [json_name = "ProjectID"]; */
        if (message.projectID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.projectID);
        /* string Domain = 2 [json_name = "Domain"]; */
        if (message.domain !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.domain);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.GetKpiEntitiesRequest
 */
export const GetKpiEntitiesRequest = new GetKpiEntitiesRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetKpiEntitiesResult$Type extends MessageType<GetKpiEntitiesResult> {
    constructor() {
        super("api.GetKpiEntitiesResult", [
            { no: 1, name: "Entities", kind: "scalar", jsonName: "Entities", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
        ]);
    }
    create(value?: PartialMessage<GetKpiEntitiesResult>): GetKpiEntitiesResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.entities = [];
        if (value !== undefined)
            reflectionMergePartial<GetKpiEntitiesResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetKpiEntitiesResult): GetKpiEntitiesResult {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* repeated string Entities = 1 [json_name = "Entities"];*/ 1:
                    message.entities.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: GetKpiEntitiesResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* repeated string Entities = 1 [json_name = "Entities"]; */
        for (let i = 0; i < message.entities.length; i++)
            writer.tag(1, WireType.LengthDelimited).string(message.entities[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.GetKpiEntitiesResult
 */
export const GetKpiEntitiesResult = new GetKpiEntitiesResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClearKpiEntityRequest$Type extends MessageType<ClearKpiEntityRequest> {
    constructor() {
        super("api.ClearKpiEntityRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "Entity", kind: "enum", jsonName: "Entity", T: () => ["api.ModelDataSetEnum", ModelDataSetEnum], options: { "validate.rules": { enum: { definedOnly: true } } } }
        ]);
    }
    create(value?: PartialMessage<ClearKpiEntityRequest>): ClearKpiEntityRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        message.entity = 0;
        if (value !== undefined)
            reflectionMergePartial<ClearKpiEntityRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClearKpiEntityRequest): ClearKpiEntityRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string ProjectID = 1 [json_name = "ProjectID"];*/ 1:
                    message.projectID = reader.string();
                    break;
                case /* api.ModelDataSetEnum Entity = 2 [json_name = "Entity"];*/ 2:
                    message.entity = reader.int32();
                    break;
                default:
                    let u = options.readUnknownField;
                    if (u === "throw")
                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
                    let d = reader.skip(wireType);
                    if (u !== false)
                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
            }
        }
        return message;
    }
    internalBinaryWrite(message: ClearKpiEntityRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ProjectID = 1 [json_name = "ProjectID"]; */
        if (message.projectID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.projectID);
        /* api.ModelDataSetEnum Entity = 2 [json_name = "Entity"]; */
        if (message.entity !== 0)
            writer.tag(2, WireType.Varint).int32(message.entity);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.ClearKpiEntityRequest
 */
export const ClearKpiEntityRequest = new ClearKpiEntityRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ClearKpiEntityResult$Type extends MessageType<ClearKpiEntityResult> {
    constructor() {
        super("api.ClearKpiEntityResult", []);
    }
    create(value?: PartialMessage<ClearKpiEntityResult>): ClearKpiEntityResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<ClearKpiEntityResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClearKpiEntityResult): ClearKpiEntityResult {
        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: ClearKpiEntityResult, 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.ClearKpiEntityResult
 */
export const ClearKpiEntityResult = new ClearKpiEntityResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateMVRequest$Type extends MessageType<CreateMVRequest> {
    constructor() {
        super("api.CreateMVRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "Domain", kind: "scalar", jsonName: "Domain", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["trade", "collab", "core"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { default: "trade" } } }
        ]);
    }
    create(value?: PartialMessage<CreateMVRequest>): CreateMVRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        message.domain = "";
        if (value !== undefined)
            reflectionMergePartial<CreateMVRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateMVRequest): CreateMVRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string ProjectID = 1 [json_name = "ProjectID"];*/ 1:
                    message.projectID = reader.string();
                    break;
                case /* string Domain = 2 [json_name = "Domain"];*/ 2:
                    message.domain = 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: CreateMVRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ProjectID = 1 [json_name = "ProjectID"]; */
        if (message.projectID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.projectID);
        /* string Domain = 2 [json_name = "Domain"]; */
        if (message.domain !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.domain);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.CreateMVRequest
 */
export const CreateMVRequest = new CreateMVRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateMVResult$Type extends MessageType<CreateMVResult> {
    constructor() {
        super("api.CreateMVResult", []);
    }
    create(value?: PartialMessage<CreateMVResult>): CreateMVResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<CreateMVResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateMVResult): CreateMVResult {
        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: CreateMVResult, 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.CreateMVResult
 */
export const CreateMVResult = new CreateMVResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DropMVRequest$Type extends MessageType<DropMVRequest> {
    constructor() {
        super("api.DropMVRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "Domain", kind: "scalar", jsonName: "Domain", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["trade", "collab", "core"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { default: "trade" } } }
        ]);
    }
    create(value?: PartialMessage<DropMVRequest>): DropMVRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        message.domain = "";
        if (value !== undefined)
            reflectionMergePartial<DropMVRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DropMVRequest): DropMVRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string ProjectID = 1 [json_name = "ProjectID"];*/ 1:
                    message.projectID = reader.string();
                    break;
                case /* string Domain = 2 [json_name = "Domain"];*/ 2:
                    message.domain = 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: DropMVRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ProjectID = 1 [json_name = "ProjectID"]; */
        if (message.projectID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.projectID);
        /* string Domain = 2 [json_name = "Domain"]; */
        if (message.domain !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.domain);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.DropMVRequest
 */
export const DropMVRequest = new DropMVRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DropMVResult$Type extends MessageType<DropMVResult> {
    constructor() {
        super("api.DropMVResult", []);
    }
    create(value?: PartialMessage<DropMVResult>): DropMVResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<DropMVResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DropMVResult): DropMVResult {
        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: DropMVResult, 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.DropMVResult
 */
export const DropMVResult = new DropMVResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class PopulateMVRequest$Type extends MessageType<PopulateMVRequest> {
    constructor() {
        super("api.PopulateMVRequest", [
            { no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
            { no: 2, name: "Domain", kind: "scalar", jsonName: "Domain", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["trade", "collab", "core"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { default: "trade" } } }
        ]);
    }
    create(value?: PartialMessage<PopulateMVRequest>): PopulateMVRequest {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.projectID = "";
        message.domain = "";
        if (value !== undefined)
            reflectionMergePartial<PopulateMVRequest>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PopulateMVRequest): PopulateMVRequest {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* string ProjectID = 1 [json_name = "ProjectID"];*/ 1:
                    message.projectID = reader.string();
                    break;
                case /* string Domain = 2 [json_name = "Domain"];*/ 2:
                    message.domain = 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: PopulateMVRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* string ProjectID = 1 [json_name = "ProjectID"]; */
        if (message.projectID !== "")
            writer.tag(1, WireType.LengthDelimited).string(message.projectID);
        /* string Domain = 2 [json_name = "Domain"]; */
        if (message.domain !== "")
            writer.tag(2, WireType.LengthDelimited).string(message.domain);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message api.PopulateMVRequest
 */
export const PopulateMVRequest = new PopulateMVRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class PopulateMVResult$Type extends MessageType<PopulateMVResult> {
    constructor() {
        super("api.PopulateMVResult", []);
    }
    create(value?: PartialMessage<PopulateMVResult>): PopulateMVResult {
        const message = globalThis.Object.create((this.messagePrototype!));
        if (value !== undefined)
            reflectionMergePartial<PopulateMVResult>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PopulateMVResult): PopulateMVResult {
        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: PopulateMVResult, 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.PopulateMVResult
 */
export const PopulateMVResult = new PopulateMVResult$Type();
/**
 * @generated ServiceType for protobuf service api.KpiService
 */
export const KpiService = new ServiceType("api.KpiService", [
    { name: "GetKpis", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project KPIs"], description: "Get the KPIs analysis possibilities" }, "api.rscType": "Project", "api.roles": "Platform.Project-KPI", "google.api.method_visibility": { restriction: "SDK" } }, I: GetKpisRequest, O: GetKpisResult },
    { name: "GetKpiTableStructure", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project KPIs"], description: "Get KPI Table structure" }, "api.rscType": "Platform", "api.roles": "Platform.Project-KPI", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: GetKpiTableStructureRequest, O: GetKpiTableStructureResult },
    { name: "UpdateKpiTableStructure", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project KPIs"], description: "Update KPI Table structure" }, "api.rscType": "Platform", "api.roles": "Platform.Project-KPI", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: UpdateKpiTableStructureRequest, O: UpdateKpiTableStructureResult },
    { name: "GetKpiEntities", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project KPIs"], description: "Get the entities with KPIs" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: GetKpiEntitiesRequest, O: GetKpiEntitiesResult },
    { name: "ClearKpiEntity", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project KPIs"], description: "Clear KPI data for a specific entity" }, "api.rscType": "Platform", "api.roles": "Platform.Project-KPI", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: ClearKpiEntityRequest, O: ClearKpiEntityResult },
    { name: "CreateMV", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project KPIs"], description: "Build materialized view for all kpi groups" }, "api.rscType": "Platform", "api.roles": "Platform.Project-KPI", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: CreateMVRequest, O: CreateMVResult },
    { name: "DropMV", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project KPIs"], description: "Clear materialized view for all kpi groups" }, "api.rscType": "Platform", "api.roles": "Platform.Project-KPI", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: DropMVRequest, O: DropMVResult },
    { name: "PopulateMV", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project KPIs"], description: "Insert data in materialized view for all kpi groups" }, "api.rscType": "Platform", "api.roles": "Platform.Project-KPI", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: PopulateMVRequest, O: PopulateMVResult }
], { "api.k8sService": "project-model-server" });
