// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name // @generated from protobuf file "core/options.proto" (package "api", syntax proto3) // tslint:disable 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"; /** * Note: Struct to define in protoc-m0 in managers/struct_model * * @generated from protobuf message api.KPIGroups */ export interface KPIGroups { /** * @generated from protobuf field: repeated api.KPIGroup Groups = 1 */ Groups: KPIGroup[]; } /** * @generated from protobuf message api.KPIGroup */ export interface KPIGroup { /** * @generated from protobuf field: string Name = 1 */ Name: string; // Name of the KPI group /** * @generated from protobuf field: api.KPIGroupType Type = 2 */ Type: KPIGroupType; // Type of the KPI group /** * @generated from protobuf field: bool Queryable = 3 */ Queryable: boolean; // Some tables are not directly queryable /** * @generated from protobuf field: string GroupToQuery = 4 */ GroupToQuery: string; // For non-queryable group, on which group table the request will be executed /** * @generated from protobuf field: string OrderBy = 5 */ OrderBy: string; // Table OrderBy /** * @generated from protobuf field: string Engine = 6 */ Engine: string; // Table engine /** * @generated from protobuf field: string HeaderColumns = 7 */ HeaderColumns: string; // Table header columns /** * @generated from protobuf field: string PartitionBy = 8 */ PartitionBy: string; // Table PartitionBy } /** * @generated from protobuf message api.KPIItems */ export interface KPIItems { /** * @generated from protobuf field: repeated api.KPIItem Items = 1 */ Items: KPIItem[]; } /** * @generated from protobuf message api.KPIItem */ export interface KPIItem { /** * @generated from protobuf field: string Context = 1 */ Context: string; // Entity on which the KPI is defined /** * @generated from protobuf field: string Group = 2 */ Group: string; // Group on which the KPI is defined /** * @generated from protobuf field: bool Queryable = 3 */ Queryable: boolean; // Defined if the KPI is queryable (some kpi are only returns on the result because linked to other, ex on stock_extended : Actor_Name depends on ActorID) /** * @generated from protobuf field: string GroupToJoin = 4 */ GroupToJoin: string; // KPI is used to join another KPI group /** * @generated from protobuf field: string CustomType = 5 */ CustomType: string; // Type of the field in the table } /** * @generated from protobuf message api.FieldTypes */ export interface FieldTypes { /** * @generated from protobuf field: repeated api.FieldType Types = 1 */ Types: FieldType[]; } /** * @generated from protobuf message api.FieldType */ export interface FieldType { /** * @generated from protobuf field: string Context = 1 */ Context: string; // Entity on which the KPI is defined /** * @generated from protobuf field: string Type = 2 */ Type: string; // Type of the field } /** * @generated from protobuf enum api.KPIGroupType */ export enum KPIGroupType { /** * @generated from protobuf enum value: KPIGROUP_TYPE_UNKNOWN = 0; */ KPIGROUP_TYPE_UNKNOWN = 0, /** * Table fed by a entity stream sink job * * @generated from protobuf enum value: KPIGROUP_TYPE_SINK = 1; */ KPIGROUP_TYPE_SINK = 1, /** * Table fed by a materialized view on the database * * @generated from protobuf enum value: KPIGROUP_TYPE_MATERIALIZED = 2; */ KPIGROUP_TYPE_MATERIALIZED = 2, /** * Virtual table, the request is concretely executed on physical table (GroupToQuery) * * @generated from protobuf enum value: KPIGROUP_TYPE_VIEW = 3; */ KPIGROUP_TYPE_VIEW = 3 } // @generated message type with reflection information, may provide speed optimized methods class KPIGroups$Type extends MessageType { constructor() { super("api.KPIGroups", [ { no: 1, name: "Groups", kind: "message", localName: "Groups", jsonName: "Groups", repeat: 2 /*RepeatType.UNPACKED*/, T: () => KPIGroup } ]); } create(value?: PartialMessage): KPIGroups { const message = globalThis.Object.create((this.messagePrototype!)); message.Groups = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: KPIGroups): KPIGroups { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated api.KPIGroup Groups */ 1: message.Groups.push(KPIGroup.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: KPIGroups, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* repeated api.KPIGroup Groups = 1; */ for (let i = 0; i < message.Groups.length; i++) KPIGroup.internalBinaryWrite(message.Groups[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.KPIGroups */ export const KPIGroups = new KPIGroups$Type(); // @generated message type with reflection information, may provide speed optimized methods class KPIGroup$Type extends MessageType { constructor() { super("api.KPIGroup", [ { no: 1, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "Type", kind: "enum", localName: "Type", jsonName: "Type", T: () => ["api.KPIGroupType", KPIGroupType] }, { no: 3, name: "Queryable", kind: "scalar", localName: "Queryable", jsonName: "Queryable", T: 8 /*ScalarType.BOOL*/ }, { no: 4, name: "GroupToQuery", kind: "scalar", localName: "GroupToQuery", jsonName: "GroupToQuery", T: 9 /*ScalarType.STRING*/ }, { no: 5, name: "OrderBy", kind: "scalar", localName: "OrderBy", jsonName: "OrderBy", T: 9 /*ScalarType.STRING*/ }, { no: 6, name: "Engine", kind: "scalar", localName: "Engine", jsonName: "Engine", T: 9 /*ScalarType.STRING*/ }, { no: 7, name: "HeaderColumns", kind: "scalar", localName: "HeaderColumns", jsonName: "HeaderColumns", T: 9 /*ScalarType.STRING*/ }, { no: 8, name: "PartitionBy", kind: "scalar", localName: "PartitionBy", jsonName: "PartitionBy", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): KPIGroup { const message = globalThis.Object.create((this.messagePrototype!)); message.Name = ""; message.Type = 0; message.Queryable = false; message.GroupToQuery = ""; message.OrderBy = ""; message.Engine = ""; message.HeaderColumns = ""; message.PartitionBy = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: KPIGroup): KPIGroup { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string Name */ 1: message.Name = reader.string(); break; case /* api.KPIGroupType Type */ 2: message.Type = reader.int32(); break; case /* bool Queryable */ 3: message.Queryable = reader.bool(); break; case /* string GroupToQuery */ 4: message.GroupToQuery = reader.string(); break; case /* string OrderBy */ 5: message.OrderBy = reader.string(); break; case /* string Engine */ 6: message.Engine = reader.string(); break; case /* string HeaderColumns */ 7: message.HeaderColumns = reader.string(); break; case /* string PartitionBy */ 8: message.PartitionBy = 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: KPIGroup, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string Name = 1; */ if (message.Name !== "") writer.tag(1, WireType.LengthDelimited).string(message.Name); /* api.KPIGroupType Type = 2; */ if (message.Type !== 0) writer.tag(2, WireType.Varint).int32(message.Type); /* bool Queryable = 3; */ if (message.Queryable !== false) writer.tag(3, WireType.Varint).bool(message.Queryable); /* string GroupToQuery = 4; */ if (message.GroupToQuery !== "") writer.tag(4, WireType.LengthDelimited).string(message.GroupToQuery); /* string OrderBy = 5; */ if (message.OrderBy !== "") writer.tag(5, WireType.LengthDelimited).string(message.OrderBy); /* string Engine = 6; */ if (message.Engine !== "") writer.tag(6, WireType.LengthDelimited).string(message.Engine); /* string HeaderColumns = 7; */ if (message.HeaderColumns !== "") writer.tag(7, WireType.LengthDelimited).string(message.HeaderColumns); /* string PartitionBy = 8; */ if (message.PartitionBy !== "") writer.tag(8, WireType.LengthDelimited).string(message.PartitionBy); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.KPIGroup */ export const KPIGroup = new KPIGroup$Type(); // @generated message type with reflection information, may provide speed optimized methods class KPIItems$Type extends MessageType { constructor() { super("api.KPIItems", [ { no: 1, name: "Items", kind: "message", localName: "Items", jsonName: "Items", repeat: 2 /*RepeatType.UNPACKED*/, T: () => KPIItem } ]); } create(value?: PartialMessage): KPIItems { const message = globalThis.Object.create((this.messagePrototype!)); message.Items = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: KPIItems): KPIItems { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated api.KPIItem Items */ 1: message.Items.push(KPIItem.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: KPIItems, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* repeated api.KPIItem Items = 1; */ for (let i = 0; i < message.Items.length; i++) KPIItem.internalBinaryWrite(message.Items[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.KPIItems */ export const KPIItems = new KPIItems$Type(); // @generated message type with reflection information, may provide speed optimized methods class KPIItem$Type extends MessageType { constructor() { super("api.KPIItem", [ { no: 1, name: "Context", kind: "scalar", localName: "Context", jsonName: "Context", T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "Group", kind: "scalar", localName: "Group", jsonName: "Group", T: 9 /*ScalarType.STRING*/ }, { no: 3, name: "Queryable", kind: "scalar", localName: "Queryable", jsonName: "Queryable", T: 8 /*ScalarType.BOOL*/ }, { no: 4, name: "GroupToJoin", kind: "scalar", localName: "GroupToJoin", jsonName: "GroupToJoin", T: 9 /*ScalarType.STRING*/ }, { no: 5, name: "CustomType", kind: "scalar", localName: "CustomType", jsonName: "CustomType", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): KPIItem { const message = globalThis.Object.create((this.messagePrototype!)); message.Context = ""; message.Group = ""; message.Queryable = false; message.GroupToJoin = ""; message.CustomType = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: KPIItem): KPIItem { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string Context */ 1: message.Context = reader.string(); break; case /* string Group */ 2: message.Group = reader.string(); break; case /* bool Queryable */ 3: message.Queryable = reader.bool(); break; case /* string GroupToJoin */ 4: message.GroupToJoin = reader.string(); break; case /* string CustomType */ 5: message.CustomType = 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: KPIItem, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string Context = 1; */ if (message.Context !== "") writer.tag(1, WireType.LengthDelimited).string(message.Context); /* string Group = 2; */ if (message.Group !== "") writer.tag(2, WireType.LengthDelimited).string(message.Group); /* bool Queryable = 3; */ if (message.Queryable !== false) writer.tag(3, WireType.Varint).bool(message.Queryable); /* string GroupToJoin = 4; */ if (message.GroupToJoin !== "") writer.tag(4, WireType.LengthDelimited).string(message.GroupToJoin); /* string CustomType = 5; */ if (message.CustomType !== "") writer.tag(5, WireType.LengthDelimited).string(message.CustomType); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.KPIItem */ export const KPIItem = new KPIItem$Type(); // @generated message type with reflection information, may provide speed optimized methods class FieldTypes$Type extends MessageType { constructor() { super("api.FieldTypes", [ { no: 1, name: "Types", kind: "message", localName: "Types", jsonName: "Types", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldType } ]); } create(value?: PartialMessage): FieldTypes { const message = globalThis.Object.create((this.messagePrototype!)); message.Types = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldTypes): FieldTypes { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated api.FieldType Types */ 1: message.Types.push(FieldType.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: FieldTypes, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* repeated api.FieldType Types = 1; */ for (let i = 0; i < message.Types.length; i++) FieldType.internalBinaryWrite(message.Types[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.FieldTypes */ export const FieldTypes = new FieldTypes$Type(); // @generated message type with reflection information, may provide speed optimized methods class FieldType$Type extends MessageType { constructor() { super("api.FieldType", [ { no: 1, name: "Context", kind: "scalar", localName: "Context", jsonName: "Context", T: 9 /*ScalarType.STRING*/ }, { no: 2, name: "Type", kind: "scalar", localName: "Type", jsonName: "Type", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): FieldType { const message = globalThis.Object.create((this.messagePrototype!)); message.Context = ""; message.Type = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldType): FieldType { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* string Context */ 1: message.Context = reader.string(); break; case /* string Type */ 2: message.Type = 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: FieldType, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* string Context = 1; */ if (message.Context !== "") writer.tag(1, WireType.LengthDelimited).string(message.Context); /* string Type = 2; */ if (message.Type !== "") writer.tag(2, WireType.LengthDelimited).string(message.Type); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.FieldType */ export const FieldType = new FieldType$Type();