Latest generation

This commit is contained in:
ci viz model
2025-03-18 15:51:18 +00:00
parent f351d06ab7
commit c6344f1d3a
47 changed files with 30682 additions and 2 deletions

3150
core/shared.ts Normal file

File diff suppressed because it is too large Load Diff

322
core/unitOfMeasures.ts Normal file
View File

@@ -0,0 +1,322 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "core/unitOfMeasures.proto" (package "api", syntax proto3)
// tslint:disable
/**
* @generated from protobuf enum api.Length
*/
export enum Length {
/**
* @generated from protobuf enum value: LENGTH_UNKNOWN = 0;
*/
LENGTH_UNKNOWN = 0,
/**
* @generated from protobuf enum value: METER = 10;
*/
METER = 10,
/**
* @generated from protobuf enum value: MILLIMETER = 20;
*/
MILLIMETER = 20,
/**
* @generated from protobuf enum value: CENTIMETER = 30;
*/
CENTIMETER = 30,
/**
* @generated from protobuf enum value: DECIMETER = 40;
*/
DECIMETER = 40,
/**
* @generated from protobuf enum value: DECAMETER = 50;
*/
DECAMETER = 50,
/**
* @generated from protobuf enum value: HECTOMETER = 60;
*/
HECTOMETER = 60,
/**
* @generated from protobuf enum value: KILOMETER = 70;
*/
KILOMETER = 70,
/**
* @generated from protobuf enum value: INCH = 80;
*/
INCH = 80,
/**
* @generated from protobuf enum value: FOOT = 90;
*/
FOOT = 90,
/**
* @generated from protobuf enum value: YARD = 100;
*/
YARD = 100,
/**
* @generated from protobuf enum value: MILE = 110;
*/
MILE = 110
}
/**
* @generated from protobuf enum api.Weight
*/
export enum Weight {
/**
* @generated from protobuf enum value: WEIGHT_UNKNOWN = 0;
*/
WEIGHT_UNKNOWN = 0,
/**
* @generated from protobuf enum value: GRAMME = 10;
*/
GRAMME = 10,
/**
* @generated from protobuf enum value: MILLIGRAM = 20;
*/
MILLIGRAM = 20,
/**
* @generated from protobuf enum value: CENTIGRAM = 30;
*/
CENTIGRAM = 30,
/**
* @generated from protobuf enum value: DECIGRAM = 40;
*/
DECIGRAM = 40,
/**
* @generated from protobuf enum value: DECAGRAM = 50;
*/
DECAGRAM = 50,
/**
* @generated from protobuf enum value: HECTOGRAM = 60;
*/
HECTOGRAM = 60,
/**
* @generated from protobuf enum value: KILOGRAM = 70;
*/
KILOGRAM = 70,
/**
* @generated from protobuf enum value: TONNE = 80;
*/
TONNE = 80,
/**
* @generated from protobuf enum value: GRAIN = 90;
*/
GRAIN = 90,
/**
* @generated from protobuf enum value: ONCE = 100;
*/
ONCE = 100,
/**
* @generated from protobuf enum value: POUND = 110;
*/
POUND = 110,
/**
* @generated from protobuf enum value: SHORT_TON = 120;
*/
SHORT_TON = 120,
/**
* @generated from protobuf enum value: LONG_TON = 130;
*/
LONG_TON = 130,
/**
* @generated from protobuf enum value: STONE = 140;
*/
STONE = 140
}
/**
* @generated from protobuf enum api.Temperature
*/
export enum Temperature {
/**
* @generated from protobuf enum value: TEMPERATURE_UNKNOWN = 0;
*/
TEMPERATURE_UNKNOWN = 0,
/**
* @generated from protobuf enum value: CELSIUS = 1;
*/
CELSIUS = 1,
/**
* @generated from protobuf enum value: FAHRENHEIT = 2;
*/
FAHRENHEIT = 2
}
/**
* @generated from protobuf enum api.Speed
*/
export enum Speed {
/**
* @generated from protobuf enum value: SPEED_UNKNOWN = 0;
*/
SPEED_UNKNOWN = 0,
/**
* @generated from protobuf enum value: KM_PER_HOUR = 10;
*/
KM_PER_HOUR = 10,
/**
* @generated from protobuf enum value: METER_PER_SECOND = 20;
*/
METER_PER_SECOND = 20,
/**
* @generated from protobuf enum value: YARD_PER_SECOND = 30;
*/
YARD_PER_SECOND = 30,
/**
* @generated from protobuf enum value: MILE_PER_HOUR = 40;
*/
MILE_PER_HOUR = 40
}
/**
* @generated from protobuf enum api.Area
*/
export enum Area {
/**
* @generated from protobuf enum value: AREA_UNKNOWN = 0;
*/
AREA_UNKNOWN = 0,
/**
* @generated from protobuf enum value: SQUARE_METER = 10;
*/
SQUARE_METER = 10,
/**
* @generated from protobuf enum value: SQUARE_MILLIMETER = 20;
*/
SQUARE_MILLIMETER = 20,
/**
* @generated from protobuf enum value: SQUARE_CENTIMETER = 30;
*/
SQUARE_CENTIMETER = 30,
/**
* @generated from protobuf enum value: SQUARE_DECIMETER = 40;
*/
SQUARE_DECIMETER = 40,
/**
* @generated from protobuf enum value: SQUARE_DECAMETER = 50;
*/
SQUARE_DECAMETER = 50,
/**
* @generated from protobuf enum value: SQUARE_HECTOMETER = 60;
*/
SQUARE_HECTOMETER = 60,
/**
* @generated from protobuf enum value: SQUARE_INCH = 70;
*/
SQUARE_INCH = 70,
/**
* @generated from protobuf enum value: SQUARE_FEET = 80;
*/
SQUARE_FEET = 80,
/**
* @generated from protobuf enum value: SQUARE_YARD = 90;
*/
SQUARE_YARD = 90,
/**
* @generated from protobuf enum value: ACRE = 100;
*/
ACRE = 100
}
/**
* @generated from protobuf enum api.Volume
*/
export enum Volume {
/**
* @generated from protobuf enum value: VOLUME_UNKNOWN = 0;
*/
VOLUME_UNKNOWN = 0,
/**
* @generated from protobuf enum value: CUBIC_METER = 10;
*/
CUBIC_METER = 10,
/**
* @generated from protobuf enum value: CUBIC_MILLIMETER = 20;
*/
CUBIC_MILLIMETER = 20,
/**
* @generated from protobuf enum value: CUBIC_CENTIMETER = 30;
*/
CUBIC_CENTIMETER = 30,
/**
* @generated from protobuf enum value: CUBIC_DECIMETER = 40;
*/
CUBIC_DECIMETER = 40,
/**
* @generated from protobuf enum value: LITER = 50;
*/
LITER = 50,
/**
* @generated from protobuf enum value: MILLI_LITER = 60;
*/
MILLI_LITER = 60,
/**
* @generated from protobuf enum value: CENTI_LITER = 70;
*/
CENTI_LITER = 70,
/**
* @generated from protobuf enum value: DECI_LITER = 80;
*/
DECI_LITER = 80,
/**
* @generated from protobuf enum value: DECA_LITER = 90;
*/
DECA_LITER = 90,
/**
* @generated from protobuf enum value: HECTO_LITER = 100;
*/
HECTO_LITER = 100,
/**
* @generated from protobuf enum value: CUBIC_INCH = 110;
*/
CUBIC_INCH = 110,
/**
* @generated from protobuf enum value: CUBIC_FEET = 120;
*/
CUBIC_FEET = 120,
/**
* @generated from protobuf enum value: CUBIC_YARD = 130;
*/
CUBIC_YARD = 130,
/**
* @generated from protobuf enum value: US_FLUID_OUNCE = 140;
*/
US_FLUID_OUNCE = 140,
/**
* @generated from protobuf enum value: US_PINT = 150;
*/
US_PINT = 150,
/**
* @generated from protobuf enum value: US_DRY_PINT = 160;
*/
US_DRY_PINT = 160,
/**
* @generated from protobuf enum value: US_DRY_QUART = 170;
*/
US_DRY_QUART = 170,
/**
* @generated from protobuf enum value: US_GAL = 180;
*/
US_GAL = 180,
/**
* @generated from protobuf enum value: IMPERIAL_OUNCE = 190;
*/
IMPERIAL_OUNCE = 190,
/**
* @generated from protobuf enum value: IMPERIAL_PINT = 200;
*/
IMPERIAL_PINT = 200,
/**
* @generated from protobuf enum value: IMPERIAL_QUART = 210;
*/
IMPERIAL_QUART = 210,
/**
* @generated from protobuf enum value: IMPERIAL_GAL = 220;
*/
IMPERIAL_GAL = 220
}
/**
* @generated from protobuf enum api.DimensionLess
*/
export enum DimensionLess {
/**
* @generated from protobuf enum value: DIMENSIONLESS_UNKNOWN = 0;
*/
DIMENSIONLESS_UNKNOWN = 0,
/**
* @generated from protobuf enum value: UNIT = 1;
*/
UNIT = 1
}

37
counter.client.ts Normal file
View File

@@ -0,0 +1,37 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "counter.proto" (package "vizapi", syntax proto3)
// tslint:disable
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
import { ProjectCountersService } from "./counter";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
import type { NextCounterResult } from "./counter";
import type { NextProjectCounterRequest } from "./counter";
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
/**
* @generated from protobuf service vizapi.ProjectCountersService
*/
export interface IProjectCountersServiceClient {
/**
* @generated from protobuf rpc: Next(vizapi.NextProjectCounterRequest) returns (vizapi.NextCounterResult);
*/
next(input: NextProjectCounterRequest, options?: RpcOptions): UnaryCall<NextProjectCounterRequest, NextCounterResult>;
}
/**
* @generated from protobuf service vizapi.ProjectCountersService
*/
export class ProjectCountersServiceClient implements IProjectCountersServiceClient, ServiceInfo {
typeName = ProjectCountersService.typeName;
methods = ProjectCountersService.methods;
options = ProjectCountersService.options;
constructor(private readonly _transport: RpcTransport) {
}
/**
* @generated from protobuf rpc: Next(vizapi.NextProjectCounterRequest) returns (vizapi.NextCounterResult);
*/
next(input: NextProjectCounterRequest, options?: RpcOptions): UnaryCall<NextProjectCounterRequest, NextCounterResult> {
const method = this.methods[0], opt = this._transport.mergeOptions(options);
return stackIntercept<NextProjectCounterRequest, NextCounterResult>("unary", this._transport, method, opt, input);
}
}

143
counter.ts Normal file
View File

