// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file clickhouse.proto (package api, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { BlockFilter, ExtractColumnFormat, QueryProjectHeader, StringDateObject, TranslationMap, WorkflowExecutionResult } from "./shared_pb.js";

/**
 * @generated from enum api.CHChartType
 */
export enum CHChartType {
  /**
   * @generated from enum value: CH_CHART_TYPE_UNKNOWN = 0;
   */
  CH_CHART_TYPE_UNKNOWN = 0,

  /**
   * @generated from enum value: CH_CHART_TYPE_LINE_CHART = 1;
   */
  CH_CHART_TYPE_LINE_CHART = 1,

  /**
   * @generated from enum value: CH_CHART_TYPE_MULTI_LINE_CHART = 2;
   */
  CH_CHART_TYPE_MULTI_LINE_CHART = 2,

  /**
   * @generated from enum value: CH_CHART_TYPE_VERTICAL_BAR_CHART = 3;
   */
  CH_CHART_TYPE_VERTICAL_BAR_CHART = 3,

  /**
   * @generated from enum value: CH_CHART_TYPE_HORIZONTAL_BAR_CHART = 4;
   */
  CH_CHART_TYPE_HORIZONTAL_BAR_CHART = 4,

  /**
   * @generated from enum value: CH_CHART_TYPE_STACKED_BAR_CHART = 5;
   */
  CH_CHART_TYPE_STACKED_BAR_CHART = 5,

  /**
   * @generated from enum value: CH_CHART_TYPE_PIE_CHART = 6;
   */
  CH_CHART_TYPE_PIE_CHART = 6,

  /**
   * @generated from enum value: CH_CHART_TYPE_DOUGHNUT_CHART = 7;
   */
  CH_CHART_TYPE_DOUGHNUT_CHART = 7,

  /**
   * @generated from enum value: CH_CHART_TYPE_METRIC = 8;
   */
  CH_CHART_TYPE_METRIC = 8,

  /**
   * @generated from enum value: CH_CHART_TYPE_TABLE = 9;
   */
  CH_CHART_TYPE_TABLE = 9,

  /**
   * @generated from enum value: CH_CHART_TYPE_PIVOT_TABLE = 10;
   */
  CH_CHART_TYPE_PIVOT_TABLE = 10,
}
// Retrieve enum metadata with: proto3.getEnumType(CHChartType)
proto3.util.setEnumType(CHChartType, "api.CHChartType", [
  { no: 0, name: "CH_CHART_TYPE_UNKNOWN" },
  { no: 1, name: "CH_CHART_TYPE_LINE_CHART" },
  { no: 2, name: "CH_CHART_TYPE_MULTI_LINE_CHART" },
  { no: 3, name: "CH_CHART_TYPE_VERTICAL_BAR_CHART" },
  { no: 4, name: "CH_CHART_TYPE_HORIZONTAL_BAR_CHART" },
  { no: 5, name: "CH_CHART_TYPE_STACKED_BAR_CHART" },
  { no: 6, name: "CH_CHART_TYPE_PIE_CHART" },
  { no: 7, name: "CH_CHART_TYPE_DOUGHNUT_CHART" },
  { no: 8, name: "CH_CHART_TYPE_METRIC" },
  { no: 9, name: "CH_CHART_TYPE_TABLE" },
  { no: 10, name: "CH_CHART_TYPE_PIVOT_TABLE" },
]);

/**
 * @generated from enum api.CHQueryType
 */
export enum CHQueryType {
  /**
   * @generated from enum value: CH_QUERY_TYPE_UNKNOWN = 0;
   */
  CH_QUERY_TYPE_UNKNOWN = 0,

  /**
   * @generated from enum value: CH_QUERY_TYPE_A = 1;
   */
  CH_QUERY_TYPE_A = 1,

  /**
   * @generated from enum value: CH_QUERY_TYPE_B = 2;
   */
  CH_QUERY_TYPE_B = 2,

  /**
   * @generated from enum value: CH_QUERY_TYPE_C = 3;
   */
  CH_QUERY_TYPE_C = 3,
}
// Retrieve enum metadata with: proto3.getEnumType(CHQueryType)
proto3.util.setEnumType(CHQueryType, "api.CHQueryType", [
  { no: 0, name: "CH_QUERY_TYPE_UNKNOWN" },
  { no: 1, name: "CH_QUERY_TYPE_A" },
  { no: 2, name: "CH_QUERY_TYPE_B" },
  { no: 3, name: "CH_QUERY_TYPE_C" },
]);

