You've already forked npm-viz-sdk
136 lines
6.4 KiB
TypeScript
136 lines
6.4 KiB
TypeScript
// @generated by protobuf-ts 2.9.5
|
|
// @generated from protobuf file "viz-tab.proto" (package "vizapi", syntax proto3)
|
|
// tslint:disable
|
|
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
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 vizapi.ListTabRequest
|
|
*/
|
|
export interface ListTabRequest {
|
|
/**
|
|
* Identifier of the Tab
|
|
*
|
|
* @generated from protobuf field: string TabID = 1 [json_name = "TabID"];
|
|
*/
|
|
tabID: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.ListTabResult
|
|
*/
|
|
export interface ListTabResult {
|
|
/**
|
|
* List of tabs
|
|
*
|
|
* @generated from protobuf field: string Result = 1 [json_name = "Result"];
|
|
*/
|
|
result: string;
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ListTabRequest$Type extends MessageType<ListTabRequest> {
|
|
constructor() {
|
|
super("vizapi.ListTabRequest", [
|
|
{ no: 1, name: "TabID", kind: "scalar", jsonName: "TabID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the Tab" }, "validate.rules": { string: { minLen: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["TabID"] } } });
|
|
}
|
|
create(value?: PartialMessage<ListTabRequest>): ListTabRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.tabID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ListTabRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListTabRequest): ListTabRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string TabID = 1 [json_name = "TabID"];*/ 1:
|
|
message.tabID = 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: ListTabRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string TabID = 1 [json_name = "TabID"]; */
|
|
if (message.tabID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.tabID);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message vizapi.ListTabRequest
|
|
*/
|
|
export const ListTabRequest = new ListTabRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ListTabResult$Type extends MessageType<ListTabResult> {
|
|
constructor() {
|
|
super("vizapi.ListTabResult", [
|
|
{ no: 1, name: "Result", kind: "scalar", jsonName: "Result", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "List of tabs" } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<ListTabResult>): ListTabResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.result = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ListTabResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListTabResult): ListTabResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string Result = 1 [json_name = "Result"];*/ 1:
|
|
message.result = 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: ListTabResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string Result = 1 [json_name = "Result"]; */
|
|
if (message.result !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.result);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message vizapi.ListTabResult
|
|
*/
|
|
export const ListTabResult = new ListTabResult$Type();
|
|
/**
|
|
* @generated ServiceType for protobuf service vizapi.TabService
|
|
*/
|
|
export const TabService = new ServiceType("vizapi.TabService", [
|
|
{ name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Tab"], summary: "List tabs", description: "List the tabs for a given ScreenID" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ListTabRequest, O: ListTabResult }
|
|
], { "api.k8sService": "views-server" });
|