// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name // @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 */ ViewID: string; /** * Content of the View * * @generated from protobuf field: string Payload = 4 */ Payload: string; /** * Visibility of the View * * @generated from protobuf field: bool IsPrivate = 5 */ IsPrivate: boolean; } /** * @generated from protobuf message vizapi.CreatePlatformDefaultViewRequest */ export interface CreatePlatformDefaultViewRequest { /** * Identifier of the Screen * * @generated from protobuf field: string ScreenID = 1 */ ScreenID: string; /** * Content of the View * * @generated from protobuf field: string Payload = 4 */ Payload: string; /** * Visibility of the View * * @generated from protobuf field: bool IsPrivate = 5 */ 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 */ ViewID: string; } /** * @generated from protobuf message vizapi.UpdatePlatformDefaultViewResult */ export interface UpdatePlatformDefaultViewResult { /** * Identifier of the View * * @generated from protobuf field: string ViewID = 1 */ ViewID: string; } // @generated message type with reflection information, may provide speed optimized methods class UpdatePlatformDefaultViewRequest$Type extends MessageType { constructor() { super("vizapi.UpdatePlatformDefaultViewRequest", [ { no: 1, name: "ViewID", kind: "scalar", localName: "ViewID", jsonName: "ViewID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the View" }, "n1validate.rules": { string: { minLen: "1" } } } }, { no: 4, name: "Payload", kind: "scalar", localName: "Payload", jsonName: "Payload", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Content of the View" }, "n1validate.rules": { string: { minLen: "1" } } } }, { no: 5, name: "IsPrivate", kind: "scalar", localName: "IsPrivate", 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 { const message = globalThis.Object.create((this.messagePrototype!)); message.ViewID = ""; message.Payload = ""; message.IsPrivate = false; if (value !== undefined) reflectionMergePartial(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: message.ViewID = reader.string(); break; case /* string Payload */ 4: message.Payload = reader.string(); break; case /* bool 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; */ if (message.ViewID !== "") writer.tag(1, WireType.LengthDelimited).string(message.ViewID); /* string Payload = 4; */ if (message.Payload !== "") writer.tag(4, WireType.LengthDelimited).string(message.Payload); /* bool IsPrivate = 5; */ 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 { constructor() { super("vizapi.CreatePlatformDefaultViewRequest", [ { no: 1, name: "ScreenID", kind: "scalar", localName: "ScreenID", jsonName: "ScreenID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the Screen" }, "n1validate.rules": { string: { minLen: "1" } } } }, { no: 4, name: "Payload", kind: "scalar", localName: "Payload", jsonName: "Payload", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Content of the View" }, "n1validate.rules": { string: { minLen: "1" } } } }, { no: 5, name: "IsPrivate", kind: "scalar", localName: "IsPrivate", 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 { const message = globalThis.Object.create((this.messagePrototype!)); message.ScreenID = ""; message.Payload = ""; message.IsPrivate = false; if (value !== undefined) reflectionMergePartial(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: message.ScreenID = reader.string(); break; case /* string Payload */ 4: message.Payload = reader.string(); break; case /* bool 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; */ if (message.ScreenID !== "") writer.tag(1, WireType.LengthDelimited).string(message.ScreenID); /* string Payload = 4; */ if (message.Payload !== "") writer.tag(4, WireType.LengthDelimited).string(message.Payload); /* bool IsPrivate = 5; */ 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 { constructor() { super("vizapi.CreatePlatformDefaultViewResult", [ { no: 1, name: "ViewID", kind: "scalar", localName: "ViewID", 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 { const message = globalThis.Object.create((this.messagePrototype!)); message.ViewID = ""; if (value !== undefined) reflectionMergePartial(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: 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; */ 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 { constructor() { super("vizapi.UpdatePlatformDefaultViewResult", [ { no: 1, name: "ViewID", kind: "scalar", localName: "ViewID", jsonName: "ViewID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the View" } } } ]); } create(value?: PartialMessage): UpdatePlatformDefaultViewResult { const message = globalThis.Object.create((this.messagePrototype!)); message.ViewID = ""; if (value !== undefined) reflectionMergePartial(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: 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; */ 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" });