// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix // @generated from protobuf file "clickhouseMetrics.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"; /** * @generated from protobuf message api.Metrics */ export interface Metrics { /** * @generated from protobuf field: int64 CurrentTime = 1 */ CurrentTime: bigint; /** * @generated from protobuf field: string OrganisationID = 2 */ OrganisationID: string; /** * @generated from protobuf field: string ProjectID = 3 */ ProjectID: string; /** * @generated from protobuf field: string EntityService = 4 */ EntityService: string; /** * @generated from protobuf field: string Method = 5 */ Method: string; /** * @generated from protobuf field: string UserID = 6 */ UserID: string; /** * @generated from protobuf field: string UserMail = 7 */ UserMail: string; /** * @generated from protobuf field: string RefID = 8 */ RefID: string; } // @generated message type with reflection information, may provide speed optimized methods class Metrics$Type extends MessageType { constructor() { super("api.Metrics", [ { no: 1, name: "CurrentTime", kind: "scalar", localName: "CurrentTime", jsonName: "CurrentTime", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 2, name: "OrganisationID", kind: "scalar", localName: "OrganisationID", jsonName: "OrganisationID", T: 9 /*ScalarType.STRING*/ }, { no: 3, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/ }, { no: 4, name: "EntityService", kind: "scalar", localName: "EntityService", jsonName: "EntityService", T: 9 /*ScalarType.STRING*/ }, { no: 5, name: "Method", kind: "scalar", localName: "Method", jsonName: "Method", T: 9 /*ScalarType.STRING*/ }, { no: 6, name: "UserID", kind: "scalar", localName: "UserID", jsonName: "UserID", T: 9 /*ScalarType.STRING*/ }, { no: 7, name: "UserMail", kind: "scalar", localName: "UserMail", jsonName: "UserMail", T: 9 /*ScalarType.STRING*/ }, { no: 8, name: "RefID", kind: "scalar", localName: "RefID", jsonName: "RefID", T: 9 /*ScalarType.STRING*/ } ]); } create(value?: PartialMessage): Metrics { const message = globalThis.Object.create((this.messagePrototype!)); message.CurrentTime = 0n; message.OrganisationID = ""; message.ProjectID = ""; message.EntityService = ""; message.Method = ""; message.UserID = ""; message.UserMail = ""; message.RefID = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Metrics): Metrics { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* int64 CurrentTime */ 1: message.CurrentTime = reader.int64().toBigInt(); break; case /* string OrganisationID */ 2: message.OrganisationID = reader.string(); break; case /* string ProjectID */ 3: message.ProjectID = reader.string(); break; case /* string EntityService */ 4: message.EntityService = reader.string(); break; case /* string Method */ 5: message.Method = reader.string(); break; case /* string UserID */ 6: message.UserID = reader.string(); break; case /* string UserMail */ 7: message.UserMail = reader.string(); break; case /* string RefID */ 8: message.RefID = 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: Metrics, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* int64 CurrentTime = 1; */ if (message.CurrentTime !== 0n) writer.tag(1, WireType.Varint).int64(message.CurrentTime); /* string OrganisationID = 2; */ if (message.OrganisationID !== "") writer.tag(2, WireType.LengthDelimited).string(message.OrganisationID); /* string ProjectID = 3; */ if (message.ProjectID !== "") writer.tag(3, WireType.LengthDelimited).string(message.ProjectID); /* string EntityService = 4; */ if (message.EntityService !== "") writer.tag(4, WireType.LengthDelimited).string(message.EntityService); /* string Method = 5; */ if (message.Method !== "") writer.tag(5, WireType.LengthDelimited).string(message.Method); /* string UserID = 6; */ if (message.UserID !== "") writer.tag(6, WireType.LengthDelimited).string(message.UserID); /* string UserMail = 7; */ if (message.UserMail !== "") writer.tag(7, WireType.LengthDelimited).string(message.UserMail); /* string RefID = 8; */ if (message.RefID !== "") writer.tag(8, WireType.LengthDelimited).string(message.RefID); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.Metrics */ export const Metrics = new Metrics$Type();