Files
npm-core-sdk/elastic.ts
2026-02-24 15:36:48 +00:00

512 lines
26 KiB
TypeScript

// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
// @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 { EntityType } from "./shared";
/**
* @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
*/
TemplateGeneration: {
[key: string]: boolean;
};
}
/**
* @generated from protobuf message api.CreateResourceMappingsRequest
*/
export interface CreateResourceMappingsRequest {
/**
* @generated from protobuf field: string RscID = 1
*/
RscID: string;
}
/**
* @generated from protobuf message api.CreateResourceMappingsResult
*/
export interface CreateResourceMappingsResult {
/**
* @generated from protobuf field: map<string, bool> TemplateGeneration = 1
*/
TemplateGeneration: {
[key: string]: boolean;
};
}
/**
* @generated from protobuf message api.DeleteResourceMappingsRequest
*/
export interface DeleteResourceMappingsRequest {
/**
* @generated from protobuf field: string RscID = 1
*/
RscID: string;
}
/**
* @generated from protobuf message api.DeleteResourceMappingsResult
*/
export interface DeleteResourceMappingsResult {
/**
* @generated from protobuf field: map<string, bool> TemplateDeletion = 1
*/
TemplateDeletion: {
[key: string]: boolean;
};
}
/**
* @generated from protobuf message api.ClearIndexEntityRequest
*/
export interface ClearIndexEntityRequest {
/**
* @generated from protobuf field: string RscID = 1
*/
RscID: string;
/**
* @generated from protobuf field: api.EntityType Entity = 2
*/
Entity: EntityType;
}
/**
* @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:
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 api.UpdateModelMappingsResult.TemplateGeneration");
}
}
map[key ?? ""] = val ?? false;
}
internalBinaryWrite(message: UpdateModelMappingsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* map<string, bool> TemplateGeneration = 1; */
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 CreateResourceMappingsRequest$Type extends MessageType<CreateResourceMappingsRequest> {
constructor() {
super("api.CreateResourceMappingsRequest", [
{ no: 1, name: "RscID", kind: "scalar", localName: "RscID", jsonName: "RscID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["RscID"] } } });
}
create(value?: PartialMessage<CreateResourceMappingsRequest>): CreateResourceMappingsRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.RscID = "";
if (value !== undefined)
reflectionMergePartial<CreateResourceMappingsRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateResourceMappingsRequest): CreateResourceMappingsRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string RscID */ 1:
message.RscID = 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: CreateResourceMappingsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string RscID = 1; */
if (message.RscID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.RscID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.CreateResourceMappingsRequest
*/
export const CreateResourceMappingsRequest = new CreateResourceMappingsRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CreateResourceMappingsResult$Type extends MessageType<CreateResourceMappingsResult> {
constructor() {
super("api.CreateResourceMappingsResult", [
{ no: 1, name: "TemplateGeneration", kind: "map", localName: "TemplateGeneration", jsonName: "TemplateGeneration", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 8 /*ScalarType.BOOL*/ } }
]);
}
create(value?: PartialMessage<CreateResourceMappingsResult>): CreateResourceMappingsResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.TemplateGeneration = {};
if (value !== undefined)
reflectionMergePartial<CreateResourceMappingsResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateResourceMappingsResult): CreateResourceMappingsResult {
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:
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: CreateResourceMappingsResult["TemplateGeneration"], reader: IBinaryReader, options: BinaryReadOptions): void {
let len = reader.uint32(), end = reader.pos + len, key: keyof CreateResourceMappingsResult["TemplateGeneration"] | undefined, val: CreateResourceMappingsResult["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 api.CreateResourceMappingsResult.TemplateGeneration");
}
}
map[key ?? ""] = val ?? false;
}
internalBinaryWrite(message: CreateResourceMappingsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* map<string, bool> TemplateGeneration = 1; */
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.CreateResourceMappingsResult
*/
export const CreateResourceMappingsResult = new CreateResourceMappingsResult$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteResourceMappingsRequest$Type extends MessageType<DeleteResourceMappingsRequest> {
constructor() {
super("api.DeleteResourceMappingsRequest", [
{ no: 1, name: "RscID", kind: "scalar", localName: "RscID", jsonName: "RscID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["RscID", "RscType"] } } });
}
create(value?: PartialMessage<DeleteResourceMappingsRequest>): DeleteResourceMappingsRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.RscID = "";
if (value !== undefined)
reflectionMergePartial<DeleteResourceMappingsRequest>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteResourceMappingsRequest): DeleteResourceMappingsRequest {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string RscID */ 1:
message.RscID = 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: DeleteResourceMappingsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string RscID = 1; */
if (message.RscID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.RscID);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.DeleteResourceMappingsRequest
*/
export const DeleteResourceMappingsRequest = new DeleteResourceMappingsRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DeleteResourceMappingsResult$Type extends MessageType<DeleteResourceMappingsResult> {
constructor() {
super("api.DeleteResourceMappingsResult", [
{ no: 1, name: "TemplateDeletion", kind: "map", localName: "TemplateDeletion", jsonName: "TemplateDeletion", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 8 /*ScalarType.BOOL*/ } }
]);
}
create(value?: PartialMessage<DeleteResourceMappingsResult>): DeleteResourceMappingsResult {
const message = globalThis.Object.create((this.messagePrototype!));
message.TemplateDeletion = {};
if (value !== undefined)
reflectionMergePartial<DeleteResourceMappingsResult>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteResourceMappingsResult): DeleteResourceMappingsResult {
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:
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: DeleteResourceMappingsResult["TemplateDeletion"], reader: IBinaryReader, options: BinaryReadOptions): void {
let len = reader.uint32(), end = reader.pos + len, key: keyof DeleteResourceMappingsResult["TemplateDeletion"] | undefined, val: DeleteResourceMappingsResult["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 api.DeleteResourceMappingsResult.TemplateDeletion");
}
}
map[key ?? ""] = val ?? false;
}
internalBinaryWrite(message: DeleteResourceMappingsResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* map<string, bool> TemplateDeletion = 1; */
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.DeleteResourceMappingsResult
*/
export const DeleteResourceMappingsResult = new DeleteResourceMappingsResult$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: "RscID", kind: "scalar", localName: "RscID", jsonName: "RscID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "Entity", kind: "enum", localName: "Entity", jsonName: "Entity", T: () => ["api.EntityType", EntityType], options: { "validate.rules": { enum: { definedOnly: true } } } }
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["RscID", "RscType", "Entity"] } } });
}
create(value?: PartialMessage<ClearIndexEntityRequest>): ClearIndexEntityRequest {
const message = globalThis.Object.create((this.messagePrototype!));
message.RscID = "";
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 RscID */ 1:
message.RscID = reader.string();
break;
case /* api.EntityType 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 RscID = 1; */
if (message.RscID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.RscID);
/* api.EntityType Entity = 2; */
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: ["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: "CreateResourceMappings", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Elastic"], description: "Generate new resource mapping templates" }, "api.rscType": "Platform", "api.roles": "Platform.Elastic", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: CreateResourceMappingsRequest, O: CreateResourceMappingsResult },
{ name: "DeleteResourceMappings", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Elastic"], description: "Delete resoource mapping templates" }, "api.rscType": "Platform", "api.roles": "Platform.Elastic", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: DeleteResourceMappingsRequest, O: DeleteResourceMappingsResult },
{ name: "ClearIndexEntity", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["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" });