/**
 * @generated from enum api.KpiDataResultFormat
 */
export enum KpiDataResultFormat {
  /**
   * @generated from enum value: KPIDATA_RESULT_FORMAT_RAW = 0;
   */
  KPIDATA_RESULT_FORMAT_RAW = 0,

  /**
   * @generated from enum value: KPIDATA_RESULT_FORMAT_SERIES = 1;
   */
  KPIDATA_RESULT_FORMAT_SERIES = 1,
}
// Retrieve enum metadata with: proto3.getEnumType(KpiDataResultFormat)
proto3.util.setEnumType(KpiDataResultFormat, "api.KpiDataResultFormat", [
  { no: 0, name: "KPIDATA_RESULT_FORMAT_RAW" },
  { no: 1, name: "KPIDATA_RESULT_FORMAT_SERIES" },
]);

/**
 * @generated from message api.CHDimension
 */
export class CHDimension extends Message<CHDimension> {
  /**
   * @generated from field: string Name = 1;
   */
  Name = "";

  /**
   * @generated from field: string Granularity = 2;
   */
  Granularity = "";

  /**
   * @generated from field: string Level = 3;
   */
  Level = "";

  /**
   * @generated from field: string DataType = 4;
   */
  DataType = "";

  /**
   * @generated from field: string ContentType = 5;
   */
  ContentType = "";

  /**
   * @generated from field: string EnumValues = 6;
   */
  EnumValues = "";

  /**
   * A period of time
   *
   * @generated from field: string Period = 7;
   */
  Period = "";

  /**
   * Allowed values : \"\", \"EQUAL\", \"DIFF\", \"START_BY\", \"NOT_START_BY\", \"FINISH_BY\", \"NOT_FINISH_BY\", \"CONTAINS\", \"NOT_CONTAINS\", \"IN_LIST\", \"NOT_IN_LIST\"
   *
   * @generated from field: string Operator = 8;
   */
  Operator = "";

  /**
   * @generated from field: repeated string Values = 9;
   */
  Values: string[] = [];

  /**
   * @generated from field: api.StringDateObject StartDate = 10;
   */
  StartDate?: StringDateObject;

  /**
   * @generated from field: api.StringDateObject EndDate = 11;
   */
  EndDate?: StringDateObject;

  /**
   * @generated from field: repeated api.CHQueryExpression Expressions = 12;
   */
  Expressions: CHQueryExpression[] = [];

  /**
   * @generated from field: bool IsComputed = 13;
   */
  IsComputed = false;

  /**
   * Only useful for filters
   *
   * @generated from field: api.CHDimension Or = 14;
   */
  Or?: CHDimension;

