You've already forked npm-viz-sdk
1194 lines
60 KiB
TypeScript
1194 lines
60 KiB
TypeScript
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name
|
|
// @generated from protobuf file "viz-translations.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";
|
|
// ===================================
|
|
// ============== Model ==============
|
|
// ===================================
|
|
|
|
/**
|
|
* @generated from protobuf message vizapi.Label
|
|
*/
|
|
export interface Label {
|
|
/**
|
|
* @generated from protobuf field: string ID = 1
|
|
*/
|
|
ID: string; // ID of the label (unique, ProjectID + Context + Label)
|
|
/**
|
|
* @generated from protobuf field: string ProjectID = 2
|
|
*/
|
|
ProjectID: string; // ID of the project
|
|
/**
|
|
* @generated from protobuf field: string Context = 3
|
|
*/
|
|
Context: string; // Context of the label (ex: "Order", "Product", "Customer", "User", "...")
|
|
/**
|
|
* @generated from protobuf field: string Label = 4
|
|
*/
|
|
Label: string; // Label (ex: "Status", "Color", "Size")
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.LanguageCode
|
|
*/
|
|
export interface LanguageCode {
|
|
/**
|
|
* @generated from protobuf field: string Code = 1
|
|
*/
|
|
Code: string; // ISO 639-1 code
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.Translation
|
|
*/
|
|
export interface Translation {
|
|
/**
|
|
* @generated from protobuf field: string LabelID = 1
|
|
*/
|
|
LabelID: string; // ID of the label (unique, ProjectID + Context + Label)
|
|
/**
|
|
* @generated from protobuf field: string LanguageCode = 2
|
|
*/
|
|
LanguageCode: string; // ICU - ISO 639-1 code
|
|
/**
|
|
* @generated from protobuf field: string Translation = 3
|
|
*/
|
|
Translation: string; // Translation of the label in the given language code
|
|
}
|
|
// ===================================
|
|
// ======= Requests & Results ========
|
|
// ===================================
|
|
|
|
/**
|
|
* @generated from protobuf message vizapi.GetTranslationsRequest
|
|
*/
|
|
export interface GetTranslationsRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestProjectHeader Header = 1
|
|
*/
|
|
Header?: RequestProjectHeader;
|
|
/**
|
|
* @generated from protobuf field: string Context = 2
|
|
*/
|
|
Context: string;
|
|
/**
|
|
* @generated from protobuf field: string Label = 3
|
|
*/
|
|
Label: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.GetTranslationsResult
|
|
*/
|
|
export interface GetTranslationsResult {
|
|
/**
|
|
* @generated from protobuf field: repeated vizapi.Translation Translations = 1
|
|
*/
|
|
Translations: Translation[];
|
|
}
|
|
/**
|
|
* Message used to Put a translation for a label in the PutTranslationsRequest
|
|
*
|
|
* @generated from protobuf message vizapi.PutTranslationMessage
|
|
*/
|
|
export interface PutTranslationMessage {
|
|
/**
|
|
* @generated from protobuf field: string LanguageCode = 1
|
|
*/
|
|
LanguageCode: string;
|
|
/**
|
|
* @generated from protobuf field: string Translation = 2
|
|
*/
|
|
Translation: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.PutTranslationsRequest
|
|
*/
|
|
export interface PutTranslationsRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestProjectHeader Header = 1
|
|
*/
|
|
Header?: RequestProjectHeader;
|
|
/**
|
|
* @generated from protobuf field: string Context = 2
|
|
*/
|
|
Context: string;
|
|
/**
|
|
* @generated from protobuf field: string Label = 3
|
|
*/
|
|
Label: string;
|
|
/**
|
|
* @generated from protobuf field: repeated vizapi.PutTranslationMessage Translations = 4
|
|
*/
|
|
Translations: PutTranslationMessage[];
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.PutTranslationsResult
|
|
*/
|
|
export interface PutTranslationsResult {
|
|
/**
|
|
* @generated from protobuf field: repeated vizapi.Translation Translations = 1
|
|
*/
|
|
Translations: Translation[];
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.DeleteTranslationsRequest
|
|
*/
|
|
export interface DeleteTranslationsRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestProjectHeader Header = 1
|
|
*/
|
|
Header?: RequestProjectHeader;
|
|
/**
|
|
* @generated from protobuf field: string Context = 2
|
|
*/
|
|
Context: string;
|
|
/**
|
|
* @generated from protobuf field: string Label = 3
|
|
*/
|
|
Label: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.DeleteTranslationsResult
|
|
*/
|
|
export interface DeleteTranslationsResult {
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.ListTranslationsRequest
|
|
*/
|
|
export interface ListTranslationsRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestProjectHeader Header = 1
|
|
*/
|
|
Header?: RequestProjectHeader;
|
|
/**
|
|
* @generated from protobuf field: string LanguageCode = 2
|
|
*/
|
|
LanguageCode: string;
|
|
}
|
|
/**
|
|
* Messages for the ListTranslationsResult
|
|
*
|
|
* @generated from protobuf message vizapi.TranslationContextResult
|
|
*/
|
|
export interface TranslationContextResult {
|
|
/**
|
|
* @generated from protobuf field: string Name = 1
|
|
*/
|
|
Name: string;
|
|
/**
|
|
* @generated from protobuf field: repeated vizapi.TranslationLabelResult Labels = 2
|
|
*/
|
|
Labels: TranslationLabelResult[];
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.TranslationLabelResult
|
|
*/
|
|
export interface TranslationLabelResult {
|
|
/**
|
|
* @generated from protobuf field: string Name = 1
|
|
*/
|
|
Name: string;
|
|
/**
|
|
* @generated from protobuf field: string Translation = 2
|
|
*/
|
|
Translation: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.ListTranslationsResult
|
|
*/
|
|
export interface ListTranslationsResult {
|
|
/**
|
|
* @generated from protobuf field: repeated vizapi.TranslationContextResult Contexts = 1
|
|
*/
|
|
Contexts: TranslationContextResult[];
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.DeleteAllTranslationsRequest
|
|
*/
|
|
export interface DeleteAllTranslationsRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestProjectHeader Header = 1
|
|
*/
|
|
Header?: RequestProjectHeader;
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.DeleteAllTranslationsResult
|
|
*/
|
|
export interface DeleteAllTranslationsResult {
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.GetLanguagesRequest
|
|
*/
|
|
export interface GetLanguagesRequest {
|
|
}
|
|
/**
|
|
* @generated from protobuf message vizapi.GetLanguagesResult
|
|
*/
|
|
export interface GetLanguagesResult {
|
|
/**
|
|
* @generated from protobuf field: repeated vizapi.LanguageCode Languages = 1
|
|
*/
|
|
Languages: LanguageCode[];
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class Label$Type extends MessageType<Label> {
|
|
constructor() {
|
|
super("vizapi.Label", [
|
|
{ no: 1, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 3, name: "Context", kind: "scalar", localName: "Context", jsonName: "Context", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 4, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<Label>): Label {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.ID = "";
|
|
message.ProjectID = "";
|
|
message.Context = "";
|
|
message.Label = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<Label>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Label): Label {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string ID */ 1:
|
|
message.ID = reader.string();
|
|
break;
|
|
case /* string ProjectID */ 2:
|
|
message.ProjectID = reader.string();
|
|
break;
|
|
case /* string Context */ 3:
|
|
message.Context = reader.string();
|
|
break;
|
|
case /* string Label */ 4:
|
|
message.Label = 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: Label, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ID = 1; */
|
|
if (message.ID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.ID);
|
|
/* string ProjectID = 2; */
|
|
if (message.ProjectID !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.ProjectID);
|
|
/* string Context = 3; */
|
|
if (message.Context !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.Context);
|
|
/* string Label = 4; */
|
|
if (message.Label !== "")
|
|
writer.tag(4, WireType.LengthDelimited).string(message.Label);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message vizapi.Label
|
|
*/
|
|
export const Label = new Label$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class LanguageCode$Type extends MessageType<LanguageCode> {
|
|
constructor() {
|
|
super("vizapi.LanguageCode", [
|
|
{ no: 1, name: "Code", kind: "scalar", localName: "Code", jsonName: "Code", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<LanguageCode>): LanguageCode {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Code = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<LanguageCode>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LanguageCode): LanguageCode {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string Code */ 1:
|
|
message.Code = 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: LanguageCode, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string Code = 1; */
|
|
if (message.Code !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.Code);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message vizapi.LanguageCode
|
|
*/
|
|
export const LanguageCode = new LanguageCode$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class Translation$Type extends MessageType<Translation> {
|
|
constructor() {
|
|
super("vizapi.Translation", [
|
|
{ no: 1, name: "LabelID", kind: "scalar", localName: "LabelID", jsonName: "LabelID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "LanguageCode", kind: "scalar", localName: "LanguageCode", jsonName: "LanguageCode", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 3, name: "Translation", kind: "scalar", localName: "Translation", jsonName: "Translation", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<Translation>): Translation {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.LabelID = "";
|
|
message.LanguageCode = "";
|
|
message.Translation = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<Translation>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Translation): Translation {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string LabelID */ 1:
|
|
message.LabelID = reader.string();
|
|
break;
|
|
case /* string LanguageCode */ 2:
|
|
message.LanguageCode = reader.string();
|
|
break;
|
|
case /* string Translation */ 3:
|
|
message.Translation = 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: Translation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string LabelID = 1; */
|
|
if (message.LabelID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.LabelID);
|
|
/* string LanguageCode = 2; */
|
|
if (message.LanguageCode !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.LanguageCode);
|
|
/* string Translation = 3; */
|
|
if (message.Translation !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.Translation);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message vizapi.Translation
|
|
*/
|
|
export const Translation = new Translation$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class GetTranslationsRequest$Type extends MessageType<GetTranslationsRequest> {
|
|
constructor() {
|
|
super("vizapi.GetTranslationsRequest", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "Context", kind: "scalar", localName: "Context", jsonName: "Context", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 3, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Message request for the GetTranslations method", required: ["Header", "Context", "Label"] } } });
|
|
}
|
|
create(value?: PartialMessage<GetTranslationsRequest>): GetTranslationsRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Context = "";
|
|
message.Label = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<GetTranslationsRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetTranslationsRequest): GetTranslationsRequest {
|
|
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 Context */ 2:
|
|
message.Context = reader.string();
|
|
break;
|
|
case /* string Label */ 3:
|
|
message.Label = 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: GetTranslationsRequest, 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 Context = 2; */
|
|
if (message.Context !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.Context);
|
|
/* string Label = 3; */
|
|
if (message.Label !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.Label);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message vizapi.GetTranslationsRequest
|
|
*/
|
|
export const GetTranslationsRequest = new GetTranslationsRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class GetTranslationsResult$Type extends MessageType<GetTranslationsResult> {
|
|
constructor() {
|
|
super("vizapi.GetTranslationsResult", [
|
|
{ no: 1, name: "Translations", kind: "message", localName: "Translations", jsonName: "Translations", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Translation }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Message result for the GetTranslations method" } } });
|
|
}
|
|
create(value?: PartialMessage<GetTranslationsResult>): GetTranslationsResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Translations = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<GetTranslationsResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetTranslationsResult): GetTranslationsResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated vizapi.Translation Translations */ 1:
|
|
message.Translations.push(Translation.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: GetTranslationsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated vizapi.Translation Translations = 1; */
|
|
for (let i = 0; i < message.Translations.length; i++)
|
|
Translation.internalBinaryWrite(message.Translations[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.GetTranslationsResult
|
|
*/
|
|
export const GetTranslationsResult = new GetTranslationsResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class PutTranslationMessage$Type extends MessageType<PutTranslationMessage> {
|
|
constructor() {
|
|
super("vizapi.PutTranslationMessage", [
|
|
{ no: 1, name: "LanguageCode", kind: "scalar", localName: "LanguageCode", jsonName: "LanguageCode", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "Translation", kind: "scalar", localName: "Translation", jsonName: "Translation", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<PutTranslationMessage>): PutTranslationMessage {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.LanguageCode = "";
|
|
message.Translation = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<PutTranslationMessage>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutTranslationMessage): PutTranslationMessage {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string LanguageCode */ 1:
|
|
message.LanguageCode = reader.string();
|
|
break;
|
|
case /* string Translation */ 2:
|
|
message.Translation = 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: PutTranslationMessage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string LanguageCode = 1; */
|
|
if (message.LanguageCode !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.LanguageCode);
|
|
/* string Translation = 2; */
|
|
if (message.Translation !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.Translation);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message vizapi.PutTranslationMessage
|
|
*/
|
|
export const PutTranslationMessage = new PutTranslationMessage$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class PutTranslationsRequest$Type extends MessageType<PutTranslationsRequest> {
|
|
constructor() {
|
|
super("vizapi.PutTranslationsRequest", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "Context", kind: "scalar", localName: "Context", jsonName: "Context", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 3, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 4, name: "Translations", kind: "message", localName: "Translations", jsonName: "Translations", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PutTranslationMessage }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Message request for the PutTranslation method", required: ["Header", "Context", "Label"] } } });
|
|
}
|
|
create(value?: PartialMessage<PutTranslationsRequest>): PutTranslationsRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Context = "";
|
|
message.Label = "";
|
|
message.Translations = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<PutTranslationsRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutTranslationsRequest): PutTranslationsRequest {
|
|
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 Context */ 2:
|
|
message.Context = reader.string();
|
|
break;
|
|
case /* string Label */ 3:
|
|
message.Label = reader.string();
|
|
break;
|
|
case /* repeated vizapi.PutTranslationMessage Translations */ 4:
|
|
message.Translations.push(PutTranslationMessage.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: PutTranslationsRequest, 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 Context = 2; */
|
|
if (message.Context !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.Context);
|
|
/* string Label = 3; */
|
|
if (message.Label !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.Label);
|
|
/* repeated vizapi.PutTranslationMessage Translations = 4; */
|
|
for (let i = 0; i < message.Translations.length; i++)
|
|
PutTranslationMessage.internalBinaryWrite(message.Translations[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.PutTranslationsRequest
|
|
*/
|
|
export const PutTranslationsRequest = new PutTranslationsRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class PutTranslationsResult$Type extends MessageType<PutTranslationsResult> {
|
|
constructor() {
|
|
super("vizapi.PutTranslationsResult", [
|
|
{ no: 1, name: "Translations", kind: "message", localName: "Translations", jsonName: "Translations", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Translation }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Message result for the PutTranslation method" } } });
|
|
}
|
|
create(value?: PartialMessage<PutTranslationsResult>): PutTranslationsResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Translations = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<PutTranslationsResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PutTranslationsResult): PutTranslationsResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated vizapi.Translation Translations */ 1:
|
|
message.Translations.push(Translation.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: PutTranslationsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated vizapi.Translation Translations = 1; */
|
|
for (let i = 0; i < message.Translations.length; i++)
|
|
Translation.internalBinaryWrite(message.Translations[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.PutTranslationsResult
|
|
*/
|
|
export const PutTranslationsResult = new PutTranslationsResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DeleteTranslationsRequest$Type extends MessageType<DeleteTranslationsRequest> {
|
|
constructor() {
|
|
super("vizapi.DeleteTranslationsRequest", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "Context", kind: "scalar", localName: "Context", jsonName: "Context", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 3, name: "Label", kind: "scalar", localName: "Label", jsonName: "Label", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Message request for the DeleteTranslation method", required: ["Header", "Context", "Label"] } } });
|
|
}
|
|
create(value?: PartialMessage<DeleteTranslationsRequest>): DeleteTranslationsRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Context = "";
|
|
message.Label = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DeleteTranslationsRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteTranslationsRequest): DeleteTranslationsRequest {
|
|
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 Context */ 2:
|
|
message.Context = reader.string();
|
|
break;
|
|
case /* string Label */ 3:
|
|
message.Label = 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: DeleteTranslationsRequest, 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 Context = 2; */
|
|
if (message.Context !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.Context);
|
|
/* string Label = 3; */
|
|
if (message.Label !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.Label);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message vizapi.DeleteTranslationsRequest
|
|
*/
|
|
export const DeleteTranslationsRequest = new DeleteTranslationsRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DeleteTranslationsResult$Type extends MessageType<DeleteTranslationsResult> {
|
|
constructor() {
|
|
super("vizapi.DeleteTranslationsResult", [], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Message result for the DeleteTranslation method" } } });
|
|
}
|
|
create(value?: PartialMessage<DeleteTranslationsResult>): DeleteTranslationsResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DeleteTranslationsResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteTranslationsResult): DeleteTranslationsResult {
|
|
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: DeleteTranslationsResult, 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.DeleteTranslationsResult
|
|
*/
|
|
export const DeleteTranslationsResult = new DeleteTranslationsResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ListTranslationsRequest$Type extends MessageType<ListTranslationsRequest> {
|
|
constructor() {
|
|
super("vizapi.ListTranslationsRequest", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "LanguageCode", kind: "scalar", localName: "LanguageCode", jsonName: "LanguageCode", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Message request for the ListTranslations method", required: ["Header", "LanguageCode"] } } });
|
|
}
|
|
create(value?: PartialMessage<ListTranslationsRequest>): ListTranslationsRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.LanguageCode = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ListTranslationsRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListTranslationsRequest): ListTranslationsRequest {
|
|
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 LanguageCode */ 2:
|
|
message.LanguageCode = 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: ListTranslationsRequest, 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 LanguageCode = 2; */
|
|
if (message.LanguageCode !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.LanguageCode);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message vizapi.ListTranslationsRequest
|
|
*/
|
|
export const ListTranslationsRequest = new ListTranslationsRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class TranslationContextResult$Type extends MessageType<TranslationContextResult> {
|
|
constructor() {
|
|
super("vizapi.TranslationContextResult", [
|
|
{ no: 1, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "Labels", kind: "message", localName: "Labels", jsonName: "Labels", repeat: 2 /*RepeatType.UNPACKED*/, T: () => TranslationLabelResult }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<TranslationContextResult>): TranslationContextResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Name = "";
|
|
message.Labels = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<TranslationContextResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TranslationContextResult): TranslationContextResult {
|
|
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 vizapi.TranslationLabelResult Labels */ 2:
|
|
message.Labels.push(TranslationLabelResult.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: TranslationContextResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string Name = 1; */
|
|
if (message.Name !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.Name);
|
|
/* repeated vizapi.TranslationLabelResult Labels = 2; */
|
|
for (let i = 0; i < message.Labels.length; i++)
|
|
TranslationLabelResult.internalBinaryWrite(message.Labels[i], 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 vizapi.TranslationContextResult
|
|
*/
|
|
export const TranslationContextResult = new TranslationContextResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class TranslationLabelResult$Type extends MessageType<TranslationLabelResult> {
|
|
constructor() {
|
|
super("vizapi.TranslationLabelResult", [
|
|
{ no: 1, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "Translation", kind: "scalar", localName: "Translation", jsonName: "Translation", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<TranslationLabelResult>): TranslationLabelResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Name = "";
|
|
message.Translation = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<TranslationLabelResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TranslationLabelResult): TranslationLabelResult {
|
|
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 Translation */ 2:
|
|
message.Translation = 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: TranslationLabelResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string Name = 1; */
|
|
if (message.Name !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.Name);
|
|
/* string Translation = 2; */
|
|
if (message.Translation !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.Translation);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message vizapi.TranslationLabelResult
|
|
*/
|
|
export const TranslationLabelResult = new TranslationLabelResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ListTranslationsResult$Type extends MessageType<ListTranslationsResult> {
|
|
constructor() {
|
|
super("vizapi.ListTranslationsResult", [
|
|
{ no: 1, name: "Contexts", kind: "message", localName: "Contexts", jsonName: "Contexts", repeat: 2 /*RepeatType.UNPACKED*/, T: () => TranslationContextResult }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Message result for the ListTranslations method" } } });
|
|
}
|
|
create(value?: PartialMessage<ListTranslationsResult>): ListTranslationsResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Contexts = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ListTranslationsResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListTranslationsResult): ListTranslationsResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated vizapi.TranslationContextResult Contexts */ 1:
|
|
message.Contexts.push(TranslationContextResult.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: ListTranslationsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated vizapi.TranslationContextResult Contexts = 1; */
|
|
for (let i = 0; i < message.Contexts.length; i++)
|
|
TranslationContextResult.internalBinaryWrite(message.Contexts[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.ListTranslationsResult
|
|
*/
|
|
export const ListTranslationsResult = new ListTranslationsResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DeleteAllTranslationsRequest$Type extends MessageType<DeleteAllTranslationsRequest> {
|
|
constructor() {
|
|
super("vizapi.DeleteAllTranslationsRequest", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Message request for the DeleteAllTranslations method", required: ["Header"] } } });
|
|
}
|
|
create(value?: PartialMessage<DeleteAllTranslationsRequest>): DeleteAllTranslationsRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DeleteAllTranslationsRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteAllTranslationsRequest): DeleteAllTranslationsRequest {
|
|
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;
|
|
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: DeleteAllTranslationsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestProjectHeader Header = 1; */
|
|
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.DeleteAllTranslationsRequest
|
|
*/
|
|
export const DeleteAllTranslationsRequest = new DeleteAllTranslationsRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DeleteAllTranslationsResult$Type extends MessageType<DeleteAllTranslationsResult> {
|
|
constructor() {
|
|
super("vizapi.DeleteAllTranslationsResult", [], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Message result for the DeleteAllTranslations method" } } });
|
|
}
|
|
create(value?: PartialMessage<DeleteAllTranslationsResult>): DeleteAllTranslationsResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DeleteAllTranslationsResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteAllTranslationsResult): DeleteAllTranslationsResult {
|
|
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: DeleteAllTranslationsResult, 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.DeleteAllTranslationsResult
|
|
*/
|
|
export const DeleteAllTranslationsResult = new DeleteAllTranslationsResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class GetLanguagesRequest$Type extends MessageType<GetLanguagesRequest> {
|
|
constructor() {
|
|
super("vizapi.GetLanguagesRequest", [], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Message request for the GetLanguages method" } } });
|
|
}
|
|
create(value?: PartialMessage<GetLanguagesRequest>): GetLanguagesRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<GetLanguagesRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetLanguagesRequest): GetLanguagesRequest {
|
|
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: GetLanguagesRequest, 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.GetLanguagesRequest
|
|
*/
|
|
export const GetLanguagesRequest = new GetLanguagesRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class GetLanguagesResult$Type extends MessageType<GetLanguagesResult> {
|
|
constructor() {
|
|
super("vizapi.GetLanguagesResult", [
|
|
{ no: 1, name: "Languages", kind: "message", localName: "Languages", jsonName: "Languages", repeat: 2 /*RepeatType.UNPACKED*/, T: () => LanguageCode }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Message result for the GetLanguages method" } } });
|
|
}
|
|
create(value?: PartialMessage<GetLanguagesResult>): GetLanguagesResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Languages = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<GetLanguagesResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetLanguagesResult): GetLanguagesResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated vizapi.LanguageCode Languages */ 1:
|
|
message.Languages.push(LanguageCode.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: GetLanguagesResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated vizapi.LanguageCode Languages = 1; */
|
|
for (let i = 0; i < message.Languages.length; i++)
|
|
LanguageCode.internalBinaryWrite(message.Languages[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.GetLanguagesResult
|
|
*/
|
|
export const GetLanguagesResult = new GetLanguagesResult$Type();
|
|
/**
|
|
* @generated ServiceType for protobuf service vizapi.TranslationsService
|
|
*/
|
|
export const TranslationsService = new ServiceType("vizapi.TranslationsService", [
|
|
{ name: "Get", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Translations"], summary: "Get the translations of a label", description: "Get the translations of a label for a given context in a project" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "HIDDEN" } }, I: GetTranslationsRequest, O: GetTranslationsResult },
|
|
{ name: "Put", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Translations"], summary: "Put the translations of a label", description: "Put the translations of a label for a given context in a project" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "HIDDEN" } }, I: PutTranslationsRequest, O: PutTranslationsResult },
|
|
{ name: "Delete", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Translations"], summary: "Delete the translations of a label", description: "Delete the translations of a label for a given context in a project" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "HIDDEN" } }, I: DeleteTranslationsRequest, O: DeleteTranslationsResult },
|
|
{ name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Translations"], summary: "List the translations of a label", description: "List all the available translations for a given language code in a project" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "HIDDEN" } }, I: ListTranslationsRequest, O: ListTranslationsResult },
|
|
{ name: "DeleteAll", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Translations"], summary: "Delete all the translations", description: "Delete all the translations of a project" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "HIDDEN" } }, I: DeleteAllTranslationsRequest, O: DeleteAllTranslationsResult },
|
|
{ name: "GetLanguages", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Translations"], summary: "Get all the available languages", description: "Get all the available languages" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "HIDDEN" } }, I: GetLanguagesRequest, O: GetLanguagesResult }
|
|
], { "api.k8sService": "translations-server" });
|