You've already forked npm-viz-sdk
284 lines
14 KiB
TypeScript
284 lines
14 KiB
TypeScript
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name
|
|
// @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
|
|
*/
|
|
Header?: RequestProjectHeader;
|
|
/**
|
|
* @generated from protobuf field: string Key = 2
|
|
*/
|
|
Key: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.NextCounterResult
|
|
*/
|
|
export interface NextCounterResult {
|
|
/**
|
|
* @generated from protobuf field: int64 Value = 1
|
|
*/
|
|
Value: bigint;
|
|
}
|
|
/**
|
|
* Deprecated: This method is deprecated and should not be used. It will be removed in a future release.
|
|
*
|
|
* @generated from protobuf message vizapi.NextProjectCounterSiteRequest
|
|
*/
|
|
export interface NextProjectCounterSiteRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestProjectHeader Header = 1
|
|
*/
|
|
Header?: RequestProjectHeader;
|
|
/**
|
|
* @generated from protobuf field: string ActorID = 2
|
|
*/
|
|
ActorID: string;
|
|
/**
|
|
* @generated from protobuf field: string Key = 3
|
|
*/
|
|
Key: string;
|
|
}
|
|
/**
|
|
* Deprecated: This method is deprecated and should not be used. It will be removed in a future release.
|
|
*
|
|
* @generated from protobuf message vizapi.NextCounterSiteResult
|
|
*/
|
|
export interface NextCounterSiteResult {
|
|
/**
|
|
* @generated from protobuf field: int64 Value = 1
|
|
*/
|
|
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", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "Key", kind: "scalar", localName: "Key", 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:
|
|
message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* string 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; */
|
|
if (message.Header)
|
|
RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string Key = 2; */
|
|
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", localName: "Value", 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:
|
|
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; */
|
|
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 message type with reflection information, may provide speed optimized methods
|
|
class NextProjectCounterSiteRequest$Type extends MessageType<NextProjectCounterSiteRequest> {
|
|
constructor() {
|
|
super("vizapi.NextProjectCounterSiteRequest", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "ActorID", kind: "scalar", localName: "ActorID", jsonName: "ActorID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 3, name: "Key", kind: "scalar", localName: "Key", 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", "ActorID", "Key"] } } });
|
|
}
|
|
create(value?: PartialMessage<NextProjectCounterSiteRequest>): NextProjectCounterSiteRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.ActorID = "";
|
|
message.Key = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<NextProjectCounterSiteRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NextProjectCounterSiteRequest): NextProjectCounterSiteRequest {
|
|
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:
|
|
message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* string ActorID */ 2:
|
|
message.ActorID = reader.string();
|
|
break;
|
|
case /* string Key */ 3:
|
|
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: NextProjectCounterSiteRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestProjectHeader Header = 1; */
|
|
if (message.Header)
|
|
RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string ActorID = 2; */
|
|
if (message.ActorID !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.ActorID);
|
|
/* string Key = 3; */
|
|
if (message.Key !== "")
|
|
writer.tag(3, 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.NextProjectCounterSiteRequest
|
|
*/
|
|
export const NextProjectCounterSiteRequest = new NextProjectCounterSiteRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class NextCounterSiteResult$Type extends MessageType<NextCounterSiteResult> {
|
|
constructor() {
|
|
super("vizapi.NextCounterSiteResult", [
|
|
{ no: 1, name: "Value", kind: "scalar", localName: "Value", jsonName: "Value", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<NextCounterSiteResult>): NextCounterSiteResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Value = 0n;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<NextCounterSiteResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: NextCounterSiteResult): NextCounterSiteResult {
|
|
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: NextCounterSiteResult, 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 vizapi.NextCounterSiteResult
|
|
*/
|
|
export const NextCounterSiteResult = new NextCounterSiteResult$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": "", "api.aliasType": "APPOINTMENT_SCHEDULING", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: NextProjectCounterRequest, O: NextCounterResult },
|
|
{ name: "NextSite", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project Counters"], summary: "Get the next value for a site type project key", description: "Get the next value for a site type project key" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "PUBLIC" } }, I: NextProjectCounterSiteRequest, O: NextCounterSiteResult }
|
|
], { "api.k8sService": "settings-server" });
|