  constructor(data?: PartialMessage<CHDimension>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.CHDimension";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "Granularity", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "Level", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "DataType", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "ContentType", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 6, name: "EnumValues", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 7, name: "Period", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 8, name: "Operator", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 9, name: "Values", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 10, name: "StartDate", kind: "message", T: StringDateObject },
    { no: 11, name: "EndDate", kind: "message", T: StringDateObject },
    { no: 12, name: "Expressions", kind: "message", T: CHQueryExpression, repeated: true },
    { no: 13, name: "IsComputed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
    { no: 14, name: "Or", kind: "message", T: CHDimension },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CHDimension {
    return new CHDimension().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CHDimension {
    return new CHDimension().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CHDimension {
    return new CHDimension().fromJsonString(jsonString, options);
  }

  static equals(a: CHDimension | PlainMessage<CHDimension> | undefined, b: CHDimension | PlainMessage<CHDimension> | undefined): boolean {
    return proto3.util.equals(CHDimension, a, b);
  }
}

/**
 * @generated from message api.CHQueryExpression
 */
export class CHQueryExpression extends Message<CHQueryExpression> {
  /**
   * @generated from field: string Block = 1;
   */
  Block = "";

  /**
   * @generated from field: api.CHQueryType QueryType = 2;
   */
  QueryType = CHQueryType.CH_QUERY_TYPE_UNKNOWN;

  /**
   * @generated from field: string Field = 3;
   */
  Field = "";

  /**
   * @generated from field: string Query = 4;
   */
  Query = "";

  constructor(data?: PartialMessage<CHQueryExpression>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.CHQueryExpression";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Block", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "QueryType", kind: "enum", T: proto3.getEnumType(CHQueryType) },
    { no: 3, name: "Field", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "Query", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CHQueryExpression {
    return new CHQueryExpression().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CHQueryExpression {
    return new CHQueryExpression().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CHQueryExpression {
    return new CHQueryExpression().fromJsonString(jsonString, options);
  }

  static equals(a: CHQueryExpression | PlainMessage<CHQueryExpression> | undefined, b: CHQueryExpression | PlainMessage<CHQueryExpression> | undefined): boolean {
    return proto3.util.equals(CHQueryExpression, a, b);
  }
}

/**
 * @generated from message api.CHMetric
 */
export class CHMetric extends Message<CHMetric> {
  /**
   * @generated from field: string Name = 1;
   */
  Name = "";

  /**
   * @generated from field: string Level = 3;
   */
  Level = "";

  /**
   * @generated from field: string DataType = 4;
   */
  DataType = "";

  /**
   * @generated from field: string ContentType = 5;
   */
  ContentType = "";

  /**
   * @generated from field: string EnumValues = 6;
   */
  EnumValues = "";

  /**
   * @generated from field: repeated api.CHQueryExpression Expressions = 12;
   */
  Expressions: CHQueryExpression[] = [];

  /**
   * @generated from field: bool IsComputed = 13;
   */
  IsComputed = false;

  constructor(data?: PartialMessage<CHMetric>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.CHMetric";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "Level", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "DataType", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "ContentType", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 6, name: "EnumValues", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 12, name: "Expressions", kind: "message", T: CHQueryExpression, repeated: true },
    { no: 13, name: "IsComputed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CHMetric {
    return new CHMetric().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CHMetric {
    return new CHMetric().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CHMetric {
    return new CHMetric().fromJsonString(jsonString, options);
  }

  static equals(a: CHMetric | PlainMessage<CHMetric> | undefined, b: CHMetric | PlainMessage<CHMetric> | undefined): boolean {
    return proto3.util.equals(CHMetric, a, b);
  }
}

/**
 * @generated from message api.CHFilter
 */
export class CHFilter extends Message<CHFilter> {
  /**
   * @generated from field: repeated api.CHDimension Dimensions = 1;
   */
  Dimensions: CHDimension[] = [];

  constructor(data?: PartialMessage<CHFilter>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.CHFilter";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Dimensions", kind: "message", T: CHDimension, repeated: true },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CHFilter {
    return new CHFilter().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CHFilter {
    return new CHFilter().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CHFilter {
    return new CHFilter().fromJsonString(jsonString, options);
  }

  static equals(a: CHFilter | PlainMessage<CHFilter> | undefined, b: CHFilter | PlainMessage<CHFilter> | undefined): boolean {
    return proto3.util.equals(CHFilter, a, b);
  }
}

/**
 * @generated from message api.KpiDataSerie
 */
export class KpiDataSerie extends Message<KpiDataSerie> {
  /**
   * @generated from field: string Name = 1;
   */
  Name = "";

  /**
   * @generated from field: repeated string Values = 2;
   */
  Values: string[] = [];

  constructor(data?: PartialMessage<KpiDataSerie>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.KpiDataSerie";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "Values", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): KpiDataSerie {
    return new KpiDataSerie().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): KpiDataSerie {
    return new KpiDataSerie().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): KpiDataSerie {
    return new KpiDataSerie().fromJsonString(jsonString, options);
  }

  static equals(a: KpiDataSerie | PlainMessage<KpiDataSerie> | undefined, b: KpiDataSerie | PlainMessage<KpiDataSerie> | undefined): boolean {
    return proto3.util.equals(KpiDataSerie, a, b);
  }
}

/**
 * @generated from message api.GetKPIDataQuery
 */
export class GetKPIDataQuery extends Message<GetKPIDataQuery> {
  /**
   * @generated from field: api.QueryProjectHeader Header = 1;
   */
  Header?: QueryProjectHeader;

  /**
   * @generated from field: api.CHChartType ChartType = 2;
   */
  ChartType = CHChartType.CH_CHART_TYPE_UNKNOWN;

  /**
   * @generated from field: api.CHQueryType QueryType = 3;
   */
  QueryType = CHQueryType.CH_QUERY_TYPE_UNKNOWN;

  /**
   * @generated from field: string QueryBlock = 4;
   */
  QueryBlock = "";

  /**
   * @generated from field: repeated api.CHDimension Dimensions = 5;
   */
  Dimensions: CHDimension[] = [];

  /**
   * @generated from field: repeated api.CHMetric Metrics = 6;
   */
  Metrics: CHMetric[] = [];

  /**
   * @generated from field: api.CHFilter Filter = 7;
   */
  Filter?: CHFilter;

  /**
   * @generated from field: string TargetTimeZone = 8;
   */
  TargetTimeZone = "";

  /**
   * @generated from field: api.KpiDataResultFormat ResultFormat = 9;
   */
  ResultFormat = KpiDataResultFormat.KPIDATA_RESULT_FORMAT_RAW;

  /**
   * @generated from field: string KpiGroupName = 10;
   */
  KpiGroupName = "";

  constructor(data?: PartialMessage<GetKPIDataQuery>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.GetKPIDataQuery";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Header", kind: "message", T: QueryProjectHeader },
    { no: 2, name: "ChartType", kind: "enum", T: proto3.getEnumType(CHChartType) },
    { no: 3, name: "QueryType", kind: "enum", T: proto3.getEnumType(CHQueryType) },
    { no: 4, name: "QueryBlock", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "Dimensions", kind: "message", T: CHDimension, repeated: true },
    { no: 6, name: "Metrics", kind: "message", T: CHMetric, repeated: true },
    { no: 7, name: "Filter", kind: "message", T: CHFilter },
    { no: 8, name: "TargetTimeZone", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 9, name: "ResultFormat", kind: "enum", T: proto3.getEnumType(KpiDataResultFormat) },
    { no: 10, name: "KpiGroupName", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetKPIDataQuery {
    return new GetKPIDataQuery().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetKPIDataQuery {
    return new GetKPIDataQuery().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetKPIDataQuery {
    return new GetKPIDataQuery().fromJsonString(jsonString, options);
  }

  static equals(a: GetKPIDataQuery | PlainMessage<GetKPIDataQuery> | undefined, b: GetKPIDataQuery | PlainMessage<GetKPIDataQuery> | undefined): boolean {
    return proto3.util.equals(GetKPIDataQuery, a, b);
  }
}

/**
 * @generated from message api.GetKPIDataForUserQuery
 */
export class GetKPIDataForUserQuery extends Message<GetKPIDataForUserQuery> {
  /**
   * @generated from field: string ProjectID = 1;
   */
  ProjectID = "";

  /**
   * @generated from field: api.CHChartType ChartType = 2;
   */
  ChartType = CHChartType.CH_CHART_TYPE_UNKNOWN;

  /**
   * @generated from field: api.CHQueryType QueryType = 3;
   */
  QueryType = CHQueryType.CH_QUERY_TYPE_UNKNOWN;

  /**
   * @generated from field: string QueryBlock = 4;
   */
  QueryBlock = "";

  /**
   * @generated from field: repeated api.CHDimension Dimensions = 5;
   */
  Dimensions: CHDimension[] = [];

  /**
   * @generated from field: repeated api.CHMetric Metrics = 6;
   */
  Metrics: CHMetric[] = [];

  /**
   * @generated from field: api.CHFilter Filter = 7;
   */
  Filter?: CHFilter;

  /**
   * @generated from field: string TargetTimeZone = 8;
   */
  TargetTimeZone = "";

  /**
   * @generated from field: api.KpiDataResultFormat ResultFormat = 9;
   */
  ResultFormat = KpiDataResultFormat.KPIDATA_RESULT_FORMAT_RAW;

  /**
   * @generated from field: string KpiGroupName = 10;
   */
  KpiGroupName = "";

  /**
   * @generated from field: string UserID = 11;
   */
  UserID = "";

  /**
   * Number of elements displayed
   *
   * @generated from field: string PagingState = 12;
   */
  PagingState = "";

  /**
   * Number of additional elements to display
   *
   * @generated from field: string Limit = 13;
   */
  Limit = "";

  constructor(data?: PartialMessage<GetKPIDataForUserQuery>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.GetKPIDataForUserQuery";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "ProjectID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "ChartType", kind: "enum", T: proto3.getEnumType(CHChartType) },
    { no: 3, name: "QueryType", kind: "enum", T: proto3.getEnumType(CHQueryType) },
    { no: 4, name: "QueryBlock", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "Dimensions", kind: "message", T: CHDimension, repeated: true },
    { no: 6, name: "Metrics", kind: "message", T: CHMetric, repeated: true },
    { no: 7, name: "Filter", kind: "message", T: CHFilter },
    { no: 8, name: "TargetTimeZone", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 9, name: "ResultFormat", kind: "enum", T: proto3.getEnumType(KpiDataResultFormat) },
    { no: 10, name: "KpiGroupName", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 11, name: "UserID", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 12, name: "PagingState", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 13, name: "Limit", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetKPIDataForUserQuery {
    return new GetKPIDataForUserQuery().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetKPIDataForUserQuery {
    return new GetKPIDataForUserQuery().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetKPIDataForUserQuery {
    return new GetKPIDataForUserQuery().fromJsonString(jsonString, options);
  }

  static equals(a: GetKPIDataForUserQuery | PlainMessage<GetKPIDataForUserQuery> | undefined, b: GetKPIDataForUserQuery | PlainMessage<GetKPIDataForUserQuery> | undefined): boolean {
    return proto3.util.equals(GetKPIDataForUserQuery, a, b);
  }
}

/**
 * @generated from message api.GetKPIDataResult
 */
export class GetKPIDataResult extends Message<GetKPIDataResult> {
  /**
   * @generated from field: string Results = 1;
   */
  Results = "";

  /**
   * @generated from field: repeated api.KpiDataSerie Series = 2;
   */
  Series: KpiDataSerie[] = [];

  constructor(data?: PartialMessage<GetKPIDataResult>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.GetKPIDataResult";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Results", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "Series", kind: "message", T: KpiDataSerie, repeated: true },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetKPIDataResult {
    return new GetKPIDataResult().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetKPIDataResult {
    return new GetKPIDataResult().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetKPIDataResult {
    return new GetKPIDataResult().fromJsonString(jsonString, options);
  }

  static equals(a: GetKPIDataResult | PlainMessage<GetKPIDataResult> | undefined, b: GetKPIDataResult | PlainMessage<GetKPIDataResult> | undefined): boolean {
    return proto3.util.equals(GetKPIDataResult, a, b);
  }
}

/**
 * @generated from message api.EntityBlockFilter
 */
export class EntityBlockFilter extends Message<EntityBlockFilter> {
  /**
   * @generated from field: string EntityName = 1;
   */
  EntityName = "";

  /**
   * @generated from field: repeated api.BlockFilter BlockFilters = 2;
   */
  BlockFilters: BlockFilter[] = [];

  constructor(data?: PartialMessage<EntityBlockFilter>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.EntityBlockFilter";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "EntityName", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "BlockFilters", kind: "message", T: BlockFilter, repeated: true },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EntityBlockFilter {
    return new EntityBlockFilter().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EntityBlockFilter {
    return new EntityBlockFilter().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EntityBlockFilter {
    return new EntityBlockFilter().fromJsonString(jsonString, options);
  }

  static equals(a: EntityBlockFilter | PlainMessage<EntityBlockFilter> | undefined, b: EntityBlockFilter | PlainMessage<EntityBlockFilter> | undefined): boolean {
    return proto3.util.equals(EntityBlockFilter, a, b);
  }
}

/**
 * @generated from message api.FindKPIDataQuery
 */
export class FindKPIDataQuery extends Message<FindKPIDataQuery> {
  /**
   * @generated from field: api.QueryProjectHeader Header = 1;
   */
  Header?: QueryProjectHeader;

  /**
   * TODO really useful ??
   *
   * @generated from field: api.CHQueryType QueryType = 2;
   */
  QueryType = CHQueryType.CH_QUERY_TYPE_UNKNOWN;

  /**
   * TODO Really useful ??
   *
   * @generated from field: string QueryBlock = 3;
   */
  QueryBlock = "";

  /**
   * list of blockFilters structure for Find query, each element (BlockFilter) in the list is an "OR" part of the query
   *
   * @generated from field: repeated api.EntityBlockFilter EntityBlockFilters = 4;
   */
  EntityBlockFilters: EntityBlockFilter[] = [];

  /**
   * @generated from field: api.CHFilter Filter = 5;
   */
  Filter?: CHFilter;

  /**
   * @generated from field: repeated api.CHDimension Dimensions = 6;
   */
  Dimensions: CHDimension[] = [];

  /**
   * @generated from field: repeated api.CHMetric Metrics = 7;
   */
  Metrics: CHMetric[] = [];

  /**
   * @generated from field: string TargetTimeZone = 8;
   */
  TargetTimeZone = "";

  /**
   * @generated from field: string KpiGroupName = 9;
   */
  KpiGroupName = "";

  constructor(data?: PartialMessage<FindKPIDataQuery>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.FindKPIDataQuery";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Header", kind: "message", T: QueryProjectHeader },
    { no: 2, name: "QueryType", kind: "enum", T: proto3.getEnumType(CHQueryType) },
    { no: 3, name: "QueryBlock", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "EntityBlockFilters", kind: "message", T: EntityBlockFilter, repeated: true },
    { no: 5, name: "Filter", kind: "message", T: CHFilter },
    { no: 6, name: "Dimensions", kind: "message", T: CHDimension, repeated: true },
    { no: 7, name: "Metrics", kind: "message", T: CHMetric, repeated: true },
    { no: 8, name: "TargetTimeZone", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 9, name: "KpiGroupName", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FindKPIDataQuery {
    return new FindKPIDataQuery().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): FindKPIDataQuery {
    return new FindKPIDataQuery().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): FindKPIDataQuery {
    return new FindKPIDataQuery().fromJsonString(jsonString, options);
  }

  static equals(a: FindKPIDataQuery | PlainMessage<FindKPIDataQuery> | undefined, b: FindKPIDataQuery | PlainMessage<FindKPIDataQuery> | undefined): boolean {
    return proto3.util.equals(FindKPIDataQuery, a, b);
  }
}

/**
 * @generated from message api.FindKPIDataResult
 */
export class FindKPIDataResult extends Message<FindKPIDataResult> {
  /**
   * @generated from field: repeated api.KpiDataSerie Series = 1;
   */
  Series: KpiDataSerie[] = [];

  constructor(data?: PartialMessage<FindKPIDataResult>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.FindKPIDataResult";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Series", kind: "message", T: KpiDataSerie, repeated: true },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FindKPIDataResult {
    return new FindKPIDataResult().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): FindKPIDataResult {
    return new FindKPIDataResult().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): FindKPIDataResult {
    return new FindKPIDataResult().fromJsonString(jsonString, options);
  }

  static equals(a: FindKPIDataResult | PlainMessage<FindKPIDataResult> | undefined, b: FindKPIDataResult | PlainMessage<FindKPIDataResult> | undefined): boolean {
    return proto3.util.equals(FindKPIDataResult, a, b);
  }
}

/**
 * @generated from message api.ExtractKPIQuery
 */
export class ExtractKPIQuery extends Message<ExtractKPIQuery> {
  /**
   * @generated from field: api.QueryProjectHeader Header = 1;
   */
  Header?: QueryProjectHeader;

  /**
   * @generated from field: string UserId = 2;
   */
  UserId = "";

  /**
   * @generated from field: api.CHQueryType QueryType = 3;
   */
  QueryType = CHQueryType.CH_QUERY_TYPE_UNKNOWN;

  /**
   * @generated from field: string QueryBlock = 4;
   */
  QueryBlock = "";

  /**
   * @generated from field: repeated api.EntityBlockFilter EntityBlockFilters = 5;
   */
  EntityBlockFilters: EntityBlockFilter[] = [];

  /**
   * @generated from field: api.CHFilter Filter = 6;
   */
  Filter?: CHFilter;

  /**
   * @generated from field: repeated api.CHDimension Dimensions = 7;
   */
  Dimensions: CHDimension[] = [];

  /**
   * @generated from field: repeated api.CHMetric Metrics = 8;
   */
  Metrics: CHMetric[] = [];

  /**
   * @generated from field: string TargetTimeZone = 9;
   */
  TargetTimeZone = "";

  /**
   * @generated from field: string KpiGroupName = 10;
   */
  KpiGroupName = "";

  /**
   * @generated from field: string TargetDomain = 11;
   */
  TargetDomain = "";

  /**
   * @generated from field: string TargetType = 12;
   */
  TargetType = "";

  /**
   * @generated from field: repeated string Fields = 13;
   */
  Fields: string[] = [];

  /**
   * @generated from field: string ListSeparator = 14;
   */
  ListSeparator = "";

  /**
   * @generated from field: string DecimalSeparator = 15;
   */
  DecimalSeparator = "";

  /**
   * @generated from field: repeated string ColumnNames = 16;
   */
  ColumnNames: string[] = [];

  /**
   * @generated from field: map<string, api.TranslationMap> ColumnTranslationMaps = 17;
   */
  ColumnTranslationMaps: { [key: string]: TranslationMap } = {};

  /**
   * @generated from field: repeated int32 FieldIdxLVDetailedQuantity = 18;
   */
  FieldIdxLVDetailedQuantity: number[] = [];

  /**
   * @generated from field: map<int32, api.ExtractColumnFormat> ColumnFormats = 19;
   */
  ColumnFormats: { [key: number]: ExtractColumnFormat } = {};

  constructor(data?: PartialMessage<ExtractKPIQuery>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ExtractKPIQuery";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "Header", kind: "message", T: QueryProjectHeader },
    { no: 2, name: "UserId", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "QueryType", kind: "enum", T: proto3.getEnumType(CHQueryType) },
    { no: 4, name: "QueryBlock", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "EntityBlockFilters", kind: "message", T: EntityBlockFilter, repeated: true },
    { no: 6, name: "Filter", kind: "message", T: CHFilter },
    { no: 7, name: "Dimensions", kind: "message", T: CHDimension, repeated: true },
    { no: 8, name: "Metrics", kind: "message", T: CHMetric, repeated: true },
    { no: 9, name: "TargetTimeZone", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 10, name: "KpiGroupName", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 11, name: "TargetDomain", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 12, name: "TargetType", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 13, name: "Fields", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 14, name: "ListSeparator", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 15, name: "DecimalSeparator", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 16, name: "ColumnNames", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 17, name: "ColumnTranslationMaps", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: TranslationMap} },
    { no: 18, name: "FieldIdxLVDetailedQuantity", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true },
    { no: 19, name: "ColumnFormats", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "message", T: ExtractColumnFormat} },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ExtractKPIQuery {
    return new ExtractKPIQuery().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ExtractKPIQuery {
    return new ExtractKPIQuery().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ExtractKPIQuery {
    return new ExtractKPIQuery().fromJsonString(jsonString, options);
  }

  static equals(a: ExtractKPIQuery | PlainMessage<ExtractKPIQuery> | undefined, b: ExtractKPIQuery | PlainMessage<ExtractKPIQuery> | undefined): boolean {
    return proto3.util.equals(ExtractKPIQuery, a, b);
  }
}

/**
 * @generated from message api.ExtractKPIResult
 */
export class ExtractKPIResult extends Message<ExtractKPIResult> {
  /**
   * @generated from field: api.WorkflowExecutionResult WorkflowExecution = 1;
   */
  WorkflowExecution?: WorkflowExecutionResult;

  constructor(data?: PartialMessage<ExtractKPIResult>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "api.ExtractKPIResult";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "WorkflowExecution", kind: "message", T: WorkflowExecutionResult },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ExtractKPIResult {
    return new ExtractKPIResult().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ExtractKPIResult {
    return new ExtractKPIResult().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ExtractKPIResult {
    return new ExtractKPIResult().fromJsonString(jsonString, options);
  }

  static equals(a: ExtractKPIResult | PlainMessage<ExtractKPIResult> | undefined, b: ExtractKPIResult | PlainMessage<ExtractKPIResult> | undefined): boolean {
    return proto3.util.equals(ExtractKPIResult, a, b);
  }
}

