You've already forked npm-core-sdk
686 lines
31 KiB
TypeScript
686 lines
31 KiB
TypeScript
// @generated by protobuf-ts 2.9.6 with parameter use_proto_field_name
|
|
// @generated from protobuf file "elastic.proto" (package "api", syntax proto3)
|
|
// tslint:disable
|
|
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
import { WireType } from "@protobuf-ts/runtime";
|
|
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";
|
|
import { ModelDataSetEnum } from "./shared";
|
|
//
|
|
// message ReIndexElasticRequest {
|
|
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
|
// json_schema: {
|
|
// required: ["ProjectID"]
|
|
// }
|
|
// };
|
|
// string ProjectID = 1
|
|
// [
|
|
// (validate.rules).string.min_len = 1
|
|
// ];
|
|
// string TemporaryIndexPrefix = 3;
|
|
// }
|
|
//
|
|
// message ReIndexElasticResult {
|
|
// map<string, string> TaskIDs = 1;
|
|
// string TemporaryIndexPrefix = 3;
|
|
// }
|
|
//
|
|
// message DeleteIndexElasticRequest {
|
|
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
|
// json_schema: {
|
|
// required: ["ProjectID"]
|
|
// }
|
|
// };
|
|
// string ProjectID = 1
|
|
// [
|
|
// (validate.rules).string.min_len = 1
|
|
// ];
|
|
// string TemporaryIndexPrefix = 2;
|
|
// }
|
|
//
|
|
// message DeleteIndexElasticResult {
|
|
// map<string, bool> Completed = 1;
|
|
// }
|
|
//
|
|
// message GetReindexStatusRequest {
|
|
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
|
// json_schema: {
|
|
// required: ["ProjectID"]
|
|
// }
|
|
// };
|
|
// string ProjectID = 1
|
|
// [
|
|
// (validate.rules).string.min_len = 1
|
|
// ];
|
|
// map<string, string> TaskIDs = 2;
|
|
// }
|
|
//
|
|
// message GetReindexStatusResult {
|
|
// map<string, bool> Completed = 1;
|
|
// }
|
|
//
|
|
// message GenerateElasticTemplateRequest {
|
|
// }
|
|
//
|
|
// message GenerateElasticTemplateResult {
|
|
// map<string, bool> TemplateGeneration = 1;
|
|
// }
|
|
//
|
|
// enum EsIndexStatus {
|
|
// ES_INDEX_STATUS_UNKNOWN = 0;
|
|
// ES_INDEX_STATUS_CREATED = 1;
|
|
// ES_INDEX_STATUS_COMPLETED = 2;
|
|
// ES_INDEX_STATUS_RUNNING = 3;
|
|
// ES_INDEX_STATUS_FAILED = 4;
|
|
// }
|
|
//
|
|
// message ManagedIndexInfo {
|
|
// string Alias = 1;
|
|
// string Index = 2;
|
|
// string State = 3;
|
|
// string Info = 4;
|
|
// EsIndexStatus Status = 5;
|
|
// }
|
|
// message CreateIsmPolicyRequest {
|
|
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
|
// json_schema: {
|
|
// required: ["ProjectID"]
|
|
// }
|
|
// };
|
|
// string ProjectID = 1
|
|
// [
|
|
// (validate.rules).string.min_len = 1
|
|
// ];
|
|
// }
|
|
// message CreateIsmPolicyResult {
|
|
// }
|
|
// message DeleteIsmPolicyRequest {
|
|
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
|
// json_schema: {
|
|
// required: ["ProjectID"]
|
|
// }
|
|
// };
|
|
// string ProjectID = 1
|
|
// [
|
|
// (validate.rules).string.min_len = 1
|
|
// ];
|
|
// }
|
|
// message DeleteIsmPolicyResult {
|
|
// }
|
|
// message CreateManagedIndexesRequest {
|
|
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
|
// json_schema: {
|
|
// required: ["ProjectID"]
|
|
// }
|
|
// };
|
|
// string ProjectID = 1
|
|
// [
|
|
// (validate.rules).string.min_len = 1
|
|
// ];
|
|
// }
|
|
// message CreateManagedIndexesResult {
|
|
// repeated ManagedIndexInfo ManagedIndexInfo = 1;
|
|
// }
|
|
// message GetCurrentManagedIndexesRequest {
|
|
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
|
// json_schema: {
|
|
// required: ["ProjectID"]
|
|
// }
|
|
// };
|
|
// string ProjectID = 1
|
|
// [
|
|
// (validate.rules).string.min_len = 1
|
|
// ];
|
|
// }
|
|
// message GetCurrentManagedIndexesResult {
|
|
// repeated ManagedIndexInfo ManagedIndexInfo = 1;
|
|
// }
|
|
// message GetEntityAllManagedIndexesRequest {
|
|
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
|
// json_schema: {
|
|
// required: ["ProjectID", "EntityID"]
|
|
// }
|
|
// };
|
|
// string ProjectID = 1
|
|
// [
|
|
// (validate.rules).string.min_len = 1
|
|
// ];
|
|
// string EntityID = 2
|
|
// [
|
|
// (validate.rules).string.min_len = 1
|
|
// ];
|
|
// }
|
|
// message GetEntityAllManagedIndexesResult {
|
|
// repeated ManagedIndexInfo ManagedIndexInfo = 1;
|
|
// }
|
|
// message RetryFailedManagedIndexPolicyRequest {
|
|
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
|
// json_schema: {
|
|
// required: ["Index"]
|
|
// }
|
|
// };
|
|
// string Index = 1
|
|
// [
|
|
// (validate.rules).string.min_len = 1
|
|
// ];
|
|
// }
|
|
// message RetryFailedManagedIndexPolicyResult {
|
|
// }
|
|
// message RetryAllFailedManagedIndexPolicyRequest {
|
|
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
|
// json_schema: {
|
|
// required: ["ProjectID"]
|
|
// }
|
|
// };
|
|
// string ProjectID = 1
|
|
// [
|
|
// (validate.rules).string.min_len = 1
|
|
// ];
|
|
// }
|
|
// message RetryAllFailedManagedIndexPolicyResult {
|
|
// }
|
|
|
|
/**
|
|
* @generated from protobuf message api.UpdateModelMappingsRequest
|
|
*/
|
|
export interface UpdateModelMappingsRequest {
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.UpdateModelMappingsResult
|
|
*/
|
|
export interface UpdateModelMappingsResult {
|
|
/**
|
|
* @generated from protobuf field: map<string, bool> TemplateGeneration = 1 [json_name = "TemplateGeneration"];
|
|
*/
|
|
TemplateGeneration: {
|
|
[key: string]: boolean;
|
|
};
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.CreateProjectMappingsRequest
|
|
*/
|
|
export interface CreateProjectMappingsRequest {
|
|
/**
|
|
* @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
|
|
*/
|
|
ProjectID: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.CreateProjectMappingsResult
|
|
*/
|
|
export interface CreateProjectMappingsResult {
|
|
/**
|
|
* @generated from protobuf field: map<string, bool> TemplateGeneration = 1 [json_name = "TemplateGeneration"];
|
|
*/
|
|
TemplateGeneration: {
|
|
[key: string]: boolean;
|
|
};
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.DeleteProjectMappingsRequest
|
|
*/
|
|
export interface DeleteProjectMappingsRequest {
|
|
/**
|
|
* @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
|
|
*/
|
|
ProjectID: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.DeleteProjectMappingsResult
|
|
*/
|
|
export interface DeleteProjectMappingsResult {
|
|
/**
|
|
* @generated from protobuf field: map<string, bool> TemplateDeletion = 1 [json_name = "TemplateDeletion"];
|
|
*/
|
|
TemplateDeletion: {
|
|
[key: string]: boolean;
|
|
};
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.ClearIndexEntityRequest
|
|
*/
|
|
export interface ClearIndexEntityRequest {
|
|
/**
|
|
* @generated from protobuf field: string ProjectID = 1 [json_name = "ProjectID"];
|
|
*/
|
|
ProjectID: string;
|
|
/**
|
|
* @generated from protobuf field: api.ModelDataSetEnum Entity = 2 [json_name = "Entity"];
|
|
*/
|
|
Entity: ModelDataSetEnum;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.ClearIndexEntityResult
|
|
*/
|
|
export interface ClearIndexEntityResult {
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class UpdateModelMappingsRequest$Type extends MessageType<UpdateModelMappingsRequest> {
|
|
constructor() {
|
|
super("api.UpdateModelMappingsRequest", []);
|
|
}
|
|
create(value?: PartialMessage<UpdateModelMappingsRequest>): UpdateModelMappingsRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<UpdateModelMappingsRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateModelMappingsRequest): UpdateModelMappingsRequest {
|
|
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: UpdateModelMappingsRequest, 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 api.UpdateModelMappingsRequest
|
|
*/
|
|
export const UpdateModelMappingsRequest = new UpdateModelMappingsRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class UpdateModelMappingsResult$Type extends MessageType<UpdateModelMappingsResult> {
|
|
constructor() {
|
|
super("api.UpdateModelMappingsResult", [
|
|
{ no: 1, name: "TemplateGeneration", kind: "map", localName: "TemplateGeneration", jsonName: "TemplateGeneration", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 8 /*ScalarType.BOOL*/ } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<UpdateModelMappingsResult>): UpdateModelMappingsResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.TemplateGeneration = {};
|
|
if (value !== undefined)
|
|
reflectionMergePartial<UpdateModelMappingsResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateModelMappingsResult): UpdateModelMappingsResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* map<string, bool> TemplateGeneration = 1 [json_name = "TemplateGeneration"];*/ 1:
|
|
this.binaryReadMap1(message.TemplateGeneration, 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: UpdateModelMappingsResult["TemplateGeneration"], reader: IBinaryReader, options: BinaryReadOptions): void {
|
|
let len = reader.uint32(), end = reader.pos + len, key: keyof UpdateModelMappingsResult["TemplateGeneration"] | undefined, val: UpdateModelMappingsResult["TemplateGeneration"][any] | undefined;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case 1:
|
|
key = reader.string();
|
|
break;
|
|
case 2:
|
|
val = reader.bool();
|
|
break;
|
|
default: throw new globalThis.Error("unknown map entry field for field api.UpdateModelMappingsResult.TemplateGeneration");
|
|
}
|
|
}
|
|
map[key ?? ""] = val ?? false;
|
|
}
|
|
internalBinaryWrite(message: UpdateModelMappingsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* map<string, bool> TemplateGeneration = 1 [json_name = "TemplateGeneration"]; */
|
|
for (let k of globalThis.Object.keys(message.TemplateGeneration))
|
|
writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.Varint).bool(message.TemplateGeneration[k]).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.UpdateModelMappingsResult
|
|
*/
|
|
export const UpdateModelMappingsResult = new UpdateModelMappingsResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class CreateProjectMappingsRequest$Type extends MessageType<CreateProjectMappingsRequest> {
|
|
constructor() {
|
|
super("api.CreateProjectMappingsRequest", [
|
|
{ no: 1, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ProjectID"] } } });
|
|
}
|
|
create(value?: PartialMessage<CreateProjectMappingsRequest>): CreateProjectMappingsRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.ProjectID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<CreateProjectMappingsRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateProjectMappingsRequest): CreateProjectMappingsRequest {
|
|
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: CreateProjectMappingsRequest, 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 api.CreateProjectMappingsRequest
|
|
*/
|
|
export const CreateProjectMappingsRequest = new CreateProjectMappingsRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class CreateProjectMappingsResult$Type extends MessageType<CreateProjectMappingsResult> {
|
|
constructor() {
|
|
super("api.CreateProjectMappingsResult", [
|
|
{ no: 1, name: "TemplateGeneration", kind: "map", localName: "TemplateGeneration", jsonName: "TemplateGeneration", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 8 /*ScalarType.BOOL*/ } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<CreateProjectMappingsResult>): CreateProjectMappingsResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.TemplateGeneration = {};
|
|
if (value !== undefined)
|
|
reflectionMergePartial<CreateProjectMappingsResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateProjectMappingsResult): CreateProjectMappingsResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* map<string, bool> TemplateGeneration = 1 [json_name = "TemplateGeneration"];*/ 1:
|
|
this.binaryReadMap1(message.TemplateGeneration, 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: CreateProjectMappingsResult["TemplateGeneration"], reader: IBinaryReader, options: BinaryReadOptions): void {
|
|
let len = reader.uint32(), end = reader.pos + len, key: keyof CreateProjectMappingsResult["TemplateGeneration"] | undefined, val: CreateProjectMappingsResult["TemplateGeneration"][any] | undefined;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case 1:
|
|
key = reader.string();
|
|
break;
|
|
case 2:
|
|
val = reader.bool();
|
|
break;
|
|
default: throw new globalThis.Error("unknown map entry field for field api.CreateProjectMappingsResult.TemplateGeneration");
|
|
}
|
|
}
|
|
map[key ?? ""] = val ?? false;
|
|
}
|
|
internalBinaryWrite(message: CreateProjectMappingsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* map<string, bool> TemplateGeneration = 1 [json_name = "TemplateGeneration"]; */
|
|
for (let k of globalThis.Object.keys(message.TemplateGeneration))
|
|
writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.Varint).bool(message.TemplateGeneration[k]).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.CreateProjectMappingsResult
|
|
*/
|
|
export const CreateProjectMappingsResult = new CreateProjectMappingsResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DeleteProjectMappingsRequest$Type extends MessageType<DeleteProjectMappingsRequest> {
|
|
constructor() {
|
|
super("api.DeleteProjectMappingsRequest", [
|
|
{ no: 1, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["ProjectID"] } } });
|
|
}
|
|
create(value?: PartialMessage<DeleteProjectMappingsRequest>): DeleteProjectMappingsRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.ProjectID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DeleteProjectMappingsRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteProjectMappingsRequest): DeleteProjectMappingsRequest {
|
|
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: DeleteProjectMappingsRequest, 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 api.DeleteProjectMappingsRequest
|
|
*/
|
|
export const DeleteProjectMappingsRequest = new DeleteProjectMappingsRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DeleteProjectMappingsResult$Type extends MessageType<DeleteProjectMappingsResult> {
|
|
constructor() {
|
|
super("api.DeleteProjectMappingsResult", [
|
|
{ no: 1, name: "TemplateDeletion", kind: "map", localName: "TemplateDeletion", jsonName: "TemplateDeletion", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 8 /*ScalarType.BOOL*/ } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<DeleteProjectMappingsResult>): DeleteProjectMappingsResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.TemplateDeletion = {};
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DeleteProjectMappingsResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteProjectMappingsResult): DeleteProjectMappingsResult {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* map<string, bool> TemplateDeletion = 1 [json_name = "TemplateDeletion"];*/ 1:
|
|
this.binaryReadMap1(message.TemplateDeletion, 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: DeleteProjectMappingsResult["TemplateDeletion"], reader: IBinaryReader, options: BinaryReadOptions): void {
|
|
let len = reader.uint32(), end = reader.pos + len, key: keyof DeleteProjectMappingsResult["TemplateDeletion"] | undefined, val: DeleteProjectMappingsResult["TemplateDeletion"][any] | undefined;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case 1:
|
|
key = reader.string();
|
|
break;
|
|
case 2:
|
|
val = reader.bool();
|
|
break;
|
|
default: throw new globalThis.Error("unknown map entry field for field api.DeleteProjectMappingsResult.TemplateDeletion");
|
|
}
|
|
}
|
|
map[key ?? ""] = val ?? false;
|
|
}
|
|
internalBinaryWrite(message: DeleteProjectMappingsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* map<string, bool> TemplateDeletion = 1 [json_name = "TemplateDeletion"]; */
|
|
for (let k of globalThis.Object.keys(message.TemplateDeletion))
|
|
writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.Varint).bool(message.TemplateDeletion[k]).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.DeleteProjectMappingsResult
|
|
*/
|
|
export const DeleteProjectMappingsResult = new DeleteProjectMappingsResult$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ClearIndexEntityRequest$Type extends MessageType<ClearIndexEntityRequest> {
|
|
constructor() {
|
|
super("api.ClearIndexEntityRequest", [
|
|
{ no: 1, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 2, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.ModelDataSetEnum", ModelDataSetEnum], options: { "validate.rules": { enum: { definedOnly: true } } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<ClearIndexEntityRequest>): ClearIndexEntityRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.ProjectID = "";
|
|
message.Entity = 0;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ClearIndexEntityRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClearIndexEntityRequest): ClearIndexEntityRequest {
|
|
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 /* api.ModelDataSetEnum Entity = 2 [json_name = "Entity"];*/ 2:
|
|
message.Entity = 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: ClearIndexEntityRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ProjectID = 1 [json_name = "ProjectID"]; */
|
|
if (message.ProjectID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.ProjectID);
|
|
/* api.ModelDataSetEnum Entity = 2 [json_name = "Entity"]; */
|
|
if (message.Entity !== 0)
|
|
writer.tag(2, WireType.Varint).int32(message.Entity);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.ClearIndexEntityRequest
|
|
*/
|
|
export const ClearIndexEntityRequest = new ClearIndexEntityRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ClearIndexEntityResult$Type extends MessageType<ClearIndexEntityResult> {
|
|
constructor() {
|
|
super("api.ClearIndexEntityResult", []);
|
|
}
|
|
create(value?: PartialMessage<ClearIndexEntityResult>): ClearIndexEntityResult {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ClearIndexEntityResult>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClearIndexEntityResult): ClearIndexEntityResult {
|
|
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: ClearIndexEntityResult, 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 api.ClearIndexEntityResult
|
|
*/
|
|
export const ClearIndexEntityResult = new ClearIndexEntityResult$Type();
|
|
/**
|
|
* @generated ServiceType for protobuf service api.ElasticService
|
|
*/
|
|
export const ElasticService = new ServiceType("api.ElasticService", [
|
|
{ name: "UpdateModelMappings", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project Elastic"], description: "Generate new model mapping templates" }, "api.rscType": "Platform", "api.roles": "Platform.Elastic", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: UpdateModelMappingsRequest, O: UpdateModelMappingsResult },
|
|
{ name: "CreateProjectMappings", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project Elastic"], description: "Generate new project mapping templates" }, "api.rscType": "Platform", "api.roles": "Platform.Elastic", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: CreateProjectMappingsRequest, O: CreateProjectMappingsResult },
|
|
{ name: "DeleteProjectMappings", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project Elastic"], description: "Delete project mapping templates" }, "api.rscType": "Platform", "api.roles": "Platform.Elastic", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: DeleteProjectMappingsRequest, O: DeleteProjectMappingsResult },
|
|
{ name: "ClearIndexEntity", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Project Elastic"], description: "Clear data for a specific entity" }, "api.rscType": "Platform", "api.roles": "Platform.Elastic", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: ClearIndexEntityRequest, O: ClearIndexEntityResult }
|
|
], { "api.k8sService": "project-model-server" });
|