@@ -0,0 +1,143 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "counter.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";
import { RequestProjectHeader } from "./core/shared";
/**
* @generated from protobuf message vizapi.NextProjectCounterRequest
*/
export interface NextProjectCounterRequest {
/**
* @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
*/
header?: RequestProjectHeader;
/**
* @generated from protobuf field: string Key = 2 [json_name = "Key"];
*/
key: string;
}
/**
* @generated from protobuf message vizapi.NextCounterResult
*/
export interface NextCounterResult {
/**
* @generated from protobuf field: int64 Value = 1 [json_name = "Value"];
*/
value: bigint;
}
// @generated message type with reflection information, may provide speed optimized methods
class NextProjectCounterRequest$Type extends MessageType<NextProjectCounterRequest> {
constructor() {
super("vizapi.NextProjectCounterRequest", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"claims\"" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "Key"] } } });
}
create(value?: PartialMessage<NextProjectCounterRequest>): NextProjectCounterRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
if (value !== undefined)
reflectionMergePartial<NextProjectCounterRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NextProjectCounterRequest): NextProjectCounterRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* string Key = 2 [json_name = "Key"];*/ 2:
message.key = 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: NextProjectCounterRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
if (message.header)
RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string Key = 2 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(2, WireType.LengthDelimited).string(message.key);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.NextProjectCounterRequest
*/
export const NextProjectCounterRequest = new NextProjectCounterRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class NextCounterResult$Type extends MessageType<NextCounterResult> {
constructor() {
super("vizapi.NextCounterResult", [
{ no: 1, name: "Value", kind: "scalar", jsonName: "Value", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
]);
}
create(value?: PartialMessage<NextCounterResult>): NextCounterResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.value = 0n;
if (value !== undefined)
reflectionMergePartial<NextCounterResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NextCounterResult): NextCounterResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* int64 Value = 1 [json_name = "Value"];*/ 1:
message.value = reader.int64().toBigInt();
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: NextCounterResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* int64 Value = 1 [json_name = "Value"]; */
if (message.value !== 0n)
writer.tag(1, WireType.Varint).int64(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.NextCounterResult
*/
export const NextCounterResult = new NextCounterResult$Type();
/**
* @generated ServiceType for protobuf service vizapi.ProjectCountersService
*/
export const ProjectCountersService = new ServiceType("vizapi.ProjectCountersService", [
{ name: "Next", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project Counters"], summary: "Get the next value for a project key", description: "Get the next value for a project key" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: NextProjectCounterRequest, O: NextCounterResult }
], { "api.k8sService": "settings-server" });

View File

@@ -0,0 +1,77 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/api/field_behavior.proto" (package "google.api", syntax proto3)
// tslint:disable
//
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
/**
* An indicator of the behavior of a given field (for example, that a field
* is required in requests, or given as output but ignored as input).
* This **does not** change the behavior in protocol buffers itself; it only
* denotes the behavior and may affect how API tooling handles the field.
*
* Note: This enum **may** receive new values in the future.
*
* @generated from protobuf enum google.api.FieldBehavior
*/
export enum FieldBehavior {
/**
* Conventional default for enums. Do not use this.
*
* @generated from protobuf enum value: FIELD_BEHAVIOR_UNSPECIFIED = 0;
*/
FIELD_BEHAVIOR_UNSPECIFIED = 0,
/**
* Specifically denotes a field as optional.
* While all fields in protocol buffers are optional, this may be specified
* for emphasis if appropriate.
*
* @generated from protobuf enum value: OPTIONAL = 1;
*/
OPTIONAL = 1,
/**
* Denotes a field as required.
* This indicates that the field **must** be provided as part of the request,
* and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
*
* @generated from protobuf enum value: REQUIRED = 2;
*/
REQUIRED = 2,
/**
* Denotes a field as output only.
* This indicates that the field is provided in responses, but including the
* field in a request does nothing (the server *must* ignore it and
* *must not* throw an error as a result of the field's presence).
*
* @generated from protobuf enum value: OUTPUT_ONLY = 3;
*/
OUTPUT_ONLY = 3,
/**
* Denotes a field as input only.
* This indicates that the field is provided in requests, and the
* corresponding field is not included in output.
*
* @generated from protobuf enum value: INPUT_ONLY = 4;
*/
INPUT_ONLY = 4,
/**
* Denotes a field as immutable.
* This indicates that the field may be set once in a request to create a
* resource, but may not be changed thereafter.
*
* @generated from protobuf enum value: IMMUTABLE = 5;
*/
IMMUTABLE = 5
}

687
google/api/http.ts Normal file
View File

@@ -0,0 +1,687 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/api/http.proto" (package "google.api", syntax proto3)
// tslint:disable
//
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
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";
/**
* Defines the HTTP configuration for an API service. It contains a list of
* [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
* to one or more HTTP REST API methods.
*
* @generated from protobuf message google.api.Http
*/
export interface Http {
/**
* A list of HTTP configuration rules that apply to individual API methods.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
*
* @generated from protobuf field: repeated google.api.HttpRule rules = 1;
*/
rules: HttpRule[];
/**
* When set to true, URL path parameters will be fully URI-decoded except in
* cases of single segment matches in reserved expansion, where "%2F" will be
* left encoded.
*
* The default behavior is to not decode RFC 6570 reserved characters in multi
* segment matches.
*
* @generated from protobuf field: bool fully_decode_reserved_expansion = 2;
*/
fullyDecodeReservedExpansion: boolean;
}
/**
* # gRPC Transcoding
*
* gRPC Transcoding is a feature for mapping between a gRPC method and one or
* more HTTP REST endpoints. It allows developers to build a single API service
* that supports both gRPC APIs and REST APIs. Many systems, including [Google
* APIs](https://github.com/googleapis/googleapis),
* [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
* Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
* and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
* and use it for large scale production services.
*
* `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
* how different portions of the gRPC request message are mapped to the URL
* path, URL query parameters, and HTTP request body. It also controls how the
* gRPC response message is mapped to the HTTP response body. `HttpRule` is
* typically specified as an `google.api.http` annotation on the gRPC method.
*
* Each mapping specifies a URL path template and an HTTP method. The path
* template may refer to one or more fields in the gRPC request message, as long
* as each field is a non-repeated field with a primitive (non-message) type.
* The path template controls how fields of the request message are mapped to
* the URL path.
*
* Example:
*
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http) = {
* get: "/v1/{name=messages/*}"
* };
* }
* }
* message GetMessageRequest {
* string name = 1; // Mapped to URL path.
* }
* message Message {
* string text = 1; // The resource content.
* }
*
* This enables an HTTP REST to gRPC mapping as below:
*
* HTTP | gRPC
* -----|-----
* `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")`
*
* Any fields in the request message which are not bound by the path template
* automatically become HTTP query parameters if there is no HTTP request body.
* For example:
*
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http) = {
* get:"/v1/messages/{message_id}"
* };
* }
* }
* message GetMessageRequest {
* message SubMessage {
* string subfield = 1;
* }
* string message_id = 1; // Mapped to URL path.
* int64 revision = 2; // Mapped to URL query parameter `revision`.
* SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
* }
*
* This enables a HTTP JSON to RPC mapping as below:
*
* HTTP | gRPC
* -----|-----
* `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
* `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
* "foo"))`
*
* Note that fields which are mapped to URL query parameters must have a
* primitive type or a repeated primitive type or a non-repeated message type.
* In the case of a repeated type, the parameter can be repeated in the URL
* as `...?param=A&param=B`. In the case of a message type, each field of the
* message is mapped to a separate parameter, such as
* `...?foo.a=A&foo.b=B&foo.c=C`.
*
* For HTTP methods that allow a request body, the `body` field
* specifies the mapping. Consider a REST update method on the
* message resource collection:
*
* service Messaging {
* rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
* option (google.api.http) = {
* patch: "/v1/messages/{message_id}"
* body: "message"
* };
* }
* }
* message UpdateMessageRequest {
* string message_id = 1; // mapped to the URL
* Message message = 2; // mapped to the body
* }
*
* The following HTTP JSON to RPC mapping is enabled, where the
* representation of the JSON in the request body is determined by
* protos JSON encoding:
*
* HTTP | gRPC
* -----|-----
* `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
* "123456" message { text: "Hi!" })`
*
* The special name `*` can be used in the body mapping to define that
* every field not bound by the path template should be mapped to the
* request body. This enables the following alternative definition of
* the update method:
*
* service Messaging {
* rpc UpdateMessage(Message) returns (Message) {
* option (google.api.http) = {
* patch: "/v1/messages/{message_id}"
* body: "*"
* };
* }
* }
* message Message {
* string message_id = 1;
* string text = 2;
* }
*
*
* The following HTTP JSON to RPC mapping is enabled:
*
* HTTP | gRPC
* -----|-----
* `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
* "123456" text: "Hi!")`
*
* Note that when using `*` in the body mapping, it is not possible to
* have HTTP parameters, as all fields not bound by the path end in
* the body. This makes this option more rarely used in practice when
* defining REST APIs. The common usage of `*` is in custom methods
* which don't use the URL at all for transferring data.
*
* It is possible to define multiple HTTP methods for one RPC by using
* the `additional_bindings` option. Example:
*
* service Messaging {
* rpc GetMessage(GetMessageRequest) returns (Message) {
* option (google.api.http) = {
* get: "/v1/messages/{message_id}"
* additional_bindings {
* get: "/v1/users/{user_id}/messages/{message_id}"
* }
* };
* }
* }
* message GetMessageRequest {
* string message_id = 1;
* string user_id = 2;
* }
*
* This enables the following two alternative HTTP JSON to RPC mappings:
*
* HTTP | gRPC
* -----|-----
* `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
* `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id:
* "123456")`
*
* ## Rules for HTTP mapping
*
* 1. Leaf request fields (recursive expansion nested messages in the request
* message) are classified into three categories:
* - Fields referred by the path template. They are passed via the URL path.
* - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP
* request body.
* - All other fields are passed via the URL query parameters, and the
* parameter name is the field path in the request message. A repeated
* field can be represented as multiple query parameters under the same
* name.
* 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields
* are passed via URL path and HTTP request body.
* 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all
* fields are passed via URL path and URL query parameters.
*
* ### Path template syntax
*
* Template = "/" Segments [ Verb ] ;
* Segments = Segment { "/" Segment } ;
* Segment = "*" | "**" | LITERAL | Variable ;
* Variable = "{" FieldPath [ "=" Segments ] "}" ;
* FieldPath = IDENT { "." IDENT } ;
* Verb = ":" LITERAL ;
*
* The syntax `*` matches a single URL path segment. The syntax `**` matches
* zero or more URL path segments, which must be the last part of the URL path
* except the `Verb`.
*
* The syntax `Variable` matches part of the URL path as specified by its
* template. A variable template must not contain other variables. If a variable
* matches a single path segment, its template may be omitted, e.g. `{var}`
* is equivalent to `{var=*}`.
*
* The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
* contains any reserved character, such characters should be percent-encoded
* before the matching.
*
* If a variable contains exactly one path segment, such as `"{var}"` or
* `"{var=*}"`, when such a variable is expanded into a URL path on the client
* side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
* server side does the reverse decoding. Such variables show up in the
* [Discovery
* Document](https://developers.google.com/discovery/v1/reference/apis) as
* `{var}`.
*
* If a variable contains multiple path segments, such as `"{var=foo/*}"`
* or `"{var=**}"`, when such a variable is expanded into a URL path on the
* client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
* The server side does the reverse decoding, except "%2F" and "%2f" are left
* unchanged. Such variables show up in the
* [Discovery
* Document](https://developers.google.com/discovery/v1/reference/apis) as
* `{+var}`.
*
* ## Using gRPC API Service Configuration
*
* gRPC API Service Configuration (service config) is a configuration language
* for configuring a gRPC service to become a user-facing product. The
* service config is simply the YAML representation of the `google.api.Service`
* proto message.
*
* As an alternative to annotating your proto file, you can configure gRPC
* transcoding in your service config YAML files. You do this by specifying a
* `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
* effect as the proto annotation. This can be particularly useful if you
* have a proto that is reused in multiple services. Note that any transcoding
* specified in the service config will override any matching transcoding
* configuration in the proto.
*
* Example:
*
* http:
* rules:
* # Selects a gRPC method and applies HttpRule to it.
* - selector: example.v1.Messaging.GetMessage
* get: /v1/messages/{message_id}/{sub.subfield}
*
* ## Special notes
*
* When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
* proto to JSON conversion must follow the [proto3
* specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
*
* While the single segment variable follows the semantics of
* [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
* Expansion, the multi segment variable **does not** follow RFC 6570 Section
* 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
* does not expand special characters like `?` and `#`, which would lead
* to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
* for multi segment variables.
*
* The path variables **must not** refer to any repeated or mapped field,
* because client libraries are not capable of handling such variable expansion.
*
* The path variables **must not** capture the leading "/" character. The reason
* is that the most common use case "{var}" does not capture the leading "/"
* character. For consistency, all path variables must share the same behavior.
*
* Repeated message fields must not be mapped to URL query parameters, because
* no client library can support such complicated mapping.
*
* If an API needs to use a JSON array for request or response body, it can map
* the request or response body to a repeated field. However, some gRPC
* Transcoding implementations may not support this feature.
*
* @generated from protobuf message google.api.HttpRule
*/
export interface HttpRule {
/**
* Selects a method to which this rule applies.
*
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
* @generated from protobuf field: string selector = 1;
*/
selector: string;
/**
* @generated from protobuf oneof: pattern
*/
pattern: {
oneofKind: "get";
/**
* Maps to HTTP GET. Used for listing and getting information about
* resources.
*
* @generated from protobuf field: string get = 2;
*/
get: string;
} | {
oneofKind: "put";
/**
* Maps to HTTP PUT. Used for replacing a resource.
*
* @generated from protobuf field: string put = 3;
*/
put: string;
} | {
oneofKind: "post";
/**
* Maps to HTTP POST. Used for creating a resource or performing an action.
*
* @generated from protobuf field: string post = 4;
*/
post: string;
} | {
oneofKind: "delete";
/**
* Maps to HTTP DELETE. Used for deleting a resource.
*
* @generated from protobuf field: string delete = 5;
*/
delete: string;
} | {
oneofKind: "patch";
/**
* Maps to HTTP PATCH. Used for updating a resource.
*
* @generated from protobuf field: string patch = 6;
*/
patch: string;
} | {
oneofKind: "custom";
/**
* The custom pattern is used for specifying an HTTP method that is not
* included in the `pattern` field, such as HEAD, or "*" to leave the
* HTTP method unspecified for this rule. The wild-card rule is useful
* for services that provide content to Web (HTML) clients.
*
* @generated from protobuf field: google.api.CustomHttpPattern custom = 8;
*/
custom: CustomHttpPattern;
} | {
oneofKind: undefined;
};
/**
* The name of the request field whose value is mapped to the HTTP request
* body, or `*` for mapping all request fields not captured by the path
* pattern to the HTTP body, or omitted for not having any HTTP request body.
*
* NOTE: the referred field must be present at the top-level of the request
* message type.
*
* @generated from protobuf field: string body = 7;
*/
body: string;
/**
* Optional. The name of the response field whose value is mapped to the HTTP
* response body. When omitted, the entire response message will be used
* as the HTTP response body.
*
* NOTE: The referred field must be present at the top-level of the response
* message type.
*
* @generated from protobuf field: string response_body = 12;
*/
responseBody: string;
/**
* Additional HTTP bindings for the selector. Nested bindings must
* not contain an `additional_bindings` field themselves (that is,
* the nesting may only be one level deep).
*
* @generated from protobuf field: repeated google.api.HttpRule additional_bindings = 11;
*/
additionalBindings: HttpRule[];
}
/**
* A custom pattern is used for defining custom HTTP verb.
*
* @generated from protobuf message google.api.CustomHttpPattern
*/
export interface CustomHttpPattern {
/**
* The name of this custom HTTP verb.
*
* @generated from protobuf field: string kind = 1;
*/
kind: string;
/**
* The path matched by this custom verb.
*
* @generated from protobuf field: string path = 2;
*/
path: string;
}
// @generated message type with reflection information, may provide speed optimized methods
class Http$Type extends MessageType<Http> {
constructor() {
super("google.api.Http", [
{ no: 1, name: "rules", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => HttpRule },
{ no: 2, name: "fully_decode_reserved_expansion", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
]);
}
create(value?: PartialMessage<Http>): Http {
const message = globalThis.Object.create((this.messagePrototype!));
message.rules = [];
message.fullyDecodeReservedExpansion = false;
if (value !== undefined)
reflectionMergePartial<Http>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Http): Http {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated google.api.HttpRule rules */ 1:
message.rules.push(HttpRule.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* bool fully_decode_reserved_expansion */ 2:
message.fullyDecodeReservedExpansion = 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: Http, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated google.api.HttpRule rules = 1; */
for (let i = 0; i < message.rules.length; i++)
HttpRule.internalBinaryWrite(message.rules[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* bool fully_decode_reserved_expansion = 2; */
if (message.fullyDecodeReservedExpansion !== false)
writer.tag(2, WireType.Varint).bool(message.fullyDecodeReservedExpansion);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.api.Http
*/
export const Http = new Http$Type();
// @generated message type with reflection information, may provide speed optimized methods
class HttpRule$Type extends MessageType<HttpRule> {
constructor() {
super("google.api.HttpRule", [
{ no: 1, name: "selector", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "get", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "put", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "post", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ },
{ no: 5, name: "delete", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ },
{ no: 6, name: "patch", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ },
{ no: 8, name: "custom", kind: "message", oneof: "pattern", T: () => CustomHttpPattern },
{ no: 7, name: "body", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 12, name: "response_body", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 11, name: "additional_bindings", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => HttpRule }
]);
}
create(value?: PartialMessage<HttpRule>): HttpRule {
const message = globalThis.Object.create((this.messagePrototype!));
message.selector = "";
message.pattern = { oneofKind: undefined };
message.body = "";
message.responseBody = "";
message.additionalBindings = [];
if (value !== undefined)
reflectionMergePartial<HttpRule>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HttpRule): HttpRule {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string selector */ 1:
message.selector = reader.string();
break;
case /* string get */ 2:
message.pattern = {
oneofKind: "get",
get: reader.string()
};
break;
case /* string put */ 3:
message.pattern = {
oneofKind: "put",
put: reader.string()
};
break;
case /* string post */ 4:
message.pattern = {
oneofKind: "post",
post: reader.string()
};
break;
case /* string delete */ 5:
message.pattern = {
oneofKind: "delete",
delete: reader.string()
};
break;
case /* string patch */ 6:
message.pattern = {
oneofKind: "patch",
patch: reader.string()
};
break;
case /* google.api.CustomHttpPattern custom */ 8:
message.pattern = {
oneofKind: "custom",
custom: CustomHttpPattern.internalBinaryRead(reader, reader.uint32(), options, (message.pattern as any).custom)
};
break;
case /* string body */ 7:
message.body = reader.string();
break;
case /* string response_body */ 12:
message.responseBody = reader.string();
break;
case /* repeated google.api.HttpRule additional_bindings */ 11:
message.additionalBindings.push(HttpRule.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: HttpRule, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string selector = 1; */
if (message.selector !== "")
writer.tag(1, WireType.LengthDelimited).string(message.selector);
/* string get = 2; */
if (message.pattern.oneofKind === "get")
writer.tag(2, WireType.LengthDelimited).string(message.pattern.get);
/* string put = 3; */
if (message.pattern.oneofKind === "put")
writer.tag(3, WireType.LengthDelimited).string(message.pattern.put);
/* string post = 4; */
if (message.pattern.oneofKind === "post")
writer.tag(4, WireType.LengthDelimited).string(message.pattern.post);
/* string delete = 5; */
if (message.pattern.oneofKind === "delete")
writer.tag(5, WireType.LengthDelimited).string(message.pattern.delete);
/* string patch = 6; */
if (message.pattern.oneofKind === "patch")
writer.tag(6, WireType.LengthDelimited).string(message.pattern.patch);
/* google.api.CustomHttpPattern custom = 8; */
if (message.pattern.oneofKind === "custom")
CustomHttpPattern.internalBinaryWrite(message.pattern.custom, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
/* string body = 7; */
if (message.body !== "")
writer.tag(7, WireType.LengthDelimited).string(message.body);
/* string response_body = 12; */
if (message.responseBody !== "")
writer.tag(12, WireType.LengthDelimited).string(message.responseBody);
/* repeated google.api.HttpRule additional_bindings = 11; */
for (let i = 0; i < message.additionalBindings.length; i++)
HttpRule.internalBinaryWrite(message.additionalBindings[i], writer.tag(11, 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 google.api.HttpRule
*/
export const HttpRule = new HttpRule$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CustomHttpPattern$Type extends MessageType<CustomHttpPattern> {
constructor() {
super("google.api.CustomHttpPattern", [
{ no: 1, name: "kind", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "path", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<CustomHttpPattern>): CustomHttpPattern {
const message = globalThis.Object.create((this.messagePrototype!));
message.kind = "";
message.path = "";
if (value !== undefined)
reflectionMergePartial<CustomHttpPattern>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CustomHttpPattern): CustomHttpPattern {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string kind */ 1:
message.kind = reader.string();
break;
case /* string path */ 2:
message.path = 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: CustomHttpPattern, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string kind = 1; */
if (message.kind !== "")
writer.tag(1, WireType.LengthDelimited).string(message.kind);
/* string path = 2; */
if (message.path !== "")
writer.tag(2, WireType.LengthDelimited).string(message.path);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.api.CustomHttpPattern
*/
export const CustomHttpPattern = new CustomHttpPattern$Type();

155
google/api/httpbody.ts Normal file
View File

@@ -0,0 +1,155 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/api/httpbody.proto" (package "google.api", syntax proto3)
// tslint:disable
//
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
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 { Any } from "../protobuf/any";
/**
* Message that represents an arbitrary HTTP body. It should only be used for
* payload formats that can't be represented as JSON, such as raw binary or
* an HTML page.
*
*
* This message can be used both in streaming and non-streaming API methods in
* the request as well as the response.
*
* It can be used as a top-level request field, which is convenient if one
* wants to extract parameters from either the URL or HTTP template into the
* request fields and also want access to the raw HTTP body.
*
* Example:
*
* message GetResourceRequest {
* // A unique request id.
* string request_id = 1;
*
* // The raw HTTP body is bound to this field.
* google.api.HttpBody http_body = 2;
* }
*
* service ResourceService {
* rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
* rpc UpdateResource(google.api.HttpBody) returns
* (google.protobuf.Empty);
* }
*
* Example with streaming methods:
*
* service CaldavService {
* rpc GetCalendar(stream google.api.HttpBody)
* returns (stream google.api.HttpBody);
* rpc UpdateCalendar(stream google.api.HttpBody)
* returns (stream google.api.HttpBody);
* }
*
* Use of this type only changes how the request and response bodies are
* handled, all other features will continue to work unchanged.
*
* @generated from protobuf message google.api.HttpBody
*/
export interface HttpBody {
/**
* The HTTP Content-Type header value specifying the content type of the body.
*
* @generated from protobuf field: string content_type = 1;
*/
contentType: string;
/**
* The HTTP request/response body as raw binary.
*
* @generated from protobuf field: bytes data = 2;
*/
data: Uint8Array;
/**
* Application specific response metadata. Must be set in the first response
* for streaming APIs.
*
* @generated from protobuf field: repeated google.protobuf.Any extensions = 3;
*/
extensions: Any[];
}
// @generated message type with reflection information, may provide speed optimized methods
class HttpBody$Type extends MessageType<HttpBody> {
constructor() {
super("google.api.HttpBody", [
{ no: 1, name: "content_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
{ no: 3, name: "extensions", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Any }
]);
}
create(value?: PartialMessage<HttpBody>): HttpBody {
const message = globalThis.Object.create((this.messagePrototype!));
message.contentType = "";
message.data = new Uint8Array(0);
message.extensions = [];
if (value !== undefined)
reflectionMergePartial<HttpBody>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HttpBody): HttpBody {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string content_type */ 1:
message.contentType = reader.string();
break;
case /* bytes data */ 2:
message.data = reader.bytes();
break;
case /* repeated google.protobuf.Any extensions */ 3:
message.extensions.push(Any.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: HttpBody, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string content_type = 1; */
if (message.contentType !== "")
writer.tag(1, WireType.LengthDelimited).string(message.contentType);
/* bytes data = 2; */
if (message.data.length)
writer.tag(2, WireType.LengthDelimited).bytes(message.data);
/* repeated google.protobuf.Any extensions = 3; */
for (let i = 0; i < message.extensions.length; i++)
Any.internalBinaryWrite(message.extensions[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 google.api.HttpBody
*/
export const HttpBody = new HttpBody$Type();

319
google/protobuf/any.ts Normal file
View File

@@ -0,0 +1,319 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/protobuf/any.proto" (package "google.protobuf", syntax proto3)
// tslint:disable
//
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import { WireType } 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 { isJsonObject } from "@protobuf-ts/runtime";
import { typeofJsonValue } from "@protobuf-ts/runtime";
import type { JsonValue } from "@protobuf-ts/runtime";
import { jsonWriteOptions } from "@protobuf-ts/runtime";
import type { JsonReadOptions } from "@protobuf-ts/runtime";
import type { JsonWriteOptions } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IMessageType } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
/**
* `Any` contains an arbitrary serialized protocol buffer message along with a
* URL that describes the type of the serialized message.
*
* Protobuf library provides support to pack/unpack Any values in the form
* of utility functions or additional generated methods of the Any type.
*
* Example 1: Pack and unpack a message in C++.
*
* Foo foo = ...;
* Any any;
* any.PackFrom(foo);
* ...
* if (any.UnpackTo(&foo)) {
* ...
* }
*
* Example 2: Pack and unpack a message in Java.
*
* Foo foo = ...;
* Any any = Any.pack(foo);
* ...
* if (any.is(Foo.class)) {
* foo = any.unpack(Foo.class);
* }
*
* Example 3: Pack and unpack a message in Python.
*
* foo = Foo(...)
* any = Any()
* any.Pack(foo)
* ...
* if any.Is(Foo.DESCRIPTOR):
* any.Unpack(foo)
* ...
*
* Example 4: Pack and unpack a message in Go
*
* foo := &pb.Foo{...}
* any, err := ptypes.MarshalAny(foo)
* ...
* foo := &pb.Foo{}
* if err := ptypes.UnmarshalAny(any, foo); err != nil {
* ...
* }
*
* The pack methods provided by protobuf library will by default use
* 'type.googleapis.com/full.type.name' as the type URL and the unpack
* methods only use the fully qualified type name after the last '/'
* in the type URL, for example "foo.bar.com/x/y.z" will yield type
* name "y.z".
*
*
* JSON
* ====
* The JSON representation of an `Any` value uses the regular
* representation of the deserialized, embedded message, with an
* additional field `@type` which contains the type URL. Example:
*
* package google.profile;
* message Person {
* string first_name = 1;
* string last_name = 2;
* }
*
* {
* "@type": "type.googleapis.com/google.profile.Person",
* "firstName": <string>,
* "lastName": <string>
* }
*
* If the embedded message type is well-known and has a custom JSON
* representation, that representation will be embedded adding a field
* `value` which holds the custom JSON in addition to the `@type`
* field. Example (for message [google.protobuf.Duration][]):
*
* {
* "@type": "type.googleapis.com/google.protobuf.Duration",
* "value": "1.212s"
* }
*
*
* @generated from protobuf message google.protobuf.Any
*/
export interface Any {
/**
* A URL/resource name that uniquely identifies the type of the serialized
* protocol buffer message. This string must contain at least
* one "/" character. The last segment of the URL's path must represent
* the fully qualified name of the type (as in
* `path/google.protobuf.Duration`). The name should be in a canonical form
* (e.g., leading "." is not accepted).
*
* In practice, teams usually precompile into the binary all types that they
* expect it to use in the context of Any. However, for URLs which use the
* scheme `http`, `https`, or no scheme, one can optionally set up a type
* server that maps type URLs to message definitions as follows:
*
* * If no scheme is provided, `https` is assumed.
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
* value in binary format, or produce an error.
* * Applications are allowed to cache lookup results based on the
* URL, or have them precompiled into a binary to avoid any
* lookup. Therefore, binary compatibility needs to be preserved
* on changes to types. (Use versioned type names to manage
* breaking changes.)
*
* Note: this functionality is not currently available in the official
* protobuf release, and it is not used for type URLs beginning with
* type.googleapis.com.
*
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.
*
*
* @generated from protobuf field: string type_url = 1;
*/
typeUrl: string;
/**
* Must be a valid serialized protocol buffer of the above specified type.
*
* @generated from protobuf field: bytes value = 2;
*/
value: Uint8Array;
}
// @generated message type with reflection information, may provide speed optimized methods
class Any$Type extends MessageType<Any> {
constructor() {
super("google.protobuf.Any", [
{ no: 1, name: "type_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
]);
}
/**
* Pack the message into a new `Any`.
*
* Uses 'type.googleapis.com/full.type.name' as the type URL.
*/
pack<T extends object>(message: T, type: IMessageType<T>): Any {
return {
typeUrl: this.typeNameToUrl(type.typeName), value: type.toBinary(message),
};
}
/**
* Unpack the message from the `Any`.
*/
unpack<T extends object>(any: Any, type: IMessageType<T>, options?: Partial<BinaryReadOptions>): T {
if (!this.contains(any, type))
throw new Error("Cannot unpack google.protobuf.Any with typeUrl '" + any.typeUrl + "' as " + type.typeName + ".");
return type.fromBinary(any.value, options);
}
/**
* Does the given `Any` contain a packed message of the given type?
*/
contains(any: Any, type: IMessageType<any> | string): boolean {
if (!any.typeUrl.length)
return false;
let wants = typeof type == "string" ? type : type.typeName;
let has = this.typeUrlToName(any.typeUrl);
return wants === has;
}
/**
* Convert the message to canonical JSON value.
*
* You have to provide the `typeRegistry` option so that the
* packed message can be converted to JSON.
*
* The `typeRegistry` option is also required to read
* `google.protobuf.Any` from JSON format.
*/
internalJsonWrite(any: Any, options: JsonWriteOptions): JsonValue {
if (any.typeUrl === "")
return {};
let typeName = this.typeUrlToName(any.typeUrl);
let opt = jsonWriteOptions(options);
let type = opt.typeRegistry?.find(t => t.typeName === typeName);
if (!type)
throw new globalThis.Error("Unable to convert google.protobuf.Any with typeUrl '" + any.typeUrl + "' to JSON. The specified type " + typeName + " is not available in the type registry.");
let value = type.fromBinary(any.value, { readUnknownField: false });
let json = type.internalJsonWrite(value, opt);
if (typeName.startsWith("google.protobuf.") || !isJsonObject(json))
json = { value: json };
json["@type"] = any.typeUrl;
return json;
}
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Any): Any {
if (!isJsonObject(json))
throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON " + typeofJsonValue(json) + ".");
if (typeof json["@type"] != "string" || json["@type"] == "")
return this.create();
let typeName = this.typeUrlToName(json["@type"]);
let type = options?.typeRegistry?.find(t => t.typeName == typeName);
if (!type)
throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON. The specified type " + typeName + " is not available in the type registry.");
let value;
if (typeName.startsWith("google.protobuf.") && json.hasOwnProperty("value"))
value = type.fromJson(json["value"], options);
else {
let copy = Object.assign({}, json);
delete copy["@type"];
value = type.fromJson(copy, options);
}
if (target === undefined)
target = this.create();
target.typeUrl = json["@type"];
target.value = type.toBinary(value);
return target;
}
typeNameToUrl(name: string): string {
if (!name.length)
throw new Error("invalid type name: " + name);
return "type.googleapis.com/" + name;
}
typeUrlToName(url: string): string {
if (!url.length)
throw new Error("invalid type url: " + url);
let slash = url.lastIndexOf("/");
let name = slash > 0 ? url.substring(slash + 1) : url;
if (!name.length)
throw new Error("invalid type url: " + url);
return name;
}
create(value?: PartialMessage<Any>): Any {
const message = globalThis.Object.create((this.messagePrototype!));
message.typeUrl = "";
message.value = new Uint8Array(0);
if (value !== undefined)
reflectionMergePartial<Any>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Any): Any {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string type_url */ 1:
message.typeUrl = reader.string();
break;
case /* bytes value */ 2:
message.value = reader.bytes();
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: Any, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string type_url = 1; */
if (message.typeUrl !== "")
writer.tag(1, WireType.LengthDelimited).string(message.typeUrl);
/* bytes value = 2; */
if (message.value.length)
writer.tag(2, WireType.LengthDelimited).bytes(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.Any
*/
export const Any = new Any$Type();

515
google/protobuf/api.ts Normal file
View File

@@ -0,0 +1,515 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/protobuf/api.proto" (package "google.protobuf", syntax proto3)
// tslint:disable
//
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
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 { Syntax } from "./type";
import { SourceContext } from "./source_context";
import { Option } from "./type";
/**
* Api is a light-weight descriptor for an API Interface.
*
* Interfaces are also described as "protocol buffer services" in some contexts,
* such as by the "service" keyword in a .proto file, but they are different
* from API Services, which represent a concrete implementation of an interface
* as opposed to simply a description of methods and bindings. They are also
* sometimes simply referred to as "APIs" in other contexts, such as the name of
* this message itself. See https://cloud.google.com/apis/design/glossary for
* detailed terminology.
*
* @generated from protobuf message google.protobuf.Api
*/
export interface Api {
/**
* The fully qualified name of this interface, including package name
* followed by the interface's simple name.
*
* @generated from protobuf field: string name = 1;
*/
name: string;
/**
* The methods of this interface, in unspecified order.
*
* @generated from protobuf field: repeated google.protobuf.Method methods = 2;
*/
methods: Method[];
/**
* Any metadata attached to the interface.
*
* @generated from protobuf field: repeated google.protobuf.Option options = 3;
*/
options: Option[];
/**
* A version string for this interface. If specified, must have the form
* `major-version.minor-version`, as in `1.10`. If the minor version is
* omitted, it defaults to zero. If the entire version field is empty, the
* major version is derived from the package name, as outlined below. If the
* field is not empty, the version in the package name will be verified to be
* consistent with what is provided here.
*
* The versioning schema uses [semantic
* versioning](http://semver.org) where the major version number
* indicates a breaking change and the minor version an additive,
* non-breaking change. Both version numbers are signals to users
* what to expect from different versions, and should be carefully
* chosen based on the product plan.
*
* The major version is also reflected in the package name of the
* interface, which must end in `v<major-version>`, as in
* `google.feature.v1`. For major versions 0 and 1, the suffix can
* be omitted. Zero major versions must only be used for
* experimental, non-GA interfaces.
*
*
*
* @generated from protobuf field: string version = 4;
*/
version: string;
/**
* Source context for the protocol buffer service represented by this
* message.
*
* @generated from protobuf field: google.protobuf.SourceContext source_context = 5;
*/
sourceContext?: SourceContext;
/**
* Included interfaces. See [Mixin][].
*
* @generated from protobuf field: repeated google.protobuf.Mixin mixins = 6;
*/
mixins: Mixin[];
/**
* The source syntax of the service.
*
* @generated from protobuf field: google.protobuf.Syntax syntax = 7;
*/
syntax: Syntax;
}
/**
* Method represents a method of an API interface.
*
* @generated from protobuf message google.protobuf.Method
*/
export interface Method {
/**
* The simple name of this method.
*
* @generated from protobuf field: string name = 1;
*/
name: string;
/**
* A URL of the input message type.
*
* @generated from protobuf field: string request_type_url = 2;
*/
requestTypeUrl: string;
/**
* If true, the request is streamed.
*
* @generated from protobuf field: bool request_streaming = 3;
*/
requestStreaming: boolean;
/**
* The URL of the output message type.
*
* @generated from protobuf field: string response_type_url = 4;
*/
responseTypeUrl: string;
/**
* If true, the response is streamed.
*
* @generated from protobuf field: bool response_streaming = 5;
*/
responseStreaming: boolean;
/**
* Any metadata attached to the method.
*
* @generated from protobuf field: repeated google.protobuf.Option options = 6;
*/
options: Option[];
/**
* The source syntax of this method.
*
* @generated from protobuf field: google.protobuf.Syntax syntax = 7;
*/
syntax: Syntax;
}
/**
* Declares an API Interface to be included in this interface. The including
* interface must redeclare all the methods from the included interface, but
* documentation and options are inherited as follows:
*
* - If after comment and whitespace stripping, the documentation
* string of the redeclared method is empty, it will be inherited
* from the original method.
*
* - Each annotation belonging to the service config (http,
* visibility) which is not set in the redeclared method will be
* inherited.
*
* - If an http annotation is inherited, the path pattern will be
* modified as follows. Any version prefix will be replaced by the
* version of the including interface plus the [root][] path if
* specified.
*
* Example of a simple mixin:
*
* package google.acl.v1;
* service AccessControl {
* // Get the underlying ACL object.
* rpc GetAcl(GetAclRequest) returns (Acl) {
* option (google.api.http).get = "/v1/{resource=**}:getAcl";
* }
* }
*
* package google.storage.v2;
* service Storage {
* rpc GetAcl(GetAclRequest) returns (Acl);
*
* // Get a data record.
* rpc GetData(GetDataRequest) returns (Data) {
* option (google.api.http).get = "/v2/{resource=**}";
* }
* }
*
* Example of a mixin configuration:
*
* apis:
* - name: google.storage.v2.Storage
* mixins:
* - name: google.acl.v1.AccessControl
*
* The mixin construct implies that all methods in `AccessControl` are
* also declared with same name and request/response types in
* `Storage`. A documentation generator or annotation processor will
* see the effective `Storage.GetAcl` method after inherting
* documentation and annotations as follows:
*
* service Storage {
* // Get the underlying ACL object.
* rpc GetAcl(GetAclRequest) returns (Acl) {
* option (google.api.http).get = "/v2/{resource=**}:getAcl";
* }
* ...
* }
*
* Note how the version in the path pattern changed from `v1` to `v2`.
*
* If the `root` field in the mixin is specified, it should be a
* relative path under which inherited HTTP paths are placed. Example:
*
* apis:
* - name: google.storage.v2.Storage
* mixins:
* - name: google.acl.v1.AccessControl
* root: acls
*
* This implies the following inherited HTTP annotation:
*
* service Storage {
* // Get the underlying ACL object.
* rpc GetAcl(GetAclRequest) returns (Acl) {
* option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
* }
* ...
* }
*
* @generated from protobuf message google.protobuf.Mixin
*/
export interface Mixin {
/**
* The fully qualified name of the interface which is included.
*
* @generated from protobuf field: string name = 1;
*/
name: string;
/**
* If non-empty specifies a path under which inherited HTTP paths
* are rooted.
*
* @generated from protobuf field: string root = 2;
*/
root: string;
}
// @generated message type with reflection information, may provide speed optimized methods
class Api$Type extends MessageType<Api> {
constructor() {
super("google.protobuf.Api", [
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "methods", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Method },
{ no: 3, name: "options", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Option },
{ no: 4, name: "version", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 5, name: "source_context", kind: "message", T: () => SourceContext },
{ no: 6, name: "mixins", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Mixin },
{ no: 7, name: "syntax", kind: "enum", T: () => ["google.protobuf.Syntax", Syntax, "SYNTAX_"] }
]);
}
create(value?: PartialMessage<Api>): Api {
const message = globalThis.Object.create((this.messagePrototype!));
message.name = "";
message.methods = [];
message.options = [];
message.version = "";
message.mixins = [];
message.syntax = 0;
if (value !== undefined)
reflectionMergePartial<Api>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Api): Api {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string name */ 1:
message.name = reader.string();
break;
case /* repeated google.protobuf.Method methods */ 2:
message.methods.push(Method.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* repeated google.protobuf.Option options */ 3:
message.options.push(Option.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* string version */ 4:
message.version = reader.string();
break;
case /* google.protobuf.SourceContext source_context */ 5:
message.sourceContext = SourceContext.internalBinaryRead(reader, reader.uint32(), options, message.sourceContext);
break;
case /* repeated google.protobuf.Mixin mixins */ 6:
message.mixins.push(Mixin.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* google.protobuf.Syntax syntax */ 7:
message.syntax = reader.int32();
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: Api, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string name = 1; */
if (message.name !== "")
writer.tag(1, WireType.LengthDelimited).string(message.name);
/* repeated google.protobuf.Method methods = 2; */
for (let i = 0; i < message.methods.length; i++)
Method.internalBinaryWrite(message.methods[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
/* repeated google.protobuf.Option options = 3; */
for (let i = 0; i < message.options.length; i++)
Option.internalBinaryWrite(message.options[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* string version = 4; */
if (message.version !== "")
writer.tag(4, WireType.LengthDelimited).string(message.version);
/* google.protobuf.SourceContext source_context = 5; */
if (message.sourceContext)
SourceContext.internalBinaryWrite(message.sourceContext, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
/* repeated google.protobuf.Mixin mixins = 6; */
for (let i = 0; i < message.mixins.length; i++)
Mixin.internalBinaryWrite(message.mixins[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
/* google.protobuf.Syntax syntax = 7; */
if (message.syntax !== 0)
writer.tag(7, WireType.Varint).int32(message.syntax);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.Api
*/
export const Api = new Api$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Method$Type extends MessageType<Method> {
constructor() {
super("google.protobuf.Method", [
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "request_type_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "request_streaming", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 4, name: "response_type_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 5, name: "response_streaming", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 6, name: "options", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Option },
{ no: 7, name: "syntax", kind: "enum", T: () => ["google.protobuf.Syntax", Syntax, "SYNTAX_"] }
]);
}
create(value?: PartialMessage<Method>): Method {
const message = globalThis.Object.create((this.messagePrototype!));
message.name = "";
message.requestTypeUrl = "";
message.requestStreaming = false;
message.responseTypeUrl = "";
message.responseStreaming = false;
message.options = [];
message.syntax = 0;
if (value !== undefined)
reflectionMergePartial<Method>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Method): Method {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string name */ 1:
message.name = reader.string();
break;
case /* string request_type_url */ 2:
message.requestTypeUrl = reader.string();
break;
case /* bool request_streaming */ 3:
message.requestStreaming = reader.bool();
break;
case /* string response_type_url */ 4:
message.responseTypeUrl = reader.string();
break;
case /* bool response_streaming */ 5:
message.responseStreaming = reader.bool();
break;
case /* repeated google.protobuf.Option options */ 6:
message.options.push(Option.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* google.protobuf.Syntax syntax */ 7:
message.syntax = reader.int32();
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: Method, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string name = 1; */
if (message.name !== "")
writer.tag(1, WireType.LengthDelimited).string(message.name);
/* string request_type_url = 2; */
if (message.requestTypeUrl !== "")
writer.tag(2, WireType.LengthDelimited).string(message.requestTypeUrl);
/* bool request_streaming = 3; */
if (message.requestStreaming !== false)
writer.tag(3, WireType.Varint).bool(message.requestStreaming);
/* string response_type_url = 4; */
if (message.responseTypeUrl !== "")
writer.tag(4, WireType.LengthDelimited).string(message.responseTypeUrl);
/* bool response_streaming = 5; */
if (message.responseStreaming !== false)
writer.tag(5, WireType.Varint).bool(message.responseStreaming);
/* repeated google.protobuf.Option options = 6; */
for (let i = 0; i < message.options.length; i++)
Option.internalBinaryWrite(message.options[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
/* google.protobuf.Syntax syntax = 7; */
if (message.syntax !== 0)
writer.tag(7, WireType.Varint).int32(message.syntax);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.Method
*/
export const Method = new Method$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Mixin$Type extends MessageType<Mixin> {
constructor() {
super("google.protobuf.Mixin", [
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "root", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<Mixin>): Mixin {
const message = globalThis.Object.create((this.messagePrototype!));
message.name = "";
message.root = "";
if (value !== undefined)
reflectionMergePartial<Mixin>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Mixin): Mixin {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string name */ 1:
message.name = reader.string();
break;
case /* string root */ 2:
message.root = 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: Mixin, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string name = 1; */
if (message.name !== "")
writer.tag(1, WireType.LengthDelimited).string(message.name);
/* string root = 2; */
if (message.root !== "")
writer.tag(2, WireType.LengthDelimited).string(message.root);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.Mixin
*/
export const Mixin = new Mixin$Type();

View File

@@ -0,0 +1,478 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/protobuf/compiler/plugin.proto" (package "google.protobuf.compiler", syntax proto2)
// tslint:disable
//
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
// Author: kenton@google.com (Kenton Varda)
//
// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to
// change.
//
// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
// just a program that reads a CodeGeneratorRequest from stdin and writes a
// CodeGeneratorResponse to stdout.
//
// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
// of dealing with the raw protocol defined here.
//
// A plugin executable needs only to be placed somewhere in the path. The
// plugin should be named "protoc-gen-$NAME", and will then be used when the
// flag "--${NAME}_out" is passed to protoc.
//
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 { FileDescriptorProto } from "../descriptor";
/**
* The version number of protocol compiler.
*
* @generated from protobuf message google.protobuf.compiler.Version
*/
export interface Version {
/**
* @generated from protobuf field: optional int32 major = 1;
*/
major?: number;
/**
* @generated from protobuf field: optional int32 minor = 2;
*/
minor?: number;
/**
* @generated from protobuf field: optional int32 patch = 3;
*/
patch?: number;
/**
* A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
* be empty for mainline stable releases.
*
* @generated from protobuf field: optional string suffix = 4;
*/
suffix?: string;
}
/**
* An encoded CodeGeneratorRequest is written to the plugin's stdin.
*
* @generated from protobuf message google.protobuf.compiler.CodeGeneratorRequest
*/
export interface CodeGeneratorRequest {
/**
* The .proto files that were explicitly listed on the command-line. The
* code generator should generate code only for these files. Each file's
* descriptor will be included in proto_file, below.
*
* @generated from protobuf field: repeated string file_to_generate = 1;
*/
fileToGenerate: string[];
/**
* The generator parameter passed on the command-line.
*
* @generated from protobuf field: optional string parameter = 2;
*/
parameter?: string;
/**
* FileDescriptorProtos for all files in files_to_generate and everything
* they import. The files will appear in topological order, so each file
* appears before any file that imports it.
*
* protoc guarantees that all proto_files will be written after
* the fields above, even though this is not technically guaranteed by the
* protobuf wire format. This theoretically could allow a plugin to stream
* in the FileDescriptorProtos and handle them one by one rather than read
* the entire set into memory at once. However, as of this writing, this
* is not similarly optimized on protoc's end -- it will store all fields in
* memory at once before sending them to the plugin.
*
* Type names of fields and extensions in the FileDescriptorProto are always
* fully qualified.
*
* @generated from protobuf field: repeated google.protobuf.FileDescriptorProto proto_file = 15;
*/
protoFile: FileDescriptorProto[];
/**
* The version number of protocol compiler.
*
* @generated from protobuf field: optional google.protobuf.compiler.Version compiler_version = 3;
*/
compilerVersion?: Version;
}
/**
* The plugin writes an encoded CodeGeneratorResponse to stdout.
*
* @generated from protobuf message google.protobuf.compiler.CodeGeneratorResponse
*/
export interface CodeGeneratorResponse {
/**
* Error message. If non-empty, code generation failed. The plugin process
* should exit with status code zero even if it reports an error in this way.
*
* This should be used to indicate errors in .proto files which prevent the
* code generator from generating correct code. Errors which indicate a
* problem in protoc itself -- such as the input CodeGeneratorRequest being
* unparseable -- should be reported by writing a message to stderr and
* exiting with a non-zero status code.
*
* @generated from protobuf field: optional string error = 1;
*/
error?: string;
/**
* @generated from protobuf field: repeated google.protobuf.compiler.CodeGeneratorResponse.File file = 15;
*/
file: CodeGeneratorResponse_File[];
}
/**
* Represents a single generated file.
*
* @generated from protobuf message google.protobuf.compiler.CodeGeneratorResponse.File
*/
export interface CodeGeneratorResponse_File {
/**
* The file name, relative to the output directory. The name must not
* contain "." or ".." components and must be relative, not be absolute (so,
* the file cannot lie outside the output directory). "/" must be used as
* the path separator, not "\".
*
* If the name is omitted, the content will be appended to the previous
* file. This allows the generator to break large files into small chunks,
* and allows the generated text to be streamed back to protoc so that large
* files need not reside completely in memory at one time. Note that as of
* this writing protoc does not optimize for this -- it will read the entire
* CodeGeneratorResponse before writing files to disk.
*
* @generated from protobuf field: optional string name = 1;
*/
name?: string;
/**
* If non-empty, indicates that the named file should already exist, and the
* content here is to be inserted into that file at a defined insertion
* point. This feature allows a code generator to extend the output
* produced by another code generator. The original generator may provide
* insertion points by placing special annotations in the file that look
* like:
* @@protoc_insertion_point(NAME)
* The annotation can have arbitrary text before and after it on the line,
* which allows it to be placed in a comment. NAME should be replaced with
* an identifier naming the point -- this is what other generators will use
* as the insertion_point. Code inserted at this point will be placed
* immediately above the line containing the insertion point (thus multiple
* insertions to the same point will come out in the order they were added).
* The double-@ is intended to make it unlikely that the generated code
* could contain things that look like insertion points by accident.
*
* For example, the C++ code generator places the following line in the
* .pb.h files that it generates:
* // @@protoc_insertion_point(namespace_scope)
* This line appears within the scope of the file's package namespace, but
* outside of any particular class. Another plugin can then specify the
* insertion_point "namespace_scope" to generate additional classes or
* other declarations that should be placed in this scope.
*
* Note that if the line containing the insertion point begins with
* whitespace, the same whitespace will be added to every line of the
* inserted text. This is useful for languages like Python, where
* indentation matters. In these languages, the insertion point comment
* should be indented the same amount as any inserted code will need to be
* in order to work correctly in that context.
*
* The code generator that generates the initial file and the one which
* inserts into it must both run as part of a single invocation of protoc.
* Code generators are executed in the order in which they appear on the
* command line.
*
* If |insertion_point| is present, |name| must also be present.
*
* @generated from protobuf field: optional string insertion_point = 2;
*/
insertionPoint?: string;
/**
* The file contents.
*
* @generated from protobuf field: optional string content = 15;
*/
content?: string;
}
// @generated message type with reflection information, may provide speed optimized methods
class Version$Type extends MessageType<Version> {
constructor() {
super("google.protobuf.compiler.Version", [
{ no: 1, name: "major", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
{ no: 2, name: "minor", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
{ no: 3, name: "patch", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
{ no: 4, name: "suffix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<Version>): Version {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<Version>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Version): Version {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional int32 major */ 1:
message.major = reader.int32();
break;
case /* optional int32 minor */ 2:
message.minor = reader.int32();
break;
case /* optional int32 patch */ 3:
message.patch = reader.int32();
break;
case /* optional string suffix */ 4:
message.suffix = 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: Version, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* optional int32 major = 1; */
if (message.major !== undefined)
writer.tag(1, WireType.Varint).int32(message.major);
/* optional int32 minor = 2; */
if (message.minor !== undefined)
writer.tag(2, WireType.Varint).int32(message.minor);
/* optional int32 patch = 3; */
if (message.patch !== undefined)
writer.tag(3, WireType.Varint).int32(message.patch);
/* optional string suffix = 4; */
if (message.suffix !== undefined)
writer.tag(4, WireType.LengthDelimited).string(message.suffix);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.compiler.Version
*/
export const Version = new Version$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CodeGeneratorRequest$Type extends MessageType<CodeGeneratorRequest> {
constructor() {
super("google.protobuf.compiler.CodeGeneratorRequest", [
{ no: 1, name: "file_to_generate", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "parameter", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 15, name: "proto_file", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FileDescriptorProto },
{ no: 3, name: "compiler_version", kind: "message", T: () => Version }
]);
}
create(value?: PartialMessage<CodeGeneratorRequest>): CodeGeneratorRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.fileToGenerate = [];
message.protoFile = [];
if (value !== undefined)
reflectionMergePartial<CodeGeneratorRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CodeGeneratorRequest): CodeGeneratorRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated string file_to_generate */ 1:
message.fileToGenerate.push(reader.string());
break;
case /* optional string parameter */ 2:
message.parameter = reader.string();
break;
case /* repeated google.protobuf.FileDescriptorProto proto_file */ 15:
message.protoFile.push(FileDescriptorProto.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* optional google.protobuf.compiler.Version compiler_version */ 3:
message.compilerVersion = Version.internalBinaryRead(reader, reader.uint32(), options, message.compilerVersion);
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: CodeGeneratorRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated string file_to_generate = 1; */
for (let i = 0; i < message.fileToGenerate.length; i++)
writer.tag(1, WireType.LengthDelimited).string(message.fileToGenerate[i]);
/* optional string parameter = 2; */
if (message.parameter !== undefined)
writer.tag(2, WireType.LengthDelimited).string(message.parameter);
/* repeated google.protobuf.FileDescriptorProto proto_file = 15; */
for (let i = 0; i < message.protoFile.length; i++)
FileDescriptorProto.internalBinaryWrite(message.protoFile[i], writer.tag(15, WireType.LengthDelimited).fork(), options).join();
/* optional google.protobuf.compiler.Version compiler_version = 3; */
if (message.compilerVersion)
Version.internalBinaryWrite(message.compilerVersion, 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 google.protobuf.compiler.CodeGeneratorRequest
*/
export const CodeGeneratorRequest = new CodeGeneratorRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CodeGeneratorResponse$Type extends MessageType<CodeGeneratorResponse> {
constructor() {
super("google.protobuf.compiler.CodeGeneratorResponse", [
{ no: 1, name: "error", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 15, name: "file", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CodeGeneratorResponse_File }
]);
}
create(value?: PartialMessage<CodeGeneratorResponse>): CodeGeneratorResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.file = [];
if (value !== undefined)
reflectionMergePartial<CodeGeneratorResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CodeGeneratorResponse): CodeGeneratorResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional string error */ 1:
message.error = reader.string();
break;
case /* repeated google.protobuf.compiler.CodeGeneratorResponse.File file */ 15:
message.file.push(CodeGeneratorResponse_File.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: CodeGeneratorResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* optional string error = 1; */
if (message.error !== undefined)
writer.tag(1, WireType.LengthDelimited).string(message.error);
/* repeated google.protobuf.compiler.CodeGeneratorResponse.File file = 15; */
for (let i = 0; i < message.file.length; i++)
CodeGeneratorResponse_File.internalBinaryWrite(message.file[i], writer.tag(15, 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 google.protobuf.compiler.CodeGeneratorResponse
*/
export const CodeGeneratorResponse = new CodeGeneratorResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CodeGeneratorResponse_File$Type extends MessageType<CodeGeneratorResponse_File> {
constructor() {
super("google.protobuf.compiler.CodeGeneratorResponse.File", [
{ no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "insertion_point", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 15, name: "content", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<CodeGeneratorResponse_File>): CodeGeneratorResponse_File {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<CodeGeneratorResponse_File>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CodeGeneratorResponse_File): CodeGeneratorResponse_File {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* optional string name */ 1:
message.name = reader.string();
break;
case /* optional string insertion_point */ 2:
message.insertionPoint = reader.string();
break;
case /* optional string content */ 15:
message.content = 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: CodeGeneratorResponse_File, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* optional string name = 1; */
if (message.name !== undefined)
writer.tag(1, WireType.LengthDelimited).string(message.name);
/* optional string insertion_point = 2; */
if (message.insertionPoint !== undefined)
writer.tag(2, WireType.LengthDelimited).string(message.insertionPoint);
/* optional string content = 15; */
if (message.content !== undefined)
writer.tag(15, WireType.LengthDelimited).string(message.content);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.compiler.CodeGeneratorResponse.File
*/
export const CodeGeneratorResponse_File = new CodeGeneratorResponse_File$Type();

File diff suppressed because it is too large Load Diff

231
google/protobuf/duration.ts Normal file
View File

@@ -0,0 +1,231 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/protobuf/duration.proto" (package "google.protobuf", syntax proto3)
// tslint:disable
//
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
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 { typeofJsonValue } from "@protobuf-ts/runtime";
import type { JsonValue } from "@protobuf-ts/runtime";
import type { JsonReadOptions } from "@protobuf-ts/runtime";
import type { JsonWriteOptions } from "@protobuf-ts/runtime";
import { PbLong } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
/**
* A Duration represents a signed, fixed-length span of time represented
* as a count of seconds and fractions of seconds at nanosecond
* resolution. It is independent of any calendar and concepts like "day"
* or "month". It is related to Timestamp in that the difference between
* two Timestamp values is a Duration and it can be added or subtracted
* from a Timestamp. Range is approximately +-10,000 years.
*
* # Examples
*
* Example 1: Compute Duration from two Timestamps in pseudo code.
*
* Timestamp start = ...;
* Timestamp end = ...;
* Duration duration = ...;
*
* duration.seconds = end.seconds - start.seconds;
* duration.nanos = end.nanos - start.nanos;
*
* if (duration.seconds < 0 && duration.nanos > 0) {
* duration.seconds += 1;
* duration.nanos -= 1000000000;
* } else if (duration.seconds > 0 && duration.nanos < 0) {
* duration.seconds -= 1;
* duration.nanos += 1000000000;
* }
*
* Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
*
* Timestamp start = ...;
* Duration duration = ...;
* Timestamp end = ...;
*
* end.seconds = start.seconds + duration.seconds;
* end.nanos = start.nanos + duration.nanos;
*
* if (end.nanos < 0) {
* end.seconds -= 1;
* end.nanos += 1000000000;
* } else if (end.nanos >= 1000000000) {
* end.seconds += 1;
* end.nanos -= 1000000000;
* }
*
* Example 3: Compute Duration from datetime.timedelta in Python.
*
* td = datetime.timedelta(days=3, minutes=10)
* duration = Duration()
* duration.FromTimedelta(td)
*
* # JSON Mapping
*
* In JSON format, the Duration type is encoded as a string rather than an
* object, where the string ends in the suffix "s" (indicating seconds) and
* is preceded by the number of seconds, with nanoseconds expressed as
* fractional seconds. For example, 3 seconds with 0 nanoseconds should be
* encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
* be expressed in JSON format as "3.000000001s", and 3 seconds and 1
* microsecond should be expressed in JSON format as "3.000001s".
*
*
*
* @generated from protobuf message google.protobuf.Duration
*/
export interface Duration {
/**
* Signed seconds of the span of time. Must be from -315,576,000,000
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
*
* @generated from protobuf field: int64 seconds = 1;
*/
seconds: bigint;
/**
* Signed fractions of a second at nanosecond resolution of the span
* of time. Durations less than one second are represented with a 0
* `seconds` field and a positive or negative `nanos` field. For durations
* of one second or more, a non-zero value for the `nanos` field must be
* of the same sign as the `seconds` field. Must be from -999,999,999
* to +999,999,999 inclusive.
*
* @generated from protobuf field: int32 nanos = 2;
*/
nanos: number;
}
// @generated message type with reflection information, may provide speed optimized methods
class Duration$Type extends MessageType<Duration> {
constructor() {
super("google.protobuf.Duration", [
{ no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
]);
}
/**
* Encode `Duration` to JSON string like "3.000001s".
*/
internalJsonWrite(message: Duration, options: JsonWriteOptions): JsonValue {
let s = PbLong.from(message.seconds).toNumber();
if (s > 315576000000 || s < -315576000000)
throw new Error("Duration value out of range.");
let text = message.seconds.toString();
if (s === 0 && message.nanos < 0)
text = "-" + text;
if (message.nanos !== 0) {
let nanosStr = Math.abs(message.nanos).toString();
nanosStr = "0".repeat(9 - nanosStr.length) + nanosStr;
if (nanosStr.substring(3) === "000000")
nanosStr = nanosStr.substring(0, 3);
else if (nanosStr.substring(6) === "000")
nanosStr = nanosStr.substring(0, 6);
text += "." + nanosStr;
}
return text + "s";
}
/**
* Decode `Duration` from JSON string like "3.000001s"
*/
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Duration): Duration {
if (typeof json !== "string")
throw new Error("Unable to parse Duration from JSON " + typeofJsonValue(json) + ". Expected string.");
let match = json.match(/^(-?)([0-9]+)(?:\.([0-9]+))?s/);
if (match === null)
throw new Error("Unable to parse Duration from JSON string. Invalid format.");
if (!target)
target = this.create();
let [, sign, secs, nanos] = match;
let longSeconds = PbLong.from(sign + secs);
if (longSeconds.toNumber() > 315576000000 || longSeconds.toNumber() < -315576000000)
throw new Error("Unable to parse Duration from JSON string. Value out of range.");
target.seconds = longSeconds.toBigInt();
if (typeof nanos == "string") {
let nanosStr = sign + nanos + "0".repeat(9 - nanos.length);
target.nanos = parseInt(nanosStr);
}
return target;
}
create(value?: PartialMessage<Duration>): Duration {
const message = globalThis.Object.create((this.messagePrototype!));
message.seconds = 0n;
message.nanos = 0;
if (value !== undefined)
reflectionMergePartial<Duration>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Duration): Duration {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* int64 seconds */ 1:
message.seconds = reader.int64().toBigInt();
break;
case /* int32 nanos */ 2:
message.nanos = reader.int32();
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: Duration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* int64 seconds = 1; */
if (message.seconds !== 0n)
writer.tag(1, WireType.Varint).int64(message.seconds);
/* int32 nanos = 2; */
if (message.nanos !== 0)
writer.tag(2, WireType.Varint).int32(message.nanos);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.Duration
*/
export const Duration = new Duration$Type();

95
google/protobuf/empty.ts Normal file
View File

@@ -0,0 +1,95 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/protobuf/empty.proto" (package "google.protobuf", syntax proto3)
// tslint:disable
//
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } 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";
/**
* A generic empty message that you can re-use to avoid defining duplicated
* empty messages in your APIs. A typical example is to use it as the request
* or the response type of an API method. For instance:
*
* service Foo {
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
* }
*
* The JSON representation for `Empty` is empty JSON object `{}`.
*
* @generated from protobuf message google.protobuf.Empty
*/
export interface Empty {
}
// @generated message type with reflection information, may provide speed optimized methods
class Empty$Type extends MessageType<Empty> {
constructor() {
super("google.protobuf.Empty", []);
}
create(value?: PartialMessage<Empty>): Empty {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<Empty>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Empty): Empty {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: Empty, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.Empty
*/
export const Empty = new Empty$Type();

View File

@@ -0,0 +1,336 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/protobuf/field_mask.proto" (package "google.protobuf", syntax proto3)
// tslint:disable
//
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
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 { typeofJsonValue } from "@protobuf-ts/runtime";
import type { JsonValue } from "@protobuf-ts/runtime";
import { lowerCamelCase } from "@protobuf-ts/runtime";
import type { JsonReadOptions } from "@protobuf-ts/runtime";
import type { JsonWriteOptions } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
/**
* `FieldMask` represents a set of symbolic field paths, for example:
*
* paths: "f.a"
* paths: "f.b.d"
*
* Here `f` represents a field in some root message, `a` and `b`
* fields in the message found in `f`, and `d` a field found in the
* message in `f.b`.
*
* Field masks are used to specify a subset of fields that should be
* returned by a get operation or modified by an update operation.
* Field masks also have a custom JSON encoding (see below).
*
* # Field Masks in Projections
*
* When used in the context of a projection, a response message or
* sub-message is filtered by the API to only contain those fields as
* specified in the mask. For example, if the mask in the previous
* example is applied to a response message as follows:
*
* f {
* a : 22
* b {
* d : 1
* x : 2
* }
* y : 13
* }
* z: 8
*
* The result will not contain specific values for fields x,y and z
* (their value will be set to the default, and omitted in proto text
* output):
*
*
* f {
* a : 22
* b {
* d : 1
* }
* }
*
* A repeated field is not allowed except at the last position of a
* paths string.
*
* If a FieldMask object is not present in a get operation, the
* operation applies to all fields (as if a FieldMask of all fields
* had been specified).
*
* Note that a field mask does not necessarily apply to the
* top-level response message. In case of a REST get operation, the
* field mask applies directly to the response, but in case of a REST
* list operation, the mask instead applies to each individual message
* in the returned resource list. In case of a REST custom method,
* other definitions may be used. Where the mask applies will be
* clearly documented together with its declaration in the API. In
* any case, the effect on the returned resource/resources is required
* behavior for APIs.
*
* # Field Masks in Update Operations
*
* A field mask in update operations specifies which fields of the
* targeted resource are going to be updated. The API is required
* to only change the values of the fields as specified in the mask
* and leave the others untouched. If a resource is passed in to
* describe the updated values, the API ignores the values of all
* fields not covered by the mask.
*
* If a repeated field is specified for an update operation, new values will
* be appended to the existing repeated field in the target resource. Note that
* a repeated field is only allowed in the last position of a `paths` string.
*
* If a sub-message is specified in the last position of the field mask for an
* update operation, then new value will be merged into the existing sub-message
* in the target resource.
*
* For example, given the target message:
*
* f {
* b {
* d: 1
* x: 2
* }
* c: [1]
* }
*
* And an update message:
*
* f {
* b {
* d: 10
* }
* c: [2]
* }
*
* then if the field mask is:
*
* paths: ["f.b", "f.c"]
*
* then the result will be:
*
* f {
* b {
* d: 10
* x: 2
* }
* c: [1, 2]
* }
*
* An implementation may provide options to override this default behavior for
* repeated and message fields.
*
* In order to reset a field's value to the default, the field must
* be in the mask and set to the default value in the provided resource.
* Hence, in order to reset all fields of a resource, provide a default
* instance of the resource and set all fields in the mask, or do
* not provide a mask as described below.
*
* If a field mask is not present on update, the operation applies to
* all fields (as if a field mask of all fields has been specified).
* Note that in the presence of schema evolution, this may mean that
* fields the client does not know and has therefore not filled into
* the request will be reset to their default. If this is unwanted
* behavior, a specific service may require a client to always specify
* a field mask, producing an error if not.
*
* As with get operations, the location of the resource which
* describes the updated values in the request message depends on the
* operation kind. In any case, the effect of the field mask is
* required to be honored by the API.
*
* ## Considerations for HTTP REST
*
* The HTTP kind of an update operation which uses a field mask must
* be set to PATCH instead of PUT in order to satisfy HTTP semantics
* (PUT must only be used for full updates).
*
* # JSON Encoding of Field Masks
*
* In JSON, a field mask is encoded as a single string where paths are
* separated by a comma. Fields name in each path are converted
* to/from lower-camel naming conventions.
*
* As an example, consider the following message declarations:
*
* message Profile {
* User user = 1;
* Photo photo = 2;
* }
* message User {
* string display_name = 1;
* string address = 2;
* }
*
* In proto a field mask for `Profile` may look as such:
*
* mask {
* paths: "user.display_name"
* paths: "photo"
* }
*
* In JSON, the same mask is represented as below:
*
* {
* mask: "user.displayName,photo"
* }
*
* # Field Masks and Oneof Fields
*
* Field masks treat fields in oneofs just as regular fields. Consider the
* following message:
*
* message SampleMessage {
* oneof test_oneof {
* string name = 4;
* SubMessage sub_message = 9;
* }
* }
*
* The field mask can be:
*
* mask {
* paths: "name"
* }
*
* Or:
*
* mask {
* paths: "sub_message"
* }
*
* Note that oneof type names ("test_oneof" in this case) cannot be used in
* paths.
*
* ## Field Mask Verification
*
* The implementation of any API method which has a FieldMask type field in the
* request should verify the included field paths, and return an
* `INVALID_ARGUMENT` error if any path is unmappable.
*
* @generated from protobuf message google.protobuf.FieldMask
*/
export interface FieldMask {
/**
* The set of field mask paths.
*
* @generated from protobuf field: repeated string paths = 1;
*/
paths: string[];
}
// @generated message type with reflection information, may provide speed optimized methods
class FieldMask$Type extends MessageType<FieldMask> {
constructor() {
super("google.protobuf.FieldMask", [
{ no: 1, name: "paths", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
]);
}
/**
* Encode `FieldMask` to JSON object.
*/
internalJsonWrite(message: FieldMask, options: JsonWriteOptions): JsonValue {
const invalidFieldMaskJsonRegex = /[A-Z]|(_([.0-9_]|$))/g;
return message.paths.map(p => {
if (invalidFieldMaskJsonRegex.test(p))
throw new Error("Unable to encode FieldMask to JSON. lowerCamelCase of path name \"" + p + "\" is irreversible.");
return lowerCamelCase(p);
}).join(",");
}
/**
* Decode `FieldMask` from JSON object.
*/
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: FieldMask): FieldMask {
if (typeof json !== "string")
throw new Error("Unable to parse FieldMask from JSON " + typeofJsonValue(json) + ". Expected string.");
if (!target)
target = this.create();
if (json === "")
return target;
let camelToSnake = (str: string) => {
if (str.includes("_"))
throw new Error("Unable to parse FieldMask from JSON. Path names must be lowerCamelCase.");
let sc = str.replace(/[A-Z]/g, letter => "_" + letter.toLowerCase());
return sc;
};
target.paths = json.split(",").map(camelToSnake);
return target;
}
create(value?: PartialMessage<FieldMask>): FieldMask {
const message = globalThis.Object.create((this.messagePrototype!));
message.paths = [];
if (value !== undefined)
reflectionMergePartial<FieldMask>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldMask): FieldMask {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated string paths */ 1:
message.paths.push(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: FieldMask, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated string paths = 1; */
for (let i = 0; i < message.paths.length; i++)
writer.tag(1, WireType.LengthDelimited).string(message.paths[i]);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.FieldMask
*/
export const FieldMask = new FieldMask$Type();

View File

@@ -0,0 +1,105 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/protobuf/source_context.proto" (package "google.protobuf", syntax proto3)
// tslint:disable
//
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
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";
/**
* `SourceContext` represents information about the source of a
* protobuf element, like the file in which it is defined.
*
* @generated from protobuf message google.protobuf.SourceContext
*/
export interface SourceContext {
/**
* The path-qualified name of the .proto file that contained the associated
* protobuf element. For example: `"google/protobuf/source_context.proto"`.
*
* @generated from protobuf field: string file_name = 1;
*/
fileName: string;
}
// @generated message type with reflection information, may provide speed optimized methods
class SourceContext$Type extends MessageType<SourceContext> {
constructor() {
super("google.protobuf.SourceContext", [
{ no: 1, name: "file_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<SourceContext>): SourceContext {
const message = globalThis.Object.create((this.messagePrototype!));
message.fileName = "";
if (value !== undefined)
reflectionMergePartial<SourceContext>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SourceContext): SourceContext {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string file_name */ 1:
message.fileName = 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: SourceContext, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string file_name = 1; */
if (message.fileName !== "")
writer.tag(1, WireType.LengthDelimited).string(message.fileName);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.SourceContext
*/
export const SourceContext = new SourceContext$Type();

482
google/protobuf/struct.ts Normal file
View File

@@ -0,0 +1,482 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/protobuf/struct.proto" (package "google.protobuf", syntax proto3)
// tslint:disable
//
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
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 { isJsonObject } from "@protobuf-ts/runtime";
import { typeofJsonValue } from "@protobuf-ts/runtime";
import type { JsonValue } from "@protobuf-ts/runtime";
import type { JsonReadOptions } from "@protobuf-ts/runtime";
import type { JsonWriteOptions } from "@protobuf-ts/runtime";
import type { JsonObject } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
/**
* `Struct` represents a structured data value, consisting of fields
* which map to dynamically typed values. In some languages, `Struct`
* might be supported by a native representation. For example, in
* scripting languages like JS a struct is represented as an
* object. The details of that representation are described together
* with the proto support for the language.
*
* The JSON representation for `Struct` is JSON object.
*
* @generated from protobuf message google.protobuf.Struct
*/
export interface Struct {
/**
* Unordered map of dynamically typed values.
*
* @generated from protobuf field: map<string, google.protobuf.Value> fields = 1;
*/
fields: {
[key: string]: Value;
};
}
/**
* `Value` represents a dynamically typed value which can be either
* null, a number, a string, a boolean, a recursive struct value, or a
* list of values. A producer of value is expected to set one of that
* variants, absence of any variant indicates an error.
*
* The JSON representation for `Value` is JSON value.
*
* @generated from protobuf message google.protobuf.Value
*/
export interface Value {
/**
* @generated from protobuf oneof: kind
*/
kind: {
oneofKind: "nullValue";
/**
* Represents a null value.
*
* @generated from protobuf field: google.protobuf.NullValue null_value = 1;
*/
nullValue: NullValue;
} | {
oneofKind: "numberValue";
/**
* Represents a double value.
*
* @generated from protobuf field: double number_value = 2;
*/
numberValue: number;
} | {
oneofKind: "stringValue";
/**
* Represents a string value.
*
* @generated from protobuf field: string string_value = 3;
*/
stringValue: string;
} | {
oneofKind: "boolValue";
/**
* Represents a boolean value.
*
* @generated from protobuf field: bool bool_value = 4;
*/
boolValue: boolean;
} | {
oneofKind: "structValue";
/**
* Represents a structured value.
*
* @generated from protobuf field: google.protobuf.Struct struct_value = 5;
*/
structValue: Struct;
} | {
oneofKind: "listValue";
/**
* Represents a repeated `Value`.
*
* @generated from protobuf field: google.protobuf.ListValue list_value = 6;
*/
listValue: ListValue;
} | {
oneofKind: undefined;
};
}
/**
* `ListValue` is a wrapper around a repeated field of values.
*
* The JSON representation for `ListValue` is JSON array.
*
* @generated from protobuf message google.protobuf.ListValue
*/
export interface ListValue {
/**
* Repeated field of dynamically typed values.
*
* @generated from protobuf field: repeated google.protobuf.Value values = 1;
*/
values: Value[];
}
/**
* `NullValue` is a singleton enumeration to represent the null value for the
* `Value` type union.
*
* The JSON representation for `NullValue` is JSON `null`.
*
* @generated from protobuf enum google.protobuf.NullValue
*/
export enum NullValue {
/**
* Null value.
*
* @generated from protobuf enum value: NULL_VALUE = 0;
*/
NULL_VALUE = 0
}
// @generated message type with reflection information, may provide speed optimized methods
class Struct$Type extends MessageType<Struct> {
constructor() {
super("google.protobuf.Struct", [
{ no: 1, name: "fields", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "message", T: () => Value } }
]);
}
/**
* Encode `Struct` to JSON object.
*/
internalJsonWrite(message: Struct, options: JsonWriteOptions): JsonValue {
let json: JsonObject = {};
for (let [k, v] of Object.entries(message.fields)) {
json[k] = Value.toJson(v);
}
return json;
}
/**
* Decode `Struct` from JSON object.
*/
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Struct): Struct {
if (!isJsonObject(json))
throw new globalThis.Error("Unable to parse message " + this.typeName + " from JSON " + typeofJsonValue(json) + ".");
if (!target)
target = this.create();
for (let [k, v] of globalThis.Object.entries(json)) {
target.fields[k] = Value.fromJson(v);
}
return target;
}
create(value?: PartialMessage<Struct>): Struct {
const message = globalThis.Object.create((this.messagePrototype!));
message.fields = {};
if (value !== undefined)
reflectionMergePartial<Struct>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Struct): Struct {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* map<string, google.protobuf.Value> fields */ 1:
this.binaryReadMap1(message.fields, reader, 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;
}
private binaryReadMap1(map: Struct["fields"], reader: IBinaryReader, options: BinaryReadOptions): void {
let len = reader.uint32(), end = reader.pos + len, key: keyof Struct["fields"] | undefined, val: Struct["fields"][any] | undefined;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case 1:
key = reader.string();
break;
case 2:
val = Value.internalBinaryRead(reader, reader.uint32(), options);
break;
default: throw new globalThis.Error("unknown map entry field for field google.protobuf.Struct.fields");
}
}
map[key ?? ""] = val ?? Value.create();
}
internalBinaryWrite(message: Struct, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* map<string, google.protobuf.Value> fields = 1; */
for (let k of globalThis.Object.keys(message.fields)) {
writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
writer.tag(2, WireType.LengthDelimited).fork();
Value.internalBinaryWrite(message.fields[k], writer, options);
writer.join().join();
}
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.Struct
*/
export const Struct = new Struct$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Value$Type extends MessageType<Value> {
constructor() {
super("google.protobuf.Value", [
{ no: 1, name: "null_value", kind: "enum", oneof: "kind", T: () => ["google.protobuf.NullValue", NullValue] },
{ no: 2, name: "number_value", kind: "scalar", oneof: "kind", T: 1 /*ScalarType.DOUBLE*/ },
{ no: 3, name: "string_value", kind: "scalar", oneof: "kind", T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "bool_value", kind: "scalar", oneof: "kind", T: 8 /*ScalarType.BOOL*/ },
{ no: 5, name: "struct_value", kind: "message", oneof: "kind", T: () => Struct },
{ no: 6, name: "list_value", kind: "message", oneof: "kind", T: () => ListValue }
]);
}
/**
* Encode `Value` to JSON value.
*/
internalJsonWrite(message: Value, options: JsonWriteOptions): JsonValue {
if (message.kind.oneofKind === undefined)
throw new globalThis.Error();
switch (message.kind.oneofKind) {
case undefined: throw new globalThis.Error();
case "boolValue": return message.kind.boolValue;
case "nullValue": return null;
case "numberValue":
let numberValue = message.kind.numberValue;
if (typeof numberValue == "number" && !Number.isFinite(numberValue))
throw new globalThis.Error();
return numberValue;
case "stringValue": return message.kind.stringValue;
case "listValue":
let listValueField = this.fields.find(f => f.no === 6);
if (listValueField?.kind !== "message")
throw new globalThis.Error();
return listValueField.T().toJson(message.kind.listValue);
case "structValue":
let structValueField = this.fields.find(f => f.no === 5);
if (structValueField?.kind !== "message")
throw new globalThis.Error();
return structValueField.T().toJson(message.kind.structValue);
}
}
/**
* Decode `Value` from JSON value.
*/
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Value): Value {
if (!target)
target = this.create();
switch (typeof json) {
case "number":
target.kind = { oneofKind: "numberValue", numberValue: json };
break;
case "string":
target.kind = { oneofKind: "stringValue", stringValue: json };
break;
case "boolean":
target.kind = { oneofKind: "boolValue", boolValue: json };
break;
case "object":
if (json === null) {
target.kind = { oneofKind: "nullValue", nullValue: NullValue.NULL_VALUE };
}
else if (globalThis.Array.isArray(json)) {
target.kind = { oneofKind: "listValue", listValue: ListValue.fromJson(json) };
}
else {
target.kind = { oneofKind: "structValue", structValue: Struct.fromJson(json) };
}
break;
default: throw new globalThis.Error("Unable to parse " + this.typeName + " from JSON " + typeofJsonValue(json));
}
return target;
}
create(value?: PartialMessage<Value>): Value {
const message = globalThis.Object.create((this.messagePrototype!));
message.kind = { oneofKind: undefined };
if (value !== undefined)
reflectionMergePartial<Value>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Value): Value {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* google.protobuf.NullValue null_value */ 1:
message.kind = {
oneofKind: "nullValue",
nullValue: reader.int32()
};
break;
case /* double number_value */ 2:
message.kind = {
oneofKind: "numberValue",
numberValue: reader.double()
};
break;
case /* string string_value */ 3:
message.kind = {
oneofKind: "stringValue",
stringValue: reader.string()
};
break;
case /* bool bool_value */ 4:
message.kind = {
oneofKind: "boolValue",
boolValue: reader.bool()
};
break;
case /* google.protobuf.Struct struct_value */ 5:
message.kind = {
oneofKind: "structValue",
structValue: Struct.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).structValue)
};
break;
case /* google.protobuf.ListValue list_value */ 6:
message.kind = {
oneofKind: "listValue",
listValue: ListValue.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).listValue)
};
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: Value, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* google.protobuf.NullValue null_value = 1; */
if (message.kind.oneofKind === "nullValue")
writer.tag(1, WireType.Varint).int32(message.kind.nullValue);
/* double number_value = 2; */
if (message.kind.oneofKind === "numberValue")
writer.tag(2, WireType.Bit64).double(message.kind.numberValue);
/* string string_value = 3; */
if (message.kind.oneofKind === "stringValue")
writer.tag(3, WireType.LengthDelimited).string(message.kind.stringValue);
/* bool bool_value = 4; */
if (message.kind.oneofKind === "boolValue")
writer.tag(4, WireType.Varint).bool(message.kind.boolValue);
/* google.protobuf.Struct struct_value = 5; */
if (message.kind.oneofKind === "structValue")
Struct.internalBinaryWrite(message.kind.structValue, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
/* google.protobuf.ListValue list_value = 6; */
if (message.kind.oneofKind === "listValue")
ListValue.internalBinaryWrite(message.kind.listValue, writer.tag(6, 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 google.protobuf.Value
*/
export const Value = new Value$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListValue$Type extends MessageType<ListValue> {
constructor() {
super("google.protobuf.ListValue", [
{ no: 1, name: "values", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Value }
]);
}
/**
* Encode `ListValue` to JSON array.
*/
internalJsonWrite(message: ListValue, options: JsonWriteOptions): JsonValue {
return message.values.map(v => Value.toJson(v));
}
/**
* Decode `ListValue` from JSON array.
*/
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: ListValue): ListValue {
if (!globalThis.Array.isArray(json))
throw new globalThis.Error("Unable to parse " + this.typeName + " from JSON " + typeofJsonValue(json));
if (!target)
target = this.create();
let values = json.map(v => Value.fromJson(v));
target.values.push(...values);
return target;
}
create(value?: PartialMessage<ListValue>): ListValue {
const message = globalThis.Object.create((this.messagePrototype!));
message.values = [];
if (value !== undefined)
reflectionMergePartial<ListValue>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListValue): ListValue {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated google.protobuf.Value values */ 1:
message.values.push(Value.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: ListValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated google.protobuf.Value values = 1; */
for (let i = 0; i < message.values.length; i++)
Value.internalBinaryWrite(message.values[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 google.protobuf.ListValue
*/
export const ListValue = new ListValue$Type();

View File

@@ -0,0 +1,281 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/protobuf/timestamp.proto" (package "google.protobuf", syntax proto3)
// tslint:disable
//
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
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 { typeofJsonValue } from "@protobuf-ts/runtime";
import type { JsonValue } from "@protobuf-ts/runtime";
import type { JsonReadOptions } from "@protobuf-ts/runtime";
import type { JsonWriteOptions } from "@protobuf-ts/runtime";
import { PbLong } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
/**
* A Timestamp represents a point in time independent of any time zone or local
* calendar, encoded as a count of seconds and fractions of seconds at
* nanosecond resolution. The count is relative to an epoch at UTC midnight on
* January 1, 1970, in the proleptic Gregorian calendar which extends the
* Gregorian calendar backwards to year one.
*
* All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
* second table is needed for interpretation, using a [24-hour linear
* smear](https://developers.google.com/time/smear).
*
* The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
* restricting to that range, we ensure that we can convert to and from [RFC
* 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
*
* # Examples
*
* Example 1: Compute Timestamp from POSIX `time()`.
*
* Timestamp timestamp;
* timestamp.set_seconds(time(NULL));
* timestamp.set_nanos(0);
*
* Example 2: Compute Timestamp from POSIX `gettimeofday()`.
*
* struct timeval tv;
* gettimeofday(&tv, NULL);
*
* Timestamp timestamp;
* timestamp.set_seconds(tv.tv_sec);
* timestamp.set_nanos(tv.tv_usec * 1000);
*
* Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
*
* FILETIME ft;
* GetSystemTimeAsFileTime(&ft);
* UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
*
* // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
* // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
* Timestamp timestamp;
* timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
* timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
*
* Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
*
* long millis = System.currentTimeMillis();
*
* Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
* .setNanos((int) ((millis % 1000) * 1000000)).build();
*
*
* Example 5: Compute Timestamp from current time in Python.
*
* timestamp = Timestamp()
* timestamp.GetCurrentTime()
*
* # JSON Mapping
*
* In JSON format, the Timestamp type is encoded as a string in the
* [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
* format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
* where {year} is always expressed using four digits while {month}, {day},
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
* is required. A proto3 JSON serializer should always use UTC (as indicated by
* "Z") when printing the Timestamp type and a proto3 JSON parser should be
* able to accept both UTC and other timezones (as indicated by an offset).
*
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
* 01:30 UTC on January 15, 2017.
*
* In JavaScript, one can convert a Date object to this format using the
* standard
* [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
* method. In Python, a standard `datetime.datetime` object can be converted
* to this format using
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
* http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
* ) to obtain a formatter capable of generating timestamps in this format.
*
*
*
* @generated from protobuf message google.protobuf.Timestamp
*/
export interface Timestamp {
/**
* Represents seconds of UTC time since Unix epoch
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59Z inclusive.
*
* @generated from protobuf field: int64 seconds = 1;
*/
seconds: bigint;
/**
* Non-negative fractions of a second at nanosecond resolution. Negative
* second values with fractions must still have non-negative nanos values
* that count forward in time. Must be from 0 to 999,999,999
* inclusive.
*
* @generated from protobuf field: int32 nanos = 2;
*/
nanos: number;
}
// @generated message type with reflection information, may provide speed optimized methods
class Timestamp$Type extends MessageType<Timestamp> {
constructor() {
super("google.protobuf.Timestamp", [
{ no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
{ no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
]);
}
/**
* Creates a new `Timestamp` for the current time.
*/
now(): Timestamp {
const msg = this.create();
const ms = Date.now();
msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();
msg.nanos = (ms % 1000) * 1000000;
return msg;
}
/**
* Converts a `Timestamp` to a JavaScript Date.
*/
toDate(message: Timestamp): Date {
return new Date(PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000));
}
/**
* Converts a JavaScript Date to a `Timestamp`.
*/
fromDate(date: Date): Timestamp {
const msg = this.create();
const ms = date.getTime();
msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();
msg.nanos = (ms % 1000) * 1000000;
return msg;
}
/**
* In JSON format, the `Timestamp` type is encoded as a string
* in the RFC 3339 format.
*/
internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue {
let ms = PbLong.from(message.seconds).toNumber() * 1000;
if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z"))
throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
if (message.nanos < 0)
throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");
let z = "Z";
if (message.nanos > 0) {
let nanosStr = (message.nanos + 1000000000).toString().substring(1);
if (nanosStr.substring(3) === "000000")
z = "." + nanosStr.substring(0, 3) + "Z";
else if (nanosStr.substring(6) === "000")
z = "." + nanosStr.substring(0, 6) + "Z";
else
z = "." + nanosStr + "Z";
}
return new Date(ms).toISOString().replace(".000Z", z);
}
/**
* In JSON format, the `Timestamp` type is encoded as a string
* in the RFC 3339 format.
*/
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp {
if (typeof json !== "string")
throw new Error("Unable to parse Timestamp from JSON " + typeofJsonValue(json) + ".");
let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);
if (!matches)
throw new Error("Unable to parse Timestamp from JSON. Invalid format.");
let ms = Date.parse(matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z"));
if (Number.isNaN(ms))
throw new Error("Unable to parse Timestamp from JSON. Invalid value.");
if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z"))
throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
if (!target)
target = this.create();
target.seconds = PbLong.from(ms / 1000).toBigInt();
target.nanos = 0;
if (matches[7])
target.nanos = (parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1000000000);
return target;
}
create(value?: PartialMessage<Timestamp>): Timestamp {
const message = globalThis.Object.create((this.messagePrototype!));
message.seconds = 0n;
message.nanos = 0;
if (value !== undefined)
reflectionMergePartial<Timestamp>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Timestamp): Timestamp {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* int64 seconds */ 1:
message.seconds = reader.int64().toBigInt();
break;
case /* int32 nanos */ 2:
message.nanos = reader.int32();
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: Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* int64 seconds = 1; */
if (message.seconds !== 0n)
writer.tag(1, WireType.Varint).int64(message.seconds);
/* int32 nanos = 2; */
if (message.nanos !== 0)
writer.tag(2, WireType.Varint).int32(message.nanos);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.Timestamp
*/
export const Timestamp = new Timestamp$Type();

816
google/protobuf/type.ts Normal file
View File

@@ -0,0 +1,816 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/protobuf/type.proto" (package "google.protobuf", syntax proto3)
// tslint:disable
//
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
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 { Any } from "./any";
import { SourceContext } from "./source_context";
/**
* A protocol buffer message type.
*
* @generated from protobuf message google.protobuf.Type
*/
export interface Type {
/**
* The fully qualified message name.
*
* @generated from protobuf field: string name = 1;
*/
name: string;
/**
* The list of fields.
*
* @generated from protobuf field: repeated google.protobuf.Field fields = 2;
*/
fields: Field[];
/**
* The list of types appearing in `oneof` definitions in this type.
*
* @generated from protobuf field: repeated string oneofs = 3;
*/
oneofs: string[];
/**
* The protocol buffer options.
*
* @generated from protobuf field: repeated google.protobuf.Option options = 4;
*/
options: Option[];
/**
* The source context.
*
* @generated from protobuf field: google.protobuf.SourceContext source_context = 5;
*/
sourceContext?: SourceContext;
/**
* The source syntax.
*
* @generated from protobuf field: google.protobuf.Syntax syntax = 6;
*/
syntax: Syntax;
}
/**
* A single field of a message type.
*
* @generated from protobuf message google.protobuf.Field
*/
export interface Field {
/**
* The field type.
*
* @generated from protobuf field: google.protobuf.Field.Kind kind = 1;
*/
kind: Field_Kind;
/**
* The field cardinality.
*
* @generated from protobuf field: google.protobuf.Field.Cardinality cardinality = 2;
*/
cardinality: Field_Cardinality;
/**
* The field number.
*
* @generated from protobuf field: int32 number = 3;
*/
number: number;
/**
* The field name.
*
* @generated from protobuf field: string name = 4;
*/
name: string;
/**
* The field type URL, without the scheme, for message or enumeration
* types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
*
* @generated from protobuf field: string type_url = 6;
*/
typeUrl: string;
/**
* The index of the field type in `Type.oneofs`, for message or enumeration
* types. The first type has index 1; zero means the type is not in the list.
*
* @generated from protobuf field: int32 oneof_index = 7;
*/
oneofIndex: number;
/**
* Whether to use alternative packed wire representation.
*
* @generated from protobuf field: bool packed = 8;
*/
packed: boolean;
/**
* The protocol buffer options.
*
* @generated from protobuf field: repeated google.protobuf.Option options = 9;
*/
options: Option[];
/**
* The field JSON name.
*
* @generated from protobuf field: string json_name = 10;
*/
jsonName: string;
/**
* The string value of the default value of this field. Proto2 syntax only.
*
* @generated from protobuf field: string default_value = 11;
*/
defaultValue: string;
}
/**
* Basic field types.
*
* @generated from protobuf enum google.protobuf.Field.Kind
*/
export enum Field_Kind {
/**
* Field type unknown.
*
* @generated from protobuf enum value: TYPE_UNKNOWN = 0;
*/
TYPE_UNKNOWN = 0,
/**
* Field type double.
*
* @generated from protobuf enum value: TYPE_DOUBLE = 1;
*/
TYPE_DOUBLE = 1,
/**
* Field type float.
*
* @generated from protobuf enum value: TYPE_FLOAT = 2;
*/
TYPE_FLOAT = 2,
/**
* Field type int64.
*
* @generated from protobuf enum value: TYPE_INT64 = 3;
*/
TYPE_INT64 = 3,
/**
* Field type uint64.
*
* @generated from protobuf enum value: TYPE_UINT64 = 4;
*/
TYPE_UINT64 = 4,
/**
* Field type int32.
*
* @generated from protobuf enum value: TYPE_INT32 = 5;
*/
TYPE_INT32 = 5,
/**
* Field type fixed64.
*
* @generated from protobuf enum value: TYPE_FIXED64 = 6;
*/
TYPE_FIXED64 = 6,
/**
* Field type fixed32.
*
* @generated from protobuf enum value: TYPE_FIXED32 = 7;
*/
TYPE_FIXED32 = 7,
/**
* Field type bool.
*
* @generated from protobuf enum value: TYPE_BOOL = 8;
*/
TYPE_BOOL = 8,
/**
* Field type string.
*
* @generated from protobuf enum value: TYPE_STRING = 9;
*/
TYPE_STRING = 9,
/**
* Field type group. Proto2 syntax only, and deprecated.
*
* @generated from protobuf enum value: TYPE_GROUP = 10;
*/
TYPE_GROUP = 10,
/**
* Field type message.
*
* @generated from protobuf enum value: TYPE_MESSAGE = 11;
*/
TYPE_MESSAGE = 11,
/**
* Field type bytes.
*
* @generated from protobuf enum value: TYPE_BYTES = 12;
*/
TYPE_BYTES = 12,
/**
* Field type uint32.
*
* @generated from protobuf enum value: TYPE_UINT32 = 13;
*/
TYPE_UINT32 = 13,
/**
* Field type enum.
*
* @generated from protobuf enum value: TYPE_ENUM = 14;
*/
TYPE_ENUM = 14,
/**
* Field type sfixed32.
*
* @generated from protobuf enum value: TYPE_SFIXED32 = 15;
*/
TYPE_SFIXED32 = 15,
/**
* Field type sfixed64.
*
* @generated from protobuf enum value: TYPE_SFIXED64 = 16;
*/
TYPE_SFIXED64 = 16,
/**
* Field type sint32.
*
* @generated from protobuf enum value: TYPE_SINT32 = 17;
*/
TYPE_SINT32 = 17,
/**
* Field type sint64.
*
* @generated from protobuf enum value: TYPE_SINT64 = 18;
*/
TYPE_SINT64 = 18
}
/**
* Whether a field is optional, required, or repeated.
*
* @generated from protobuf enum google.protobuf.Field.Cardinality
*/
export enum Field_Cardinality {
/**
* For fields with unknown cardinality.
*
* @generated from protobuf enum value: CARDINALITY_UNKNOWN = 0;
*/
UNKNOWN = 0,
/**
* For optional fields.
*
* @generated from protobuf enum value: CARDINALITY_OPTIONAL = 1;
*/
OPTIONAL = 1,
/**
* For required fields. Proto2 syntax only.
*
* @generated from protobuf enum value: CARDINALITY_REQUIRED = 2;
*/
REQUIRED = 2,
/**
* For repeated fields.
*
* @generated from protobuf enum value: CARDINALITY_REPEATED = 3;
*/
REPEATED = 3
}
/**
* Enum type definition.
*
* @generated from protobuf message google.protobuf.Enum
*/
export interface Enum {
/**
* Enum type name.
*
* @generated from protobuf field: string name = 1;
*/
name: string;
/**
* Enum value definitions.
*
* @generated from protobuf field: repeated google.protobuf.EnumValue enumvalue = 2;
*/
enumvalue: EnumValue[];
/**
* Protocol buffer options.
*
* @generated from protobuf field: repeated google.protobuf.Option options = 3;
*/
options: Option[];
/**
* The source context.
*
* @generated from protobuf field: google.protobuf.SourceContext source_context = 4;
*/
sourceContext?: SourceContext;
/**
* The source syntax.
*
* @generated from protobuf field: google.protobuf.Syntax syntax = 5;
*/
syntax: Syntax;
}
/**
* Enum value definition.
*
* @generated from protobuf message google.protobuf.EnumValue
*/
export interface EnumValue {
/**
* Enum value name.
*
* @generated from protobuf field: string name = 1;
*/
name: string;
/**
* Enum value number.
*
* @generated from protobuf field: int32 number = 2;
*/
number: number;
/**
* Protocol buffer options.
*
* @generated from protobuf field: repeated google.protobuf.Option options = 3;
*/
options: Option[];
}
/**
* A protocol buffer option, which can be attached to a message, field,
* enumeration, etc.
*
* @generated from protobuf message google.protobuf.Option
*/
export interface Option {
/**
* The option's name. For protobuf built-in options (options defined in
* descriptor.proto), this is the short name. For example, `"map_entry"`.
* For custom options, it should be the fully-qualified name. For example,
* `"google.api.http"`.
*
* @generated from protobuf field: string name = 1;
*/
name: string;
/**
* The option's value packed in an Any message. If the value is a primitive,
* the corresponding wrapper type defined in google/protobuf/wrappers.proto
* should be used. If the value is an enum, it should be stored as an int32
* value using the google.protobuf.Int32Value type.
*
* @generated from protobuf field: google.protobuf.Any value = 2;
*/
value?: Any;
}
/**
* The syntax in which a protocol buffer element is defined.
*
* @generated from protobuf enum google.protobuf.Syntax
*/
export enum Syntax {
/**
* Syntax `proto2`.
*
* @generated from protobuf enum value: SYNTAX_PROTO2 = 0;
*/
PROTO2 = 0,
/**
* Syntax `proto3`.
*
* @generated from protobuf enum value: SYNTAX_PROTO3 = 1;
*/
PROTO3 = 1
}
// @generated message type with reflection information, may provide speed optimized methods
class Type$Type extends MessageType<Type> {
constructor() {
super("google.protobuf.Type", [
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "fields", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Field },
{ no: 3, name: "oneofs", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "options", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Option },
{ no: 5, name: "source_context", kind: "message", T: () => SourceContext },
{ no: 6, name: "syntax", kind: "enum", T: () => ["google.protobuf.Syntax", Syntax, "SYNTAX_"] }
]);
}
create(value?: PartialMessage<Type>): Type {
const message = globalThis.Object.create((this.messagePrototype!));
message.name = "";
message.fields = [];
message.oneofs = [];
message.options = [];
message.syntax = 0;
if (value !== undefined)
reflectionMergePartial<Type>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Type): Type {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string name */ 1:
message.name = reader.string();
break;
case /* repeated google.protobuf.Field fields */ 2:
message.fields.push(Field.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* repeated string oneofs */ 3:
message.oneofs.push(reader.string());
break;
case /* repeated google.protobuf.Option options */ 4:
message.options.push(Option.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* google.protobuf.SourceContext source_context */ 5:
message.sourceContext = SourceContext.internalBinaryRead(reader, reader.uint32(), options, message.sourceContext);
break;
case /* google.protobuf.Syntax syntax */ 6:
message.syntax = reader.int32();
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: Type, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string name = 1; */
if (message.name !== "")
writer.tag(1, WireType.LengthDelimited).string(message.name);
/* repeated google.protobuf.Field fields = 2; */
for (let i = 0; i < message.fields.length; i++)
Field.internalBinaryWrite(message.fields[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
/* repeated string oneofs = 3; */
for (let i = 0; i < message.oneofs.length; i++)
writer.tag(3, WireType.LengthDelimited).string(message.oneofs[i]);
/* repeated google.protobuf.Option options = 4; */
for (let i = 0; i < message.options.length; i++)
Option.internalBinaryWrite(message.options[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* google.protobuf.SourceContext source_context = 5; */
if (message.sourceContext)
SourceContext.internalBinaryWrite(message.sourceContext, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
/* google.protobuf.Syntax syntax = 6; */
if (message.syntax !== 0)
writer.tag(6, WireType.Varint).int32(message.syntax);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.Type
*/
export const Type = new Type$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Field$Type extends MessageType<Field> {
constructor() {
super("google.protobuf.Field", [
{ no: 1, name: "kind", kind: "enum", T: () => ["google.protobuf.Field.Kind", Field_Kind] },
{ no: 2, name: "cardinality", kind: "enum", T: () => ["google.protobuf.Field.Cardinality", Field_Cardinality, "CARDINALITY_"] },
{ no: 3, name: "number", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
{ no: 4, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 6, name: "type_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 7, name: "oneof_index", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
{ no: 8, name: "packed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
{ no: 9, name: "options", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Option },
{ no: 10, name: "json_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 11, name: "default_value", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<Field>): Field {
const message = globalThis.Object.create((this.messagePrototype!));
message.kind = 0;
message.cardinality = 0;
message.number = 0;
message.name = "";
message.typeUrl = "";
message.oneofIndex = 0;
message.packed = false;
message.options = [];
message.jsonName = "";
message.defaultValue = "";
if (value !== undefined)
reflectionMergePartial<Field>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Field): Field {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* google.protobuf.Field.Kind kind */ 1:
message.kind = reader.int32();
break;
case /* google.protobuf.Field.Cardinality cardinality */ 2:
message.cardinality = reader.int32();
break;
case /* int32 number */ 3:
message.number = reader.int32();
break;
case /* string name */ 4:
message.name = reader.string();
break;
case /* string type_url */ 6:
message.typeUrl = reader.string();
break;
case /* int32 oneof_index */ 7:
message.oneofIndex = reader.int32();
break;
case /* bool packed */ 8:
message.packed = reader.bool();
break;
case /* repeated google.protobuf.Option options */ 9:
message.options.push(Option.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* string json_name */ 10:
message.jsonName = reader.string();
break;
case /* string default_value */ 11:
message.defaultValue = 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: Field, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* google.protobuf.Field.Kind kind = 1; */
if (message.kind !== 0)
writer.tag(1, WireType.Varint).int32(message.kind);
/* google.protobuf.Field.Cardinality cardinality = 2; */
if (message.cardinality !== 0)
writer.tag(2, WireType.Varint).int32(message.cardinality);
/* int32 number = 3; */
if (message.number !== 0)
writer.tag(3, WireType.Varint).int32(message.number);
/* string name = 4; */
if (message.name !== "")
writer.tag(4, WireType.LengthDelimited).string(message.name);
/* string type_url = 6; */
if (message.typeUrl !== "")
writer.tag(6, WireType.LengthDelimited).string(message.typeUrl);
/* int32 oneof_index = 7; */
if (message.oneofIndex !== 0)
writer.tag(7, WireType.Varint).int32(message.oneofIndex);
/* bool packed = 8; */
if (message.packed !== false)
writer.tag(8, WireType.Varint).bool(message.packed);
/* repeated google.protobuf.Option options = 9; */
for (let i = 0; i < message.options.length; i++)
Option.internalBinaryWrite(message.options[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join();
/* string json_name = 10; */
if (message.jsonName !== "")
writer.tag(10, WireType.LengthDelimited).string(message.jsonName);
/* string default_value = 11; */
if (message.defaultValue !== "")
writer.tag(11, WireType.LengthDelimited).string(message.defaultValue);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.Field
*/
export const Field = new Field$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Enum$Type extends MessageType<Enum> {
constructor() {
super("google.protobuf.Enum", [
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "enumvalue", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => EnumValue },
{ no: 3, name: "options", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Option },
{ no: 4, name: "source_context", kind: "message", T: () => SourceContext },
{ no: 5, name: "syntax", kind: "enum", T: () => ["google.protobuf.Syntax", Syntax, "SYNTAX_"] }
]);
}
create(value?: PartialMessage<Enum>): Enum {
const message = globalThis.Object.create((this.messagePrototype!));
message.name = "";
message.enumvalue = [];
message.options = [];
message.syntax = 0;
if (value !== undefined)
reflectionMergePartial<Enum>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Enum): Enum {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string name */ 1:
message.name = reader.string();
break;
case /* repeated google.protobuf.EnumValue enumvalue */ 2:
message.enumvalue.push(EnumValue.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* repeated google.protobuf.Option options */ 3:
message.options.push(Option.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* google.protobuf.SourceContext source_context */ 4:
message.sourceContext = SourceContext.internalBinaryRead(reader, reader.uint32(), options, message.sourceContext);
break;
case /* google.protobuf.Syntax syntax */ 5:
message.syntax = reader.int32();
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: Enum, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string name = 1; */
if (message.name !== "")
writer.tag(1, WireType.LengthDelimited).string(message.name);
/* repeated google.protobuf.EnumValue enumvalue = 2; */
for (let i = 0; i < message.enumvalue.length; i++)
EnumValue.internalBinaryWrite(message.enumvalue[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
/* repeated google.protobuf.Option options = 3; */
for (let i = 0; i < message.options.length; i++)
Option.internalBinaryWrite(message.options[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
/* google.protobuf.SourceContext source_context = 4; */
if (message.sourceContext)
SourceContext.internalBinaryWrite(message.sourceContext, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
/* google.protobuf.Syntax syntax = 5; */
if (message.syntax !== 0)
writer.tag(5, WireType.Varint).int32(message.syntax);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.Enum
*/
export const Enum = new Enum$Type();
// @generated message type with reflection information, may provide speed optimized methods
class EnumValue$Type extends MessageType<EnumValue> {
constructor() {
super("google.protobuf.EnumValue", [
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "number", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
{ no: 3, name: "options", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Option }
]);
}
create(value?: PartialMessage<EnumValue>): EnumValue {
const message = globalThis.Object.create((this.messagePrototype!));
message.name = "";
message.number = 0;
message.options = [];
if (value !== undefined)
reflectionMergePartial<EnumValue>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumValue): EnumValue {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string name */ 1:
message.name = reader.string();
break;
case /* int32 number */ 2:
message.number = reader.int32();
break;
case /* repeated google.protobuf.Option options */ 3:
message.options.push(Option.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: EnumValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string name = 1; */
if (message.name !== "")
writer.tag(1, WireType.LengthDelimited).string(message.name);
/* int32 number = 2; */
if (message.number !== 0)
writer.tag(2, WireType.Varint).int32(message.number);
/* repeated google.protobuf.Option options = 3; */
for (let i = 0; i < message.options.length; i++)
Option.internalBinaryWrite(message.options[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 google.protobuf.EnumValue
*/
export const EnumValue = new EnumValue$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Option$Type extends MessageType<Option> {
constructor() {
super("google.protobuf.Option", [
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "value", kind: "message", T: () => Any }
]);
}
create(value?: PartialMessage<Option>): Option {
const message = globalThis.Object.create((this.messagePrototype!));
message.name = "";
if (value !== undefined)
reflectionMergePartial<Option>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Option): Option {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string name */ 1:
message.name = reader.string();
break;
case /* google.protobuf.Any value */ 2:
message.value = Any.internalBinaryRead(reader, reader.uint32(), options, message.value);
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: Option, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string name = 1; */
if (message.name !== "")
writer.tag(1, WireType.LengthDelimited).string(message.name);
/* google.protobuf.Any value = 2; */
if (message.value)
Any.internalBinaryWrite(message.value, 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 google.protobuf.Option
*/
export const Option = new Option$Type();

752
google/protobuf/wrappers.ts Normal file
View File

@@ -0,0 +1,752 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/protobuf/wrappers.proto" (package "google.protobuf", syntax proto3)
// tslint:disable
//
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
// Wrappers for primitive (non-message) types. These types are useful
// for embedding primitives in the `google.protobuf.Any` type and for places
// where we need to distinguish between the absence of a primitive
// typed field and its default value.
//
// These wrappers have no meaningful use within repeated fields as they lack
// the ability to detect presence on individual elements.
// These wrappers have no meaningful use within a map or a oneof since
// individual entries of a map or fields of a oneof can already detect presence.
//
import { ScalarType } from "@protobuf-ts/runtime";
import { LongType } from "@protobuf-ts/runtime";
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 type { JsonValue } from "@protobuf-ts/runtime";
import type { JsonReadOptions } from "@protobuf-ts/runtime";
import type { JsonWriteOptions } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
/**
* Wrapper message for `double`.
*
* The JSON representation for `DoubleValue` is JSON number.
*
* @generated from protobuf message google.protobuf.DoubleValue
*/
export interface DoubleValue {
/**
* The double value.
*
* @generated from protobuf field: double value = 1;
*/
value: number;
}
/**
* Wrapper message for `float`.
*
* The JSON representation for `FloatValue` is JSON number.
*
* @generated from protobuf message google.protobuf.FloatValue
*/
export interface FloatValue {
/**
* The float value.
*
* @generated from protobuf field: float value = 1;
*/
value: number;
}
/**
* Wrapper message for `int64`.
*
* The JSON representation for `Int64Value` is JSON string.
*
* @generated from protobuf message google.protobuf.Int64Value
*/
export interface Int64Value {
/**
* The int64 value.
*
* @generated from protobuf field: int64 value = 1;
*/
value: bigint;
}
/**
* Wrapper message for `uint64`.
*
* The JSON representation for `UInt64Value` is JSON string.
*
* @generated from protobuf message google.protobuf.UInt64Value
*/
export interface UInt64Value {
/**
* The uint64 value.
*
* @generated from protobuf field: uint64 value = 1;
*/
value: bigint;
}
/**
* Wrapper message for `int32`.
*
* The JSON representation for `Int32Value` is JSON number.
*
* @generated from protobuf message google.protobuf.Int32Value
*/
export interface Int32Value {
/**
* The int32 value.
*
* @generated from protobuf field: int32 value = 1;
*/
value: number;
}
/**
* Wrapper message for `uint32`.
*
* The JSON representation for `UInt32Value` is JSON number.
*
* @generated from protobuf message google.protobuf.UInt32Value
*/
export interface UInt32Value {
/**
* The uint32 value.
*
* @generated from protobuf field: uint32 value = 1;
*/
value: number;
}
/**
* Wrapper message for `bool`.
*
* The JSON representation for `BoolValue` is JSON `true` and `false`.
*
* @generated from protobuf message google.protobuf.BoolValue
*/
export interface BoolValue {
/**
* The bool value.
*
* @generated from protobuf field: bool value = 1;
*/
value: boolean;
}
/**
* Wrapper message for `string`.
*
* The JSON representation for `StringValue` is JSON string.
*
* @generated from protobuf message google.protobuf.StringValue
*/
export interface StringValue {
/**
* The string value.
*
* @generated from protobuf field: string value = 1;
*/
value: string;
}
/**
* Wrapper message for `bytes`.
*
* The JSON representation for `BytesValue` is JSON string.
*
* @generated from protobuf message google.protobuf.BytesValue
*/
export interface BytesValue {
/**
* The bytes value.
*
* @generated from protobuf field: bytes value = 1;
*/
value: Uint8Array;
}
// @generated message type with reflection information, may provide speed optimized methods
class DoubleValue$Type extends MessageType<DoubleValue> {
constructor() {
super("google.protobuf.DoubleValue", [
{ no: 1, name: "value", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }
]);
}
/**
* Encode `DoubleValue` to JSON number.
*/
internalJsonWrite(message: DoubleValue, options: JsonWriteOptions): JsonValue {
return this.refJsonWriter.scalar(2, message.value, "value", false, true);
}
/**
* Decode `DoubleValue` from JSON number.
*/
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: DoubleValue): DoubleValue {
if (!target)
target = this.create();
target.value = this.refJsonReader.scalar(json, 1, undefined, "value") as number;
return target;
}
create(value?: PartialMessage<DoubleValue>): DoubleValue {
const message = globalThis.Object.create((this.messagePrototype!));
message.value = 0;
if (value !== undefined)
reflectionMergePartial<DoubleValue>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DoubleValue): DoubleValue {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* double value */ 1:
message.value = reader.double();
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: DoubleValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* double value = 1; */
if (message.value !== 0)
writer.tag(1, WireType.Bit64).double(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.DoubleValue
*/
export const DoubleValue = new DoubleValue$Type();
// @generated message type with reflection information, may provide speed optimized methods
class FloatValue$Type extends MessageType<FloatValue> {
constructor() {
super("google.protobuf.FloatValue", [
{ no: 1, name: "value", kind: "scalar", T: 2 /*ScalarType.FLOAT*/ }
]);
}
/**
* Encode `FloatValue` to JSON number.
*/
internalJsonWrite(message: FloatValue, options: JsonWriteOptions): JsonValue {
return this.refJsonWriter.scalar(1, message.value, "value", false, true);
}
/**
* Decode `FloatValue` from JSON number.
*/
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: FloatValue): FloatValue {
if (!target)
target = this.create();
target.value = this.refJsonReader.scalar(json, 1, undefined, "value") as number;
return target;
}
create(value?: PartialMessage<FloatValue>): FloatValue {
const message = globalThis.Object.create((this.messagePrototype!));
message.value = 0;
if (value !== undefined)
reflectionMergePartial<FloatValue>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FloatValue): FloatValue {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* float value */ 1:
message.value = reader.float();
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: FloatValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* float value = 1; */
if (message.value !== 0)
writer.tag(1, WireType.Bit32).float(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.FloatValue
*/
export const FloatValue = new FloatValue$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Int64Value$Type extends MessageType<Int64Value> {
constructor() {
super("google.protobuf.Int64Value", [
{ no: 1, name: "value", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
]);
}
/**
* Encode `Int64Value` to JSON string.
*/
internalJsonWrite(message: Int64Value, options: JsonWriteOptions): JsonValue {
return this.refJsonWriter.scalar(ScalarType.INT64, message.value, "value", false, true);
}
/**
* Decode `Int64Value` from JSON string.
*/
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Int64Value): Int64Value {
if (!target)
target = this.create();
target.value = this.refJsonReader.scalar(json, ScalarType.INT64, LongType.BIGINT, "value") as any;
return target;
}
create(value?: PartialMessage<Int64Value>): Int64Value {
const message = globalThis.Object.create((this.messagePrototype!));
message.value = 0n;
if (value !== undefined)
reflectionMergePartial<Int64Value>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Int64Value): Int64Value {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* int64 value */ 1:
message.value = reader.int64().toBigInt();
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: Int64Value, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* int64 value = 1; */
if (message.value !== 0n)
writer.tag(1, WireType.Varint).int64(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.Int64Value
*/
export const Int64Value = new Int64Value$Type();
// @generated message type with reflection information, may provide speed optimized methods
class UInt64Value$Type extends MessageType<UInt64Value> {
constructor() {
super("google.protobuf.UInt64Value", [
{ no: 1, name: "value", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
]);
}
/**
* Encode `UInt64Value` to JSON string.
*/
internalJsonWrite(message: UInt64Value, options: JsonWriteOptions): JsonValue {
return this.refJsonWriter.scalar(ScalarType.UINT64, message.value, "value", false, true);
}
/**
* Decode `UInt64Value` from JSON string.
*/
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: UInt64Value): UInt64Value {
if (!target)
target = this.create();
target.value = this.refJsonReader.scalar(json, ScalarType.UINT64, LongType.BIGINT, "value") as any;
return target;
}
create(value?: PartialMessage<UInt64Value>): UInt64Value {
const message = globalThis.Object.create((this.messagePrototype!));
message.value = 0n;
if (value !== undefined)
reflectionMergePartial<UInt64Value>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UInt64Value): UInt64Value {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* uint64 value */ 1:
message.value = reader.uint64().toBigInt();
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: UInt64Value, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* uint64 value = 1; */
if (message.value !== 0n)
writer.tag(1, WireType.Varint).uint64(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.UInt64Value
*/
export const UInt64Value = new UInt64Value$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Int32Value$Type extends MessageType<Int32Value> {
constructor() {
super("google.protobuf.Int32Value", [
{ no: 1, name: "value", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
]);
}
/**
* Encode `Int32Value` to JSON string.
*/
internalJsonWrite(message: Int32Value, options: JsonWriteOptions): JsonValue {
return this.refJsonWriter.scalar(5, message.value, "value", false, true);
}
/**
* Decode `Int32Value` from JSON string.
*/
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Int32Value): Int32Value {
if (!target)
target = this.create();
target.value = this.refJsonReader.scalar(json, 5, undefined, "value") as number;
return target;
}
create(value?: PartialMessage<Int32Value>): Int32Value {
const message = globalThis.Object.create((this.messagePrototype!));
message.value = 0;
if (value !== undefined)
reflectionMergePartial<Int32Value>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Int32Value): Int32Value {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* int32 value */ 1:
message.value = reader.int32();
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: Int32Value, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* int32 value = 1; */
if (message.value !== 0)
writer.tag(1, WireType.Varint).int32(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.Int32Value
*/
export const Int32Value = new Int32Value$Type();
// @generated message type with reflection information, may provide speed optimized methods
class UInt32Value$Type extends MessageType<UInt32Value> {
constructor() {
super("google.protobuf.UInt32Value", [
{ no: 1, name: "value", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
]);
}
/**
* Encode `UInt32Value` to JSON string.
*/
internalJsonWrite(message: UInt32Value, options: JsonWriteOptions): JsonValue {
return this.refJsonWriter.scalar(13, message.value, "value", false, true);
}
/**
* Decode `UInt32Value` from JSON string.
*/
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: UInt32Value): UInt32Value {
if (!target)
target = this.create();
target.value = this.refJsonReader.scalar(json, 13, undefined, "value") as number;
return target;
}
create(value?: PartialMessage<UInt32Value>): UInt32Value {
const message = globalThis.Object.create((this.messagePrototype!));
message.value = 0;
if (value !== undefined)
reflectionMergePartial<UInt32Value>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UInt32Value): UInt32Value {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* uint32 value */ 1:
message.value = reader.uint32();
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: UInt32Value, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* uint32 value = 1; */
if (message.value !== 0)
writer.tag(1, WireType.Varint).uint32(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.UInt32Value
*/
export const UInt32Value = new UInt32Value$Type();
// @generated message type with reflection information, may provide speed optimized methods
class BoolValue$Type extends MessageType<BoolValue> {
constructor() {
super("google.protobuf.BoolValue", [
{ no: 1, name: "value", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
]);
}
/**
* Encode `BoolValue` to JSON bool.
*/
internalJsonWrite(message: BoolValue, options: JsonWriteOptions): JsonValue {
return message.value;
}
/**
* Decode `BoolValue` from JSON bool.
*/
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: BoolValue): BoolValue {
if (!target)
target = this.create();
target.value = this.refJsonReader.scalar(json, 8, undefined, "value") as boolean;
return target;
}
create(value?: PartialMessage<BoolValue>): BoolValue {
const message = globalThis.Object.create((this.messagePrototype!));
message.value = false;
if (value !== undefined)
reflectionMergePartial<BoolValue>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BoolValue): BoolValue {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* bool value */ 1:
message.value = 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: BoolValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* bool value = 1; */
if (message.value !== false)
writer.tag(1, WireType.Varint).bool(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.BoolValue
*/
export const BoolValue = new BoolValue$Type();
// @generated message type with reflection information, may provide speed optimized methods
class StringValue$Type extends MessageType<StringValue> {
constructor() {
super("google.protobuf.StringValue", [
{ no: 1, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
/**
* Encode `StringValue` to JSON string.
*/
internalJsonWrite(message: StringValue, options: JsonWriteOptions): JsonValue {
return message.value;
}
/**
* Decode `StringValue` from JSON string.
*/
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: StringValue): StringValue {
if (!target)
target = this.create();
target.value = this.refJsonReader.scalar(json, 9, undefined, "value") as string;
return target;
}
create(value?: PartialMessage<StringValue>): StringValue {
const message = globalThis.Object.create((this.messagePrototype!));
message.value = "";
if (value !== undefined)
reflectionMergePartial<StringValue>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StringValue): StringValue {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string value */ 1:
message.value = 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: StringValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string value = 1; */
if (message.value !== "")
writer.tag(1, WireType.LengthDelimited).string(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.StringValue
*/
export const StringValue = new StringValue$Type();
// @generated message type with reflection information, may provide speed optimized methods
class BytesValue$Type extends MessageType<BytesValue> {
constructor() {
super("google.protobuf.BytesValue", [
{ no: 1, name: "value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
]);
}
/**
* Encode `BytesValue` to JSON string.
*/
internalJsonWrite(message: BytesValue, options: JsonWriteOptions): JsonValue {
return this.refJsonWriter.scalar(12, message.value, "value", false, true);
}
/**
* Decode `BytesValue` from JSON string.
*/
internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: BytesValue): BytesValue {
if (!target)
target = this.create();
target.value = this.refJsonReader.scalar(json, 12, undefined, "value") as Uint8Array;
return target;
}
create(value?: PartialMessage<BytesValue>): BytesValue {
const message = globalThis.Object.create((this.messagePrototype!));
message.value = new Uint8Array(0);
if (value !== undefined)
reflectionMergePartial<BytesValue>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BytesValue): BytesValue {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* bytes value */ 1:
message.value = reader.bytes();
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: BytesValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* bytes value = 1; */
if (message.value.length)
writer.tag(1, WireType.LengthDelimited).bytes(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.protobuf.BytesValue
*/
export const BytesValue = new BytesValue$Type();

235
google/rpc/code.ts Normal file
View File

@@ -0,0 +1,235 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/rpc/code.proto" (package "google.rpc", syntax proto3)
// tslint:disable
//
// Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
/**
* The canonical error codes for Google APIs.
*
*
* Sometimes multiple error codes may apply. Services should return
* the most specific error code that applies. For example, prefer
* `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
* Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
*
* @generated from protobuf enum google.rpc.Code
*/
export enum Code {
/**
* Not an error; returned on success
*
* HTTP Mapping: 200 OK
*
* @generated from protobuf enum value: OK = 0;
*/
OK = 0,
/**
* The operation was cancelled, typically by the caller.
*
* HTTP Mapping: 499 Client Closed Request
*
* @generated from protobuf enum value: CANCELLED = 1;
*/
CANCELLED = 1,
/**
* Unknown error. For example, this error may be returned when
* a `Status` value received from another address space belongs to
* an error space that is not known in this address space. Also
* errors raised by APIs that do not return enough error information
* may be converted to this error.
*
* HTTP Mapping: 500 Internal Server Error
*
* @generated from protobuf enum value: UNKNOWN = 2;
*/
UNKNOWN = 2,
/**
* The client specified an invalid argument. Note that this differs
* from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments
* that are problematic regardless of the state of the system
* (e.g., a malformed file name).
*
* HTTP Mapping: 400 Bad Request
*
* @generated from protobuf enum value: INVALID_ARGUMENT = 3;
*/
INVALID_ARGUMENT = 3,
/**
* The deadline expired before the operation could complete. For operations
* that change the state of the system, this error may be returned
* even if the operation has completed successfully. For example, a
* successful response from a server could have been delayed long
* enough for the deadline to expire.
*
* HTTP Mapping: 504 Gateway Timeout
*
* @generated from protobuf enum value: DEADLINE_EXCEEDED = 4;
*/
DEADLINE_EXCEEDED = 4,
/**
* Some requested entity (e.g., file or directory) was not found.
*
* Note to server developers: if a request is denied for an entire class
* of users, such as gradual feature rollout or undocumented whitelist,
* `NOT_FOUND` may be used. If a request is denied for some users within
* a class of users, such as user-based access control, `PERMISSION_DENIED`
* must be used.
*
* HTTP Mapping: 404 Not Found
*
* @generated from protobuf enum value: NOT_FOUND = 5;
*/
NOT_FOUND = 5,
/**
* The entity that a client attempted to create (e.g., file or directory)
* already exists.
*
* HTTP Mapping: 409 Conflict
*
* @generated from protobuf enum value: ALREADY_EXISTS = 6;
*/
ALREADY_EXISTS = 6,
/**
* The caller does not have permission to execute the specified
* operation. `PERMISSION_DENIED` must not be used for rejections
* caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
* instead for those errors). `PERMISSION_DENIED` must not be
* used if the caller can not be identified (use `UNAUTHENTICATED`
* instead for those errors). This error code does not imply the
* request is valid or the requested entity exists or satisfies
* other pre-conditions.
*
* HTTP Mapping: 403 Forbidden
*
* @generated from protobuf enum value: PERMISSION_DENIED = 7;
*/
PERMISSION_DENIED = 7,
/**
* The request does not have valid authentication credentials for the
* operation.
*
* HTTP Mapping: 401 Unauthorized
*
* @generated from protobuf enum value: UNAUTHENTICATED = 16;
*/
UNAUTHENTICATED = 16,
/**
* Some resource has been exhausted, perhaps a per-user quota, or
* perhaps the entire file system is out of space.
*
* HTTP Mapping: 429 Too Many Requests
*
* @generated from protobuf enum value: RESOURCE_EXHAUSTED = 8;
*/
RESOURCE_EXHAUSTED = 8,
/**
* The operation was rejected because the system is not in a state
* required for the operation's execution. For example, the directory
* to be deleted is non-empty, an rmdir operation is applied to
* a non-directory, etc.
*
* Service implementors can use the following guidelines to decide
* between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
* (a) Use `UNAVAILABLE` if the client can retry just the failing call.
* (b) Use `ABORTED` if the client should retry at a higher level
* (e.g., when a client-specified test-and-set fails, indicating the
* client should restart a read-modify-write sequence).
* (c) Use `FAILED_PRECONDITION` if the client should not retry until
* the system state has been explicitly fixed. E.g., if an "rmdir"
* fails because the directory is non-empty, `FAILED_PRECONDITION`
* should be returned since the client should not retry unless
* the files are deleted from the directory.
*
* HTTP Mapping: 400 Bad Request
*
* @generated from protobuf enum value: FAILED_PRECONDITION = 9;
*/
FAILED_PRECONDITION = 9,
/**
* The operation was aborted, typically due to a concurrency issue such as
* a sequencer check failure or transaction abort.
*
* See the guidelines above for deciding between `FAILED_PRECONDITION`,
* `ABORTED`, and `UNAVAILABLE`.
*
* HTTP Mapping: 409 Conflict
*
* @generated from protobuf enum value: ABORTED = 10;
*/
ABORTED = 10,
/**
* The operation was attempted past the valid range. E.g., seeking or
* reading past end-of-file.
*
* Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
* be fixed if the system state changes. For example, a 32-bit file
* system will generate `INVALID_ARGUMENT` if asked to read at an
* offset that is not in the range [0,2^32-1], but it will generate
* `OUT_OF_RANGE` if asked to read from an offset past the current
* file size.
*
* There is a fair bit of overlap between `FAILED_PRECONDITION` and
* `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific
* error) when it applies so that callers who are iterating through
* a space can easily look for an `OUT_OF_RANGE` error to detect when
* they are done.
*
* HTTP Mapping: 400 Bad Request
*
* @generated from protobuf enum value: OUT_OF_RANGE = 11;
*/
OUT_OF_RANGE = 11,
/**
* The operation is not implemented or is not supported/enabled in this
* service.
*
* HTTP Mapping: 501 Not Implemented
*
* @generated from protobuf enum value: UNIMPLEMENTED = 12;
*/
UNIMPLEMENTED = 12,
/**
* Internal errors. This means that some invariants expected by the
* underlying system have been broken. This error code is reserved
* for serious errors.
*
* HTTP Mapping: 500 Internal Server Error
*
* @generated from protobuf enum value: INTERNAL = 13;
*/
INTERNAL = 13,
/**
* The service is currently unavailable. This is most likely a
* transient condition, which can be corrected by retrying with
* a backoff.
*
* See the guidelines above for deciding between `FAILED_PRECONDITION`,
* `ABORTED`, and `UNAVAILABLE`.
*
* HTTP Mapping: 503 Service Unavailable
*
* @generated from protobuf enum value: UNAVAILABLE = 14;
*/
UNAVAILABLE = 14,
/**
* Unrecoverable data loss or corruption.
*
* HTTP Mapping: 500 Internal Server Error
*
* @generated from protobuf enum value: DATA_LOSS = 15;
*/
DATA_LOSS = 15
}

1024
google/rpc/error_details.ts Normal file

File diff suppressed because it is too large Load Diff

170
google/rpc/status.ts Normal file
View File

@@ -0,0 +1,170 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "google/rpc/status.proto" (package "google.rpc", syntax proto3)
// tslint:disable
//
// Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
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 { Any } from "../protobuf/any";
/**
* The `Status` type defines a logical error model that is suitable for different
* programming environments, including REST APIs and RPC APIs. It is used by
* [gRPC](https://github.com/grpc). The error model is designed to be:
*
* - Simple to use and understand for most users
* - Flexible enough to meet unexpected needs
*
* # Overview
*
* The `Status` message contains three pieces of data: error code, error message,
* and error details. The error code should be an enum value of
* [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The
* error message should be a developer-facing English message that helps
* developers *understand* and *resolve* the error. If a localized user-facing
* error message is needed, put the localized message in the error details or
* localize it in the client. The optional error details may contain arbitrary
* information about the error. There is a predefined set of error detail types
* in the package `google.rpc` that can be used for common error conditions.
*
* # Language mapping
*
* The `Status` message is the logical representation of the error model, but it
* is not necessarily the actual wire format. When the `Status` message is
* exposed in different client libraries and different wire protocols, it can be
* mapped differently. For example, it will likely be mapped to some exceptions
* in Java, but more likely mapped to some error codes in C.
*
* # Other uses
*
* The error model and the `Status` message can be used in a variety of
* environments, either with or without APIs, to provide a
* consistent developer experience across different environments.
*
* Example uses of this error model include:
*
* - Partial errors. If a service needs to return partial errors to the client,
* it may embed the `Status` in the normal response to indicate the partial
* errors.
*
* - Workflow errors. A typical workflow has multiple steps. Each step may
* have a `Status` message for error reporting.
*
* - Batch operations. If a client uses batch request and batch response, the
* `Status` message should be used directly inside batch response, one for
* each error sub-response.
*
* - Asynchronous operations. If an API call embeds asynchronous operation
* results in its response, the status of those operations should be
* represented directly using the `Status` message.
*
* - Logging. If some API errors are stored in logs, the message `Status` could
* be used directly after any stripping needed for security/privacy reasons.
*
* @generated from protobuf message google.rpc.Status
*/
export interface Status {
/**
* The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
*
* @generated from protobuf field: int32 code = 1;
*/
code: number;
/**
* A developer-facing error message, which should be in English. Any
* user-facing error message should be localized and sent in the
* [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
*
* @generated from protobuf field: string message = 2;
*/
message: string;
/**
* A list of messages that carry the error details. There is a common set of
* message types for APIs to use.
*
* @generated from protobuf field: repeated google.protobuf.Any details = 3;
*/
details: Any[];
}
// @generated message type with reflection information, may provide speed optimized methods
class Status$Type extends MessageType<Status> {
constructor() {
super("google.rpc.Status", [
{ no: 1, name: "code", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
{ no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "details", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Any }
]);
}
create(value?: PartialMessage<Status>): Status {
const message = globalThis.Object.create((this.messagePrototype!));
message.code = 0;
message.message = "";
message.details = [];
if (value !== undefined)
reflectionMergePartial<Status>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Status): Status {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* int32 code */ 1:
message.code = reader.int32();
break;
case /* string message */ 2:
message.message = reader.string();
break;
case /* repeated google.protobuf.Any details */ 3:
message.details.push(Any.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: Status, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* int32 code = 1; */
if (message.code !== 0)
writer.tag(1, WireType.Varint).int32(message.code);
/* string message = 2; */
if (message.message !== "")
writer.tag(2, WireType.LengthDelimited).string(message.message);
/* repeated google.protobuf.Any details = 3; */
for (let i = 0; i < message.details.length; i++)
Any.internalBinaryWrite(message.details[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 google.rpc.Status
*/
export const Status = new Status$Type();

28
index.ts Normal file
View File

@@ -0,0 +1,28 @@
// auto generated
export * from './counter.client'
export * from './counter'
export * from './openapiv2'
export * from './validate'
export * from './visibility'
export * from './viz-composed-field.client'
export * from './viz-composed-field'
export * from './viz-dashboard.client'
export * from './viz-dashboard'
export * from './viz-default-view.client'
export * from './viz-default-view'
export * from './viz-motd.client'
export * from './viz-motd'
export * from './viz-organisation-settings.client'
export * from './viz-organisation-settings'
export * from './viz-project-settings.client'
export * from './viz-project-settings'
export * from './viz-tab.client'
export * from './viz-tab'
export * from './viz-translations.client'
export * from './viz-translations'
export * from './viz-user-settings.client'
export * from './viz-user-settings'
export * from './viz-view.client'
export * from './viz-view'

2681
openapiv2.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
{
"name": "@reflex-platform/npm-viz-sdk",
"version": "1.10.0-SNAPSHOT-250317130329",
"version": "1.10.0-SNAPSHOT-250318155056",
"description": "npm libs from visibility model proto files",
"homepage": "",
"main": "index.js",
"main": "index.ts",
"repository": {
"type": "git",
"url": ""

4434
validate.ts Normal file

File diff suppressed because it is too large Load Diff

201
visibility.ts Normal file
View File

@@ -0,0 +1,201 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "visibility.proto" (package "google.api", syntax proto3)
// tslint:disable
//
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
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";
/**
* `Visibility` defines restrictions for the visibility of service
* elements. Restrictions are specified using visibility labels
* (e.g., PREVIEW) that are elsewhere linked to users and projects.
*
* Users and projects can have access to more than one visibility label. The
* effective visibility for multiple labels is the union of each label's
* elements, plus any unrestricted elements.
*
* If an element and its parents have no restrictions, visibility is
* unconditionally granted.
*
* Example:
*
* visibility:
* rules:
* - selector: google.calendar.Calendar.EnhancedSearch
* restriction: PREVIEW
* - selector: google.calendar.Calendar.Delegate
* restriction: INTERNAL
*
* Here, all methods are publicly visible except for the restricted methods
* EnhancedSearch and Delegate.
*
* @generated from protobuf message google.api.Visibility
*/
export interface Visibility {
/**
* A list of visibility rules that apply to individual API elements.
*
* **NOTE:** All service configuration rules follow "last one wins" order.
*
* @generated from protobuf field: repeated google.api.VisibilityRule rules = 1;
*/
rules: VisibilityRule[];
}
/**
* A visibility rule provides visibility configuration for an individual API
* element.
*
* @generated from protobuf message google.api.VisibilityRule
*/
export interface VisibilityRule {
/**
* Selects methods, messages, fields, enums, etc. to which this rule applies.
*
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
* @generated from protobuf field: string selector = 1;
*/
selector: string;
/**
* A comma-separated list of visibility labels that apply to the `selector`.
* Any of the listed labels can be used to grant the visibility.
*
* If a rule has multiple labels, removing one of the labels but not all of
* them can break clients.
*
* Example:
*
* visibility:
* rules:
* - selector: google.calendar.Calendar.EnhancedSearch
* restriction: INTERNAL, PREVIEW
*
* Removing INTERNAL from this restriction will break clients that rely on
* this method and only had access to it through INTERNAL.
*
* @generated from protobuf field: string restriction = 2;
*/
restriction: string;
}
// @generated message type with reflection information, may provide speed optimized methods
class Visibility$Type extends MessageType<Visibility> {
constructor() {
super("google.api.Visibility", [
{ no: 1, name: "rules", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => VisibilityRule }
]);
}
create(value?: PartialMessage<Visibility>): Visibility {
const message = globalThis.Object.create((this.messagePrototype!));
message.rules = [];
if (value !== undefined)
reflectionMergePartial<Visibility>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Visibility): Visibility {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated google.api.VisibilityRule rules */ 1:
message.rules.push(VisibilityRule.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: Visibility, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated google.api.VisibilityRule rules = 1; */
for (let i = 0; i < message.rules.length; i++)
VisibilityRule.internalBinaryWrite(message.rules[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 google.api.Visibility
*/
export const Visibility = new Visibility$Type();
// @generated message type with reflection information, may provide speed optimized methods
class VisibilityRule$Type extends MessageType<VisibilityRule> {
constructor() {
super("google.api.VisibilityRule", [
{ no: 1, name: "selector", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "restriction", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<VisibilityRule>): VisibilityRule {
const message = globalThis.Object.create((this.messagePrototype!));
message.selector = "";
message.restriction = "";
if (value !== undefined)
reflectionMergePartial<VisibilityRule>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: VisibilityRule): VisibilityRule {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string selector */ 1:
message.selector = reader.string();
break;
case /* string restriction */ 2:
message.restriction = 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: VisibilityRule, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string selector = 1; */
if (message.selector !== "")
writer.tag(1, WireType.LengthDelimited).string(message.selector);
/* string restriction = 2; */
if (message.restriction !== "")
writer.tag(2, WireType.LengthDelimited).string(message.restriction);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message google.api.VisibilityRule
*/
export const VisibilityRule = new VisibilityRule$Type();

View File

@@ -0,0 +1,89 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "viz-composed-field.proto" (package "vizapi", syntax proto3)
// tslint:disable
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
import { ComposedFieldService } from "./viz-composed-field";
import type { ListComposedFieldResult } from "./viz-composed-field";
import type { ListComposedFieldRequest } from "./viz-composed-field";
import type { DeleteComposedFieldResult } from "./viz-composed-field";
import type { DeleteComposedFieldRequest } from "./viz-composed-field";
import type { UpdateComposedFieldResult } from "./viz-composed-field";
import type { UpdateComposedFieldRequest } from "./viz-composed-field";
import type { CreateComposedFieldResult } from "./viz-composed-field";
import type { CreateComposedFieldRequest } from "./viz-composed-field";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
import type { GetComposedFieldResult } from "./viz-composed-field";
import type { GetComposedFieldRequest } from "./viz-composed-field";
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
/**
* @generated from protobuf service vizapi.ComposedFieldService
*/
export interface IComposedFieldServiceClient {
/**
* @generated from protobuf rpc: Get(vizapi.GetComposedFieldRequest) returns (vizapi.GetComposedFieldResult);
*/
get(input: GetComposedFieldRequest, options?: RpcOptions): UnaryCall<GetComposedFieldRequest, GetComposedFieldResult>;
/**
* @generated from protobuf rpc: Create(vizapi.CreateComposedFieldRequest) returns (vizapi.CreateComposedFieldResult);
*/
create(input: CreateComposedFieldRequest, options?: RpcOptions): UnaryCall<CreateComposedFieldRequest, CreateComposedFieldResult>;
/**
* @generated from protobuf rpc: Update(vizapi.UpdateComposedFieldRequest) returns (vizapi.UpdateComposedFieldResult);
*/
update(input: UpdateComposedFieldRequest, options?: RpcOptions): UnaryCall<UpdateComposedFieldRequest, UpdateComposedFieldResult>;
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteComposedFieldRequest) returns (vizapi.DeleteComposedFieldResult);
*/
delete(input: DeleteComposedFieldRequest, options?: RpcOptions): UnaryCall<DeleteComposedFieldRequest, DeleteComposedFieldResult>;
/**
* @generated from protobuf rpc: List(vizapi.ListComposedFieldRequest) returns (vizapi.ListComposedFieldResult);
*/
list(input: ListComposedFieldRequest, options?: RpcOptions): UnaryCall<ListComposedFieldRequest, ListComposedFieldResult>;
}
/**
* @generated from protobuf service vizapi.ComposedFieldService
*/
export class ComposedFieldServiceClient implements IComposedFieldServiceClient, ServiceInfo {
typeName = ComposedFieldService.typeName;
methods = ComposedFieldService.methods;
options = ComposedFieldService.options;
constructor(private readonly _transport: RpcTransport) {
}
/**
* @generated from protobuf rpc: Get(vizapi.GetComposedFieldRequest) returns (vizapi.GetComposedFieldResult);
*/
get(input: GetComposedFieldRequest, options?: RpcOptions): UnaryCall<GetComposedFieldRequest, GetComposedFieldResult> {
const method = this.methods[0], opt = this._transport.mergeOptions(options);
return stackIntercept<GetComposedFieldRequest, GetComposedFieldResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Create(vizapi.CreateComposedFieldRequest) returns (vizapi.CreateComposedFieldResult);
*/
create(input: CreateComposedFieldRequest, options?: RpcOptions): UnaryCall<CreateComposedFieldRequest, CreateComposedFieldResult> {
const method = this.methods[1], opt = this._transport.mergeOptions(options);
return stackIntercept<CreateComposedFieldRequest, CreateComposedFieldResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Update(vizapi.UpdateComposedFieldRequest) returns (vizapi.UpdateComposedFieldResult);
*/
update(input: UpdateComposedFieldRequest, options?: RpcOptions): UnaryCall<UpdateComposedFieldRequest, UpdateComposedFieldResult> {
const method = this.methods[2], opt = this._transport.mergeOptions(options);
return stackIntercept<UpdateComposedFieldRequest, UpdateComposedFieldResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteComposedFieldRequest) returns (vizapi.DeleteComposedFieldResult);
*/
delete(input: DeleteComposedFieldRequest, options?: RpcOptions): UnaryCall<DeleteComposedFieldRequest, DeleteComposedFieldResult> {
const method = this.methods[3], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteComposedFieldRequest, DeleteComposedFieldResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: List(vizapi.ListComposedFieldRequest) returns (vizapi.ListComposedFieldResult);
*/
list(input: ListComposedFieldRequest, options?: RpcOptions): UnaryCall<ListComposedFieldRequest, ListComposedFieldResult> {
const method = this.methods[4], opt = this._transport.mergeOptions(options);
return stackIntercept<ListComposedFieldRequest, ListComposedFieldResult>("unary", this._transport, method, opt, input);
}
}

953
viz-composed-field.ts Normal file
View File

@@ -0,0 +1,953 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "viz-composed-field.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";
import { RequestProjectHeader } from "./core/shared";
/**
* @generated from protobuf message vizapi.ComposedField
*/
export interface ComposedField {
/**
* Identifier of the Composed Field
*
* @generated from protobuf field: string ComposedFieldID = 1 [json_name = "ComposedFieldID"];
*/
composedFieldID: string;
/**
* Name of the Composed Field
*
* @generated from protobuf field: string Name = 2 [json_name = "Name"];
*/
name: string;
/**
* Identifier of the project
*
* @generated from protobuf field: string ProjectID = 3 [json_name = "ProjectID"];
*/
projectID: string;
/**
* Identifier of the Screen
*
* @generated from protobuf field: string ScreenID = 4 [json_name = "ScreenID"];
*/
screenID: string;
/**
* Identifier of the user who created
*
* @generated from protobuf field: string CreateUserID = 5 [json_name = "CreateUserID"];
*/
createUserID: string;
/**
* Identifier of the user who did the last update
*
* @generated from protobuf field: string UpdateUserID = 6 [json_name = "UpdateUserID"];
*/
updateUserID: string;
/**
* Date of creation in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z]
*
* @generated from protobuf field: string CreateDateTime = 7 [json_name = "CreateDateTime"];
*/
createDateTime: string;
/**
* Date of last update in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z]
*
* @generated from protobuf field: string UpdateDateTime = 8 [json_name = "UpdateDateTime"];
*/
updateDateTime: string;
/**
* Identifier of the Tab
*
* @generated from protobuf field: string TabID = 9 [json_name = "TabID"];
*/
tabID: string;
/**
* Content in the Composed Field
*
* @generated from protobuf field: string Payload = 10 [json_name = "Payload"];
*/
payload: string;
}
/**
* IDs of the Composed Field
*
* @generated from protobuf message vizapi.GetComposedFieldRequest
*/
export interface GetComposedFieldRequest {
/**
* @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
*/
header?: RequestProjectHeader;
/**
* Identifier of the Composed Field
*
* @generated from protobuf field: string ComposedFieldID = 2 [json_name = "ComposedFieldID"];
*/
composedFieldID: string;
}
/**
* All the Content about the composed field
*
* @generated from protobuf message vizapi.GetComposedFieldResult
*/
export interface GetComposedFieldResult {
/**
* @generated from protobuf field: vizapi.ComposedField Result = 1 [json_name = "Result"];
*/
result?: ComposedField;
}
/**
* Content that needs to be stored
*
* @generated from protobuf message vizapi.CreateComposedFieldRequest
*/
export interface CreateComposedFieldRequest {
/**
* @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
*/
header?: RequestProjectHeader;
/**
* Name of the Composed Field
*
* @generated from protobuf field: string Name = 2 [json_name = "Name"];
*/
name: string;
/**
* Identifier of the Screen
*
* @generated from protobuf field: string ScreenID = 3 [json_name = "ScreenID"];
*/
screenID: string;
/**
* Identifier of the Tab
*
* @generated from protobuf field: string TabID = 4 [json_name = "TabID"];
*/
tabID: string;
/**
* Content in the Composed Field
*
* @generated from protobuf field: string Payload = 5 [json_name = "Payload"];
*/
payload: string;
}
/**
* ID of the created Composed Field
*
* @generated from protobuf message vizapi.CreateComposedFieldResult
*/
export interface CreateComposedFieldResult {
/**
* Identifier of the Composed Field
*
* @generated from protobuf field: string ComposedFieldID = 1 [json_name = "ComposedFieldID"];
*/
composedFieldID: string;
}
/**
* Content that needs to be updated
*
* @generated from protobuf message vizapi.UpdateComposedFieldRequest
*/
export interface UpdateComposedFieldRequest {
/**
* @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
*/
header?: RequestProjectHeader;
/**
* Identifier of the Composed Field
*
* @generated from protobuf field: string ComposedFieldID = 2 [json_name = "ComposedFieldID"];
*/
composedFieldID: string;
/**
* Name of the Composed Field
*
* @generated from protobuf field: string Name = 3 [json_name = "Name"];
*/
name: string;
/**
* Identifier of the Screen
*
* @generated from protobuf field: string ScreenID = 4 [json_name = "ScreenID"];
*/
screenID: string;
/**
* Identifier of the Tab
*
* @generated from protobuf field: string TabID = 5 [json_name = "TabID"];
*/
tabID: string;
/**
* Content in the Composed Field
*
* @generated from protobuf field: string Payload = 6 [json_name = "Payload"];
*/
payload: string;
}
/**
* Updated dashboard ID
*
* @generated from protobuf message vizapi.UpdateComposedFieldResult
*/
export interface UpdateComposedFieldResult {
/**
* Identifier of the Composed Field
*
* @generated from protobuf field: string ComposedFieldID = 1 [json_name = "ComposedFieldID"];
*/
composedFieldID: string;
}
/**
* IDs of the Composed Field to be deleted
*
* @generated from protobuf message vizapi.DeleteComposedFieldRequest
*/
export interface DeleteComposedFieldRequest {
/**
* @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
*/
header?: RequestProjectHeader;
/**
* Identifier of the Composed Field
*
* @generated from protobuf field: string ComposedFieldID = 2 [json_name = "ComposedFieldID"];
*/
composedFieldID: string;
}
/**
* @generated from protobuf message vizapi.DeleteComposedFieldResult
*/
export interface DeleteComposedFieldResult {
}
/**
* @generated from protobuf message vizapi.ListComposedFieldRequest
*/
export interface ListComposedFieldRequest {
/**
* @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
*/
header?: RequestProjectHeader;
/**
* Identifier of the Screen
*
* @generated from protobuf field: string ScreenID = 2 [json_name = "ScreenID"];
*/
screenID: string;
/**
* Identifier of the Tab
*
* @generated from protobuf field: string TabID = 3 [json_name = "TabID"];
*/
tabID: string;
}
/**
* List of Composed Fields
*
* @generated from protobuf message vizapi.ListComposedFieldResult
*/
export interface ListComposedFieldResult {
/**
* All Content in a Composed Field
*
* @generated from protobuf field: repeated vizapi.ComposedField Results = 1 [json_name = "Results"];
*/
results: ComposedField[];
}
// @generated message type with reflection information, may provide speed optimized methods
class ComposedField$Type extends MessageType<ComposedField> {
constructor() {
super("vizapi.ComposedField", [
{ no: 1, name: "ComposedFieldID", kind: "scalar", jsonName: "ComposedFieldID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the Composed Field" } } },
{ no: 2, name: "Name", kind: "scalar", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the Composed Field" } } },
{ no: 3, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the project" }, "validate.rules": { string: { minLen: "1" } } } },
{ no: 4, name: "ScreenID", kind: "scalar", jsonName: "ScreenID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the Screen" } } },
{ no: 5, name: "CreateUserID", kind: "scalar", jsonName: "CreateUserID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the user who created" } } },
{ no: 6, name: "UpdateUserID", kind: "scalar", jsonName: "UpdateUserID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the user who did the last update" } } },
{ no: 7, name: "CreateDateTime", kind: "scalar", jsonName: "CreateDateTime", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Date of creation in <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> format with time zone (accepted tzd formats: [+01:00, -01:00, Z]" } } },
{ no: 8, name: "UpdateDateTime", kind: "scalar", jsonName: "UpdateDateTime", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Date of last update in <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> format with time zone (accepted tzd formats: [+01:00, -01:00, Z]" } } },
{ no: 9, name: "TabID", kind: "scalar", jsonName: "TabID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the Tab" } } },
{ no: 10, name: "Payload", kind: "scalar", jsonName: "Payload", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Content in the Composed Field" } } }
]);
}
create(value?: PartialMessage<ComposedField>): ComposedField {
const message = globalThis.Object.create((this.messagePrototype!));
message.composedFieldID = "";
message.name = "";
message.projectID = "";
message.screenID = "";
message.createUserID = "";
message.updateUserID = "";
message.createDateTime = "";
message.updateDateTime = "";
message.tabID = "";
message.payload = "";
if (value !== undefined)
reflectionMergePartial<ComposedField>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComposedField): ComposedField {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ComposedFieldID = 1 [json_name = "ComposedFieldID"];*/ 1:
message.composedFieldID = reader.string();
break;
case /* string Name = 2 [json_name = "Name"];*/ 2:
message.name = reader.string();
break;
case /* string ProjectID = 3 [json_name = "ProjectID"];*/ 3:
message.projectID = reader.string();
break;
case /* string ScreenID = 4 [json_name = "ScreenID"];*/ 4:
message.screenID = reader.string();
break;
case /* string CreateUserID = 5 [json_name = "CreateUserID"];*/ 5:
message.createUserID = reader.string();
break;
case /* string UpdateUserID = 6 [json_name = "UpdateUserID"];*/ 6:
message.updateUserID = reader.string();
break;
case /* string CreateDateTime = 7 [json_name = "CreateDateTime"];*/ 7:
message.createDateTime = reader.string();
break;
case /* string UpdateDateTime = 8 [json_name = "UpdateDateTime"];*/ 8:
message.updateDateTime = reader.string();
break;
case /* string TabID = 9 [json_name = "TabID"];*/ 9:
message.tabID = reader.string();
break;
case /* string Payload = 10 [json_name = "Payload"];*/ 10:
message.payload = 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: ComposedField, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ComposedFieldID = 1 [json_name = "ComposedFieldID"]; */
if (message.composedFieldID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.composedFieldID);
/* string Name = 2 [json_name = "Name"]; */
if (message.name !== "")
writer.tag(2, WireType.LengthDelimited).string(message.name);
/* string ProjectID = 3 [json_name = "ProjectID"]; */
if (message.projectID !== "")
writer.tag(3, WireType.LengthDelimited).string(message.projectID);
/* string ScreenID = 4 [json_name = "ScreenID"]; */
if (message.screenID !== "")
writer.tag(4, WireType.LengthDelimited).string(message.screenID);
/* string CreateUserID = 5 [json_name = "CreateUserID"]; */
if (message.createUserID !== "")
writer.tag(5, WireType.LengthDelimited).string(message.createUserID);
/* string UpdateUserID = 6 [json_name = "UpdateUserID"]; */
if (message.updateUserID !== "")
writer.tag(6, WireType.LengthDelimited).string(message.updateUserID);
/* string CreateDateTime = 7 [json_name = "CreateDateTime"]; */
if (message.createDateTime !== "")
writer.tag(7, WireType.LengthDelimited).string(message.createDateTime);
/* string UpdateDateTime = 8 [json_name = "UpdateDateTime"]; */
if (message.updateDateTime !== "")
writer.tag(8, WireType.LengthDelimited).string(message.updateDateTime);
/* string TabID = 9 [json_name = "TabID"]; */
if (message.tabID !== "")
writer.tag(9, WireType.LengthDelimited).string(message.tabID);
/* string Payload = 10 [json_name = "Payload"]; */
if (message.payload !== "")
writer.tag(10, WireType.LengthDelimited).string(message.payload);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.ComposedField
*/
export const ComposedField = new ComposedField$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetComposedFieldRequest$Type extends MessageType<GetComposedFieldRequest> {
constructor() {
super("vizapi.GetComposedFieldRequest", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "ComposedFieldID", kind: "scalar", jsonName: "ComposedFieldID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the Composed Field" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "IDs of the Composed Field", required: ["Header", "ComposedFieldID"] } } });
}
create(value?: PartialMessage<GetComposedFieldRequest>): GetComposedFieldRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.composedFieldID = "";
if (value !== undefined)
reflectionMergePartial<GetComposedFieldRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetComposedFieldRequest): GetComposedFieldRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* string ComposedFieldID = 2 [json_name = "ComposedFieldID"];*/ 2:
message.composedFieldID = 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: GetComposedFieldRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
if (message.header)
RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string ComposedFieldID = 2 [json_name = "ComposedFieldID"]; */
if (message.composedFieldID !== "")
writer.tag(2, WireType.LengthDelimited).string(message.composedFieldID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.GetComposedFieldRequest
*/
export const GetComposedFieldRequest = new GetComposedFieldRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetComposedFieldResult$Type extends MessageType<GetComposedFieldResult> {
constructor() {
super("vizapi.GetComposedFieldResult", [
{ no: 1, name: "Result", kind: "message", jsonName: "Result", T: () => ComposedField }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "All the Content about the composed field" } } });
}
create(value?: PartialMessage<GetComposedFieldResult>): GetComposedFieldResult {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<GetComposedFieldResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetComposedFieldResult): GetComposedFieldResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* vizapi.ComposedField Result = 1 [json_name = "Result"];*/ 1:
message.result = ComposedField.internalBinaryRead(reader, reader.uint32(), options, message.result);
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: GetComposedFieldResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* vizapi.ComposedField Result = 1 [json_name = "Result"]; */
if (message.result)
ComposedField.internalBinaryWrite(message.result, 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 vizapi.GetComposedFieldResult
*/
export const GetComposedFieldResult = new GetComposedFieldResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateComposedFieldRequest$Type extends MessageType<CreateComposedFieldRequest> {
constructor() {
super("vizapi.CreateComposedFieldRequest", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "Name", kind: "scalar", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the Composed Field" }, "validate.rules": { string: { minLen: "1" } } } },
{ no: 3, 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: "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" } } } },
{ no: 5, name: "Payload", kind: "scalar", jsonName: "Payload", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Content in the Composed Field" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Content that needs to be stored ", required: ["Header", "Name", "ScreenID", "TabID", "Payload"] } } });
}
create(value?: PartialMessage<CreateComposedFieldRequest>): CreateComposedFieldRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.name = "";
message.screenID = "";
message.tabID = "";
message.payload = "";
if (value !== undefined)
reflectionMergePartial<CreateComposedFieldRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateComposedFieldRequest): CreateComposedFieldRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* string Name = 2 [json_name = "Name"];*/ 2:
message.name = reader.string();
break;
case /* string ScreenID = 3 [json_name = "ScreenID"];*/ 3:
message.screenID = reader.string();
break;
case /* string TabID = 4 [json_name = "TabID"];*/ 4:
message.tabID = reader.string();
break;
case /* string Payload = 5 [json_name = "Payload"];*/ 5:
message.payload = 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: CreateComposedFieldRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
if (message.header)
RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string Name = 2 [json_name = "Name"]; */
if (message.name !== "")
writer.tag(2, WireType.LengthDelimited).string(message.name);
/* string ScreenID = 3 [json_name = "ScreenID"]; */
if (message.screenID !== "")
writer.tag(3, WireType.LengthDelimited).string(message.screenID);
/* string TabID = 4 [json_name = "TabID"]; */
if (message.tabID !== "")
writer.tag(4, WireType.LengthDelimited).string(message.tabID);
/* string Payload = 5 [json_name = "Payload"]; */
if (message.payload !== "")
writer.tag(5, WireType.LengthDelimited).string(message.payload);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.CreateComposedFieldRequest
*/
export const CreateComposedFieldRequest = new CreateComposedFieldRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateComposedFieldResult$Type extends MessageType<CreateComposedFieldResult> {
constructor() {
super("vizapi.CreateComposedFieldResult", [
{ no: 1, name: "ComposedFieldID", kind: "scalar", jsonName: "ComposedFieldID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the Composed Field" } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "ID of the created Composed Field" } } });
}
create(value?: PartialMessage<CreateComposedFieldResult>): CreateComposedFieldResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.composedFieldID = "";
if (value !== undefined)
reflectionMergePartial<CreateComposedFieldResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateComposedFieldResult): CreateComposedFieldResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ComposedFieldID = 1 [json_name = "ComposedFieldID"];*/ 1:
message.composedFieldID = 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: CreateComposedFieldResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ComposedFieldID = 1 [json_name = "ComposedFieldID"]; */
if (message.composedFieldID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.composedFieldID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.CreateComposedFieldResult
*/
export const CreateComposedFieldResult = new CreateComposedFieldResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class UpdateComposedFieldRequest$Type extends MessageType<UpdateComposedFieldRequest> {
constructor() {
super("vizapi.UpdateComposedFieldRequest", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "ComposedFieldID", kind: "scalar", jsonName: "ComposedFieldID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the Composed Field" }, "validate.rules": { string: { minLen: "1" } } } },
{ no: 3, name: "Name", kind: "scalar", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the Composed Field" }, "validate.rules": { string: { minLen: "1" } } } },
{ no: 4, 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: 5, 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" } } } },
{ no: 6, name: "Payload", kind: "scalar", jsonName: "Payload", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Content in the Composed Field" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Content that needs to be updated", required: ["Header", "ComposedFieldID", "Name", "ScreenID", "TabID", "Payload"] } } });
}
create(value?: PartialMessage<UpdateComposedFieldRequest>): UpdateComposedFieldRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.composedFieldID = "";
message.name = "";
message.screenID = "";
message.tabID = "";
message.payload = "";
if (value !== undefined)
reflectionMergePartial<UpdateComposedFieldRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateComposedFieldRequest): UpdateComposedFieldRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* string ComposedFieldID = 2 [json_name = "ComposedFieldID"];*/ 2:
message.composedFieldID = reader.string();
break;
case /* string Name = 3 [json_name = "Name"];*/ 3:
message.name = reader.string();
break;
case /* string ScreenID = 4 [json_name = "ScreenID"];*/ 4:
message.screenID = reader.string();
break;
case /* string TabID = 5 [json_name = "TabID"];*/ 5:
message.tabID = reader.string();
break;
case /* string Payload = 6 [json_name = "Payload"];*/ 6:
message.payload = 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: UpdateComposedFieldRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
if (message.header)
RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string ComposedFieldID = 2 [json_name = "ComposedFieldID"]; */
if (message.composedFieldID !== "")
writer.tag(2, WireType.LengthDelimited).string(message.composedFieldID);
/* string Name = 3 [json_name = "Name"]; */
if (message.name !== "")
writer.tag(3, WireType.LengthDelimited).string(message.name);
/* string ScreenID = 4 [json_name = "ScreenID"]; */
if (message.screenID !== "")
writer.tag(4, WireType.LengthDelimited).string(message.screenID);
/* string TabID = 5 [json_name = "TabID"]; */
if (message.tabID !== "")
writer.tag(5, WireType.LengthDelimited).string(message.tabID);
/* string Payload = 6 [json_name = "Payload"]; */
if (message.payload !== "")
writer.tag(6, WireType.LengthDelimited).string(message.payload);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.UpdateComposedFieldRequest
*/
export const UpdateComposedFieldRequest = new UpdateComposedFieldRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class UpdateComposedFieldResult$Type extends MessageType<UpdateComposedFieldResult> {
constructor() {
super("vizapi.UpdateComposedFieldResult", [
{ no: 1, name: "ComposedFieldID", kind: "scalar", jsonName: "ComposedFieldID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the Composed Field" } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Updated dashboard ID" } } });
}
create(value?: PartialMessage<UpdateComposedFieldResult>): UpdateComposedFieldResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.composedFieldID = "";
if (value !== undefined)
reflectionMergePartial<UpdateComposedFieldResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateComposedFieldResult): UpdateComposedFieldResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ComposedFieldID = 1 [json_name = "ComposedFieldID"];*/ 1:
message.composedFieldID = 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: UpdateComposedFieldResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ComposedFieldID = 1 [json_name = "ComposedFieldID"]; */
if (message.composedFieldID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.composedFieldID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.UpdateComposedFieldResult
*/
export const UpdateComposedFieldResult = new UpdateComposedFieldResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteComposedFieldRequest$Type extends MessageType<DeleteComposedFieldRequest> {
constructor() {
super("vizapi.DeleteComposedFieldRequest", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "ComposedFieldID", kind: "scalar", jsonName: "ComposedFieldID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the Composed Field" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "IDs of the Composed Field to be deleted", required: ["Header", "ComposedFieldID"] } } });
}
create(value?: PartialMessage<DeleteComposedFieldRequest>): DeleteComposedFieldRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.composedFieldID = "";
if (value !== undefined)
reflectionMergePartial<DeleteComposedFieldRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteComposedFieldRequest): DeleteComposedFieldRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* string ComposedFieldID = 2 [json_name = "ComposedFieldID"];*/ 2:
message.composedFieldID = 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: DeleteComposedFieldRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
if (message.header)
RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string ComposedFieldID = 2 [json_name = "ComposedFieldID"]; */
if (message.composedFieldID !== "")
writer.tag(2, WireType.LengthDelimited).string(message.composedFieldID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.DeleteComposedFieldRequest
*/
export const DeleteComposedFieldRequest = new DeleteComposedFieldRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteComposedFieldResult$Type extends MessageType<DeleteComposedFieldResult> {
constructor() {
super("vizapi.DeleteComposedFieldResult", []);
}
create(value?: PartialMessage<DeleteComposedFieldResult>): DeleteComposedFieldResult {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<DeleteComposedFieldResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteComposedFieldResult): DeleteComposedFieldResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: DeleteComposedFieldResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.DeleteComposedFieldResult
*/
export const DeleteComposedFieldResult = new DeleteComposedFieldResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListComposedFieldRequest$Type extends MessageType<ListComposedFieldRequest> {
constructor() {
super("vizapi.ListComposedFieldRequest", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "ScreenID", kind: "scalar", jsonName: "ScreenID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the Screen" } } },
{ no: 3, name: "TabID", kind: "scalar", jsonName: "TabID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the Tab" } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
}
create(value?: PartialMessage<ListComposedFieldRequest>): ListComposedFieldRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.screenID = "";
message.tabID = "";
if (value !== undefined)
reflectionMergePartial<ListComposedFieldRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListComposedFieldRequest): ListComposedFieldRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* string ScreenID = 2 [json_name = "ScreenID"];*/ 2:
message.screenID = reader.string();
break;
case /* string TabID = 3 [json_name = "TabID"];*/ 3:
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: ListComposedFieldRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
if (message.header)
RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string ScreenID = 2 [json_name = "ScreenID"]; */
if (message.screenID !== "")
writer.tag(2, WireType.LengthDelimited).string(message.screenID);
/* string TabID = 3 [json_name = "TabID"]; */
if (message.tabID !== "")
writer.tag(3, 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.ListComposedFieldRequest
*/
export const ListComposedFieldRequest = new ListComposedFieldRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListComposedFieldResult$Type extends MessageType<ListComposedFieldResult> {
constructor() {
super("vizapi.ListComposedFieldResult", [
{ no: 1, name: "Results", kind: "message", jsonName: "Results", repeat: 1 /*RepeatType.PACKED*/, T: () => ComposedField, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "All Content in a Composed Field" } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "List of Composed Fields" } } });
}
create(value?: PartialMessage<ListComposedFieldResult>): ListComposedFieldResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.results = [];
if (value !== undefined)
reflectionMergePartial<ListComposedFieldResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListComposedFieldResult): ListComposedFieldResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated vizapi.ComposedField Results = 1 [json_name = "Results"];*/ 1:
message.results.push(ComposedField.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: ListComposedFieldResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated vizapi.ComposedField Results = 1 [json_name = "Results"]; */
for (let i = 0; i < message.results.length; i++)
ComposedField.internalBinaryWrite(message.results[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 vizapi.ListComposedFieldResult
*/
export const ListComposedFieldResult = new ListComposedFieldResult$Type();
/**
* @generated ServiceType for protobuf service vizapi.ComposedFieldService
*/
export const ComposedFieldService = new ServiceType("vizapi.ComposedFieldService", [
{ name: "Get", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Composed Field"], summary: "Get a composed field" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: GetComposedFieldRequest, O: GetComposedFieldResult },
{ name: "Create", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Composed Field"], summary: "Create a composed field", description: "TODO" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: CreateComposedFieldRequest, O: CreateComposedFieldResult },
{ name: "Update", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Composed Field"], summary: "Update a composed field", description: "TODO" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: UpdateComposedFieldRequest, O: UpdateComposedFieldResult },
{ name: "Delete", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Composed Field"], summary: "Delete a composed field", description: "TODO" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: DeleteComposedFieldRequest, O: DeleteComposedFieldResult },
{ name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Composed Field"], summary: "List composed fields", description: "List all composed fields present under the same Project and with the same Screen and Tab IDs" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ListComposedFieldRequest, O: ListComposedFieldResult }
], { "api.k8sService": "views-server" });

128
viz-dashboard.client.ts Normal file
View File

@@ -0,0 +1,128 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "viz-dashboard.proto" (package "vizapi", syntax proto3)
// tslint:disable
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
import { DashboardService } from "./viz-dashboard";
import type { CopyDashboardResult } from "./viz-dashboard";
import type { CopyDashboardRequest } from "./viz-dashboard";
import type { GetDashboardResult } from "./viz-dashboard";
import type { GetDashboardRequest } from "./viz-dashboard";
import type { UpdateDashboardResult } from "./viz-dashboard";
import type { UpdateDashboardRequest } from "./viz-dashboard";
import type { DeleteDashboardsForProjectResult } from "./viz-dashboard";
import type { DeleteDashboardsForProjectRequest } from "./viz-dashboard";
import type { DeleteDashboardsForOrganisationResult } from "./viz-dashboard";
import type { DeleteDashboardsForOrganisationRequest } from "./viz-dashboard";
import type { DeleteDashboardResult } from "./viz-dashboard";
import type { DeleteDashboardRequest } from "./viz-dashboard";
import type { ListDashboardResult } from "./viz-dashboard";
import type { ListDashboardRequest } from "./viz-dashboard";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
import type { CreateDashboardResult } from "./viz-dashboard";
import type { CreateDashboardRequest } from "./viz-dashboard";
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
/**
* @generated from protobuf service vizapi.DashboardService
*/
export interface IDashboardServiceClient {
/**
* @generated from protobuf rpc: Create(vizapi.CreateDashboardRequest) returns (vizapi.CreateDashboardResult);
*/
create(input: CreateDashboardRequest, options?: RpcOptions): UnaryCall<CreateDashboardRequest, CreateDashboardResult>;
/**
* @generated from protobuf rpc: List(vizapi.ListDashboardRequest) returns (vizapi.ListDashboardResult);
*/
list(input: ListDashboardRequest, options?: RpcOptions): UnaryCall<ListDashboardRequest, ListDashboardResult>;
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteDashboardRequest) returns (vizapi.DeleteDashboardResult);
*/
delete(input: DeleteDashboardRequest, options?: RpcOptions): UnaryCall<DeleteDashboardRequest, DeleteDashboardResult>;
/**
* @generated from protobuf rpc: DeleteDashboardsForOrganisation(vizapi.DeleteDashboardsForOrganisationRequest) returns (vizapi.DeleteDashboardsForOrganisationResult);
*/
deleteDashboardsForOrganisation(input: DeleteDashboardsForOrganisationRequest, options?: RpcOptions): UnaryCall<DeleteDashboardsForOrganisationRequest, DeleteDashboardsForOrganisationResult>;
/**
* @generated from protobuf rpc: DeleteDashboardsForProject(vizapi.DeleteDashboardsForProjectRequest) returns (vizapi.DeleteDashboardsForProjectResult);
*/
deleteDashboardsForProject(input: DeleteDashboardsForProjectRequest, options?: RpcOptions): UnaryCall<DeleteDashboardsForProjectRequest, DeleteDashboardsForProjectResult>;
/**
* @generated from protobuf rpc: Update(vizapi.UpdateDashboardRequest) returns (vizapi.UpdateDashboardResult);
*/
update(input: UpdateDashboardRequest, options?: RpcOptions): UnaryCall<UpdateDashboardRequest, UpdateDashboardResult>;
/**
* @generated from protobuf rpc: Get(vizapi.GetDashboardRequest) returns (vizapi.GetDashboardResult);
*/
get(input: GetDashboardRequest, options?: RpcOptions): UnaryCall<GetDashboardRequest, GetDashboardResult>;
/**
* @generated from protobuf rpc: Copy(vizapi.CopyDashboardRequest) returns (vizapi.CopyDashboardResult);
*/
copy(input: CopyDashboardRequest, options?: RpcOptions): UnaryCall<CopyDashboardRequest, CopyDashboardResult>;
}
/**
* @generated from protobuf service vizapi.DashboardService
*/
export class DashboardServiceClient implements IDashboardServiceClient, ServiceInfo {
typeName = DashboardService.typeName;
methods = DashboardService.methods;
options = DashboardService.options;
constructor(private readonly _transport: RpcTransport) {
}
/**
* @generated from protobuf rpc: Create(vizapi.CreateDashboardRequest) returns (vizapi.CreateDashboardResult);
*/
create(input: CreateDashboardRequest, options?: RpcOptions): UnaryCall<CreateDashboardRequest, CreateDashboardResult> {
const method = this.methods[0], opt = this._transport.mergeOptions(options);
return stackIntercept<CreateDashboardRequest, CreateDashboardResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: List(vizapi.ListDashboardRequest) returns (vizapi.ListDashboardResult);
*/
list(input: ListDashboardRequest, options?: RpcOptions): UnaryCall<ListDashboardRequest, ListDashboardResult> {
const method = this.methods[1], opt = this._transport.mergeOptions(options);
return stackIntercept<ListDashboardRequest, ListDashboardResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteDashboardRequest) returns (vizapi.DeleteDashboardResult);
*/
delete(input: DeleteDashboardRequest, options?: RpcOptions): UnaryCall<DeleteDashboardRequest, DeleteDashboardResult> {
const method = this.methods[2], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteDashboardRequest, DeleteDashboardResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: DeleteDashboardsForOrganisation(vizapi.DeleteDashboardsForOrganisationRequest) returns (vizapi.DeleteDashboardsForOrganisationResult);
*/
deleteDashboardsForOrganisation(input: DeleteDashboardsForOrganisationRequest, options?: RpcOptions): UnaryCall<DeleteDashboardsForOrganisationRequest, DeleteDashboardsForOrganisationResult> {
const method = this.methods[3], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteDashboardsForOrganisationRequest, DeleteDashboardsForOrganisationResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: DeleteDashboardsForProject(vizapi.DeleteDashboardsForProjectRequest) returns (vizapi.DeleteDashboardsForProjectResult);
*/
deleteDashboardsForProject(input: DeleteDashboardsForProjectRequest, options?: RpcOptions): UnaryCall<DeleteDashboardsForProjectRequest, DeleteDashboardsForProjectResult> {
const method = this.methods[4], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteDashboardsForProjectRequest, DeleteDashboardsForProjectResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Update(vizapi.UpdateDashboardRequest) returns (vizapi.UpdateDashboardResult);
*/
update(input: UpdateDashboardRequest, options?: RpcOptions): UnaryCall<UpdateDashboardRequest, UpdateDashboardResult> {
const method = this.methods[5], opt = this._transport.mergeOptions(options);
return stackIntercept<UpdateDashboardRequest, UpdateDashboardResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Get(vizapi.GetDashboardRequest) returns (vizapi.GetDashboardResult);
*/
get(input: GetDashboardRequest, options?: RpcOptions): UnaryCall<GetDashboardRequest, GetDashboardResult> {
const method = this.methods[6], opt = this._transport.mergeOptions(options);
return stackIntercept<GetDashboardRequest, GetDashboardResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Copy(vizapi.CopyDashboardRequest) returns (vizapi.CopyDashboardResult);
*/
copy(input: CopyDashboardRequest, options?: RpcOptions): UnaryCall<CopyDashboardRequest, CopyDashboardResult> {
const method = this.methods[7], opt = this._transport.mergeOptions(options);
return stackIntercept<CopyDashboardRequest, CopyDashboardResult>("unary", this._transport, method, opt, input);
}
}

1261
viz-dashboard.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "viz-default-view.proto" (package "vizapi", syntax proto3)
// tslint:disable
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
import { DefaultViewService } from "./viz-default-view";
import type { UpdatePlatformDefaultViewResult } from "./viz-default-view";
import type { UpdatePlatformDefaultViewRequest } from "./viz-default-view";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
import type { CreatePlatformDefaultViewResult } from "./viz-default-view";
import type { CreatePlatformDefaultViewRequest } from "./viz-default-view";
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
/**
* @generated from protobuf service vizapi.DefaultViewService
*/
export interface IDefaultViewServiceClient {
/**
* @generated from protobuf rpc: CreatePlatform(vizapi.CreatePlatformDefaultViewRequest) returns (vizapi.CreatePlatformDefaultViewResult);
*/
createPlatform(input: CreatePlatformDefaultViewRequest, options?: RpcOptions): UnaryCall<CreatePlatformDefaultViewRequest, CreatePlatformDefaultViewResult>;
/**
* @generated from protobuf rpc: UpdatePlatform(vizapi.UpdatePlatformDefaultViewRequest) returns (vizapi.UpdatePlatformDefaultViewResult);
*/
updatePlatform(input: UpdatePlatformDefaultViewRequest, options?: RpcOptions): UnaryCall<UpdatePlatformDefaultViewRequest, UpdatePlatformDefaultViewResult>;
}
/**
* @generated from protobuf service vizapi.DefaultViewService
*/
export class DefaultViewServiceClient implements IDefaultViewServiceClient, ServiceInfo {
typeName = DefaultViewService.typeName;
methods = DefaultViewService.methods;
options = DefaultViewService.options;
constructor(private readonly _transport: RpcTransport) {
}
/**
* @generated from protobuf rpc: CreatePlatform(vizapi.CreatePlatformDefaultViewRequest) returns (vizapi.CreatePlatformDefaultViewResult);
*/
createPlatform(input: CreatePlatformDefaultViewRequest, options?: RpcOptions): UnaryCall<CreatePlatformDefaultViewRequest, CreatePlatformDefaultViewResult> {
const method = this.methods[0], opt = this._transport.mergeOptions(options);
return stackIntercept<CreatePlatformDefaultViewRequest, CreatePlatformDefaultViewResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: UpdatePlatform(vizapi.UpdatePlatformDefaultViewRequest) returns (vizapi.UpdatePlatformDefaultViewResult);
*/
updatePlatform(input: UpdatePlatformDefaultViewRequest, options?: RpcOptions): UnaryCall<UpdatePlatformDefaultViewRequest, UpdatePlatformDefaultViewResult> {
const method = this.methods[1], opt = this._transport.mergeOptions(options);
return stackIntercept<UpdatePlatformDefaultViewRequest, UpdatePlatformDefaultViewResult>("unary", this._transport, method, opt, input);
}
}

310
viz-default-view.ts Normal file
View File

@@ -0,0 +1,310 @@
// @generated by protobuf-ts 2.9.5
// @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" });

89
viz-motd.client.ts Normal file
View File

@@ -0,0 +1,89 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "viz-motd.proto" (package "vizapi", syntax proto3)
// tslint:disable
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
import { MotdService } from "./viz-motd";
import type { ListMotdsResult } from "./viz-motd";
import type { ListMotdsRequest } from "./viz-motd";
import type { DeleteMotdResult } from "./viz-motd";
import type { DeleteMotdRequest } from "./viz-motd";
import type { UpdateMotdResult } from "./viz-motd";
import type { UpdateMotdRequest } from "./viz-motd";
import type { CreateMotdResult } from "./viz-motd";
import type { CreateMotdRequest } from "./viz-motd";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
import type { GetMotdResult } from "./viz-motd";
import type { GetMotdRequest } from "./viz-motd";
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
/**
* @generated from protobuf service vizapi.MotdService
*/
export interface IMotdServiceClient {
/**
* @generated from protobuf rpc: Get(vizapi.GetMotdRequest) returns (vizapi.GetMotdResult);
*/
get(input: GetMotdRequest, options?: RpcOptions): UnaryCall<GetMotdRequest, GetMotdResult>;
/**
* @generated from protobuf rpc: Create(vizapi.CreateMotdRequest) returns (vizapi.CreateMotdResult);
*/
create(input: CreateMotdRequest, options?: RpcOptions): UnaryCall<CreateMotdRequest, CreateMotdResult>;
/**
* @generated from protobuf rpc: Update(vizapi.UpdateMotdRequest) returns (vizapi.UpdateMotdResult);
*/
update(input: UpdateMotdRequest, options?: RpcOptions): UnaryCall<UpdateMotdRequest, UpdateMotdResult>;
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteMotdRequest) returns (vizapi.DeleteMotdResult);
*/
delete(input: DeleteMotdRequest, options?: RpcOptions): UnaryCall<DeleteMotdRequest, DeleteMotdResult>;
/**
* @generated from protobuf rpc: List(vizapi.ListMotdsRequest) returns (vizapi.ListMotdsResult);
*/
list(input: ListMotdsRequest, options?: RpcOptions): UnaryCall<ListMotdsRequest, ListMotdsResult>;
}
/**
* @generated from protobuf service vizapi.MotdService
*/
export class MotdServiceClient implements IMotdServiceClient, ServiceInfo {
typeName = MotdService.typeName;
methods = MotdService.methods;
options = MotdService.options;
constructor(private readonly _transport: RpcTransport) {
}
/**
* @generated from protobuf rpc: Get(vizapi.GetMotdRequest) returns (vizapi.GetMotdResult);
*/
get(input: GetMotdRequest, options?: RpcOptions): UnaryCall<GetMotdRequest, GetMotdResult> {
const method = this.methods[0], opt = this._transport.mergeOptions(options);
return stackIntercept<GetMotdRequest, GetMotdResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Create(vizapi.CreateMotdRequest) returns (vizapi.CreateMotdResult);
*/
create(input: CreateMotdRequest, options?: RpcOptions): UnaryCall<CreateMotdRequest, CreateMotdResult> {
const method = this.methods[1], opt = this._transport.mergeOptions(options);
return stackIntercept<CreateMotdRequest, CreateMotdResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Update(vizapi.UpdateMotdRequest) returns (vizapi.UpdateMotdResult);
*/
update(input: UpdateMotdRequest, options?: RpcOptions): UnaryCall<UpdateMotdRequest, UpdateMotdResult> {
const method = this.methods[2], opt = this._transport.mergeOptions(options);
return stackIntercept<UpdateMotdRequest, UpdateMotdResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteMotdRequest) returns (vizapi.DeleteMotdResult);
*/
delete(input: DeleteMotdRequest, options?: RpcOptions): UnaryCall<DeleteMotdRequest, DeleteMotdResult> {
const method = this.methods[3], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteMotdRequest, DeleteMotdResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: List(vizapi.ListMotdsRequest) returns (vizapi.ListMotdsResult);
*/
list(input: ListMotdsRequest, options?: RpcOptions): UnaryCall<ListMotdsRequest, ListMotdsResult> {
const method = this.methods[4], opt = this._transport.mergeOptions(options);
return stackIntercept<ListMotdsRequest, ListMotdsResult>("unary", this._transport, method, opt, input);
}
}

978
viz-motd.ts Normal file
View File

@@ -0,0 +1,978 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "viz-motd.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.Motd
*/
export interface Motd {
/**
* @generated from protobuf field: string MotdID = 1 [json_name = "MotdID"];
*/
motdID: string;
/**
* @generated from protobuf field: string StartDate = 2 [json_name = "StartDate"];
*/
startDate: string;
/**
* @generated from protobuf field: string EndDate = 3 [json_name = "EndDate"];
*/
endDate: string;
/**
* @generated from protobuf field: repeated vizapi.MotdMessage Message = 4 [json_name = "Message"];
*/
message: MotdMessage[];
}
/**
* @generated from protobuf message vizapi.MotdMessage
*/
export interface MotdMessage {
/**
* ISO 639-1 code message language
*
* @generated from protobuf field: string Lang = 1 [json_name = "Lang"];
*/
lang: string;
/**
* The message content
*
* @generated from protobuf field: string Message = 2 [json_name = "Message"];
*/
message: string;
}
/**
* @generated from protobuf message vizapi.MotdMessageRes
*/
export interface MotdMessageRes {
/**
* Language used for the message
*
* @generated from protobuf field: string Lang = 1 [json_name = "Lang"];
*/
lang: string;
/**
* The message content
*
* @generated from protobuf field: string Message = 2 [json_name = "Message"];
*/
message: string;
}
/**
* Message request with the content and the dates
*
* @generated from protobuf message vizapi.CreateMotdRequest
*/
export interface CreateMotdRequest {
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from protobuf field: string StartDate = 1 [json_name = "StartDate"];
*/
startDate: string;
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from protobuf field: string EndDate = 2 [json_name = "EndDate"];
*/
endDate: string;
/**
* @generated from protobuf field: repeated vizapi.MotdMessage Message = 3 [json_name = "Message"];
*/
message: MotdMessage[];
}
/**
* Message result with ID, content and dates
*
* @generated from protobuf message vizapi.CreateMotdResult
*/
export interface CreateMotdResult {
/**
* @generated from protobuf field: string ID = 1 [json_name = "ID"];
*/
iD: string;
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from protobuf field: string StartDate = 2 [json_name = "StartDate"];
*/
startDate: string;
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from protobuf field: string EndDate = 3 [json_name = "EndDate"];
*/
endDate: string;
/**
* @generated from protobuf field: repeated vizapi.MotdMessageRes Message = 4 [json_name = "Message"];
*/
message: MotdMessageRes[];
}
/**
* Update an existing Message Of The Day using its key
*
* @generated from protobuf message vizapi.UpdateMotdRequest
*/
export interface UpdateMotdRequest {
/**
* @generated from protobuf field: string ID = 1 [json_name = "ID"];
*/
iD: string;
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from protobuf field: string StartDate = 2 [json_name = "StartDate"];
*/
startDate: string;
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from protobuf field: string EndDate = 3 [json_name = "EndDate"];
*/
endDate: string;
/**
* @generated from protobuf field: repeated vizapi.MotdMessage Message = 4 [json_name = "Message"];
*/
message: MotdMessage[];
}
/**
* @generated from protobuf message vizapi.UpdateMotdResult
*/
export interface UpdateMotdResult {
/**
* @generated from protobuf field: string ID = 1 [json_name = "ID"];
*/
iD: string;
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from protobuf field: string StartDate = 2 [json_name = "StartDate"];
*/
startDate: string;
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from protobuf field: string EndDate = 3 [json_name = "EndDate"];
*/
endDate: string;
/**
* @generated from protobuf field: repeated vizapi.MotdMessage Message = 4 [json_name = "Message"];
*/
message: MotdMessage[];
}
/**
* @generated from protobuf message vizapi.GetMotdRequest
*/
export interface GetMotdRequest {
}
/**
* Return the current Message Of The Day
*
* @generated from protobuf message vizapi.GetMotdResult
*/
export interface GetMotdResult {
/**
* @generated from protobuf field: string ID = 1 [json_name = "ID"];
*/
iD: string;
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from protobuf field: string StartDate = 2 [json_name = "StartDate"];
*/
startDate: string;
/**
* UTC date/time in ISO 8601 format with time zone (accepted tzd formats: [+01:00, -01:00, Z])
*
* @generated from protobuf field: string EndDate = 3 [json_name = "EndDate"];
*/
endDate: string;
/**
* @generated from protobuf field: repeated vizapi.MotdMessageRes Message = 4 [json_name = "Message"];
*/
message: MotdMessageRes[];
}
/**
* @generated from protobuf message vizapi.DeleteMotdRequest
*/
export interface DeleteMotdRequest {
/**
* @generated from protobuf field: string ID = 1 [json_name = "ID"];
*/
iD: string;
}
/**
* @generated from protobuf message vizapi.DeleteMotdResult
*/
export interface DeleteMotdResult {
}
/**
* @generated from protobuf message vizapi.ListMotdsRequest
*/
export interface ListMotdsRequest {
}
/**
* List of all existing messages of the day
*
* @generated from protobuf message vizapi.ListMotdsResult
*/
export interface ListMotdsResult {
/**
* @generated from protobuf field: repeated vizapi.GetMotdResult Motds = 1 [json_name = "Motds"];
*/
motds: GetMotdResult[];
}
// @generated message type with reflection information, may provide speed optimized methods
class Motd$Type extends MessageType<Motd> {
constructor() {
super("vizapi.Motd", [
{ no: 1, name: "MotdID", kind: "scalar", jsonName: "MotdID", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "StartDate", kind: "scalar", jsonName: "StartDate", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "EndDate", kind: "scalar", jsonName: "EndDate", T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "Message", kind: "message", jsonName: "Message", repeat: 1 /*RepeatType.PACKED*/, T: () => MotdMessage }
]);
}
create(value?: PartialMessage<Motd>): Motd {
const message = globalThis.Object.create((this.messagePrototype!));
message.motdID = "";
message.startDate = "";
message.endDate = "";
message.message = [];
if (value !== undefined)
reflectionMergePartial<Motd>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Motd): Motd {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string MotdID = 1 [json_name = "MotdID"];*/ 1:
message.motdID = reader.string();
break;
case /* string StartDate = 2 [json_name = "StartDate"];*/ 2:
message.startDate = reader.string();
break;
case /* string EndDate = 3 [json_name = "EndDate"];*/ 3:
message.endDate = reader.string();
break;
case /* repeated vizapi.MotdMessage Message = 4 [json_name = "Message"];*/ 4:
message.message.push(MotdMessage.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: Motd, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string MotdID = 1 [json_name = "MotdID"]; */
if (message.motdID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.motdID);
/* string StartDate = 2 [json_name = "StartDate"]; */
if (message.startDate !== "")
writer.tag(2, WireType.LengthDelimited).string(message.startDate);
/* string EndDate = 3 [json_name = "EndDate"]; */
if (message.endDate !== "")
writer.tag(3, WireType.LengthDelimited).string(message.endDate);
/* repeated vizapi.MotdMessage Message = 4 [json_name = "Message"]; */
for (let i = 0; i < message.message.length; i++)
MotdMessage.internalBinaryWrite(message.message[i], writer.tag(4, 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 vizapi.Motd
*/
export const Motd = new Motd$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MotdMessage$Type extends MessageType<MotdMessage> {
constructor() {
super("vizapi.MotdMessage", [
{ no: 1, name: "Lang", kind: "scalar", jsonName: "Lang", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "<a href='https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes'>ISO 639-1 code</a> message language", example: "\"en\"" } } },
{ no: 2, name: "Message", kind: "scalar", jsonName: "Message", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The message content", example: "\"Happy new year\"" } } }
]);
}
create(value?: PartialMessage<MotdMessage>): MotdMessage {
const message = globalThis.Object.create((this.messagePrototype!));
message.lang = "";
message.message = "";
if (value !== undefined)
reflectionMergePartial<MotdMessage>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MotdMessage): MotdMessage {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Lang = 1 [json_name = "Lang"];*/ 1:
message.lang = reader.string();
break;
case /* string Message = 2 [json_name = "Message"];*/ 2:
message.message = 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: MotdMessage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Lang = 1 [json_name = "Lang"]; */
if (message.lang !== "")
writer.tag(1, WireType.LengthDelimited).string(message.lang);
/* string Message = 2 [json_name = "Message"]; */
if (message.message !== "")
writer.tag(2, WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.MotdMessage
*/
export const MotdMessage = new MotdMessage$Type();
// @generated message type with reflection information, may provide speed optimized methods
class MotdMessageRes$Type extends MessageType<MotdMessageRes> {
constructor() {
super("vizapi.MotdMessageRes", [
{ no: 1, name: "Lang", kind: "scalar", jsonName: "Lang", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Language used for the message" } } },
{ no: 2, name: "Message", kind: "scalar", jsonName: "Message", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The message content" } } }
]);
}
create(value?: PartialMessage<MotdMessageRes>): MotdMessageRes {
const message = globalThis.Object.create((this.messagePrototype!));
message.lang = "";
message.message = "";
if (value !== undefined)
reflectionMergePartial<MotdMessageRes>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MotdMessageRes): MotdMessageRes {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Lang = 1 [json_name = "Lang"];*/ 1:
message.lang = reader.string();
break;
case /* string Message = 2 [json_name = "Message"];*/ 2:
message.message = 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: MotdMessageRes, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Lang = 1 [json_name = "Lang"]; */
if (message.lang !== "")
writer.tag(1, WireType.LengthDelimited).string(message.lang);
/* string Message = 2 [json_name = "Message"]; */
if (message.message !== "")
writer.tag(2, WireType.LengthDelimited).string(message.message);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.MotdMessageRes
*/
export const MotdMessageRes = new MotdMessageRes$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateMotdRequest$Type extends MessageType<CreateMotdRequest> {
constructor() {
super("vizapi.CreateMotdRequest", [
{ no: 1, name: "StartDate", kind: "scalar", jsonName: "StartDate", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "UTC date/time in <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> format with time zone (accepted tzd formats: [+01:00, -01:00, Z])", example: "\"2023-01-01T00:00:00Z\"" }, "validate.rules": { string: { dateIso8601: true } } } },
{ no: 2, name: "EndDate", kind: "scalar", jsonName: "EndDate", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "UTC date/time in <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> format with time zone (accepted tzd formats: [+01:00, -01:00, Z])", example: "\"2023-01-01T00:00:00Z\"" }, "validate.rules": { string: { dateIso8601: true } } } },
{ no: 3, name: "Message", kind: "message", jsonName: "Message", repeat: 1 /*RepeatType.PACKED*/, T: () => MotdMessage }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Message request with the content and the dates" } } });
}
create(value?: PartialMessage<CreateMotdRequest>): CreateMotdRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.startDate = "";
message.endDate = "";
message.message = [];
if (value !== undefined)
reflectionMergePartial<CreateMotdRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateMotdRequest): CreateMotdRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string StartDate = 1 [json_name = "StartDate"];*/ 1:
message.startDate = reader.string();
break;
case /* string EndDate = 2 [json_name = "EndDate"];*/ 2:
message.endDate = reader.string();
break;
case /* repeated vizapi.MotdMessage Message = 3 [json_name = "Message"];*/ 3:
message.message.push(MotdMessage.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: CreateMotdRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string StartDate = 1 [json_name = "StartDate"]; */
if (message.startDate !== "")
writer.tag(1, WireType.LengthDelimited).string(message.startDate);
/* string EndDate = 2 [json_name = "EndDate"]; */
if (message.endDate !== "")
writer.tag(2, WireType.LengthDelimited).string(message.endDate);
/* repeated vizapi.MotdMessage Message = 3 [json_name = "Message"]; */
for (let i = 0; i < message.message.length; i++)
MotdMessage.internalBinaryWrite(message.message[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 vizapi.CreateMotdRequest
*/
export const CreateMotdRequest = new CreateMotdRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateMotdResult$Type extends MessageType<CreateMotdResult> {
constructor() {
super("vizapi.CreateMotdResult", [
{ no: 1, name: "ID", kind: "scalar", jsonName: "ID", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "StartDate", kind: "scalar", jsonName: "StartDate", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "UTC date/time in <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> format with time zone (accepted tzd formats: [+01:00, -01:00, Z])", example: "\"2023-01-01T00:00:00Z\"" }, "validate.rules": { string: { dateIso8601: true } } } },
{ no: 3, name: "EndDate", kind: "scalar", jsonName: "EndDate", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "UTC date/time in <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> format with time zone (accepted tzd formats: [+01:00, -01:00, Z])", example: "\"2023-01-01T00:00:01Z\"" }, "validate.rules": { string: { dateIso8601: true } } } },
{ no: 4, name: "Message", kind: "message", jsonName: "Message", repeat: 1 /*RepeatType.PACKED*/, T: () => MotdMessageRes }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Message result with ID, content and dates" } } });
}
create(value?: PartialMessage<CreateMotdResult>): CreateMotdResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.iD = "";
message.startDate = "";
message.endDate = "";
message.message = [];
if (value !== undefined)
reflectionMergePartial<CreateMotdResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateMotdResult): CreateMotdResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ID = 1 [json_name = "ID"];*/ 1:
message.iD = reader.string();
break;
case /* string StartDate = 2 [json_name = "StartDate"];*/ 2:
message.startDate = reader.string();
break;
case /* string EndDate = 3 [json_name = "EndDate"];*/ 3:
message.endDate = reader.string();
break;
case /* repeated vizapi.MotdMessageRes Message = 4 [json_name = "Message"];*/ 4:
message.message.push(MotdMessageRes.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: CreateMotdResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ID = 1 [json_name = "ID"]; */
if (message.iD !== "")
writer.tag(1, WireType.LengthDelimited).string(message.iD);
/* string StartDate = 2 [json_name = "StartDate"]; */
if (message.startDate !== "")
writer.tag(2, WireType.LengthDelimited).string(message.startDate);
/* string EndDate = 3 [json_name = "EndDate"]; */
if (message.endDate !== "")
writer.tag(3, WireType.LengthDelimited).string(message.endDate);
/* repeated vizapi.MotdMessageRes Message = 4 [json_name = "Message"]; */
for (let i = 0; i < message.message.length; i++)
MotdMessageRes.internalBinaryWrite(message.message[i], writer.tag(4, 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 vizapi.CreateMotdResult
*/
export const CreateMotdResult = new CreateMotdResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class UpdateMotdRequest$Type extends MessageType<UpdateMotdRequest> {
constructor() {
super("vizapi.UpdateMotdRequest", [
{ no: 1, name: "ID", kind: "scalar", jsonName: "ID", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "StartDate", kind: "scalar", jsonName: "StartDate", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "UTC date/time in <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> format with time zone (accepted tzd formats: [+01:00, -01:00, Z])", example: "\"2023-01-01T00:00:00Z\"" }, "validate.rules": { string: { dateIso8601: true } } } },
{ no: 3, name: "EndDate", kind: "scalar", jsonName: "EndDate", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "UTC date/time in <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> format with time zone (accepted tzd formats: [+01:00, -01:00, Z])", example: "\"2023-01-01T00:00:01Z\"" }, "validate.rules": { string: { dateIso8601: true } } } },
{ no: 4, name: "Message", kind: "message", jsonName: "Message", repeat: 1 /*RepeatType.PACKED*/, T: () => MotdMessage }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Update an existing Message Of The Day using its key" } } });
}
create(value?: PartialMessage<UpdateMotdRequest>): UpdateMotdRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.iD = "";
message.startDate = "";
message.endDate = "";
message.message = [];
if (value !== undefined)
reflectionMergePartial<UpdateMotdRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateMotdRequest): UpdateMotdRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ID = 1 [json_name = "ID"];*/ 1:
message.iD = reader.string();
break;
case /* string StartDate = 2 [json_name = "StartDate"];*/ 2:
message.startDate = reader.string();
break;
case /* string EndDate = 3 [json_name = "EndDate"];*/ 3:
message.endDate = reader.string();
break;
case /* repeated vizapi.MotdMessage Message = 4 [json_name = "Message"];*/ 4:
message.message.push(MotdMessage.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: UpdateMotdRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ID = 1 [json_name = "ID"]; */
if (message.iD !== "")
writer.tag(1, WireType.LengthDelimited).string(message.iD);
/* string StartDate = 2 [json_name = "StartDate"]; */
if (message.startDate !== "")
writer.tag(2, WireType.LengthDelimited).string(message.startDate);
/* string EndDate = 3 [json_name = "EndDate"]; */
if (message.endDate !== "")
writer.tag(3, WireType.LengthDelimited).string(message.endDate);
/* repeated vizapi.MotdMessage Message = 4 [json_name = "Message"]; */
for (let i = 0; i < message.message.length; i++)
MotdMessage.internalBinaryWrite(message.message[i], writer.tag(4, 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 vizapi.UpdateMotdRequest
*/
export const UpdateMotdRequest = new UpdateMotdRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class UpdateMotdResult$Type extends MessageType<UpdateMotdResult> {
constructor() {
super("vizapi.UpdateMotdResult", [
{ no: 1, name: "ID", kind: "scalar", jsonName: "ID", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "StartDate", kind: "scalar", jsonName: "StartDate", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "UTC date/time in <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> format with time zone (accepted tzd formats: [+01:00, -01:00, Z])", example: "\"2023-01-01T00:00:00Z\"" } } },
{ no: 3, name: "EndDate", kind: "scalar", jsonName: "EndDate", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "UTC date/time in <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> format with time zone (accepted tzd formats: [+01:00, -01:00, Z])", example: "\"2023-01-01T00:00:01Z\"" } } },
{ no: 4, name: "Message", kind: "message", jsonName: "Message", repeat: 1 /*RepeatType.PACKED*/, T: () => MotdMessage }
]);
}
create(value?: PartialMessage<UpdateMotdResult>): UpdateMotdResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.iD = "";
message.startDate = "";
message.endDate = "";
message.message = [];
if (value !== undefined)
reflectionMergePartial<UpdateMotdResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateMotdResult): UpdateMotdResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ID = 1 [json_name = "ID"];*/ 1:
message.iD = reader.string();
break;
case /* string StartDate = 2 [json_name = "StartDate"];*/ 2:
message.startDate = reader.string();
break;
case /* string EndDate = 3 [json_name = "EndDate"];*/ 3:
message.endDate = reader.string();
break;
case /* repeated vizapi.MotdMessage Message = 4 [json_name = "Message"];*/ 4:
message.message.push(MotdMessage.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: UpdateMotdResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ID = 1 [json_name = "ID"]; */
if (message.iD !== "")
writer.tag(1, WireType.LengthDelimited).string(message.iD);
/* string StartDate = 2 [json_name = "StartDate"]; */
if (message.startDate !== "")
writer.tag(2, WireType.LengthDelimited).string(message.startDate);
/* string EndDate = 3 [json_name = "EndDate"]; */
if (message.endDate !== "")
writer.tag(3, WireType.LengthDelimited).string(message.endDate);
/* repeated vizapi.MotdMessage Message = 4 [json_name = "Message"]; */
for (let i = 0; i < message.message.length; i++)
MotdMessage.internalBinaryWrite(message.message[i], writer.tag(4, 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 vizapi.UpdateMotdResult
*/
export const UpdateMotdResult = new UpdateMotdResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetMotdRequest$Type extends MessageType<GetMotdRequest> {
constructor() {
super("vizapi.GetMotdRequest", []);
}
create(value?: PartialMessage<GetMotdRequest>): GetMotdRequest {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<GetMotdRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetMotdRequest): GetMotdRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: GetMotdRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.GetMotdRequest
*/
export const GetMotdRequest = new GetMotdRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetMotdResult$Type extends MessageType<GetMotdResult> {
constructor() {
super("vizapi.GetMotdResult", [
{ no: 1, name: "ID", kind: "scalar", jsonName: "ID", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "StartDate", kind: "scalar", jsonName: "StartDate", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "UTC date/time in <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> format with time zone (accepted tzd formats: [+01:00, -01:00, Z])", example: "\"2023-01-01T00:00:00Z\"" } } },
{ no: 3, name: "EndDate", kind: "scalar", jsonName: "EndDate", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "UTC date/time in <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> format with time zone (accepted tzd formats: [+01:00, -01:00, Z])", example: "\"2023-01-01T00:00:01Z\"" } } },
{ no: 4, name: "Message", kind: "message", jsonName: "Message", repeat: 1 /*RepeatType.PACKED*/, T: () => MotdMessageRes }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Return the current Message Of The Day" } } });
}
create(value?: PartialMessage<GetMotdResult>): GetMotdResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.iD = "";
message.startDate = "";
message.endDate = "";
message.message = [];
if (value !== undefined)
reflectionMergePartial<GetMotdResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetMotdResult): GetMotdResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ID = 1 [json_name = "ID"];*/ 1:
message.iD = reader.string();
break;
case /* string StartDate = 2 [json_name = "StartDate"];*/ 2:
message.startDate = reader.string();
break;
case /* string EndDate = 3 [json_name = "EndDate"];*/ 3:
message.endDate = reader.string();
break;
case /* repeated vizapi.MotdMessageRes Message = 4 [json_name = "Message"];*/ 4:
message.message.push(MotdMessageRes.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: GetMotdResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ID = 1 [json_name = "ID"]; */
if (message.iD !== "")
writer.tag(1, WireType.LengthDelimited).string(message.iD);
/* string StartDate = 2 [json_name = "StartDate"]; */
if (message.startDate !== "")
writer.tag(2, WireType.LengthDelimited).string(message.startDate);
/* string EndDate = 3 [json_name = "EndDate"]; */
if (message.endDate !== "")
writer.tag(3, WireType.LengthDelimited).string(message.endDate);
/* repeated vizapi.MotdMessageRes Message = 4 [json_name = "Message"]; */
for (let i = 0; i < message.message.length; i++)
MotdMessageRes.internalBinaryWrite(message.message[i], writer.tag(4, 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 vizapi.GetMotdResult
*/
export const GetMotdResult = new GetMotdResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteMotdRequest$Type extends MessageType<DeleteMotdRequest> {
constructor() {
super("vizapi.DeleteMotdRequest", [
{ no: 1, name: "ID", kind: "scalar", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ID"] } } });
}
create(value?: PartialMessage<DeleteMotdRequest>): DeleteMotdRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.iD = "";
if (value !== undefined)
reflectionMergePartial<DeleteMotdRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteMotdRequest): DeleteMotdRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ID = 1 [json_name = "ID"];*/ 1:
message.iD = 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: DeleteMotdRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ID = 1 [json_name = "ID"]; */
if (message.iD !== "")
writer.tag(1, WireType.LengthDelimited).string(message.iD);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.DeleteMotdRequest
*/
export const DeleteMotdRequest = new DeleteMotdRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteMotdResult$Type extends MessageType<DeleteMotdResult> {
constructor() {
super("vizapi.DeleteMotdResult", []);
}
create(value?: PartialMessage<DeleteMotdResult>): DeleteMotdResult {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<DeleteMotdResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteMotdResult): DeleteMotdResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: DeleteMotdResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.DeleteMotdResult
*/
export const DeleteMotdResult = new DeleteMotdResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListMotdsRequest$Type extends MessageType<ListMotdsRequest> {
constructor() {
super("vizapi.ListMotdsRequest", []);
}
create(value?: PartialMessage<ListMotdsRequest>): ListMotdsRequest {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ListMotdsRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListMotdsRequest): ListMotdsRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: ListMotdsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.ListMotdsRequest
*/
export const ListMotdsRequest = new ListMotdsRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListMotdsResult$Type extends MessageType<ListMotdsResult> {
constructor() {
super("vizapi.ListMotdsResult", [
{ no: 1, name: "Motds", kind: "message", jsonName: "Motds", repeat: 1 /*RepeatType.PACKED*/, T: () => GetMotdResult }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "List of all existing messages of the day" } } });
}
create(value?: PartialMessage<ListMotdsResult>): ListMotdsResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.motds = [];
if (value !== undefined)
reflectionMergePartial<ListMotdsResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListMotdsResult): ListMotdsResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated vizapi.GetMotdResult Motds = 1 [json_name = "Motds"];*/ 1:
message.motds.push(GetMotdResult.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: ListMotdsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated vizapi.GetMotdResult Motds = 1 [json_name = "Motds"]; */
for (let i = 0; i < message.motds.length; i++)
GetMotdResult.internalBinaryWrite(message.motds[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 vizapi.ListMotdsResult
*/
export const ListMotdsResult = new ListMotdsResult$Type();
/**
* @generated ServiceType for protobuf service vizapi.MotdService
*/
export const MotdService = new ServiceType("vizapi.MotdService", [
{ name: "Get", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Motd"], summary: "Get the Message Of The Day", description: "Get the current Message Of The Day" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: GetMotdRequest, O: GetMotdResult },
{ name: "Create", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Motd"], summary: "Create a Message Of The Day", description: "Create a Message Of The Day for a given time period" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: CreateMotdRequest, O: CreateMotdResult },
{ name: "Update", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Motd"], summary: "Update a Message Of The day", description: "Update an existing Message Of The Day" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: UpdateMotdRequest, O: UpdateMotdResult },
{ name: "Delete", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Motd"], summary: "Delete a Message Of The Day", description: "Delete a Message Of The Day using its ID" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: DeleteMotdRequest, O: DeleteMotdResult },
{ name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Motd"], summary: "List the Messages Of The Day", description: "List all existing messages of the day" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ListMotdsRequest, O: ListMotdsResult }
], { "api.k8sService": "motd-server" });

View File

@@ -0,0 +1,89 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "viz-organisation-settings.proto" (package "vizapi", syntax proto3)
// tslint:disable
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
import { OrganisationSettingsService } from "./viz-organisation-settings";
import type { DeleteSettingsForOrganisationResult } from "./viz-organisation-settings";
import type { DeleteSettingsForOrganisationRequest } from "./viz-organisation-settings";
import type { ListOrganisationSettingsResult } from "./viz-organisation-settings";
import type { ListOrganisationSettingsRequest } from "./viz-organisation-settings";
import type { DeleteOrganisationSettingResult } from "./viz-organisation-settings";
import type { DeleteOrganisationSettingRequest } from "./viz-organisation-settings";
import type { PutOrganisationSettingResult } from "./viz-organisation-settings";
import type { PutOrganisationSettingRequest } from "./viz-organisation-settings";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
import type { GetOrganisationSettingResult } from "./viz-organisation-settings";
import type { GetOrganisationSettingRequest } from "./viz-organisation-settings";
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
/**
* @generated from protobuf service vizapi.OrganisationSettingsService
*/
export interface IOrganisationSettingsServiceClient {
/**
* @generated from protobuf rpc: Get(vizapi.GetOrganisationSettingRequest) returns (vizapi.GetOrganisationSettingResult);
*/
get(input: GetOrganisationSettingRequest, options?: RpcOptions): UnaryCall<GetOrganisationSettingRequest, GetOrganisationSettingResult>;
/**
* @generated from protobuf rpc: Put(vizapi.PutOrganisationSettingRequest) returns (vizapi.PutOrganisationSettingResult);
*/
put(input: PutOrganisationSettingRequest, options?: RpcOptions): UnaryCall<PutOrganisationSettingRequest, PutOrganisationSettingResult>;
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteOrganisationSettingRequest) returns (vizapi.DeleteOrganisationSettingResult);
*/
delete(input: DeleteOrganisationSettingRequest, options?: RpcOptions): UnaryCall<DeleteOrganisationSettingRequest, DeleteOrganisationSettingResult>;
/**
* @generated from protobuf rpc: List(vizapi.ListOrganisationSettingsRequest) returns (vizapi.ListOrganisationSettingsResult);
*/
list(input: ListOrganisationSettingsRequest, options?: RpcOptions): UnaryCall<ListOrganisationSettingsRequest, ListOrganisationSettingsResult>;
/**
* @generated from protobuf rpc: DeleteSettingsForOrganisation(vizapi.DeleteSettingsForOrganisationRequest) returns (vizapi.DeleteSettingsForOrganisationResult);
*/
deleteSettingsForOrganisation(input: DeleteSettingsForOrganisationRequest, options?: RpcOptions): UnaryCall<DeleteSettingsForOrganisationRequest, DeleteSettingsForOrganisationResult>;
}
/**
* @generated from protobuf service vizapi.OrganisationSettingsService
*/
export class OrganisationSettingsServiceClient implements IOrganisationSettingsServiceClient, ServiceInfo {
typeName = OrganisationSettingsService.typeName;
methods = OrganisationSettingsService.methods;
options = OrganisationSettingsService.options;
constructor(private readonly _transport: RpcTransport) {
}
/**
* @generated from protobuf rpc: Get(vizapi.GetOrganisationSettingRequest) returns (vizapi.GetOrganisationSettingResult);
*/
get(input: GetOrganisationSettingRequest, options?: RpcOptions): UnaryCall<GetOrganisationSettingRequest, GetOrganisationSettingResult> {
const method = this.methods[0], opt = this._transport.mergeOptions(options);
return stackIntercept<GetOrganisationSettingRequest, GetOrganisationSettingResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Put(vizapi.PutOrganisationSettingRequest) returns (vizapi.PutOrganisationSettingResult);
*/
put(input: PutOrganisationSettingRequest, options?: RpcOptions): UnaryCall<PutOrganisationSettingRequest, PutOrganisationSettingResult> {
const method = this.methods[1], opt = this._transport.mergeOptions(options);
return stackIntercept<PutOrganisationSettingRequest, PutOrganisationSettingResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteOrganisationSettingRequest) returns (vizapi.DeleteOrganisationSettingResult);
*/
delete(input: DeleteOrganisationSettingRequest, options?: RpcOptions): UnaryCall<DeleteOrganisationSettingRequest, DeleteOrganisationSettingResult> {
const method = this.methods[2], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteOrganisationSettingRequest, DeleteOrganisationSettingResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: List(vizapi.ListOrganisationSettingsRequest) returns (vizapi.ListOrganisationSettingsResult);
*/
list(input: ListOrganisationSettingsRequest, options?: RpcOptions): UnaryCall<ListOrganisationSettingsRequest, ListOrganisationSettingsResult> {
const method = this.methods[3], opt = this._transport.mergeOptions(options);
return stackIntercept<ListOrganisationSettingsRequest, ListOrganisationSettingsResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: DeleteSettingsForOrganisation(vizapi.DeleteSettingsForOrganisationRequest) returns (vizapi.DeleteSettingsForOrganisationResult);
*/
deleteSettingsForOrganisation(input: DeleteSettingsForOrganisationRequest, options?: RpcOptions): UnaryCall<DeleteSettingsForOrganisationRequest, DeleteSettingsForOrganisationResult> {
const method = this.methods[4], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteSettingsForOrganisationRequest, DeleteSettingsForOrganisationResult>("unary", this._transport, method, opt, input);
}
}

View File

@@ -0,0 +1,783 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "viz-organisation-settings.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";
import { RequestOrganisationHeader } from "./core/shared";
/**
* @generated from protobuf message vizapi.OrganisationSetting
*/
export interface OrganisationSetting {
/**
* @generated from protobuf field: string OrganisationID = 1 [json_name = "OrganisationID"];
*/
organisationID: string;
/**
* @generated from protobuf field: string Key = 2 [json_name = "Key"];
*/
key: string;
/**
* @generated from protobuf field: string Value = 3 [json_name = "Value"];
*/
value: string;
/**
* @generated from protobuf field: vizapi.SettingVisibility Visibility = 4 [json_name = "Visibility"];
*/
visibility: SettingVisibility;
}
/**
* Key, Value pair to store
*
* @generated from protobuf message vizapi.PutOrganisationSettingRequest
*/
export interface PutOrganisationSettingRequest {
/**
* @generated from protobuf field: api.RequestOrganisationHeader Header = 1 [json_name = "Header"];
*/
header?: RequestOrganisationHeader;
/**
* @generated from protobuf field: string Key = 2 [json_name = "Key"];
*/
key: string;
/**
* @generated from protobuf field: string Value = 3 [json_name = "Value"];
*/
value: string;
/**
* @generated from protobuf field: vizapi.SettingVisibility Visibility = 4 [json_name = "Visibility"];
*/
visibility: SettingVisibility;
}
/**
* Key, Value pair response
*
* @generated from protobuf message vizapi.PutOrganisationSettingResult
*/
export interface PutOrganisationSettingResult {
/**
* @generated from protobuf field: string Key = 1 [json_name = "Key"];
*/
key: string;
/**
* @generated from protobuf field: string Value = 2 [json_name = "Value"];
*/
value: string;
/**
* @generated from protobuf field: vizapi.SettingVisibility Visibility = 3 [json_name = "Visibility"];
*/
visibility: SettingVisibility;
}
/**
* Key of the organisation's setting to get
*
* @generated from protobuf message vizapi.GetOrganisationSettingRequest
*/
export interface GetOrganisationSettingRequest {
/**
* @generated from protobuf field: api.RequestOrganisationHeader Header = 1 [json_name = "Header"];
*/
header?: RequestOrganisationHeader;
/**
* @generated from protobuf field: string Key = 2 [json_name = "Key"];
*/
key: string;
}
/**
* Key, Value pair response
*
* @generated from protobuf message vizapi.GetOrganisationSettingResult
*/
export interface GetOrganisationSettingResult {
/**
* @generated from protobuf field: string Key = 1 [json_name = "Key"];
*/
key: string;
/**
* @generated from protobuf field: string Value = 2 [json_name = "Value"];
*/
value: string;
/**
* @generated from protobuf field: vizapi.SettingVisibility Visibility = 3 [json_name = "Visibility"];
*/
visibility: SettingVisibility;
}
/**
* Key of the organisation's setting to delete
*
* @generated from protobuf message vizapi.DeleteOrganisationSettingRequest
*/
export interface DeleteOrganisationSettingRequest {
/**
* @generated from protobuf field: api.RequestOrganisationHeader Header = 1 [json_name = "Header"];
*/
header?: RequestOrganisationHeader;
/**
* @generated from protobuf field: string Key = 2 [json_name = "Key"];
*/
key: string;
}
/**
* @generated from protobuf message vizapi.DeleteOrganisationSettingResult
*/
export interface DeleteOrganisationSettingResult {
}
/**
* @generated from protobuf message vizapi.ListOrganisationSettingsRequest
*/
export interface ListOrganisationSettingsRequest {
/**
* @generated from protobuf field: api.RequestOrganisationHeader Header = 1 [json_name = "Header"];
*/
header?: RequestOrganisationHeader;
}
/**
* List of the organisation's settings
*
* @generated from protobuf message vizapi.ListOrganisationSettingsResult
*/
export interface ListOrganisationSettingsResult {
/**
* @generated from protobuf field: repeated vizapi.GetOrganisationSettingResult OrganisationSettings = 1 [json_name = "OrganisationSettings"];
*/
organisationSettings: GetOrganisationSettingResult[];
}
/**
* @generated from protobuf message vizapi.DeleteSettingsForOrganisationRequest
*/
export interface DeleteSettingsForOrganisationRequest {
/**
* @generated from protobuf field: string OrganisationID = 1 [json_name = "OrganisationID"];
*/
organisationID: string;
}
/**
* @generated from protobuf message vizapi.DeleteSettingsForOrganisationResult
*/
export interface DeleteSettingsForOrganisationResult {
}
/**
* @generated from protobuf enum vizapi.SettingVisibility
*/
export enum SettingVisibility {
/**
* @generated from protobuf enum value: SETTING_VISIBILITY_UNKNOWN = 0;
*/
UNKNOWN = 0,
/**
* @generated from protobuf enum value: SETTING_VISIBILITY_PUBLIC = 1;
*/
PUBLIC = 1,
/**
* @generated from protobuf enum value: SETTING_VISIBILITY_PRIVATE = 2;
*/
PRIVATE = 2
}
// @generated message type with reflection information, may provide speed optimized methods
class OrganisationSetting$Type extends MessageType<OrganisationSetting> {
constructor() {
super("vizapi.OrganisationSetting", [
{ no: 1, name: "OrganisationID", kind: "scalar", jsonName: "OrganisationID", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "Value", kind: "scalar", jsonName: "Value", T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: "Visibility", kind: "enum", jsonName: "Visibility", T: () => ["vizapi.SettingVisibility", SettingVisibility, "SETTING_VISIBILITY_"] }
]);
}
create(value?: PartialMessage<OrganisationSetting>): OrganisationSetting {
const message = globalThis.Object.create((this.messagePrototype!));
message.organisationID = "";
message.key = "";
message.value = "";
message.visibility = 0;
if (value !== undefined)
reflectionMergePartial<OrganisationSetting>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OrganisationSetting): OrganisationSetting {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string OrganisationID = 1 [json_name = "OrganisationID"];*/ 1:
message.organisationID = reader.string();
break;
case /* string Key = 2 [json_name = "Key"];*/ 2:
message.key = reader.string();
break;
case /* string Value = 3 [json_name = "Value"];*/ 3:
message.value = reader.string();
break;
case /* vizapi.SettingVisibility Visibility = 4 [json_name = "Visibility"];*/ 4:
message.visibility = reader.int32();
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: OrganisationSetting, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string OrganisationID = 1 [json_name = "OrganisationID"]; */
if (message.organisationID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.organisationID);
/* string Key = 2 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(2, WireType.LengthDelimited).string(message.key);
/* string Value = 3 [json_name = "Value"]; */
if (message.value !== "")
writer.tag(3, WireType.LengthDelimited).string(message.value);
/* vizapi.SettingVisibility Visibility = 4 [json_name = "Visibility"]; */
if (message.visibility !== 0)
writer.tag(4, WireType.Varint).int32(message.visibility);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.OrganisationSetting
*/
export const OrganisationSetting = new OrganisationSetting$Type();
// @generated message type with reflection information, may provide speed optimized methods
class PutOrganisationSettingRequest$Type extends MessageType<PutOrganisationSettingRequest> {
constructor() {
super("vizapi.PutOrganisationSettingRequest", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestOrganisationHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Key: each key must be unique", example: "\"preferredTheme\"" }, "validate.rules": { string: { minLen: "1" } } } },
{ no: 3, name: "Value", kind: "scalar", jsonName: "Value", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"dark\"" }, "validate.rules": { string: { minLen: "1" } } } },
{ no: 4, name: "Visibility", kind: "enum", jsonName: "Visibility", T: () => ["vizapi.SettingVisibility", SettingVisibility, "SETTING_VISIBILITY_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Visibility: public or private. If private, only the organisation can see the setting. If public, all of the organisation and its projects users can see the setting.", example: "\"SETTING_VISIBILITY_PUBLIC\"" }, "validate.rules": { enum: { definedOnly: true } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key, Value pair to store", required: ["Key", "Value", "Visibility", "Header"] } } });
}
create(value?: PartialMessage<PutOrganisationSettingRequest>): PutOrganisationSettingRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
message.value = "";
message.visibility = 0;
if (value !== undefined)
reflectionMergePartial<PutOrganisationSettingRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutOrganisationSettingRequest): PutOrganisationSettingRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.RequestOrganisationHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = RequestOrganisationHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* string Key = 2 [json_name = "Key"];*/ 2:
message.key = reader.string();
break;
case /* string Value = 3 [json_name = "Value"];*/ 3:
message.value = reader.string();
break;
case /* vizapi.SettingVisibility Visibility = 4 [json_name = "Visibility"];*/ 4:
message.visibility = reader.int32();
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: PutOrganisationSettingRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.RequestOrganisationHeader Header = 1 [json_name = "Header"]; */
if (message.header)
RequestOrganisationHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string Key = 2 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(2, WireType.LengthDelimited).string(message.key);
/* string Value = 3 [json_name = "Value"]; */
if (message.value !== "")
writer.tag(3, WireType.LengthDelimited).string(message.value);
/* vizapi.SettingVisibility Visibility = 4 [json_name = "Visibility"]; */
if (message.visibility !== 0)
writer.tag(4, WireType.Varint).int32(message.visibility);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.PutOrganisationSettingRequest
*/
export const PutOrganisationSettingRequest = new PutOrganisationSettingRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class PutOrganisationSettingResult$Type extends MessageType<PutOrganisationSettingResult> {
constructor() {
super("vizapi.PutOrganisationSettingResult", [
{ no: 1, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"preferredTheme\"" } } },
{ no: 2, name: "Value", kind: "scalar", jsonName: "Value", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"dark\"" } } },
{ no: 3, name: "Visibility", kind: "enum", jsonName: "Visibility", T: () => ["vizapi.SettingVisibility", SettingVisibility, "SETTING_VISIBILITY_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Visibility: public or private. If private, only the organisation can see the setting. If public, all of the organisation and its projects users can see the setting.", example: "\"SETTING_VISIBILITY_PUBLIC\"" } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key, Value pair response" } } });
}
create(value?: PartialMessage<PutOrganisationSettingResult>): PutOrganisationSettingResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
message.value = "";
message.visibility = 0;
if (value !== undefined)
reflectionMergePartial<PutOrganisationSettingResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutOrganisationSettingResult): PutOrganisationSettingResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Key = 1 [json_name = "Key"];*/ 1:
message.key = reader.string();
break;
case /* string Value = 2 [json_name = "Value"];*/ 2:
message.value = reader.string();
break;
case /* vizapi.SettingVisibility Visibility = 3 [json_name = "Visibility"];*/ 3:
message.visibility = reader.int32();
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: PutOrganisationSettingResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Key = 1 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(1, WireType.LengthDelimited).string(message.key);
/* string Value = 2 [json_name = "Value"]; */
if (message.value !== "")
writer.tag(2, WireType.LengthDelimited).string(message.value);
/* vizapi.SettingVisibility Visibility = 3 [json_name = "Visibility"]; */
if (message.visibility !== 0)
writer.tag(3, WireType.Varint).int32(message.visibility);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.PutOrganisationSettingResult
*/
export const PutOrganisationSettingResult = new PutOrganisationSettingResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetOrganisationSettingRequest$Type extends MessageType<GetOrganisationSettingRequest> {
constructor() {
super("vizapi.GetOrganisationSettingRequest", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestOrganisationHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"preferredTheme\"" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key of the organisation's setting to get", required: ["Header", "Key"] } } });
}
create(value?: PartialMessage<GetOrganisationSettingRequest>): GetOrganisationSettingRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
if (value !== undefined)
reflectionMergePartial<GetOrganisationSettingRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetOrganisationSettingRequest): GetOrganisationSettingRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.RequestOrganisationHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = RequestOrganisationHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* string Key = 2 [json_name = "Key"];*/ 2:
message.key = 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: GetOrganisationSettingRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.RequestOrganisationHeader Header = 1 [json_name = "Header"]; */
if (message.header)
RequestOrganisationHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string Key = 2 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(2, WireType.LengthDelimited).string(message.key);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.GetOrganisationSettingRequest
*/
export const GetOrganisationSettingRequest = new GetOrganisationSettingRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetOrganisationSettingResult$Type extends MessageType<GetOrganisationSettingResult> {
constructor() {
super("vizapi.GetOrganisationSettingResult", [
{ no: 1, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"preferredTheme\"" }, "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "Value", kind: "scalar", jsonName: "Value", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"dark\"" }, "validate.rules": { string: { minLen: "1" } } } },
{ no: 3, name: "Visibility", kind: "enum", jsonName: "Visibility", T: () => ["vizapi.SettingVisibility", SettingVisibility, "SETTING_VISIBILITY_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Visibility: public or private. If private, only the organisation can see the setting. If public, all of the organisation and its projects users can see the setting.", example: "\"SETTING_VISIBILITY_PUBLIC\"" } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key, Value pair response" } } });
}
create(value?: PartialMessage<GetOrganisationSettingResult>): GetOrganisationSettingResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
message.value = "";
message.visibility = 0;
if (value !== undefined)
reflectionMergePartial<GetOrganisationSettingResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetOrganisationSettingResult): GetOrganisationSettingResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Key = 1 [json_name = "Key"];*/ 1:
message.key = reader.string();
break;
case /* string Value = 2 [json_name = "Value"];*/ 2:
message.value = reader.string();
break;
case /* vizapi.SettingVisibility Visibility = 3 [json_name = "Visibility"];*/ 3:
message.visibility = reader.int32();
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: GetOrganisationSettingResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Key = 1 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(1, WireType.LengthDelimited).string(message.key);
/* string Value = 2 [json_name = "Value"]; */
if (message.value !== "")
writer.tag(2, WireType.LengthDelimited).string(message.value);
/* vizapi.SettingVisibility Visibility = 3 [json_name = "Visibility"]; */
if (message.visibility !== 0)
writer.tag(3, WireType.Varint).int32(message.visibility);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.GetOrganisationSettingResult
*/
export const GetOrganisationSettingResult = new GetOrganisationSettingResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteOrganisationSettingRequest$Type extends MessageType<DeleteOrganisationSettingRequest> {
constructor() {
super("vizapi.DeleteOrganisationSettingRequest", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestOrganisationHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"preferredTheme\"" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key of the organisation's setting to delete", required: ["Header", "Key"] } } });
}
create(value?: PartialMessage<DeleteOrganisationSettingRequest>): DeleteOrganisationSettingRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
if (value !== undefined)
reflectionMergePartial<DeleteOrganisationSettingRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteOrganisationSettingRequest): DeleteOrganisationSettingRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.RequestOrganisationHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = RequestOrganisationHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* string Key = 2 [json_name = "Key"];*/ 2:
message.key = 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: DeleteOrganisationSettingRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.RequestOrganisationHeader Header = 1 [json_name = "Header"]; */
if (message.header)
RequestOrganisationHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string Key = 2 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(2, WireType.LengthDelimited).string(message.key);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.DeleteOrganisationSettingRequest
*/
export const DeleteOrganisationSettingRequest = new DeleteOrganisationSettingRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteOrganisationSettingResult$Type extends MessageType<DeleteOrganisationSettingResult> {
constructor() {
super("vizapi.DeleteOrganisationSettingResult", []);
}
create(value?: PartialMessage<DeleteOrganisationSettingResult>): DeleteOrganisationSettingResult {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<DeleteOrganisationSettingResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteOrganisationSettingResult): DeleteOrganisationSettingResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: DeleteOrganisationSettingResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.DeleteOrganisationSettingResult
*/
export const DeleteOrganisationSettingResult = new DeleteOrganisationSettingResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListOrganisationSettingsRequest$Type extends MessageType<ListOrganisationSettingsRequest> {
constructor() {
super("vizapi.ListOrganisationSettingsRequest", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestOrganisationHeader, options: { "validate.rules": { message: { required: true } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key of the organisation's setting to delete", required: ["Header"] } } });
}
create(value?: PartialMessage<ListOrganisationSettingsRequest>): ListOrganisationSettingsRequest {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ListOrganisationSettingsRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListOrganisationSettingsRequest): ListOrganisationSettingsRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.RequestOrganisationHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = RequestOrganisationHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
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: ListOrganisationSettingsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.RequestOrganisationHeader Header = 1 [json_name = "Header"]; */
if (message.header)
RequestOrganisationHeader.internalBinaryWrite(message.header, 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 vizapi.ListOrganisationSettingsRequest
*/
export const ListOrganisationSettingsRequest = new ListOrganisationSettingsRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListOrganisationSettingsResult$Type extends MessageType<ListOrganisationSettingsResult> {
constructor() {
super("vizapi.ListOrganisationSettingsResult", [
{ no: 1, name: "OrganisationSettings", kind: "message", jsonName: "OrganisationSettings", repeat: 1 /*RepeatType.PACKED*/, T: () => GetOrganisationSettingResult }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "List of the organisation's settings" } } });
}
create(value?: PartialMessage<ListOrganisationSettingsResult>): ListOrganisationSettingsResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.organisationSettings = [];
if (value !== undefined)
reflectionMergePartial<ListOrganisationSettingsResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListOrganisationSettingsResult): ListOrganisationSettingsResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated vizapi.GetOrganisationSettingResult OrganisationSettings = 1 [json_name = "OrganisationSettings"];*/ 1:
message.organisationSettings.push(GetOrganisationSettingResult.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: ListOrganisationSettingsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated vizapi.GetOrganisationSettingResult OrganisationSettings = 1 [json_name = "OrganisationSettings"]; */
for (let i = 0; i < message.organisationSettings.length; i++)
GetOrganisationSettingResult.internalBinaryWrite(message.organisationSettings[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 vizapi.ListOrganisationSettingsResult
*/
export const ListOrganisationSettingsResult = new ListOrganisationSettingsResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteSettingsForOrganisationRequest$Type extends MessageType<DeleteSettingsForOrganisationRequest> {
constructor() {
super("vizapi.DeleteSettingsForOrganisationRequest", [
{ no: 1, name: "OrganisationID", kind: "scalar", jsonName: "OrganisationID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Organisation to delete settings from", required: ["OrganisationID"] } } });
}
create(value?: PartialMessage<DeleteSettingsForOrganisationRequest>): DeleteSettingsForOrganisationRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.organisationID = "";
if (value !== undefined)
reflectionMergePartial<DeleteSettingsForOrganisationRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteSettingsForOrganisationRequest): DeleteSettingsForOrganisationRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string OrganisationID = 1 [json_name = "OrganisationID"];*/ 1:
message.organisationID = 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: DeleteSettingsForOrganisationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string OrganisationID = 1 [json_name = "OrganisationID"]; */
if (message.organisationID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.organisationID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.DeleteSettingsForOrganisationRequest
*/
export const DeleteSettingsForOrganisationRequest = new DeleteSettingsForOrganisationRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteSettingsForOrganisationResult$Type extends MessageType<DeleteSettingsForOrganisationResult> {
constructor() {
super("vizapi.DeleteSettingsForOrganisationResult", []);
}
create(value?: PartialMessage<DeleteSettingsForOrganisationResult>): DeleteSettingsForOrganisationResult {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<DeleteSettingsForOrganisationResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteSettingsForOrganisationResult): DeleteSettingsForOrganisationResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: DeleteSettingsForOrganisationResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.DeleteSettingsForOrganisationResult
*/
export const DeleteSettingsForOrganisationResult = new DeleteSettingsForOrganisationResult$Type();
/**
* @generated ServiceType for protobuf service vizapi.OrganisationSettingsService
*/
export const OrganisationSettingsService = new ServiceType("vizapi.OrganisationSettingsService", [
{ name: "Get", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Organisation Settings"], summary: "Get a organisation setting", description: "Use to get a organisation setting with his key" }, "api.rscType": "Organisation", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: GetOrganisationSettingRequest, O: GetOrganisationSettingResult },
{ name: "Put", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Organisation Settings"], summary: "Update or create a organisation setting", description: "Use to create or update organisation's settings" }, "api.rscType": "Organisation", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: PutOrganisationSettingRequest, O: PutOrganisationSettingResult },
{ name: "Delete", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Organisation Settings"], summary: "Delete a organisation setting", description: "Use to delete a organisation setting with his key" }, "api.rscType": "Organisation", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: DeleteOrganisationSettingRequest, O: DeleteOrganisationSettingResult },
{ name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Organisation Settings"], summary: "List a organisation's settings", description: "Use to list a organisation's settings" }, "api.rscType": "Organisation", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ListOrganisationSettingsRequest, O: ListOrganisationSettingsResult },
{ name: "DeleteSettingsForOrganisation", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Organisation Settings"], summary: "Delete all organisation settings", description: "Delete all settings for an organisation" }, "api.rscType": "Platform", "api.roles": "Platform.Organisation-Settings", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: DeleteSettingsForOrganisationRequest, O: DeleteSettingsForOrganisationResult }
], { "api.k8sService": "settings-server" });

View File

@@ -0,0 +1,102 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "viz-project-settings.proto" (package "vizapi", syntax proto3)
// tslint:disable
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
import { ProjectSettingsService } from "./viz-project-settings";
import type { DeleteSettingsForProjectResult } from "./viz-project-settings";
import type { DeleteSettingsForProjectRequest } from "./viz-project-settings";
import type { ListProjectOrganisationSettingsResult } from "./viz-project-settings";
import type { ListProjectOrganisationSettingsRequest } from "./viz-project-settings";
import type { ListProjectSettingsResult } from "./viz-project-settings";
import type { ListProjectSettingsRequest } from "./viz-project-settings";
import type { DeleteProjectSettingResult } from "./viz-project-settings";
import type { DeleteProjectSettingRequest } from "./viz-project-settings";
import type { PutProjectSettingResult } from "./viz-project-settings";
import type { PutProjectSettingRequest } from "./viz-project-settings";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
import type { GetProjectSettingResult } from "./viz-project-settings";
import type { GetProjectSettingRequest } from "./viz-project-settings";
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
/**
* @generated from protobuf service vizapi.ProjectSettingsService
*/
export interface IProjectSettingsServiceClient {
/**
* @generated from protobuf rpc: Get(vizapi.GetProjectSettingRequest) returns (vizapi.GetProjectSettingResult);
*/
get(input: GetProjectSettingRequest, options?: RpcOptions): UnaryCall<GetProjectSettingRequest, GetProjectSettingResult>;
/**
* @generated from protobuf rpc: Put(vizapi.PutProjectSettingRequest) returns (vizapi.PutProjectSettingResult);
*/
put(input: PutProjectSettingRequest, options?: RpcOptions): UnaryCall<PutProjectSettingRequest, PutProjectSettingResult>;
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteProjectSettingRequest) returns (vizapi.DeleteProjectSettingResult);
*/
delete(input: DeleteProjectSettingRequest, options?: RpcOptions): UnaryCall<DeleteProjectSettingRequest, DeleteProjectSettingResult>;
/**
* @generated from protobuf rpc: List(vizapi.ListProjectSettingsRequest) returns (vizapi.ListProjectSettingsResult);
*/
list(input: ListProjectSettingsRequest, options?: RpcOptions): UnaryCall<ListProjectSettingsRequest, ListProjectSettingsResult>;
/**
* @generated from protobuf rpc: ListOrganisationSettings(vizapi.ListProjectOrganisationSettingsRequest) returns (vizapi.ListProjectOrganisationSettingsResult);
*/
listOrganisationSettings(input: ListProjectOrganisationSettingsRequest, options?: RpcOptions): UnaryCall<ListProjectOrganisationSettingsRequest, ListProjectOrganisationSettingsResult>;
/**
* @generated from protobuf rpc: DeleteSettingsForProject(vizapi.DeleteSettingsForProjectRequest) returns (vizapi.DeleteSettingsForProjectResult);
*/
deleteSettingsForProject(input: DeleteSettingsForProjectRequest, options?: RpcOptions): UnaryCall<DeleteSettingsForProjectRequest, DeleteSettingsForProjectResult>;
}
/**
* @generated from protobuf service vizapi.ProjectSettingsService
*/
export class ProjectSettingsServiceClient implements IProjectSettingsServiceClient, ServiceInfo {
typeName = ProjectSettingsService.typeName;
methods = ProjectSettingsService.methods;
options = ProjectSettingsService.options;
constructor(private readonly _transport: RpcTransport) {
}
/**
* @generated from protobuf rpc: Get(vizapi.GetProjectSettingRequest) returns (vizapi.GetProjectSettingResult);
*/
get(input: GetProjectSettingRequest, options?: RpcOptions): UnaryCall<GetProjectSettingRequest, GetProjectSettingResult> {
const method = this.methods[0], opt = this._transport.mergeOptions(options);
return stackIntercept<GetProjectSettingRequest, GetProjectSettingResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Put(vizapi.PutProjectSettingRequest) returns (vizapi.PutProjectSettingResult);
*/
put(input: PutProjectSettingRequest, options?: RpcOptions): UnaryCall<PutProjectSettingRequest, PutProjectSettingResult> {
const method = this.methods[1], opt = this._transport.mergeOptions(options);
return stackIntercept<PutProjectSettingRequest, PutProjectSettingResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteProjectSettingRequest) returns (vizapi.DeleteProjectSettingResult);
*/
delete(input: DeleteProjectSettingRequest, options?: RpcOptions): UnaryCall<DeleteProjectSettingRequest, DeleteProjectSettingResult> {
const method = this.methods[2], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteProjectSettingRequest, DeleteProjectSettingResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: List(vizapi.ListProjectSettingsRequest) returns (vizapi.ListProjectSettingsResult);
*/
list(input: ListProjectSettingsRequest, options?: RpcOptions): UnaryCall<ListProjectSettingsRequest, ListProjectSettingsResult> {
const method = this.methods[3], opt = this._transport.mergeOptions(options);
return stackIntercept<ListProjectSettingsRequest, ListProjectSettingsResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: ListOrganisationSettings(vizapi.ListProjectOrganisationSettingsRequest) returns (vizapi.ListProjectOrganisationSettingsResult);
*/
listOrganisationSettings(input: ListProjectOrganisationSettingsRequest, options?: RpcOptions): UnaryCall<ListProjectOrganisationSettingsRequest, ListProjectOrganisationSettingsResult> {
const method = this.methods[4], opt = this._transport.mergeOptions(options);
return stackIntercept<ListProjectOrganisationSettingsRequest, ListProjectOrganisationSettingsResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: DeleteSettingsForProject(vizapi.DeleteSettingsForProjectRequest) returns (vizapi.DeleteSettingsForProjectResult);
*/
deleteSettingsForProject(input: DeleteSettingsForProjectRequest, options?: RpcOptions): UnaryCall<DeleteSettingsForProjectRequest, DeleteSettingsForProjectResult> {
const method = this.methods[5], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteSettingsForProjectRequest, DeleteSettingsForProjectResult>("unary", this._transport, method, opt, input);
}
}

833
viz-project-settings.ts Normal file
View File

@@ -0,0 +1,833 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "viz-project-settings.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";
import { GetOrganisationSettingResult } from "./viz-organisation-settings";
import { RequestProjectHeader } from "./core/shared";
/**
* @generated from protobuf message vizapi.ProjectSetting
*/
export interface ProjectSetting {
/**
* @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
*/
projectID: string;
/**
* @generated from protobuf field: string Key = 2 [json_name = "Key"];
*/
key: string;
/**
* @generated from protobuf field: string Value = 3 [json_name = "Value"];
*/
value: string;
}
/**
* Key, Value pair to store
*
* @generated from protobuf message vizapi.PutProjectSettingRequest
*/
export interface PutProjectSettingRequest {
/**
* @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
*/
header?: RequestProjectHeader;
/**
* @generated from protobuf field: string Key = 2 [json_name = "Key"];
*/
key: string;
/**
* @generated from protobuf field: string Value = 3 [json_name = "Value"];
*/
value: string;
}
/**
* Key, Value pair response
*
* @generated from protobuf message vizapi.PutProjectSettingResult
*/
export interface PutProjectSettingResult {
/**
* @generated from protobuf field: string Key = 1 [json_name = "Key"];
*/
key: string;
/**
* @generated from protobuf field: string Value = 2 [json_name = "Value"];
*/
value: string;
}
/**
* Key of the project's setting to get
*
* @generated from protobuf message vizapi.GetProjectSettingRequest
*/
export interface GetProjectSettingRequest {
/**
* @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
*/
header?: RequestProjectHeader;
/**
* @generated from protobuf field: string Key = 2 [json_name = "Key"];
*/
key: string;
}
/**
* Key, Value pair response
*
* @generated from protobuf message vizapi.GetProjectSettingResult
*/
export interface GetProjectSettingResult {
/**
* @generated from protobuf field: string Key = 1 [json_name = "Key"];
*/
key: string;
/**
* @generated from protobuf field: string Value = 2 [json_name = "Value"];
*/
value: string;
}
/**
* Key of the project's setting to delete
*
* @generated from protobuf message vizapi.DeleteProjectSettingRequest
*/
export interface DeleteProjectSettingRequest {
/**
* @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
*/
header?: RequestProjectHeader;
/**
* @generated from protobuf field: string Key = 2 [json_name = "Key"];
*/
key: string;
}
/**
* @generated from protobuf message vizapi.DeleteProjectSettingResult
*/
export interface DeleteProjectSettingResult {
}
/**
* @generated from protobuf message vizapi.ListProjectSettingsRequest
*/
export interface ListProjectSettingsRequest {
/**
* @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
*/
header?: RequestProjectHeader;
}
/**
* List of the project's settings
*
* @generated from protobuf message vizapi.ListProjectSettingsResult
*/
export interface ListProjectSettingsResult {
/**
* @generated from protobuf field: repeated vizapi.GetProjectSettingResult ProjectSettings = 1 [json_name = "ProjectSettings"];
*/
projectSettings: GetProjectSettingResult[];
}
/**
* @generated from protobuf message vizapi.ListProjectOrganisationSettingsRequest
*/
export interface ListProjectOrganisationSettingsRequest {
/**
* @generated from protobuf field: api.RequestProjectHeader Header = 1 [json_name = "Header"];
*/
header?: RequestProjectHeader;
}
/**
* List of the project's settings
*
* @generated from protobuf message vizapi.ListProjectOrganisationSettingsResult
*/
export interface ListProjectOrganisationSettingsResult {
/**
* @generated from protobuf field: repeated vizapi.GetOrganisationSettingResult OrganisationSettings = 1 [json_name = "OrganisationSettings"];
*/
organisationSettings: GetOrganisationSettingResult[];
}
/**
* @generated from protobuf message vizapi.DeleteSettingsForProjectRequest
*/
export interface DeleteSettingsForProjectRequest {
/**
* @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
*/
projectID: string;
}
/**
* @generated from protobuf message vizapi.DeleteSettingsForProjectResult
*/
export interface DeleteSettingsForProjectResult {
}
// @generated message type with reflection information, may provide speed optimized methods
class ProjectSetting$Type extends MessageType<ProjectSetting> {
constructor() {
super("vizapi.ProjectSetting", [
{ no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "Value", kind: "scalar", jsonName: "Value", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<ProjectSetting>): ProjectSetting {
const message = globalThis.Object.create((this.messagePrototype!));
message.projectID = "";
message.key = "";
message.value = "";
if (value !== undefined)
reflectionMergePartial<ProjectSetting>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ProjectSetting): ProjectSetting {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ProjectID = 1 [json_name = "ProjectID"];*/ 1:
message.projectID = reader.string();
break;
case /* string Key = 2 [json_name = "Key"];*/ 2:
message.key = reader.string();
break;
case /* string Value = 3 [json_name = "Value"];*/ 3:
message.value = 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: ProjectSetting, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ProjectID = 1 [json_name = "ProjectID"]; */
if (message.projectID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.projectID);
/* string Key = 2 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(2, WireType.LengthDelimited).string(message.key);
/* string Value = 3 [json_name = "Value"]; */
if (message.value !== "")
writer.tag(3, WireType.LengthDelimited).string(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.ProjectSetting
*/
export const ProjectSetting = new ProjectSetting$Type();
// @generated message type with reflection information, may provide speed optimized methods
class PutProjectSettingRequest$Type extends MessageType<PutProjectSettingRequest> {
constructor() {
super("vizapi.PutProjectSettingRequest", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Key: each key must be unique", example: "\"preferredTheme\"" }, "validate.rules": { string: { minLen: "1" } } } },
{ no: 3, name: "Value", kind: "scalar", jsonName: "Value", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"dark \"" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key, Value pair to store", required: ["Key", "Value", "Header"] } } });
}
create(value?: PartialMessage<PutProjectSettingRequest>): PutProjectSettingRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
message.value = "";
if (value !== undefined)
reflectionMergePartial<PutProjectSettingRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutProjectSettingRequest): PutProjectSettingRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* string Key = 2 [json_name = "Key"];*/ 2:
message.key = reader.string();
break;
case /* string Value = 3 [json_name = "Value"];*/ 3:
message.value = 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: PutProjectSettingRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
if (message.header)
RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string Key = 2 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(2, WireType.LengthDelimited).string(message.key);
/* string Value = 3 [json_name = "Value"]; */
if (message.value !== "")
writer.tag(3, WireType.LengthDelimited).string(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.PutProjectSettingRequest
*/
export const PutProjectSettingRequest = new PutProjectSettingRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class PutProjectSettingResult$Type extends MessageType<PutProjectSettingResult> {
constructor() {
super("vizapi.PutProjectSettingResult", [
{ no: 1, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"preferredTheme\"" }, "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "Value", kind: "scalar", jsonName: "Value", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"dark\"" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key, Value pair response" } } });
}
create(value?: PartialMessage<PutProjectSettingResult>): PutProjectSettingResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
message.value = "";
if (value !== undefined)
reflectionMergePartial<PutProjectSettingResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutProjectSettingResult): PutProjectSettingResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Key = 1 [json_name = "Key"];*/ 1:
message.key = reader.string();
break;
case /* string Value = 2 [json_name = "Value"];*/ 2:
message.value = 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: PutProjectSettingResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Key = 1 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(1, WireType.LengthDelimited).string(message.key);
/* string Value = 2 [json_name = "Value"]; */
if (message.value !== "")
writer.tag(2, WireType.LengthDelimited).string(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.PutProjectSettingResult
*/
export const PutProjectSettingResult = new PutProjectSettingResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetProjectSettingRequest$Type extends MessageType<GetProjectSettingRequest> {
constructor() {
super("vizapi.GetProjectSettingRequest", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"preferredTheme\"" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key of the project's setting to get", required: ["Header", "Key"] } } });
}
create(value?: PartialMessage<GetProjectSettingRequest>): GetProjectSettingRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
if (value !== undefined)
reflectionMergePartial<GetProjectSettingRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetProjectSettingRequest): GetProjectSettingRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* string Key = 2 [json_name = "Key"];*/ 2:
message.key = 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: GetProjectSettingRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
if (message.header)
RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string Key = 2 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(2, WireType.LengthDelimited).string(message.key);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.GetProjectSettingRequest
*/
export const GetProjectSettingRequest = new GetProjectSettingRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetProjectSettingResult$Type extends MessageType<GetProjectSettingResult> {
constructor() {
super("vizapi.GetProjectSettingResult", [
{ no: 1, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"preferredTheme\"" }, "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "Value", kind: "scalar", jsonName: "Value", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"dark\"" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key, Value pair response" } } });
}
create(value?: PartialMessage<GetProjectSettingResult>): GetProjectSettingResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
message.value = "";
if (value !== undefined)
reflectionMergePartial<GetProjectSettingResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetProjectSettingResult): GetProjectSettingResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Key = 1 [json_name = "Key"];*/ 1:
message.key = reader.string();
break;
case /* string Value = 2 [json_name = "Value"];*/ 2:
message.value = 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: GetProjectSettingResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Key = 1 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(1, WireType.LengthDelimited).string(message.key);
/* string Value = 2 [json_name = "Value"]; */
if (message.value !== "")
writer.tag(2, WireType.LengthDelimited).string(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.GetProjectSettingResult
*/
export const GetProjectSettingResult = new GetProjectSettingResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteProjectSettingRequest$Type extends MessageType<DeleteProjectSettingRequest> {
constructor() {
super("vizapi.DeleteProjectSettingRequest", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
{ no: 2, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"preferredTheme\"" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key of the project's setting to delete", required: ["Header", "Key"] } } });
}
create(value?: PartialMessage<DeleteProjectSettingRequest>): DeleteProjectSettingRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
if (value !== undefined)
reflectionMergePartial<DeleteProjectSettingRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteProjectSettingRequest): DeleteProjectSettingRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
break;
case /* string Key = 2 [json_name = "Key"];*/ 2:
message.key = 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: DeleteProjectSettingRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
if (message.header)
RequestProjectHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string Key = 2 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(2, WireType.LengthDelimited).string(message.key);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.DeleteProjectSettingRequest
*/
export const DeleteProjectSettingRequest = new DeleteProjectSettingRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteProjectSettingResult$Type extends MessageType<DeleteProjectSettingResult> {
constructor() {
super("vizapi.DeleteProjectSettingResult", []);
}
create(value?: PartialMessage<DeleteProjectSettingResult>): DeleteProjectSettingResult {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<DeleteProjectSettingResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteProjectSettingResult): DeleteProjectSettingResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: DeleteProjectSettingResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.DeleteProjectSettingResult
*/
export const DeleteProjectSettingResult = new DeleteProjectSettingResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListProjectSettingsRequest$Type extends MessageType<ListProjectSettingsRequest> {
constructor() {
super("vizapi.ListProjectSettingsRequest", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Project's settings to list", required: ["Header"] } } });
}
create(value?: PartialMessage<ListProjectSettingsRequest>): ListProjectSettingsRequest {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ListProjectSettingsRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListProjectSettingsRequest): ListProjectSettingsRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
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: ListProjectSettingsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
if (message.header)
RequestProjectHeader.internalBinaryWrite(message.header, 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 vizapi.ListProjectSettingsRequest
*/
export const ListProjectSettingsRequest = new ListProjectSettingsRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListProjectSettingsResult$Type extends MessageType<ListProjectSettingsResult> {
constructor() {
super("vizapi.ListProjectSettingsResult", [
{ no: 1, name: "ProjectSettings", kind: "message", jsonName: "ProjectSettings", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProjectSettingResult }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "List of the project's settings" } } });
}
create(value?: PartialMessage<ListProjectSettingsResult>): ListProjectSettingsResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.projectSettings = [];
if (value !== undefined)
reflectionMergePartial<ListProjectSettingsResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListProjectSettingsResult): ListProjectSettingsResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated vizapi.GetProjectSettingResult ProjectSettings = 1 [json_name = "ProjectSettings"];*/ 1:
message.projectSettings.push(GetProjectSettingResult.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: ListProjectSettingsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated vizapi.GetProjectSettingResult ProjectSettings = 1 [json_name = "ProjectSettings"]; */
for (let i = 0; i < message.projectSettings.length; i++)
GetProjectSettingResult.internalBinaryWrite(message.projectSettings[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 vizapi.ListProjectSettingsResult
*/
export const ListProjectSettingsResult = new ListProjectSettingsResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListProjectOrganisationSettingsRequest$Type extends MessageType<ListProjectOrganisationSettingsRequest> {
constructor() {
super("vizapi.ListProjectOrganisationSettingsRequest", [
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Project's organisation public settings to list", required: ["Header"] } } });
}
create(value?: PartialMessage<ListProjectOrganisationSettingsRequest>): ListProjectOrganisationSettingsRequest {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ListProjectOrganisationSettingsRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListProjectOrganisationSettingsRequest): ListProjectOrganisationSettingsRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.RequestProjectHeader Header = 1 [json_name = "Header"];*/ 1:
message.header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
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: ListProjectOrganisationSettingsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.RequestProjectHeader Header = 1 [json_name = "Header"]; */
if (message.header)
RequestProjectHeader.internalBinaryWrite(message.header, 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 vizapi.ListProjectOrganisationSettingsRequest
*/
export const ListProjectOrganisationSettingsRequest = new ListProjectOrganisationSettingsRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListProjectOrganisationSettingsResult$Type extends MessageType<ListProjectOrganisationSettingsResult> {
constructor() {
super("vizapi.ListProjectOrganisationSettingsResult", [
{ no: 1, name: "OrganisationSettings", kind: "message", jsonName: "OrganisationSettings", repeat: 1 /*RepeatType.PACKED*/, T: () => GetOrganisationSettingResult }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "List of the project's organisation public settings" } } });
}
create(value?: PartialMessage<ListProjectOrganisationSettingsResult>): ListProjectOrganisationSettingsResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.organisationSettings = [];
if (value !== undefined)
reflectionMergePartial<ListProjectOrganisationSettingsResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListProjectOrganisationSettingsResult): ListProjectOrganisationSettingsResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated vizapi.GetOrganisationSettingResult OrganisationSettings = 1 [json_name = "OrganisationSettings"];*/ 1:
message.organisationSettings.push(GetOrganisationSettingResult.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: ListProjectOrganisationSettingsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated vizapi.GetOrganisationSettingResult OrganisationSettings = 1 [json_name = "OrganisationSettings"]; */
for (let i = 0; i < message.organisationSettings.length; i++)
GetOrganisationSettingResult.internalBinaryWrite(message.organisationSettings[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 vizapi.ListProjectOrganisationSettingsResult
*/
export const ListProjectOrganisationSettingsResult = new ListProjectOrganisationSettingsResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteSettingsForProjectRequest$Type extends MessageType<DeleteSettingsForProjectRequest> {
constructor() {
super("vizapi.DeleteSettingsForProjectRequest", [
{ no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Project to delete settings from", required: ["ProjectID"] } } });
}
create(value?: PartialMessage<DeleteSettingsForProjectRequest>): DeleteSettingsForProjectRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.projectID = "";
if (value !== undefined)
reflectionMergePartial<DeleteSettingsForProjectRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteSettingsForProjectRequest): DeleteSettingsForProjectRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ProjectID = 1 [json_name = "ProjectID"];*/ 1:
message.projectID = 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: DeleteSettingsForProjectRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ProjectID = 1 [json_name = "ProjectID"]; */
if (message.projectID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.projectID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.DeleteSettingsForProjectRequest
*/
export const DeleteSettingsForProjectRequest = new DeleteSettingsForProjectRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteSettingsForProjectResult$Type extends MessageType<DeleteSettingsForProjectResult> {
constructor() {
super("vizapi.DeleteSettingsForProjectResult", []);
}
create(value?: PartialMessage<DeleteSettingsForProjectResult>): DeleteSettingsForProjectResult {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<DeleteSettingsForProjectResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteSettingsForProjectResult): DeleteSettingsForProjectResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: DeleteSettingsForProjectResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.DeleteSettingsForProjectResult
*/
export const DeleteSettingsForProjectResult = new DeleteSettingsForProjectResult$Type();
/**
* @generated ServiceType for protobuf service vizapi.ProjectSettingsService
*/
export const ProjectSettingsService = new ServiceType("vizapi.ProjectSettingsService", [
{ name: "Get", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project Settings"], summary: "Get a project setting", description: "Use to get a project setting with his key" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: GetProjectSettingRequest, O: GetProjectSettingResult },
{ name: "Put", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project Settings"], summary: "Update or create a project setting", description: "Use to create or update project's settings" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: PutProjectSettingRequest, O: PutProjectSettingResult },
{ name: "Delete", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project Settings"], summary: "Delete a project setting", description: "Use to delete a project setting with his key" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: DeleteProjectSettingRequest, O: DeleteProjectSettingResult },
{ name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project Settings"], summary: "List a project's settings.", description: "Use to list a project's settings" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ListProjectSettingsRequest, O: ListProjectSettingsResult },
{ name: "ListOrganisationSettings", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project Settings"], summary: "List a project's organisation settings.", description: "Use to list a project's organisation public settings" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ListProjectOrganisationSettingsRequest, O: ListProjectOrganisationSettingsResult },
{ name: "DeleteSettingsForProject", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project Settings"], summary: "Delete all project settings", description: "Delete all settings for a project" }, "api.rscType": "Platform", "api.roles": "Platform.Project-Settings", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: DeleteSettingsForProjectRequest, O: DeleteSettingsForProjectResult }
], { "api.k8sService": "settings-server" });

37
viz-tab.client.ts Normal file
View File

@@ -0,0 +1,37 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "viz-tab.proto" (package "vizapi", syntax proto3)
// tslint:disable
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
import { TabService } from "./viz-tab";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
import type { ListTabResult } from "./viz-tab";
import type { ListTabRequest } from "./viz-tab";
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
/**
* @generated from protobuf service vizapi.TabService
*/
export interface ITabServiceClient {
/**
* @generated from protobuf rpc: List(vizapi.ListTabRequest) returns (vizapi.ListTabResult);
*/
list(input: ListTabRequest, options?: RpcOptions): UnaryCall<ListTabRequest, ListTabResult>;
}
/**
* @generated from protobuf service vizapi.TabService
*/
export class TabServiceClient implements ITabServiceClient, ServiceInfo {
typeName = TabService.typeName;
methods = TabService.methods;
options = TabService.options;
constructor(private readonly _transport: RpcTransport) {
}
/**
* @generated from protobuf rpc: List(vizapi.ListTabRequest) returns (vizapi.ListTabResult);
*/
list(input: ListTabRequest, options?: RpcOptions): UnaryCall<ListTabRequest, ListTabResult> {
const method = this.methods[0], opt = this._transport.mergeOptions(options);
return stackIntercept<ListTabRequest, ListTabResult>("unary", this._transport, method, opt, input);
}
}

135
viz-tab.ts Normal file
View File

@@ -0,0 +1,135 @@
// @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" });

110
viz-translations.client.ts Normal file
View File

@@ -0,0 +1,110 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "viz-translations.proto" (package "vizapi", syntax proto3)
// tslint:disable
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
import { TranslationsService } from "./viz-translations";
import type { GetLanguagesResult } from "./viz-translations";
import type { GetLanguagesRequest } from "./viz-translations";
import type { DeleteAllTranslationsResult } from "./viz-translations";
import type { DeleteAllTranslationsRequest } from "./viz-translations";
import type { ListTranslationsResult } from "./viz-translations";
import type { ListTranslationsRequest } from "./viz-translations";
import type { DeleteTranslationsResult } from "./viz-translations";
import type { DeleteTranslationsRequest } from "./viz-translations";
import type { PutTranslationsResult } from "./viz-translations";
import type { PutTranslationsRequest } from "./viz-translations";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
import type { GetTranslationsResult } from "./viz-translations";
import type { GetTranslationsRequest } from "./viz-translations";
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
// ===================================
// ============= Service =============
// ===================================
/**
* @generated from protobuf service vizapi.TranslationsService
*/
export interface ITranslationsServiceClient {
/**
* @generated from protobuf rpc: Get(vizapi.GetTranslationsRequest) returns (vizapi.GetTranslationsResult);
*/
get(input: GetTranslationsRequest, options?: RpcOptions): UnaryCall<GetTranslationsRequest, GetTranslationsResult>;
/**
* @generated from protobuf rpc: Put(vizapi.PutTranslationsRequest) returns (vizapi.PutTranslationsResult);
*/
put(input: PutTranslationsRequest, options?: RpcOptions): UnaryCall<PutTranslationsRequest, PutTranslationsResult>;
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteTranslationsRequest) returns (vizapi.DeleteTranslationsResult);
*/
delete(input: DeleteTranslationsRequest, options?: RpcOptions): UnaryCall<DeleteTranslationsRequest, DeleteTranslationsResult>;
/**
* @generated from protobuf rpc: List(vizapi.ListTranslationsRequest) returns (vizapi.ListTranslationsResult);
*/
list(input: ListTranslationsRequest, options?: RpcOptions): UnaryCall<ListTranslationsRequest, ListTranslationsResult>;
/**
* @generated from protobuf rpc: DeleteAll(vizapi.DeleteAllTranslationsRequest) returns (vizapi.DeleteAllTranslationsResult);
*/
deleteAll(input: DeleteAllTranslationsRequest, options?: RpcOptions): UnaryCall<DeleteAllTranslationsRequest, DeleteAllTranslationsResult>;
/**
* @generated from protobuf rpc: GetLanguages(vizapi.GetLanguagesRequest) returns (vizapi.GetLanguagesResult);
*/
getLanguages(input: GetLanguagesRequest, options?: RpcOptions): UnaryCall<GetLanguagesRequest, GetLanguagesResult>;
}
// ===================================
// ============= Service =============
// ===================================
/**
* @generated from protobuf service vizapi.TranslationsService
*/
export class TranslationsServiceClient implements ITranslationsServiceClient, ServiceInfo {
typeName = TranslationsService.typeName;
methods = TranslationsService.methods;
options = TranslationsService.options;
constructor(private readonly _transport: RpcTransport) {
}
/**
* @generated from protobuf rpc: Get(vizapi.GetTranslationsRequest) returns (vizapi.GetTranslationsResult);
*/
get(input: GetTranslationsRequest, options?: RpcOptions): UnaryCall<GetTranslationsRequest, GetTranslationsResult> {
const method = this.methods[0], opt = this._transport.mergeOptions(options);
return stackIntercept<GetTranslationsRequest, GetTranslationsResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Put(vizapi.PutTranslationsRequest) returns (vizapi.PutTranslationsResult);
*/
put(input: PutTranslationsRequest, options?: RpcOptions): UnaryCall<PutTranslationsRequest, PutTranslationsResult> {
const method = this.methods[1], opt = this._transport.mergeOptions(options);
return stackIntercept<PutTranslationsRequest, PutTranslationsResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteTranslationsRequest) returns (vizapi.DeleteTranslationsResult);
*/
delete(input: DeleteTranslationsRequest, options?: RpcOptions): UnaryCall<DeleteTranslationsRequest, DeleteTranslationsResult> {
const method = this.methods[2], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteTranslationsRequest, DeleteTranslationsResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: List(vizapi.ListTranslationsRequest) returns (vizapi.ListTranslationsResult);
*/
list(input: ListTranslationsRequest, options?: RpcOptions): UnaryCall<ListTranslationsRequest, ListTranslationsResult> {
const method = this.methods[3], opt = this._transport.mergeOptions(options);
return stackIntercept<ListTranslationsRequest, ListTranslationsResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: DeleteAll(vizapi.DeleteAllTranslationsRequest) returns (vizapi.DeleteAllTranslationsResult);
*/
deleteAll(input: DeleteAllTranslationsRequest, options?: RpcOptions): UnaryCall<DeleteAllTranslationsRequest, DeleteAllTranslationsResult> {
const method = this.methods[4], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteAllTranslationsRequest, DeleteAllTranslationsResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: GetLanguages(vizapi.GetLanguagesRequest) returns (vizapi.GetLanguagesResult);
*/
getLanguages(input: GetLanguagesRequest, options?: RpcOptions): UnaryCall<GetLanguagesRequest, GetLanguagesResult> {
const method = this.methods[5], opt = this._transport.mergeOptions(options);
return stackIntercept<GetLanguagesRequest, GetLanguagesResult>("unary", this._transport, method, opt, input);
}
}

1193
viz-translations.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,76 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "viz-user-settings.proto" (package "vizapi", syntax proto3)
// tslint:disable
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
import { UserSettingsService } from "./viz-user-settings";
import type { ListUserSettingsResult } from "./viz-user-settings";
import type { ListUserSettingsRequest } from "./viz-user-settings";
import type { DeleteUserSettingResult } from "./viz-user-settings";
import type { DeleteUserSettingRequest } from "./viz-user-settings";
import type { PutUserSettingResult } from "./viz-user-settings";
import type { PutUserSettingRequest } from "./viz-user-settings";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
import type { GetUserSettingResult } from "./viz-user-settings";
import type { GetUserSettingRequest } from "./viz-user-settings";
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
/**
* @generated from protobuf service vizapi.UserSettingsService
*/
export interface IUserSettingsServiceClient {
/**
* @generated from protobuf rpc: Get(vizapi.GetUserSettingRequest) returns (vizapi.GetUserSettingResult);
*/
get(input: GetUserSettingRequest, options?: RpcOptions): UnaryCall<GetUserSettingRequest, GetUserSettingResult>;
/**
* @generated from protobuf rpc: Put(vizapi.PutUserSettingRequest) returns (vizapi.PutUserSettingResult);
*/
put(input: PutUserSettingRequest, options?: RpcOptions): UnaryCall<PutUserSettingRequest, PutUserSettingResult>;
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteUserSettingRequest) returns (vizapi.DeleteUserSettingResult);
*/
delete(input: DeleteUserSettingRequest, options?: RpcOptions): UnaryCall<DeleteUserSettingRequest, DeleteUserSettingResult>;
/**
* @generated from protobuf rpc: List(vizapi.ListUserSettingsRequest) returns (vizapi.ListUserSettingsResult);
*/
list(input: ListUserSettingsRequest, options?: RpcOptions): UnaryCall<ListUserSettingsRequest, ListUserSettingsResult>;
}
/**
* @generated from protobuf service vizapi.UserSettingsService
*/
export class UserSettingsServiceClient implements IUserSettingsServiceClient, ServiceInfo {
typeName = UserSettingsService.typeName;
methods = UserSettingsService.methods;
options = UserSettingsService.options;
constructor(private readonly _transport: RpcTransport) {
}
/**
* @generated from protobuf rpc: Get(vizapi.GetUserSettingRequest) returns (vizapi.GetUserSettingResult);
*/
get(input: GetUserSettingRequest, options?: RpcOptions): UnaryCall<GetUserSettingRequest, GetUserSettingResult> {
const method = this.methods[0], opt = this._transport.mergeOptions(options);
return stackIntercept<GetUserSettingRequest, GetUserSettingResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Put(vizapi.PutUserSettingRequest) returns (vizapi.PutUserSettingResult);
*/
put(input: PutUserSettingRequest, options?: RpcOptions): UnaryCall<PutUserSettingRequest, PutUserSettingResult> {
const method = this.methods[1], opt = this._transport.mergeOptions(options);
return stackIntercept<PutUserSettingRequest, PutUserSettingResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteUserSettingRequest) returns (vizapi.DeleteUserSettingResult);
*/
delete(input: DeleteUserSettingRequest, options?: RpcOptions): UnaryCall<DeleteUserSettingRequest, DeleteUserSettingResult> {
const method = this.methods[2], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteUserSettingRequest, DeleteUserSettingResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: List(vizapi.ListUserSettingsRequest) returns (vizapi.ListUserSettingsResult);
*/
list(input: ListUserSettingsRequest, options?: RpcOptions): UnaryCall<ListUserSettingsRequest, ListUserSettingsResult> {
const method = this.methods[3], opt = this._transport.mergeOptions(options);
return stackIntercept<ListUserSettingsRequest, ListUserSettingsResult>("unary", this._transport, method, opt, input);
}
}

574
viz-user-settings.ts Normal file
View File

@@ -0,0 +1,574 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "viz-user-settings.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.UserSetting
*/
export interface UserSetting {
/**
* @generated from protobuf field: string UserID = 1 [json_name = "UserID"];
*/
userID: string;
/**
* @generated from protobuf field: string Key = 2 [json_name = "Key"];
*/
key: string;
/**
* @generated from protobuf field: string Value = 3 [json_name = "Value"];
*/
value: string;
}
/**
* Key, Value pair to store
*
* @generated from protobuf message vizapi.PutUserSettingRequest
*/
export interface PutUserSettingRequest {
/**
* Key: each key must be unique
*
* @generated from protobuf field: string Key = 1 [json_name = "Key"];
*/
key: string;
/**
* @generated from protobuf field: string Value = 2 [json_name = "Value"];
*/
value: string;
}
/**
* Key, Value pair response
*
* @generated from protobuf message vizapi.PutUserSettingResult
*/
export interface PutUserSettingResult {
/**
* @generated from protobuf field: string Key = 1 [json_name = "Key"];
*/
key: string;
/**
* @generated from protobuf field: string Value = 2 [json_name = "Value"];
*/
value: string;
}
/**
* Key of the user's setting to get
*
* @generated from protobuf message vizapi.GetUserSettingRequest
*/
export interface GetUserSettingRequest {
/**
* @generated from protobuf field: string Key = 2 [json_name = "Key"];
*/
key: string;
}
/**
* Key, Value pair response
*
* @generated from protobuf message vizapi.GetUserSettingResult
*/
export interface GetUserSettingResult {
/**
* @generated from protobuf field: string Key = 1 [json_name = "Key"];
*/
key: string;
/**
* @generated from protobuf field: string Value = 2 [json_name = "Value"];
*/
value: string;
}
/**
* Key of the user's setting to delete
*
* @generated from protobuf message vizapi.DeleteUserSettingRequest
*/
export interface DeleteUserSettingRequest {
/**
* @generated from protobuf field: string Key = 2 [json_name = "Key"];
*/
key: string;
}
/**
* @generated from protobuf message vizapi.DeleteUserSettingResult
*/
export interface DeleteUserSettingResult {
}
/**
* @generated from protobuf message vizapi.ListUserSettingsRequest
*/
export interface ListUserSettingsRequest {
}
/**
* List of the user's settings
*
* @generated from protobuf message vizapi.ListUserSettingsResult
*/
export interface ListUserSettingsResult {
/**
* @generated from protobuf field: repeated vizapi.GetUserSettingResult UserSettings = 1 [json_name = "UserSettings"];
*/
userSettings: GetUserSettingResult[];
}
// @generated message type with reflection information, may provide speed optimized methods
class UserSetting$Type extends MessageType<UserSetting> {
constructor() {
super("vizapi.UserSetting", [
{ no: 1, name: "UserID", kind: "scalar", jsonName: "UserID", T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "Value", kind: "scalar", jsonName: "Value", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<UserSetting>): UserSetting {
const message = globalThis.Object.create((this.messagePrototype!));
message.userID = "";
message.key = "";
message.value = "";
if (value !== undefined)
reflectionMergePartial<UserSetting>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserSetting): UserSetting {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string UserID = 1 [json_name = "UserID"];*/ 1:
message.userID = reader.string();
break;
case /* string Key = 2 [json_name = "Key"];*/ 2:
message.key = reader.string();
break;
case /* string Value = 3 [json_name = "Value"];*/ 3:
message.value = 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: UserSetting, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string UserID = 1 [json_name = "UserID"]; */
if (message.userID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.userID);
/* string Key = 2 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(2, WireType.LengthDelimited).string(message.key);
/* string Value = 3 [json_name = "Value"]; */
if (message.value !== "")
writer.tag(3, WireType.LengthDelimited).string(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.UserSetting
*/
export const UserSetting = new UserSetting$Type();
// @generated message type with reflection information, may provide speed optimized methods
class PutUserSettingRequest$Type extends MessageType<PutUserSettingRequest> {
constructor() {
super("vizapi.PutUserSettingRequest", [
{ no: 1, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Key: each key must be unique", example: "\"preferredTheme\"" }, "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "Value", kind: "scalar", jsonName: "Value", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"dark \"" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key, Value pair to store", required: ["Key", "Value"] } } });
}
create(value?: PartialMessage<PutUserSettingRequest>): PutUserSettingRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
message.value = "";
if (value !== undefined)
reflectionMergePartial<PutUserSettingRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutUserSettingRequest): PutUserSettingRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Key = 1 [json_name = "Key"];*/ 1:
message.key = reader.string();
break;
case /* string Value = 2 [json_name = "Value"];*/ 2:
message.value = 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: PutUserSettingRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Key = 1 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(1, WireType.LengthDelimited).string(message.key);
/* string Value = 2 [json_name = "Value"]; */
if (message.value !== "")
writer.tag(2, WireType.LengthDelimited).string(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.PutUserSettingRequest
*/
export const PutUserSettingRequest = new PutUserSettingRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class PutUserSettingResult$Type extends MessageType<PutUserSettingResult> {
constructor() {
super("vizapi.PutUserSettingResult", [
{ no: 1, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"preferredTheme\"" }, "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "Value", kind: "scalar", jsonName: "Value", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"dark\"" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key, Value pair response" } } });
}
create(value?: PartialMessage<PutUserSettingResult>): PutUserSettingResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
message.value = "";
if (value !== undefined)
reflectionMergePartial<PutUserSettingResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutUserSettingResult): PutUserSettingResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Key = 1 [json_name = "Key"];*/ 1:
message.key = reader.string();
break;
case /* string Value = 2 [json_name = "Value"];*/ 2:
message.value = 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: PutUserSettingResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Key = 1 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(1, WireType.LengthDelimited).string(message.key);
/* string Value = 2 [json_name = "Value"]; */
if (message.value !== "")
writer.tag(2, WireType.LengthDelimited).string(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.PutUserSettingResult
*/
export const PutUserSettingResult = new PutUserSettingResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetUserSettingRequest$Type extends MessageType<GetUserSettingRequest> {
constructor() {
super("vizapi.GetUserSettingRequest", [
{ no: 2, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"preferredTheme\"" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key of the user's setting to get", required: ["Key"] } } });
}
create(value?: PartialMessage<GetUserSettingRequest>): GetUserSettingRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
if (value !== undefined)
reflectionMergePartial<GetUserSettingRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserSettingRequest): GetUserSettingRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Key = 2 [json_name = "Key"];*/ 2:
message.key = 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: GetUserSettingRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Key = 2 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(2, WireType.LengthDelimited).string(message.key);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.GetUserSettingRequest
*/
export const GetUserSettingRequest = new GetUserSettingRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetUserSettingResult$Type extends MessageType<GetUserSettingResult> {
constructor() {
super("vizapi.GetUserSettingResult", [
{ no: 1, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"preferredTheme\"" }, "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "Value", kind: "scalar", jsonName: "Value", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"dark\"" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key, Value pair response" } } });
}
create(value?: PartialMessage<GetUserSettingResult>): GetUserSettingResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
message.value = "";
if (value !== undefined)
reflectionMergePartial<GetUserSettingResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetUserSettingResult): GetUserSettingResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Key = 1 [json_name = "Key"];*/ 1:
message.key = reader.string();
break;
case /* string Value = 2 [json_name = "Value"];*/ 2:
message.value = 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: GetUserSettingResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Key = 1 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(1, WireType.LengthDelimited).string(message.key);
/* string Value = 2 [json_name = "Value"]; */
if (message.value !== "")
writer.tag(2, WireType.LengthDelimited).string(message.value);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.GetUserSettingResult
*/
export const GetUserSettingResult = new GetUserSettingResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteUserSettingRequest$Type extends MessageType<DeleteUserSettingRequest> {
constructor() {
super("vizapi.DeleteUserSettingRequest", [
{ no: 2, name: "Key", kind: "scalar", jsonName: "Key", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "\"preferredTheme\"" }, "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Key of the user's setting to delete", required: ["Key"] } } });
}
create(value?: PartialMessage<DeleteUserSettingRequest>): DeleteUserSettingRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.key = "";
if (value !== undefined)
reflectionMergePartial<DeleteUserSettingRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteUserSettingRequest): DeleteUserSettingRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string Key = 2 [json_name = "Key"];*/ 2:
message.key = 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: DeleteUserSettingRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string Key = 2 [json_name = "Key"]; */
if (message.key !== "")
writer.tag(2, WireType.LengthDelimited).string(message.key);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.DeleteUserSettingRequest
*/
export const DeleteUserSettingRequest = new DeleteUserSettingRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteUserSettingResult$Type extends MessageType<DeleteUserSettingResult> {
constructor() {
super("vizapi.DeleteUserSettingResult", []);
}
create(value?: PartialMessage<DeleteUserSettingResult>): DeleteUserSettingResult {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<DeleteUserSettingResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteUserSettingResult): DeleteUserSettingResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: DeleteUserSettingResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.DeleteUserSettingResult
*/
export const DeleteUserSettingResult = new DeleteUserSettingResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListUserSettingsRequest$Type extends MessageType<ListUserSettingsRequest> {
constructor() {
super("vizapi.ListUserSettingsRequest", []);
}
create(value?: PartialMessage<ListUserSettingsRequest>): ListUserSettingsRequest {
const message = globalThis.Object.create((this.messagePrototype!));
if (value !== undefined)
reflectionMergePartial<ListUserSettingsRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUserSettingsRequest): ListUserSettingsRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
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: ListUserSettingsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message vizapi.ListUserSettingsRequest
*/
export const ListUserSettingsRequest = new ListUserSettingsRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListUserSettingsResult$Type extends MessageType<ListUserSettingsResult> {
constructor() {
super("vizapi.ListUserSettingsResult", [
{ no: 1, name: "UserSettings", kind: "message", jsonName: "UserSettings", repeat: 1 /*RepeatType.PACKED*/, T: () => GetUserSettingResult }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "List of the user's settings" } } });
}
create(value?: PartialMessage<ListUserSettingsResult>): ListUserSettingsResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.userSettings = [];
if (value !== undefined)
reflectionMergePartial<ListUserSettingsResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUserSettingsResult): ListUserSettingsResult {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated vizapi.GetUserSettingResult UserSettings = 1 [json_name = "UserSettings"];*/ 1:
message.userSettings.push(GetUserSettingResult.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: ListUserSettingsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated vizapi.GetUserSettingResult UserSettings = 1 [json_name = "UserSettings"]; */
for (let i = 0; i < message.userSettings.length; i++)
GetUserSettingResult.internalBinaryWrite(message.userSettings[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 vizapi.ListUserSettingsResult
*/
export const ListUserSettingsResult = new ListUserSettingsResult$Type();
/**
* @generated ServiceType for protobuf service vizapi.UserSettingsService
*/
export const UserSettingsService = new ServiceType("vizapi.UserSettingsService", [
{ name: "Get", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["User Settings"], summary: "Get a user setting", description: "Use to get a user setting with his key" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: GetUserSettingRequest, O: GetUserSettingResult },
{ name: "Put", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["User Settings"], summary: "Update or create a user setting", description: "Use to create or update user's settings" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: PutUserSettingRequest, O: PutUserSettingResult },
{ name: "Delete", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["User Settings"], summary: "Delete a user setting", description: "Use to delete a user setting with his key" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: DeleteUserSettingRequest, O: DeleteUserSettingResult },
{ name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["User Settings"], summary: "List a user's settings", description: "Use to list a user's settings" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: ListUserSettingsRequest, O: ListUserSettingsResult }
], { "api.k8sService": "settings-server" });

115
viz-view.client.ts Normal file
View File

@@ -0,0 +1,115 @@
// @generated by protobuf-ts 2.9.5
// @generated from protobuf file "viz-view.proto" (package "vizapi", syntax proto3)
// tslint:disable
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
import { ViewService } from "./viz-view";
import type { ExtractResult } from "./viz-view";
import type { ExtractRequest } from "./viz-view";
import type { DeleteViewsForProjectResult } from "./viz-view";
import type { DeleteViewsForProjectRequest } from "./viz-view";
import type { ListViewResult } from "./viz-view";
import type { ListViewRequest } from "./viz-view";
import type { DeleteViewResult } from "./viz-view";
import type { DeleteViewRequest } from "./viz-view";
import type { UpdateViewResult } from "./viz-view";
import type { UpdateViewRequest } from "./viz-view";
import type { CreateViewResult } from "./viz-view";
import type { CreateViewRequest } from "./viz-view";
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
import type { GetViewResult } from "./viz-view";
import type { GetViewRequest } from "./viz-view";
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
/**
* @generated from protobuf service vizapi.ViewService
*/
export interface IViewServiceClient {
/**
* @generated from protobuf rpc: Get(vizapi.GetViewRequest) returns (vizapi.GetViewResult);
*/
get(input: GetViewRequest, options?: RpcOptions): UnaryCall<GetViewRequest, GetViewResult>;
/**
* @generated from protobuf rpc: Create(vizapi.CreateViewRequest) returns (vizapi.CreateViewResult);
*/
create(input: CreateViewRequest, options?: RpcOptions): UnaryCall<CreateViewRequest, CreateViewResult>;
/**
* @generated from protobuf rpc: Update(vizapi.UpdateViewRequest) returns (vizapi.UpdateViewResult);
*/
update(input: UpdateViewRequest, options?: RpcOptions): UnaryCall<UpdateViewRequest, UpdateViewResult>;
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteViewRequest) returns (vizapi.DeleteViewResult);
*/
delete(input: DeleteViewRequest, options?: RpcOptions): UnaryCall<DeleteViewRequest, DeleteViewResult>;
/**
* @generated from protobuf rpc: List(vizapi.ListViewRequest) returns (vizapi.ListViewResult);
*/
list(input: ListViewRequest, options?: RpcOptions): UnaryCall<ListViewRequest, ListViewResult>;
/**
* @generated from protobuf rpc: DeleteViewsForProject(vizapi.DeleteViewsForProjectRequest) returns (vizapi.DeleteViewsForProjectResult);
*/
deleteViewsForProject(input: DeleteViewsForProjectRequest, options?: RpcOptions): UnaryCall<DeleteViewsForProjectRequest, DeleteViewsForProjectResult>;
/**
* @generated from protobuf rpc: Extract(vizapi.ExtractRequest) returns (vizapi.ExtractResult);
*/
extract(input: ExtractRequest, options?: RpcOptions): UnaryCall<ExtractRequest, ExtractResult>;
}
/**
* @generated from protobuf service vizapi.ViewService
*/
export class ViewServiceClient implements IViewServiceClient, ServiceInfo {
typeName = ViewService.typeName;
methods = ViewService.methods;
options = ViewService.options;
constructor(private readonly _transport: RpcTransport) {
}
/**
* @generated from protobuf rpc: Get(vizapi.GetViewRequest) returns (vizapi.GetViewResult);
*/
get(input: GetViewRequest, options?: RpcOptions): UnaryCall<GetViewRequest, GetViewResult> {
const method = this.methods[0], opt = this._transport.mergeOptions(options);
return stackIntercept<GetViewRequest, GetViewResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Create(vizapi.CreateViewRequest) returns (vizapi.CreateViewResult);
*/
create(input: CreateViewRequest, options?: RpcOptions): UnaryCall<CreateViewRequest, CreateViewResult> {
const method = this.methods[1], opt = this._transport.mergeOptions(options);
return stackIntercept<CreateViewRequest, CreateViewResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Update(vizapi.UpdateViewRequest) returns (vizapi.UpdateViewResult);
*/
update(input: UpdateViewRequest, options?: RpcOptions): UnaryCall<UpdateViewRequest, UpdateViewResult> {
const method = this.methods[2], opt = this._transport.mergeOptions(options);
return stackIntercept<UpdateViewRequest, UpdateViewResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Delete(vizapi.DeleteViewRequest) returns (vizapi.DeleteViewResult);
*/
delete(input: DeleteViewRequest, options?: RpcOptions): UnaryCall<DeleteViewRequest, DeleteViewResult> {
const method = this.methods[3], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteViewRequest, DeleteViewResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: List(vizapi.ListViewRequest) returns (vizapi.ListViewResult);
*/
list(input: ListViewRequest, options?: RpcOptions): UnaryCall<ListViewRequest, ListViewResult> {
const method = this.methods[4], opt = this._transport.mergeOptions(options);
return stackIntercept<ListViewRequest, ListViewResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: DeleteViewsForProject(vizapi.DeleteViewsForProjectRequest) returns (vizapi.DeleteViewsForProjectResult);
*/
deleteViewsForProject(input: DeleteViewsForProjectRequest, options?: RpcOptions): UnaryCall<DeleteViewsForProjectRequest, DeleteViewsForProjectResult> {
const method = this.methods[5], opt = this._transport.mergeOptions(options);
return stackIntercept<DeleteViewsForProjectRequest, DeleteViewsForProjectResult>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: Extract(vizapi.ExtractRequest) returns (vizapi.ExtractResult);
*/
extract(input: ExtractRequest, options?: RpcOptions): UnaryCall<ExtractRequest, ExtractResult> {
const method = this.methods[6], opt = this._transport.mergeOptions(options);
return stackIntercept<ExtractRequest, ExtractResult>("unary", this._transport, method, opt, input);
}
}

1599
viz-view.ts Normal file

File diff suppressed because it is too large Load Diff