You've already forked npm-core-sdk
289 lines
14 KiB
TypeScript
289 lines
14 KiB
TypeScript
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
|
|
// @generated from protobuf file "collabClickhouseStatement.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 { Claim } from "./claim";
|
|
import { MetadatasToApply } from "./metadata";
|
|
/**
|
|
* ClickHouseInput Proto message for clickhouse streaming process
|
|
*
|
|
* @generated from protobuf message api.CollabClickHouseInput
|
|
*/
|
|
export interface CollabClickHouseInput {
|
|
/**
|
|
* @generated from protobuf field: api.CollabClickhouseElements ClickhouseElements = 1
|
|
*/
|
|
ClickhouseElements?: CollabClickhouseElements;
|
|
/**
|
|
* @generated from protobuf field: repeated api.MetadatasToApply MetadatasToApply = 2
|
|
*/
|
|
MetadatasToApply: MetadatasToApply[];
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.CollabClickhouseElement
|
|
*/
|
|
export interface CollabClickhouseElement {
|
|
/**
|
|
* @generated from protobuf oneof: Content
|
|
*/
|
|
Content: {
|
|
oneofKind: "Claim";
|
|
/**
|
|
* @generated from protobuf field: api.Claim Claim = 1
|
|
*/
|
|
Claim: Claim;
|
|
} | {
|
|
oneofKind: undefined;
|
|
};
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.CollabClickhouseElements
|
|
*/
|
|
export interface CollabClickhouseElements {
|
|
/**
|
|
* @generated from protobuf field: repeated api.CollabClickhouseElement ClickhouseElements = 1
|
|
*/
|
|
ClickhouseElements: CollabClickhouseElement[];
|
|
}
|
|
/**
|
|
* CollabCheckpointData Proto message for clickhouse streaming process
|
|
*
|
|
* @generated from protobuf message api.CollabCheckpointData
|
|
*/
|
|
export interface CollabCheckpointData {
|
|
/**
|
|
* @generated from protobuf field: int64 IdCheckpoint = 1
|
|
*/
|
|
IdCheckpoint: bigint;
|
|
/**
|
|
* @generated from protobuf field: string Project = 2
|
|
*/
|
|
Project: string;
|
|
/**
|
|
* @generated from protobuf field: repeated api.CollabClickHouseInput ClickHouseInput = 3
|
|
*/
|
|
ClickHouseInput: CollabClickHouseInput[];
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class CollabClickHouseInput$Type extends MessageType<CollabClickHouseInput> {
|
|
constructor() {
|
|
super("api.CollabClickHouseInput", [
|
|
{ no: 1, name: "ClickhouseElements", kind: "message", localName: "ClickhouseElements", jsonName: "ClickhouseElements", T: () => CollabClickhouseElements },
|
|
{ no: 2, name: "MetadatasToApply", kind: "message", localName: "MetadatasToApply", jsonName: "MetadatasToApply", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadatasToApply }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<CollabClickHouseInput>): CollabClickHouseInput {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.MetadatasToApply = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<CollabClickHouseInput>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CollabClickHouseInput): CollabClickHouseInput {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.CollabClickhouseElements ClickhouseElements */ 1:
|
|
message.ClickhouseElements = CollabClickhouseElements.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: CollabClickHouseInput, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.CollabClickhouseElements ClickhouseElements = 1; */
|
|
if (message.ClickhouseElements)
|
|
CollabClickhouseElements.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.CollabClickHouseInput
|
|
*/
|
|
export const CollabClickHouseInput = new CollabClickHouseInput$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class CollabClickhouseElement$Type extends MessageType<CollabClickhouseElement> {
|
|
constructor() {
|
|
super("api.CollabClickhouseElement", [
|
|
{ no: 1, name: "Claim", kind: "message", localName: "Claim", jsonName: "Claim", oneof: "Content", T: () => Claim }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<CollabClickhouseElement>): CollabClickhouseElement {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Content = { oneofKind: undefined };
|
|
if (value !== undefined)
|
|
reflectionMergePartial<CollabClickhouseElement>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CollabClickhouseElement): CollabClickhouseElement {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.Claim Claim */ 1:
|
|
message.Content = {
|
|
oneofKind: "Claim",
|
|
Claim: Claim.internalBinaryRead(reader, reader.uint32(), options, (message.Content as any).Claim)
|
|
};
|
|
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: CollabClickhouseElement, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.Claim Claim = 1; */
|
|
if (message.Content.oneofKind === "Claim")
|
|
Claim.internalBinaryWrite(message.Content.Claim, 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.CollabClickhouseElement
|
|
*/
|
|
export const CollabClickhouseElement = new CollabClickhouseElement$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class CollabClickhouseElements$Type extends MessageType<CollabClickhouseElements> {
|
|
constructor() {
|
|
super("api.CollabClickhouseElements", [
|
|
{ no: 1, name: "ClickhouseElements", kind: "message", localName: "ClickhouseElements", jsonName: "ClickhouseElements", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CollabClickhouseElement }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<CollabClickhouseElements>): CollabClickhouseElements {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.ClickhouseElements = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<CollabClickhouseElements>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CollabClickhouseElements): CollabClickhouseElements {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated api.CollabClickhouseElement ClickhouseElements */ 1:
|
|
message.ClickhouseElements.push(CollabClickhouseElement.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: CollabClickhouseElements, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated api.CollabClickhouseElement ClickhouseElements = 1; */
|
|
for (let i = 0; i < message.ClickhouseElements.length; i++)
|
|
CollabClickhouseElement.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.CollabClickhouseElements
|
|
*/
|
|
export const CollabClickhouseElements = new CollabClickhouseElements$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class CollabCheckpointData$Type extends MessageType<CollabCheckpointData> {
|
|
constructor() {
|
|
super("api.CollabCheckpointData", [
|
|
{ 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: () => CollabClickHouseInput }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<CollabCheckpointData>): CollabCheckpointData {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.IdCheckpoint = 0n;
|
|
message.Project = "";
|
|
message.ClickHouseInput = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<CollabCheckpointData>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CollabCheckpointData): CollabCheckpointData {
|
|
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.CollabClickHouseInput ClickHouseInput */ 3:
|
|
message.ClickHouseInput.push(CollabClickHouseInput.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: CollabCheckpointData, 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.CollabClickHouseInput ClickHouseInput = 3; */
|
|
for (let i = 0; i < message.ClickHouseInput.length; i++)
|
|
CollabClickHouseInput.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.CollabCheckpointData
|
|
*/
|
|
export const CollabCheckpointData = new CollabCheckpointData$Type();
|