You've already forked npm-viz-sdk
311 lines
16 KiB
TypeScript
311 lines
16 KiB
TypeScript
// @generated by protobuf-ts 2.9.6
|
|
// @generated from protobuf file "viz-default-view.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.UpdatePlatformDefaultViewRequest
|
|
*/
|
|
export interface UpdatePlatformDefaultViewRequest {
|
|
/**
|
|
* Identifier of the View
|
|
*
|
|
* @generated from protobuf field: string ViewID = 1 [json_name = "ViewID"];
|
|
*/
|
|
viewID: string;
|
|
/**
|
|
* Content of the View
|
|
*
|
|
* @generated from protobuf field: string Payload = 4 [json_name = "Payload"];
|
|
*/
|
|
payload: string;
|
|
/**
|
|
* Visibility of the View
|
|
*
|
|
* @generated from protobuf field: bool IsPrivate = 5 [json_name = "IsPrivate"];
|
|
*/
|
|
isPrivate: boolean;
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.CreatePlatformDefaultViewRequest
|
|
*/
|
|
export interface CreatePlatformDefaultViewRequest {
|
|
/**
|
|
* Identifier of the Screen
|
|
*
|
|
* @generated from protobuf field: string ScreenID = 1 [json_name = "ScreenID"];
|
|
*/
|
|
screenID: string;
|
|
/**
|
|
* Content of the View
|
|
*
|
|
* @generated from protobuf field: string Payload = 4 [json_name = "Payload"];
|
|
*/
|
|
payload: string;
|
|
/**
|
|
* Visibility of the View
|
|
*
|
|
* @generated from protobuf field: bool IsPrivate = 5 [json_name = "IsPrivate"];
|
|
*/
|
|
isPrivate: boolean;
|
|
}
|
|
/**
|
|
* ID of the created View
|
|
*
|
|
* @generated from protobuf message vizapi.CreatePlatformDefaultViewResult
|
|
*/
|
|
export interface CreatePlatformDefaultViewResult {
|
|
/**
|
|
* Identifier of the View
|
|
*
|
|
* @generated from protobuf field: string ViewID = 1 [json_name = "ViewID"];
|
|
*/
|
|
viewID: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.UpdatePlatformDefaultViewResult
|
|
*/
|
|
export interface UpdatePlatformDefaultViewResult {
|
|
/**
|
|
* Identifier of the View
|
|
*
|
|
* @generated from protobuf field: string ViewID = 1 [json_name = "ViewID"];
|
|
*/
|
|
viewID: string;
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class UpdatePlatformDefaultViewRequest$Type extends MessageType<UpdatePlatformDefaultViewRequest> {
|
|
constructor() {
|
|
super("vizapi.UpdatePlatformDefaultViewRequest", [
|
|
{ no: 1, name: "ViewID", kind: "scalar", jsonName: "ViewID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the View" }, "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 4, name: "Payload", kind: "scalar", jsonName: "Payload", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Content of the View" }, "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 5, name: "IsPrivate", kind: "scalar", jsonName: "IsPrivate", T: 8 /*ScalarType.BOOL*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Visibility of the View" } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ViewID", "Payload"] } } });
|
|
}
|
|
create(value?: PartialMessage<UpdatePlatformDefaultViewRequest>): UpdatePlatformDefaultViewRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.viewID = "";
|
|
message.payload = "";
|
|
message.isPrivate = false;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<UpdatePlatformDefaultViewRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdatePlatformDefaultViewRequest): UpdatePlatformDefaultViewRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string ViewID = 1 [json_name = "ViewID"];*/ 1:
|
|
message.viewID = reader.string();
|
|
break;
|
|
case /* string Payload = 4 [json_name = "Payload"];*/ 4:
|
|
message.payload = reader.string();
|
|
break;
|
|
case /* bool IsPrivate = 5 [json_name = "IsPrivate"];*/ 5:
|
|
message.isPrivate = reader.bool();
|
|
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: UpdatePlatformDefaultViewRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ViewID = 1 [json_name = "ViewID"]; */
|
|
if (message.viewID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.viewID);
|
|
/* string Payload = 4 [json_name = "Payload"]; */
|
|
if (message.payload !== "")
|
|
writer.tag(4, WireType.LengthDelimited).string(message.payload);
|
|
/* bool IsPrivate = 5 [json_name = "IsPrivate"]; */
|
|
if (message.isPrivate !== false)
|
|
writer.tag(5, WireType.Varint).bool(message.isPrivate);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message vizapi.UpdatePlatformDefaultViewRequest
|
|
*/
|
|
export const UpdatePlatformDefaultViewRequest = new UpdatePlatformDefaultViewRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class CreatePlatformDefaultViewRequest$Type extends MessageType<CreatePlatformDefaultViewRequest> {
|
|
constructor() {
|
|
super("vizapi.CreatePlatformDefaultViewRequest", [
|
|
{ no: 1, name: "ScreenID", kind: "scalar", jsonName: "ScreenID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the Screen" }, "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 4, name: "Payload", kind: "scalar", jsonName: "Payload", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Content of the View" }, "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 5, name: "IsPrivate", kind: "scalar", jsonName: "IsPrivate", T: 8 /*ScalarType.BOOL*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Visibility of the View" } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ScreenID", "Payload"] } } });
|
|
}
|
|
create(value?: PartialMessage<CreatePlatformDefaultViewRequest>): CreatePlatformDefaultViewRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.screenID = "";
|
|
message.payload = "";
|
|
message.isPrivate = false;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<CreatePlatformDefaultViewRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreatePlatformDefaultViewRequest): CreatePlatformDefaultViewRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string ScreenID = 1 [json_name = "ScreenID"];*/ 1:
|
|
message.screenID = reader.string();
|
|
break;
|
|
case /* string Payload = 4 [json_name = "Payload"];*/ 4:
|
|
message.payload = reader.string();
|
|
break;
|
|
case /* bool IsPrivate = 5 [json_name = "IsPrivate"];*/ 5:
|
|
message.isPrivate = reader.bool();
|
|
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: CreatePlatformDefaultViewRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ScreenID = 1 [json_name = "ScreenID"]; */
|
|
if (message.screenID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.screenID);
|
|
/* string Payload = 4 [json_name = "Payload"]; */
|
|
if (message.payload !== "")
|
|
writer.tag(4, WireType.LengthDelimited).string(message.payload);
|
|
/* bool IsPrivate = 5 [json_name = "IsPrivate"]; */
|
|
if (message.isPrivate !== false)
|
|
writer.tag(5, WireType.Varint).bool(message.isPrivate);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message vizapi.CreatePlatformDefaultViewRequest
|
|
*/
|
|
export const CreatePlatformDefaultViewRequest = new CreatePlatformDefaultViewRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class CreatePlatformDefaultViewResult$Type extends MessageType<CreatePlatformDefaultViewResult> {
|
|
constructor() {
|
|
super("vizapi.CreatePlatformDefaultViewResult", [
|
|
{ no: 1, name: "ViewID", kind: "scalar", jsonName: "ViewID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the View" } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "ID of the created View" } } });
|
|
}
|
|
create(value?: PartialMessage<CreatePlatformDefaultViewResult>): CreatePlatformDefaultViewResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.viewID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<CreatePlatformDefaultViewResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreatePlatformDefaultViewResult): CreatePlatformDefaultViewResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string ViewID = 1 [json_name = "ViewID"];*/ 1:
|
|
message.viewID = 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: CreatePlatformDefaultViewResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ViewID = 1 [json_name = "ViewID"]; */
|
|
if (message.viewID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.viewID);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message vizapi.CreatePlatformDefaultViewResult
|
|
*/
|
|
export const CreatePlatformDefaultViewResult = new CreatePlatformDefaultViewResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class UpdatePlatformDefaultViewResult$Type extends MessageType<UpdatePlatformDefaultViewResult> {
|
|
constructor() {
|
|
super("vizapi.UpdatePlatformDefaultViewResult", [
|
|
{ no: 1, name: "ViewID", kind: "scalar", jsonName: "ViewID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the View" } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<UpdatePlatformDefaultViewResult>): UpdatePlatformDefaultViewResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.viewID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<UpdatePlatformDefaultViewResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdatePlatformDefaultViewResult): UpdatePlatformDefaultViewResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string ViewID = 1 [json_name = "ViewID"];*/ 1:
|
|
message.viewID = 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: UpdatePlatformDefaultViewResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ViewID = 1 [json_name = "ViewID"]; */
|
|
if (message.viewID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.viewID);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message vizapi.UpdatePlatformDefaultViewResult
|
|
*/
|
|
export const UpdatePlatformDefaultViewResult = new UpdatePlatformDefaultViewResult$Type();
|
|
/**
|
|
* @generated ServiceType for protobuf service vizapi.DefaultViewService
|
|
*/
|
|
export const DefaultViewService = new ServiceType("vizapi.DefaultViewService", [
|
|
{ name: "CreatePlatform", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Default View"], summary: "Create a platform default view", description: "Create a platform default View in a specific Screen" }, "api.rscType": "Platform", "api.roles": "Platform.Default-Views", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: CreatePlatformDefaultViewRequest, O: CreatePlatformDefaultViewResult },
|
|
{ name: "UpdatePlatform", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Default View"], summary: "Update a platform default view", description: "Update a platform default View using its key" }, "api.rscType": "Platform", "api.roles": "Platform.Default-Views", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: UpdatePlatformDefaultViewRequest, O: UpdatePlatformDefaultViewResult }
|
|
], { "api.k8sService": "views-server" });
|