@nebius/js-sdk 0.1.44 → 0.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/nebius/compute/v1/index.d.ts +61 -0
- package/dist/cjs/api/nebius/compute/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/compute/v1/index.js +406 -2
- package/dist/cjs/api/nebius/compute/v1/index.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/api/nebius/compute/v1/index.d.ts +61 -0
- package/dist/esm/api/nebius/compute/v1/index.d.ts.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/* Generated by Nebius TS generator. DO NOT EDIT! */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.ListImagesRequest = exports.GetImageLatestByFamilyRequest = exports.GetImageRequest = exports.GpuClusterStatusInfinibandTopologyPathInstance = exports.GpuClusterStatusInfinibandTopologyPath = exports.GpuClusterStatus = exports.GpuClusterSpec = exports.GpuCluster = exports.GpuClusterService = exports.GpuClusterServiceBaseClient = exports.GpuClusterServiceServiceDescription = exports.ListGpuClustersResponse = exports.DeleteGpuClusterRequest = exports.UpdateGpuClusterRequest = exports.CreateGpuClusterRequest = exports.ListGpuClustersRequest = exports.GetGpuClusterRequest = exports.FilesystemStatus = exports.FilesystemSpec = exports.Filesystem = exports.FilesystemStatus_State = exports.FilesystemSpec_FilesystemType = exports.FilesystemService = exports.FilesystemServiceBaseClient = exports.FilesystemServiceServiceDescription = exports.ListFilesystemsResponse = exports.DeleteFilesystemRequest = exports.UpdateFilesystemRequest = exports.CreateFilesystemRequest = exports.ListFilesystemsRequest = exports.GetFilesystemRequest = exports.DiskEncryption = exports.DiskStatus_LockState = exports.DiskStatus = exports.SourceImageFamily = exports.DiskSpec = exports.Disk = exports.DiskEncryption_DiskEncryptionType = exports.DiskStatus_SourceImageCPUArchitecture = exports.DiskStatus_State = exports.DiskSpec_DiskType = exports.DiskService = exports.DiskServiceBaseClient = exports.DiskServiceServiceDescription = exports.ListDisksResponse = exports.DeleteDiskRequest = exports.UpdateDiskRequest = exports.CreateDiskRequest = exports.ListDisksRequest = exports.GetDiskRequest = void 0;
|
|
5
|
-
exports.
|
|
6
|
-
exports.PlatformStatus = exports.PresetResources = exports.Preset = exports.PlatformSpec = exports.Platform = exports.PlatformService = exports.PlatformServiceBaseClient = exports.PlatformServiceServiceDescription = exports.ListPlatformsResponse = exports.ListPlatformsRequest = exports.ListOperationsByParentRequest = exports.NodeService = exports.NodeServiceBaseClient = exports.NodeServiceServiceDescription = exports.NodeSetUnhealthyResponse = exports.NodeSetUnhealthyRequest_HealthCheckInfo = exports.NodeSetUnhealthyRequest = exports.SecurityGroup = exports.IPAliasesStatus = exports.PublicIPAddressStatus = exports.IPAddressStatus = exports.NetworkInterfaceStatus = exports.IPAlias = exports.PublicIPAddress = exports.IPAddress = exports.NetworkInterfaceSpec = exports.MaintenanceService = exports.MaintenanceServiceBaseClient = exports.MaintenanceServiceServiceDescription = exports.ListMaintenanceEventsResponse = void 0;
|
|
5
|
+
exports.MaintenanceEventSpec = exports.MaintenanceEvent = exports.PassthroughGroupRequest = exports.LocalDisksSpec = exports.ReservationPolicy = exports.InstanceStatusInfinibandTopologyPath = exports.InstanceStatus = exports.AttachedFilesystemSpec = exports.ExistingFilesystem = exports.ExistingDisk = exports.AttachedDiskSpec = exports.InstanceGpuClusterSpec = exports.ResourcesSpec = exports.PreemptibleSpec = exports.InstanceSpec = exports.Instance = exports.ReservationPolicy_Policy = exports.InstanceStatus_InstanceState = exports.AttachedFilesystemSpec_AttachMode = exports.AttachedDiskSpec_AttachMode = exports.PreemptibleSpec_PreemptionPolicy = exports.InstanceRecoveryPolicy = exports.InstanceService = exports.InstanceServiceBaseClient = exports.InstanceServiceServiceDescription = exports.BatchGetResponse_BatchGetResult = exports.BatchGetResponse = exports.BatchGetRequest = exports.StopInstanceRequest = exports.StartInstanceRequest = exports.ListInstancesResponse = exports.DeleteInstanceRequest = exports.UpdateInstanceRequest = exports.CreateInstanceRequest = exports.ListInstancesRequest = exports.GetInstanceRequest = exports.ImageStatus_ImageFamilyDeprecationStatus = exports.ImageStatus = exports.ImageSpec = exports.Image = exports.ImageStatus_State = exports.ImageSpec_CPUArchitecture = exports.ImageService = exports.ImageServiceBaseClient = exports.ImageServiceServiceDescription = exports.ListPublicRequest = exports.ListImagesResponse = exports.DeleteImageRequest = exports.UpdateImageRequest = exports.CreateImageRequest = void 0;
|
|
6
|
+
exports.PlatformStatus = exports.PresetResources = exports.Preset = exports.PlatformSpec = exports.Platform = exports.PlatformService = exports.PlatformServiceBaseClient = exports.PlatformServiceServiceDescription = exports.ListPlatformsResponse = exports.ListPlatformsRequest = exports.ListOperationsByParentRequest = exports.NodeService = exports.NodeServiceBaseClient = exports.NodeServiceServiceDescription = exports.NodeSetUnhealthyResponse = exports.NodeSetUnhealthyRequest_HealthCheckInfo = exports.NodeSetUnhealthyRequest = exports.SecurityGroup = exports.IPAliasesStatus = exports.PublicIPAddressStatus = exports.IPAddressStatus = exports.NetworkInterfaceStatus = exports.IPAlias = exports.PublicIPAddress = exports.IPAddress = exports.NetworkInterfaceSpec = exports.MaintenanceService = exports.MaintenanceServiceBaseClient = exports.MaintenanceServiceServiceDescription = exports.ListMaintenanceEventsResponse = exports.ListMaintenanceEventsRequest = exports.GetMaintenanceEventByInstanceRequest = exports.MaintenanceEventStatus = void 0;
|
|
7
7
|
const index_1 = require("../../../../runtime/protos/index");
|
|
8
8
|
const util_1 = require("util");
|
|
9
9
|
const protobuf_1 = require("../../../protobuf");
|
|
@@ -11,6 +11,7 @@ const logging_1 = require("../../../../runtime/util/logging");
|
|
|
11
11
|
const grpc_js_1 = require("@grpc/grpc-js");
|
|
12
12
|
const request_1 = require("../../../../runtime/request");
|
|
13
13
|
const operation_1 = require("../../../../runtime/operation");
|
|
14
|
+
const rpc_1 = require("../../../google/rpc");
|
|
14
15
|
const v1_1 = require("../../common/v1");
|
|
15
16
|
const __deprecatedWarned = new Set();
|
|
16
17
|
exports.GetDiskRequest = {
|
|
@@ -8153,6 +8154,391 @@ function createBaseStopInstanceRequest() {
|
|
|
8153
8154
|
};
|
|
8154
8155
|
return applyStopInstanceRequestCustom(message);
|
|
8155
8156
|
}
|
|
8157
|
+
exports.BatchGetRequest = {
|
|
8158
|
+
$type: "nebius.compute.v1.BatchGetRequest",
|
|
8159
|
+
encode(message, writer = new index_1.BinaryWriter()) {
|
|
8160
|
+
for (const v of (message.instanceIds ?? [])) {
|
|
8161
|
+
writer.uint32(10).string(v);
|
|
8162
|
+
}
|
|
8163
|
+
if (message[index_1.unknownFieldsSymbol]) {
|
|
8164
|
+
writer.raw(message[index_1.unknownFieldsSymbol]);
|
|
8165
|
+
}
|
|
8166
|
+
return writer;
|
|
8167
|
+
},
|
|
8168
|
+
decode(input, length) {
|
|
8169
|
+
const reader = input instanceof index_1.BinaryReader ? input : new index_1.BinaryReader(input);
|
|
8170
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
8171
|
+
const message = createBaseBatchGetRequest();
|
|
8172
|
+
let writer = undefined;
|
|
8173
|
+
while (reader.pos < end) {
|
|
8174
|
+
const tag = reader.uint32();
|
|
8175
|
+
switch (tag >>> 3) {
|
|
8176
|
+
case 1: {
|
|
8177
|
+
if (tag !== 10)
|
|
8178
|
+
break;
|
|
8179
|
+
message.instanceIds.push(reader.string());
|
|
8180
|
+
continue;
|
|
8181
|
+
}
|
|
8182
|
+
default:
|
|
8183
|
+
break;
|
|
8184
|
+
}
|
|
8185
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8186
|
+
break;
|
|
8187
|
+
}
|
|
8188
|
+
{
|
|
8189
|
+
if (!writer)
|
|
8190
|
+
writer = new index_1.BinaryWriter();
|
|
8191
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
8192
|
+
writer.uint32(tag).raw(skipped);
|
|
8193
|
+
}
|
|
8194
|
+
}
|
|
8195
|
+
if (writer) {
|
|
8196
|
+
message[index_1.unknownFieldsSymbol] = writer.finish();
|
|
8197
|
+
}
|
|
8198
|
+
return message;
|
|
8199
|
+
},
|
|
8200
|
+
fromJSON(object) {
|
|
8201
|
+
return applyBatchGetRequestCustom({
|
|
8202
|
+
$type: "nebius.compute.v1.BatchGetRequest",
|
|
8203
|
+
instanceIds: globalThis.Array.isArray(object?.instanceIds ?? object?.instance_ids)
|
|
8204
|
+
? (object.instanceIds ?? object.instance_ids).map((e) => String(e))
|
|
8205
|
+
: [],
|
|
8206
|
+
});
|
|
8207
|
+
},
|
|
8208
|
+
toJSON(message, use = "json") {
|
|
8209
|
+
const obj = {};
|
|
8210
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
8211
|
+
if (message.instanceIds?.length) {
|
|
8212
|
+
obj[pick("instanceIds", "instance_ids")] = message.instanceIds.map((e) => e);
|
|
8213
|
+
}
|
|
8214
|
+
return obj;
|
|
8215
|
+
},
|
|
8216
|
+
create(base) {
|
|
8217
|
+
return exports.BatchGetRequest.fromPartial(base ?? {});
|
|
8218
|
+
},
|
|
8219
|
+
fromPartial(object) {
|
|
8220
|
+
const message = createBaseBatchGetRequest();
|
|
8221
|
+
message.instanceIds = object.instanceIds?.map((e) => e) || [];
|
|
8222
|
+
return message;
|
|
8223
|
+
},
|
|
8224
|
+
};
|
|
8225
|
+
protobuf_1.protoRegistry.registerMessage(exports.BatchGetRequest);
|
|
8226
|
+
function BatchGetRequestCustomInspect() {
|
|
8227
|
+
const parts = [];
|
|
8228
|
+
if ((this.instanceIds?.length ?? 0) !== 0)
|
|
8229
|
+
parts.push("instanceIds" + "=" + (0, util_1.inspect)(this.instanceIds));
|
|
8230
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
8231
|
+
}
|
|
8232
|
+
function BatchGetRequestCustomJson() {
|
|
8233
|
+
const obj = {
|
|
8234
|
+
type: this.$type,
|
|
8235
|
+
};
|
|
8236
|
+
if ((this.instanceIds?.length ?? 0) !== 0)
|
|
8237
|
+
obj.instanceIds = (0, logging_1.inspectJson)(this.instanceIds);
|
|
8238
|
+
return obj;
|
|
8239
|
+
}
|
|
8240
|
+
function applyBatchGetRequestCustom(message) {
|
|
8241
|
+
message[logging_1.custom] = BatchGetRequestCustomInspect;
|
|
8242
|
+
message[logging_1.customJson] = BatchGetRequestCustomJson;
|
|
8243
|
+
return message;
|
|
8244
|
+
}
|
|
8245
|
+
function createBaseBatchGetRequest() {
|
|
8246
|
+
const message = {
|
|
8247
|
+
$type: "nebius.compute.v1.BatchGetRequest",
|
|
8248
|
+
instanceIds: [],
|
|
8249
|
+
};
|
|
8250
|
+
return applyBatchGetRequestCustom(message);
|
|
8251
|
+
}
|
|
8252
|
+
exports.BatchGetResponse = {
|
|
8253
|
+
$type: "nebius.compute.v1.BatchGetResponse",
|
|
8254
|
+
encode(message, writer = new index_1.BinaryWriter()) {
|
|
8255
|
+
for (const [k, v] of Object.entries(message.items ?? {})) {
|
|
8256
|
+
const w = writer.uint32(10).fork();
|
|
8257
|
+
w.uint32(10).string(k);
|
|
8258
|
+
(() => {
|
|
8259
|
+
const w2 = writer.uint32(18).fork();
|
|
8260
|
+
exports.BatchGetResponse_BatchGetResult.encode(v, w2);
|
|
8261
|
+
w2.join();
|
|
8262
|
+
})();
|
|
8263
|
+
w.join();
|
|
8264
|
+
}
|
|
8265
|
+
if (message[index_1.unknownFieldsSymbol]) {
|
|
8266
|
+
writer.raw(message[index_1.unknownFieldsSymbol]);
|
|
8267
|
+
}
|
|
8268
|
+
return writer;
|
|
8269
|
+
},
|
|
8270
|
+
decode(input, length) {
|
|
8271
|
+
const reader = input instanceof index_1.BinaryReader ? input : new index_1.BinaryReader(input);
|
|
8272
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
8273
|
+
const message = createBaseBatchGetResponse();
|
|
8274
|
+
let writer = undefined;
|
|
8275
|
+
while (reader.pos < end) {
|
|
8276
|
+
const tag = reader.uint32();
|
|
8277
|
+
switch (tag >>> 3) {
|
|
8278
|
+
case 1: {
|
|
8279
|
+
if (tag !== 10)
|
|
8280
|
+
break; // wire type guard
|
|
8281
|
+
const end2 = reader.uint32() + reader.pos;
|
|
8282
|
+
let key = "";
|
|
8283
|
+
let value = undefined;
|
|
8284
|
+
while (reader.pos < end2) {
|
|
8285
|
+
const tag2 = reader.uint32();
|
|
8286
|
+
switch (tag2 >>> 3) {
|
|
8287
|
+
case 1: {
|
|
8288
|
+
key = reader.string();
|
|
8289
|
+
continue;
|
|
8290
|
+
}
|
|
8291
|
+
case 2: {
|
|
8292
|
+
value = exports.BatchGetResponse_BatchGetResult.decode(reader, reader.uint32());
|
|
8293
|
+
continue;
|
|
8294
|
+
}
|
|
8295
|
+
}
|
|
8296
|
+
if ((tag2 & 7) === 4 || tag2 === 0)
|
|
8297
|
+
break;
|
|
8298
|
+
reader.skip(tag2 & 7);
|
|
8299
|
+
}
|
|
8300
|
+
if (value !== undefined) {
|
|
8301
|
+
const stringKey = String(key);
|
|
8302
|
+
message.items[stringKey] = value;
|
|
8303
|
+
}
|
|
8304
|
+
continue;
|
|
8305
|
+
}
|
|
8306
|
+
default:
|
|
8307
|
+
break;
|
|
8308
|
+
}
|
|
8309
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8310
|
+
break;
|
|
8311
|
+
}
|
|
8312
|
+
{
|
|
8313
|
+
if (!writer)
|
|
8314
|
+
writer = new index_1.BinaryWriter();
|
|
8315
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
8316
|
+
writer.uint32(tag).raw(skipped);
|
|
8317
|
+
}
|
|
8318
|
+
}
|
|
8319
|
+
if (writer) {
|
|
8320
|
+
message[index_1.unknownFieldsSymbol] = writer.finish();
|
|
8321
|
+
}
|
|
8322
|
+
return message;
|
|
8323
|
+
},
|
|
8324
|
+
fromJSON(object) {
|
|
8325
|
+
return applyBatchGetResponseCustom({
|
|
8326
|
+
$type: "nebius.compute.v1.BatchGetResponse",
|
|
8327
|
+
items: ((0, index_1.isSet)(object.items) && typeof object.items === "object" ? object.items
|
|
8328
|
+
: ((0, index_1.isSet)(object.items) && typeof object.items === "object" ? object.items : undefined))
|
|
8329
|
+
? Object.entries((object.items ?? object.items)).reduce((acc, [key, value]) => {
|
|
8330
|
+
acc[key] = exports.BatchGetResponse_BatchGetResult.fromJSON(value);
|
|
8331
|
+
return acc;
|
|
8332
|
+
}, {})
|
|
8333
|
+
: {},
|
|
8334
|
+
});
|
|
8335
|
+
},
|
|
8336
|
+
toJSON(message, use = "json") {
|
|
8337
|
+
const obj = {};
|
|
8338
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
8339
|
+
if (message.items) {
|
|
8340
|
+
const entries = Object.entries(message.items);
|
|
8341
|
+
if (entries.length > 0) {
|
|
8342
|
+
obj[pick("items", "items")] = {};
|
|
8343
|
+
entries.forEach(([k, v]) => {
|
|
8344
|
+
obj[pick("items", "items")][k] = exports.BatchGetResponse_BatchGetResult.toJSON(v, use);
|
|
8345
|
+
});
|
|
8346
|
+
}
|
|
8347
|
+
}
|
|
8348
|
+
return obj;
|
|
8349
|
+
},
|
|
8350
|
+
create(base) {
|
|
8351
|
+
return exports.BatchGetResponse.fromPartial(base ?? {});
|
|
8352
|
+
},
|
|
8353
|
+
fromPartial(object) {
|
|
8354
|
+
const message = createBaseBatchGetResponse();
|
|
8355
|
+
message.items = Object.entries(object.items ?? {}).reduce((acc, [key, value]) => {
|
|
8356
|
+
if (value !== undefined) {
|
|
8357
|
+
acc[key] = exports.BatchGetResponse_BatchGetResult.fromPartial(value);
|
|
8358
|
+
}
|
|
8359
|
+
return acc;
|
|
8360
|
+
}, {});
|
|
8361
|
+
return message;
|
|
8362
|
+
},
|
|
8363
|
+
};
|
|
8364
|
+
protobuf_1.protoRegistry.registerMessage(exports.BatchGetResponse);
|
|
8365
|
+
function BatchGetResponseCustomInspect() {
|
|
8366
|
+
const parts = [];
|
|
8367
|
+
if (Object.keys(this.items || {}).length)
|
|
8368
|
+
parts.push("items" + "=" + (0, util_1.inspect)(this.items));
|
|
8369
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
8370
|
+
}
|
|
8371
|
+
function BatchGetResponseCustomJson() {
|
|
8372
|
+
const obj = {
|
|
8373
|
+
type: this.$type,
|
|
8374
|
+
};
|
|
8375
|
+
if (Object.keys(this.items || {}).length)
|
|
8376
|
+
obj.items = (0, logging_1.inspectJson)(this.items);
|
|
8377
|
+
return obj;
|
|
8378
|
+
}
|
|
8379
|
+
function applyBatchGetResponseCustom(message) {
|
|
8380
|
+
message[logging_1.custom] = BatchGetResponseCustomInspect;
|
|
8381
|
+
message[logging_1.customJson] = BatchGetResponseCustomJson;
|
|
8382
|
+
return message;
|
|
8383
|
+
}
|
|
8384
|
+
function createBaseBatchGetResponse() {
|
|
8385
|
+
const message = {
|
|
8386
|
+
$type: "nebius.compute.v1.BatchGetResponse",
|
|
8387
|
+
items: {},
|
|
8388
|
+
};
|
|
8389
|
+
return applyBatchGetResponseCustom(message);
|
|
8390
|
+
}
|
|
8391
|
+
exports.BatchGetResponse_BatchGetResult = {
|
|
8392
|
+
$type: "nebius.compute.v1.BatchGetResponse.BatchGetResult",
|
|
8393
|
+
encode(message, writer = new index_1.BinaryWriter()) {
|
|
8394
|
+
if (message.result?.$case === undefined) { /* noop */ }
|
|
8395
|
+
else if (message.result?.$case === "instance") {
|
|
8396
|
+
const w = writer.uint32(10).fork();
|
|
8397
|
+
exports.Instance.encode(message.result.instance, w);
|
|
8398
|
+
w.join();
|
|
8399
|
+
}
|
|
8400
|
+
else if (message.result?.$case === "error") {
|
|
8401
|
+
const w = writer.uint32(18).fork();
|
|
8402
|
+
rpc_1.Status.encode(message.result.error, w);
|
|
8403
|
+
w.join();
|
|
8404
|
+
}
|
|
8405
|
+
if (message[index_1.unknownFieldsSymbol]) {
|
|
8406
|
+
writer.raw(message[index_1.unknownFieldsSymbol]);
|
|
8407
|
+
}
|
|
8408
|
+
return writer;
|
|
8409
|
+
},
|
|
8410
|
+
decode(input, length) {
|
|
8411
|
+
const reader = input instanceof index_1.BinaryReader ? input : new index_1.BinaryReader(input);
|
|
8412
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
8413
|
+
const message = createBaseBatchGetResponse_BatchGetResult();
|
|
8414
|
+
let writer = undefined;
|
|
8415
|
+
while (reader.pos < end) {
|
|
8416
|
+
const tag = reader.uint32();
|
|
8417
|
+
switch (tag >>> 3) {
|
|
8418
|
+
case 1: {
|
|
8419
|
+
if (tag !== 10)
|
|
8420
|
+
break;
|
|
8421
|
+
message.result = {
|
|
8422
|
+
$case: "instance",
|
|
8423
|
+
instance: exports.Instance.decode(reader, reader.uint32())
|
|
8424
|
+
};
|
|
8425
|
+
continue;
|
|
8426
|
+
}
|
|
8427
|
+
case 2: {
|
|
8428
|
+
if (tag !== 18)
|
|
8429
|
+
break;
|
|
8430
|
+
message.result = {
|
|
8431
|
+
$case: "error",
|
|
8432
|
+
error: rpc_1.Status.decode(reader, reader.uint32())
|
|
8433
|
+
};
|
|
8434
|
+
continue;
|
|
8435
|
+
}
|
|
8436
|
+
default:
|
|
8437
|
+
break;
|
|
8438
|
+
}
|
|
8439
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8440
|
+
break;
|
|
8441
|
+
}
|
|
8442
|
+
{
|
|
8443
|
+
if (!writer)
|
|
8444
|
+
writer = new index_1.BinaryWriter();
|
|
8445
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
8446
|
+
writer.uint32(tag).raw(skipped);
|
|
8447
|
+
}
|
|
8448
|
+
}
|
|
8449
|
+
if (writer) {
|
|
8450
|
+
message[index_1.unknownFieldsSymbol] = writer.finish();
|
|
8451
|
+
}
|
|
8452
|
+
return message;
|
|
8453
|
+
},
|
|
8454
|
+
fromJSON(object) {
|
|
8455
|
+
return applyBatchGetResponse_BatchGetResultCustom({
|
|
8456
|
+
$type: "nebius.compute.v1.BatchGetResponse.BatchGetResult",
|
|
8457
|
+
result: (() => {
|
|
8458
|
+
if ((0, index_1.isSet)(object.instance) || (0, index_1.isSet)(object.instance)) {
|
|
8459
|
+
return {
|
|
8460
|
+
$case: "instance",
|
|
8461
|
+
instance: exports.Instance.fromJSON(object.instance ?? object.instance)
|
|
8462
|
+
};
|
|
8463
|
+
}
|
|
8464
|
+
if ((0, index_1.isSet)(object.error) || (0, index_1.isSet)(object.error)) {
|
|
8465
|
+
return {
|
|
8466
|
+
$case: "error",
|
|
8467
|
+
error: rpc_1.Status.fromJSON(object.error ?? object.error)
|
|
8468
|
+
};
|
|
8469
|
+
}
|
|
8470
|
+
return undefined;
|
|
8471
|
+
})(),
|
|
8472
|
+
});
|
|
8473
|
+
},
|
|
8474
|
+
toJSON(message, use = "json") {
|
|
8475
|
+
const obj = {};
|
|
8476
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
8477
|
+
switch (message.result?.$case) {
|
|
8478
|
+
case "instance": {
|
|
8479
|
+
obj[pick("instance", "instance")] = exports.Instance.toJSON(message.result.instance, use);
|
|
8480
|
+
break;
|
|
8481
|
+
}
|
|
8482
|
+
case "error": {
|
|
8483
|
+
obj[pick("error", "error")] = rpc_1.Status.toJSON(message.result.error, use);
|
|
8484
|
+
break;
|
|
8485
|
+
}
|
|
8486
|
+
default: break;
|
|
8487
|
+
}
|
|
8488
|
+
return obj;
|
|
8489
|
+
},
|
|
8490
|
+
create(base) {
|
|
8491
|
+
return exports.BatchGetResponse_BatchGetResult.fromPartial(base ?? {});
|
|
8492
|
+
},
|
|
8493
|
+
fromPartial(object) {
|
|
8494
|
+
const message = createBaseBatchGetResponse_BatchGetResult();
|
|
8495
|
+
switch (object.result?.$case) {
|
|
8496
|
+
case "instance": {
|
|
8497
|
+
if (object.result.instance !== undefined && object.result.instance !== null) {
|
|
8498
|
+
message.result = {
|
|
8499
|
+
$case: "instance",
|
|
8500
|
+
instance: exports.Instance.fromPartial(object.result.instance),
|
|
8501
|
+
};
|
|
8502
|
+
}
|
|
8503
|
+
break;
|
|
8504
|
+
}
|
|
8505
|
+
case "error": {
|
|
8506
|
+
if (object.result.error !== undefined && object.result.error !== null) {
|
|
8507
|
+
message.result = {
|
|
8508
|
+
$case: "error",
|
|
8509
|
+
error: rpc_1.Status.fromPartial(object.result.error),
|
|
8510
|
+
};
|
|
8511
|
+
}
|
|
8512
|
+
break;
|
|
8513
|
+
}
|
|
8514
|
+
default: break;
|
|
8515
|
+
}
|
|
8516
|
+
return message;
|
|
8517
|
+
},
|
|
8518
|
+
};
|
|
8519
|
+
protobuf_1.protoRegistry.registerMessage(exports.BatchGetResponse_BatchGetResult);
|
|
8520
|
+
function BatchGetResponse_BatchGetResultCustomInspect() {
|
|
8521
|
+
const parts = [];
|
|
8522
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
8523
|
+
}
|
|
8524
|
+
function BatchGetResponse_BatchGetResultCustomJson() {
|
|
8525
|
+
const obj = {
|
|
8526
|
+
type: this.$type,
|
|
8527
|
+
};
|
|
8528
|
+
return obj;
|
|
8529
|
+
}
|
|
8530
|
+
function applyBatchGetResponse_BatchGetResultCustom(message) {
|
|
8531
|
+
message[logging_1.custom] = BatchGetResponse_BatchGetResultCustomInspect;
|
|
8532
|
+
message[logging_1.customJson] = BatchGetResponse_BatchGetResultCustomJson;
|
|
8533
|
+
return message;
|
|
8534
|
+
}
|
|
8535
|
+
function createBaseBatchGetResponse_BatchGetResult() {
|
|
8536
|
+
const message = {
|
|
8537
|
+
$type: "nebius.compute.v1.BatchGetResponse.BatchGetResult",
|
|
8538
|
+
result: undefined,
|
|
8539
|
+
};
|
|
8540
|
+
return applyBatchGetResponse_BatchGetResultCustom(message);
|
|
8541
|
+
}
|
|
8156
8542
|
exports.InstanceServiceServiceDescription = {
|
|
8157
8543
|
get: {
|
|
8158
8544
|
path: "/nebius.compute.v1.InstanceService/Get",
|
|
@@ -8174,6 +8560,16 @@ exports.InstanceServiceServiceDescription = {
|
|
|
8174
8560
|
responseSerialize: (value) => Buffer.from(exports.Instance.encode(value).finish()),
|
|
8175
8561
|
responseDeserialize: (value) => exports.Instance.decode(value),
|
|
8176
8562
|
},
|
|
8563
|
+
batchGet: {
|
|
8564
|
+
path: "/nebius.compute.v1.InstanceService/BatchGet",
|
|
8565
|
+
requestStream: false,
|
|
8566
|
+
responseStream: false,
|
|
8567
|
+
requestSerialize: (value) => Buffer.from(exports.BatchGetRequest.encode(value).finish()),
|
|
8568
|
+
sendResetMask: false,
|
|
8569
|
+
requestDeserialize: (value) => exports.BatchGetRequest.decode(value),
|
|
8570
|
+
responseSerialize: (value) => Buffer.from(exports.BatchGetResponse.encode(value).finish()),
|
|
8571
|
+
responseDeserialize: (value) => exports.BatchGetResponse.decode(value),
|
|
8572
|
+
},
|
|
8177
8573
|
list: {
|
|
8178
8574
|
path: "/nebius.compute.v1.InstanceService/List",
|
|
8179
8575
|
requestStream: false,
|
|
@@ -8277,6 +8673,14 @@ class InstanceService {
|
|
|
8277
8673
|
const deserialize = spec.responseDeserialize;
|
|
8278
8674
|
return new request_1.Request(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
8279
8675
|
}
|
|
8676
|
+
batchGet(...args) {
|
|
8677
|
+
const spec = this.spec.batchGet;
|
|
8678
|
+
const request = args[0];
|
|
8679
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
8680
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
8681
|
+
const deserialize = spec.responseDeserialize;
|
|
8682
|
+
return new request_1.Request(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
8683
|
+
}
|
|
8280
8684
|
list(...args) {
|
|
8281
8685
|
const spec = this.spec.list;
|
|
8282
8686
|
const request = args[0];
|