// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix // @generated from protobuf file "tradeClickhouseStatement.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"; import { Actor } from "./actor"; import { Item } from "./item"; import { Movement } from "./movement"; import { Handlingunit } from "./handlingunit"; import { Stock } from "./stock"; import { Executionflow } from "./executionflow"; import { MetadatasToApply } from "./metadata"; /** * ClickHouseInput Proto message for clickhouse streaming process * * @generated from protobuf message api.TradeClickHouseInput */ export interface TradeClickHouseInput { /** * @generated from protobuf field: api.TradeClickhouseElements ClickhouseElements = 1 */ ClickhouseElements?: TradeClickhouseElements; /** * @generated from protobuf field: repeated api.MetadatasToApply MetadatasToApply = 2 */ MetadatasToApply: MetadatasToApply[]; } /** * @generated from protobuf message api.TradeClickhouseElement */ export interface TradeClickhouseElement { /** * @generated from protobuf oneof: Content */ Content: { oneofKind: "Executionflow"; /** * @generated from protobuf field: api.Executionflow Executionflow = 1 */ Executionflow: Executionflow; } | { oneofKind: "Stock"; /** * @generated from protobuf field: api.Stock Stock = 2 */ Stock: Stock; } | { oneofKind: "Handlingunit"; /** * @generated from protobuf field: api.Handlingunit Handlingunit = 3 */ Handlingunit: Handlingunit; } | { oneofKind: "Movement"; /** * @generated from protobuf field: api.Movement Movement = 4 */ Movement: Movement; } | { oneofKind: "Item"; /** * @generated from protobuf field: api.Item Item = 5 */ Item: Item; } | { oneofKind: "Actor"; /** * @generated from protobuf field: api.Actor Actor = 6 */ Actor: Actor; } | { oneofKind: undefined; }; } /** * @generated from protobuf message api.TradeClickhouseElements */ export interface TradeClickhouseElements { /** * @generated from protobuf field: repeated api.TradeClickhouseElement ClickhouseElements = 1 */ ClickhouseElements: TradeClickhouseElement[]; } /** * TradeCheckpointData Proto message for clickhouse streaming process * * @generated from protobuf message api.TradeCheckpointData */ export interface TradeCheckpointData { /** * @generated from protobuf field: int64 IdCheckpoint = 1 */ IdCheckpoint: bigint; /** * @generated from protobuf field: string Project = 2 */ Project: string; /** * @generated from protobuf field: repeated api.TradeClickHouseInput ClickHouseInput = 3 */ ClickHouseInput: TradeClickHouseInput[]; } // @generated message type with reflection information, may provide speed optimized methods class TradeClickHouseInput$Type extends MessageType { constructor() { super("api.TradeClickHouseInput", [ { no: 1, name: "ClickhouseElements", kind: "message", localName: "ClickhouseElements", jsonName: "ClickhouseElements", T: () => TradeClickhouseElements }, { no: 2, name: "MetadatasToApply", kind: "message", localName: "MetadatasToApply", jsonName: "MetadatasToApply", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadatasToApply } ]); } create(value?: PartialMessage): TradeClickHouseInput { const message = globalThis.Object.create((this.messagePrototype!)); message.MetadatasToApply = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TradeClickHouseInput): TradeClickHouseInput { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* api.TradeClickhouseElements ClickhouseElements */ 1: message.ClickhouseElements = TradeClickhouseElements.internalBinaryRead(reader, reader.uint32(), options, message.ClickhouseElements); break; case /* repeated api.MetadatasToApply MetadatasToApply */ 2: message.MetadatasToApply.push(MetadatasToApply.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: TradeClickHouseInput, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.TradeClickhouseElements ClickhouseElements = 1; */ if (message.ClickhouseElements) TradeClickhouseElements.internalBinaryWrite(message.ClickhouseElements, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); /* repeated api.MetadatasToApply MetadatasToApply = 2; */ for (let i = 0; i < message.MetadatasToApply.length; i++) MetadatasToApply.internalBinaryWrite(message.MetadatasToApply[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.TradeClickHouseInput */ export const TradeClickHouseInput = new TradeClickHouseInput$Type(); // @generated message type with reflection information, may provide speed optimized methods class TradeClickhouseElement$Type extends MessageType { constructor() { super("api.TradeClickhouseElement", [ { no: 1, name: "Executionflow", kind: "message", localName: "Executionflow", jsonName: "Executionflow", oneof: "Content", T: () => Executionflow }, { no: 2, name: "Stock", kind: "message", localName: "Stock", jsonName: "Stock", oneof: "Content", T: () => Stock }, { no: 3, name: "Handlingunit", kind: "message", localName: "Handlingunit", jsonName: "Handlingunit", oneof: "Content", T: () => Handlingunit }, { no: 4, name: "Movement", kind: "message", localName: "Movement", jsonName: "Movement", oneof: "Content", T: () => Movement }, { no: 5, name: "Item", kind: "message", localName: "Item", jsonName: "Item", oneof: "Content", T: () => Item }, { no: 6, name: "Actor", kind: "message", localName: "Actor", jsonName: "Actor", oneof: "Content", T: () => Actor } ]); } create(value?: PartialMessage): TradeClickhouseElement { const message = globalThis.Object.create((this.messagePrototype!)); message.Content = { oneofKind: undefined }; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TradeClickhouseElement): TradeClickhouseElement { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* api.Executionflow Executionflow */ 1: message.Content = { oneofKind: "Executionflow", Executionflow: Executionflow.internalBinaryRead(reader, reader.uint32(), options, (message.Content as any).Executionflow) }; break; case /* api.Stock Stock */ 2: message.Content = { oneofKind: "Stock", Stock: Stock.internalBinaryRead(reader, reader.uint32(), options, (message.Content as any).Stock) }; break; case /* api.Handlingunit Handlingunit */ 3: message.Content = { oneofKind: "Handlingunit", Handlingunit: Handlingunit.internalBinaryRead(reader, reader.uint32(), options, (message.Content as any).Handlingunit) }; break; case /* api.Movement Movement */ 4: message.Content = { oneofKind: "Movement", Movement: Movement.internalBinaryRead(reader, reader.uint32(), options, (message.Content as any).Movement) }; break; case /* api.Item Item */ 5: message.Content = { oneofKind: "Item", Item: Item.internalBinaryRead(reader, reader.uint32(), options, (message.Content as any).Item) }; break; case /* api.Actor Actor */ 6: message.Content = { oneofKind: "Actor", Actor: Actor.internalBinaryRead(reader, reader.uint32(), options, (message.Content as any).Actor) }; 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: TradeClickhouseElement, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.Executionflow Executionflow = 1; */ if (message.Content.oneofKind === "Executionflow") Executionflow.internalBinaryWrite(message.Content.Executionflow, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); /* api.Stock Stock = 2; */ if (message.Content.oneofKind === "Stock") Stock.internalBinaryWrite(message.Content.Stock, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); /* api.Handlingunit Handlingunit = 3; */ if (message.Content.oneofKind === "Handlingunit") Handlingunit.internalBinaryWrite(message.Content.Handlingunit, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); /* api.Movement Movement = 4; */ if (message.Content.oneofKind === "Movement") Movement.internalBinaryWrite(message.Content.Movement, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); /* api.Item Item = 5; */ if (message.Content.oneofKind === "Item") Item.internalBinaryWrite(message.Content.Item, writer.tag(5, WireType.LengthDelimited).fork(), options).join(); /* api.Actor Actor = 6; */ if (message.Content.oneofKind === "Actor") Actor.internalBinaryWrite(message.Content.Actor, writer.tag(6, WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; } } /** * @generated MessageType for protobuf message api.TradeClickhouseElement */ export const TradeClickhouseElement = new TradeClickhouseElement$Type(); // @generated message type with reflection information, may provide speed optimized methods class TradeClickhouseElements$Type extends MessageType { constructor() { super("api.TradeClickhouseElements", [ { no: 1, name: "ClickhouseElements", kind: "message", localName: "ClickhouseElements", jsonName: "ClickhouseElements", repeat: 2 /*RepeatType.UNPACKED*/, T: () => TradeClickhouseElement } ]); } create(value?: PartialMessage): TradeClickhouseElements { const message = globalThis.Object.create((this.messagePrototype!)); message.ClickhouseElements = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TradeClickhouseElements): TradeClickhouseElements { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* repeated api.TradeClickhouseElement ClickhouseElements */ 1: message.ClickhouseElements.push(TradeClickhouseElement.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: TradeClickhouseElements, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* repeated api.TradeClickhouseElement ClickhouseElements = 1; */ for (let i = 0; i < message.ClickhouseElements.length; i++) TradeClickhouseElement.internalBinaryWrite(message.ClickhouseElements[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.TradeClickhouseElements */ export const TradeClickhouseElements = new TradeClickhouseElements$Type(); // @generated message type with reflection information, may provide speed optimized methods class TradeCheckpointData$Type extends MessageType { constructor() { super("api.TradeCheckpointData", [ { no: 1, name: "IdCheckpoint", kind: "scalar", localName: "IdCheckpoint", jsonName: "IdCheckpoint", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 2, name: "Project", kind: "scalar", localName: "Project", jsonName: "Project", T: 9 /*ScalarType.STRING*/ }, { no: 3, name: "ClickHouseInput", kind: "message", localName: "ClickHouseInput", jsonName: "ClickHouseInput", repeat: 2 /*RepeatType.UNPACKED*/, T: () => TradeClickHouseInput } ]); } create(value?: PartialMessage): TradeCheckpointData { const message = globalThis.Object.create((this.messagePrototype!)); message.IdCheckpoint = 0n; message.Project = ""; message.ClickHouseInput = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; } internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TradeCheckpointData): TradeCheckpointData { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { case /* int64 IdCheckpoint */ 1: message.IdCheckpoint = reader.int64().toBigInt(); break; case /* string Project */ 2: message.Project = reader.string(); break; case /* repeated api.TradeClickHouseInput ClickHouseInput */ 3: message.ClickHouseInput.push(TradeClickHouseInput.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: TradeCheckpointData, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* int64 IdCheckpoint = 1; */ if (message.IdCheckpoint !== 0n) writer.tag(1, WireType.Varint).int64(message.IdCheckpoint); /* string Project = 2; */ if (message.Project !== "") writer.tag(2, WireType.LengthDelimited).string(message.Project); /* repeated api.TradeClickHouseInput ClickHouseInput = 3; */ for (let i = 0; i < message.ClickHouseInput.length; i++) TradeClickHouseInput.internalBinaryWrite(message.ClickHouseInput[i], writer.tag(3, 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.TradeCheckpointData */ export const TradeCheckpointData = new TradeCheckpointData$Type();