Files
npm-viz-sdk/viz-tab.ts
2025-07-28 14:34:23 +00:00

136 lines
6.3 KiB
TypeScript

// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name
// @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
*/
TabID: string;
}
/**
* @generated from protobuf message vizapi.ListTabResult
*/
export interface ListTabResult {
/**
* List of tabs
*
* @generated from protobuf field: string Result = 1
*/
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", localName: "TabID", 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:
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; */
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", localName: "Result", 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:
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; */
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" });