@nebius/js-sdk 0.1.19 → 0.1.21

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.
Files changed (28) hide show
  1. package/dist/cjs/api/nebius/audit/v2/index.d.ts +25 -0
  2. package/dist/cjs/api/nebius/audit/v2/index.d.ts.map +1 -1
  3. package/dist/cjs/api/nebius/audit/v2/index.js +47 -1
  4. package/dist/cjs/api/nebius/audit/v2/index.js.map +1 -1
  5. package/dist/cjs/api/nebius/compute/v1/index.d.ts +57 -1
  6. package/dist/cjs/api/nebius/compute/v1/index.d.ts.map +1 -1
  7. package/dist/cjs/api/nebius/compute/v1/index.js +305 -4
  8. package/dist/cjs/api/nebius/compute/v1/index.js.map +1 -1
  9. package/dist/cjs/api/nebius/iam/v1/index.d.ts +90 -17
  10. package/dist/cjs/api/nebius/iam/v1/index.d.ts.map +1 -1
  11. package/dist/cjs/api/nebius/iam/v1/index.js +373 -74
  12. package/dist/cjs/api/nebius/iam/v1/index.js.map +1 -1
  13. package/dist/cjs/api/nebius/storage/v1/index.d.ts +26 -0
  14. package/dist/cjs/api/nebius/storage/v1/index.d.ts.map +1 -1
  15. package/dist/cjs/api/nebius/storage/v1/index.js +48 -1
  16. package/dist/cjs/api/nebius/storage/v1/index.js.map +1 -1
  17. package/dist/cjs/version.d.ts +1 -1
  18. package/dist/cjs/version.js +1 -1
  19. package/dist/esm/api/nebius/audit/v2/index.d.ts +25 -0
  20. package/dist/esm/api/nebius/audit/v2/index.d.ts.map +1 -1
  21. package/dist/esm/api/nebius/compute/v1/index.d.ts +57 -1
  22. package/dist/esm/api/nebius/compute/v1/index.d.ts.map +1 -1
  23. package/dist/esm/api/nebius/iam/v1/index.d.ts +90 -17
  24. package/dist/esm/api/nebius/iam/v1/index.d.ts.map +1 -1
  25. package/dist/esm/api/nebius/storage/v1/index.d.ts +26 -0
  26. package/dist/esm/api/nebius/storage/v1/index.d.ts.map +1 -1
  27. package/dist/esm/version.d.ts +1 -1
  28. 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.ListImagesResponse = 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 = 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.NetworkInterfaceStatus = exports.IPAlias = exports.PublicIPAddress = exports.IPAddress = exports.NetworkInterfaceSpec = exports.MaintenanceService = exports.MaintenanceServiceBaseClient = exports.MaintenanceServiceServiceDescription = exports.ListMaintenanceEventsResponse = exports.ListMaintenanceEventsRequest = exports.GetMaintenanceEventByInstanceRequest = exports.MaintenanceEventStatus = exports.MaintenanceEventSpec = exports.MaintenanceEvent = exports.InstanceStatusInfinibandTopologyPath = exports.InstanceStatus = exports.AttachedFilesystemSpec = exports.ExistingFilesystem = exports.ExistingDisk = exports.AttachedDiskSpec = exports.InstanceGpuClusterSpec = exports.ResourcesSpec = exports.PreemptibleSpec = exports.InstanceSpec = exports.Instance = exports.InstanceStatus_InstanceState = exports.AttachedFilesystemSpec_AttachMode = exports.AttachedDiskSpec_AttachMode = exports.PreemptibleSpec_PreemptionPolicy = exports.InstanceRecoveryPolicy = exports.InstanceService = exports.InstanceServiceBaseClient = exports.InstanceServiceServiceDescription = 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 = 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.IPAliasesStatus = exports.PublicIPAddressStatus = exports.IPAddressStatus = void 0;
5
+ exports.PublicIPAddress = exports.IPAddress = exports.NetworkInterfaceSpec = exports.MaintenanceService = exports.MaintenanceServiceBaseClient = exports.MaintenanceServiceServiceDescription = exports.ListMaintenanceEventsResponse = exports.ListMaintenanceEventsRequest = exports.GetMaintenanceEventByInstanceRequest = exports.MaintenanceEventStatus = exports.MaintenanceEventSpec = exports.MaintenanceEvent = 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.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 = 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.IPAliasesStatus = exports.PublicIPAddressStatus = exports.IPAddressStatus = exports.NetworkInterfaceStatus = exports.IPAlias = 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");
@@ -941,7 +941,7 @@ exports.DiskStatus_SourceImageCPUArchitecture = (0, index_1.createEnum)("nebius.
941
941
  protobuf_1.protoRegistry.registerEnum(exports.DiskStatus_SourceImageCPUArchitecture);
942
942
  const DiskEncryption_DiskEncryptionType_VALUE_COMMENTS = {
943
943
  DISK_ENCRYPTION_UNSPECIFIED: " No encryption is applied unless explicitly specified.\n",
944
- DISK_ENCRYPTION_MANAGED: " Enables encryption using the platform's default root key from KMS.\n Available for blank disks only.\n Available for disks with NETWORK_SSD_NON_REPLICATED and NETWORK_SSD_IO_M3 types only.\n",
944
+ DISK_ENCRYPTION_MANAGED: " Enables encryption using the platform's default root key from KMS.\n Available for disks with NETWORK_SSD_NON_REPLICATED and NETWORK_SSD_IO_M3 types only.\n",
945
945
  };
946
946
  exports.DiskEncryption_DiskEncryptionType = (0, index_1.createEnum)("nebius.compute.v1.DiskEncryption.DiskEncryptionType", {
947
947
  /**
@@ -951,7 +951,6 @@ exports.DiskEncryption_DiskEncryptionType = (0, index_1.createEnum)("nebius.comp
951
951
  DISK_ENCRYPTION_UNSPECIFIED: 0,
952
952
  /**
953
953
  * Enables encryption using the platform's default root key from KMS.
954
- * Available for blank disks only.
955
954
  * Available for disks with NETWORK_SSD_NON_REPLICATED and NETWORK_SSD_IO_M3 types only.
956
955
  *
957
956
  */
@@ -5836,6 +5835,18 @@ exports.ImageSpec = {
5836
5835
  if ((message.cpuArchitecture ?? exports.ImageSpec_CPUArchitecture.UNSPECIFIED) !== exports.ImageSpec_CPUArchitecture.UNSPECIFIED) {
5837
5836
  exports.ImageSpec_CPUArchitecture.encodeField(writer, 6, message.cpuArchitecture);
5838
5837
  }
5838
+ if (message.imageFamilyHumanReadable !== "") {
5839
+ writer.uint32(58).string(message.imageFamilyHumanReadable);
5840
+ }
5841
+ for (const v of (message.recommendedPlatforms ?? [])) {
5842
+ writer.uint32(66).string(v);
5843
+ }
5844
+ for (const [k, v] of Object.entries(message.unsupportedPlatforms ?? {})) {
5845
+ const w = writer.uint32(74).fork();
5846
+ w.uint32(10).string(k);
5847
+ w.uint32(18).string(v);
5848
+ w.join();
5849
+ }
5839
5850
  if (message[index_1.unknownFieldsSymbol]) {
5840
5851
  writer.raw(message[index_1.unknownFieldsSymbol]);
5841
5852
  }
@@ -5873,6 +5884,46 @@ exports.ImageSpec = {
5873
5884
  message.cpuArchitecture = exports.ImageSpec_CPUArchitecture.fromNumber(reader.int32());
5874
5885
  continue;
5875
5886
  }
5887
+ case 7: {
5888
+ if (tag !== 58)
5889
+ break;
5890
+ message.imageFamilyHumanReadable = reader.string();
5891
+ continue;
5892
+ }
5893
+ case 8: {
5894
+ if (tag !== 66)
5895
+ break;
5896
+ message.recommendedPlatforms.push(reader.string());
5897
+ continue;
5898
+ }
5899
+ case 9: {
5900
+ if (tag !== 74)
5901
+ break; // wire type guard
5902
+ const end2 = reader.uint32() + reader.pos;
5903
+ let key = "";
5904
+ let value = undefined;
5905
+ while (reader.pos < end2) {
5906
+ const tag2 = reader.uint32();
5907
+ switch (tag2 >>> 3) {
5908
+ case 1: {
5909
+ key = reader.string();
5910
+ continue;
5911
+ }
5912
+ case 2: {
5913
+ value = reader.string();
5914
+ continue;
5915
+ }
5916
+ }
5917
+ if ((tag2 & 7) === 4 || tag2 === 0)
5918
+ break;
5919
+ reader.skip(tag2 & 7);
5920
+ }
5921
+ if (value !== undefined) {
5922
+ const stringKey = String(key);
5923
+ message.unsupportedPlatforms[stringKey] = value;
5924
+ }
5925
+ continue;
5926
+ }
5876
5927
  default:
5877
5928
  break;
5878
5929
  }
@@ -5906,6 +5957,19 @@ exports.ImageSpec = {
5906
5957
  cpuArchitecture: (0, index_1.isSet)(object.cpuArchitecture ?? object.cpu_architecture)
5907
5958
  ? exports.ImageSpec_CPUArchitecture.fromJSON(object.cpuArchitecture ?? object.cpu_architecture)
5908
5959
  : exports.ImageSpec_CPUArchitecture.UNSPECIFIED,
5960
+ imageFamilyHumanReadable: (0, index_1.isSet)(object.imageFamilyHumanReadable ?? object.image_family_human_readable)
5961
+ ? String(object.imageFamilyHumanReadable ?? object.image_family_human_readable)
5962
+ : "",
5963
+ recommendedPlatforms: globalThis.Array.isArray(object?.recommendedPlatforms ?? object?.recommended_platforms)
5964
+ ? (object.recommendedPlatforms ?? object.recommended_platforms).map((e) => String(e))
5965
+ : [],
5966
+ unsupportedPlatforms: ((0, index_1.isSet)(object.unsupportedPlatforms) && typeof object.unsupportedPlatforms === "object" ? object.unsupportedPlatforms
5967
+ : ((0, index_1.isSet)(object.unsupported_platforms) && typeof object.unsupported_platforms === "object" ? object.unsupported_platforms : undefined))
5968
+ ? Object.entries((object.unsupportedPlatforms ?? object.unsupported_platforms)).reduce((acc, [key, value]) => {
5969
+ acc[key] = String(value);
5970
+ return acc;
5971
+ }, {})
5972
+ : {},
5909
5973
  });
5910
5974
  },
5911
5975
  toJSON(message, use = "json") {
@@ -5923,6 +5987,21 @@ exports.ImageSpec = {
5923
5987
  if ((message.cpuArchitecture ?? exports.ImageSpec_CPUArchitecture.UNSPECIFIED) !== exports.ImageSpec_CPUArchitecture.UNSPECIFIED) {
5924
5988
  obj[pick("cpuArchitecture", "cpu_architecture")] = exports.ImageSpec_CPUArchitecture.toJSON(message.cpuArchitecture);
5925
5989
  }
5990
+ if (message.imageFamilyHumanReadable !== "") {
5991
+ obj[pick("imageFamilyHumanReadable", "image_family_human_readable")] = message.imageFamilyHumanReadable;
5992
+ }
5993
+ if (message.recommendedPlatforms?.length) {
5994
+ obj[pick("recommendedPlatforms", "recommended_platforms")] = message.recommendedPlatforms.map((e) => e);
5995
+ }
5996
+ if (message.unsupportedPlatforms) {
5997
+ const entries = Object.entries(message.unsupportedPlatforms);
5998
+ if (entries.length > 0) {
5999
+ obj[pick("unsupportedPlatforms", "unsupported_platforms")] = {};
6000
+ entries.forEach(([k, v]) => {
6001
+ obj[pick("unsupportedPlatforms", "unsupported_platforms")][k] = v;
6002
+ });
6003
+ }
6004
+ }
5926
6005
  return obj;
5927
6006
  },
5928
6007
  create(base) {
@@ -5942,6 +6021,16 @@ exports.ImageSpec = {
5942
6021
  message.cpuArchitecture = (object.cpuArchitecture !== undefined && object.cpuArchitecture !== null)
5943
6022
  ? exports.ImageSpec_CPUArchitecture.fromJSON(object.cpuArchitecture.name)
5944
6023
  : exports.ImageSpec_CPUArchitecture.UNSPECIFIED;
6024
+ message.imageFamilyHumanReadable = (object.imageFamilyHumanReadable !== undefined && object.imageFamilyHumanReadable !== null)
6025
+ ? object.imageFamilyHumanReadable
6026
+ : "";
6027
+ message.recommendedPlatforms = object.recommendedPlatforms?.map((e) => e) || [];
6028
+ message.unsupportedPlatforms = Object.entries(object.unsupportedPlatforms ?? {}).reduce((acc, [key, value]) => {
6029
+ if (value !== undefined) {
6030
+ acc[key] = value;
6031
+ }
6032
+ return acc;
6033
+ }, {});
5945
6034
  return message;
5946
6035
  },
5947
6036
  };
@@ -5956,6 +6045,12 @@ function ImageSpecCustomInspect() {
5956
6045
  parts.push("version" + "=" + (0, util_1.inspect)(this.version));
5957
6046
  if (this.cpuArchitecture !== undefined)
5958
6047
  parts.push("cpuArchitecture" + "=" + (0, util_1.inspect)(this.cpuArchitecture));
6048
+ if (this.imageFamilyHumanReadable !== "")
6049
+ parts.push("imageFamilyHumanReadable" + "=" + (0, util_1.inspect)(this.imageFamilyHumanReadable));
6050
+ if ((this.recommendedPlatforms?.length ?? 0) !== 0)
6051
+ parts.push("recommendedPlatforms" + "=" + (0, util_1.inspect)(this.recommendedPlatforms));
6052
+ if (Object.keys(this.unsupportedPlatforms || {}).length)
6053
+ parts.push("unsupportedPlatforms" + "=" + (0, util_1.inspect)(this.unsupportedPlatforms));
5959
6054
  return `${this.$type}(${parts.join(", ")})`;
5960
6055
  }
5961
6056
  function ImageSpecCustomJson() {
@@ -5970,6 +6065,12 @@ function ImageSpecCustomJson() {
5970
6065
  obj.version = (0, logging_1.inspectJson)(this.version);
5971
6066
  if (this.cpuArchitecture !== undefined)
5972
6067
  obj.cpuArchitecture = (0, logging_1.inspectJson)(this.cpuArchitecture);
6068
+ if (this.imageFamilyHumanReadable !== "")
6069
+ obj.imageFamilyHumanReadable = (0, logging_1.inspectJson)(this.imageFamilyHumanReadable);
6070
+ if ((this.recommendedPlatforms?.length ?? 0) !== 0)
6071
+ obj.recommendedPlatforms = (0, logging_1.inspectJson)(this.recommendedPlatforms);
6072
+ if (Object.keys(this.unsupportedPlatforms || {}).length)
6073
+ obj.unsupportedPlatforms = (0, logging_1.inspectJson)(this.unsupportedPlatforms);
5973
6074
  return obj;
5974
6075
  }
5975
6076
  function applyImageSpecCustom(message) {
@@ -5984,6 +6085,9 @@ function createBaseImageSpec() {
5984
6085
  imageFamily: "",
5985
6086
  version: "",
5986
6087
  cpuArchitecture: exports.ImageSpec_CPUArchitecture.UNSPECIFIED,
6088
+ imageFamilyHumanReadable: "",
6089
+ recommendedPlatforms: [],
6090
+ unsupportedPlatforms: {},
5987
6091
  };
5988
6092
  return applyImageSpecCustom(message);
5989
6093
  }
@@ -7455,6 +7559,35 @@ exports.InstanceStatus_InstanceState = (0, index_1.createEnum)("nebius.compute.v
7455
7559
  ERROR: 8,
7456
7560
  });
7457
7561
  protobuf_1.protoRegistry.registerEnum(exports.InstanceStatus_InstanceState);
7562
+ const ReservationPolicy_Policy_VALUE_COMMENTS = {
7563
+ AUTO: " 1) Will try to launch instance in any reservation_ids if provided.\n 2) Will try to launch instance in any of the available capacity block.\n 3) Will try to launch instance in PAYG if 1 & 2 are not satisfied.\n",
7564
+ FORBID: " The instance is launched only using on-demand (PAYG) capacity.\n No attempt is made to find or use a Capacity Block.\n It's an error to provide reservation_ids with policy = FORBID\n",
7565
+ STRICT: " 1) Will try to launch the instance in Capacity Blocks from reservation_ids if provided.\n 2) If reservation_ids are not provided will try to launch instance in suitable & available Capacity Block.\n 3) Fail otherwise.\n",
7566
+ };
7567
+ exports.ReservationPolicy_Policy = (0, index_1.createEnum)("nebius.compute.v1.ReservationPolicy.Policy", {
7568
+ /**
7569
+ * 1) Will try to launch instance in any reservation_ids if provided.
7570
+ * 2) Will try to launch instance in any of the available capacity block.
7571
+ * 3) Will try to launch instance in PAYG if 1 & 2 are not satisfied.
7572
+ *
7573
+ */
7574
+ AUTO: 0,
7575
+ /**
7576
+ * The instance is launched only using on-demand (PAYG) capacity.
7577
+ * No attempt is made to find or use a Capacity Block.
7578
+ * It's an error to provide reservation_ids with policy = FORBID
7579
+ *
7580
+ */
7581
+ FORBID: 1,
7582
+ /**
7583
+ * 1) Will try to launch the instance in Capacity Blocks from reservation_ids if provided.
7584
+ * 2) If reservation_ids are not provided will try to launch instance in suitable & available Capacity Block.
7585
+ * 3) Fail otherwise.
7586
+ *
7587
+ */
7588
+ STRICT: 2,
7589
+ }, ReservationPolicy_Policy_VALUE_COMMENTS);
7590
+ protobuf_1.protoRegistry.registerEnum(exports.ReservationPolicy_Policy);
7458
7591
  exports.Instance = {
7459
7592
  $type: "nebius.compute.v1.Instance",
7460
7593
  encode(message, writer = new index_1.BinaryWriter()) {
@@ -7663,6 +7796,11 @@ exports.InstanceSpec = {
7663
7796
  if (message.hostname !== "") {
7664
7797
  writer.uint32(162).string(message.hostname);
7665
7798
  }
7799
+ if (message.reservationPolicy !== undefined) {
7800
+ const w = writer.uint32(186).fork();
7801
+ exports.ReservationPolicy.encode(message.reservationPolicy, w);
7802
+ w.join();
7803
+ }
7666
7804
  if (message[index_1.unknownFieldsSymbol]) {
7667
7805
  writer.raw(message[index_1.unknownFieldsSymbol]);
7668
7806
  }
@@ -7748,6 +7886,12 @@ exports.InstanceSpec = {
7748
7886
  message.hostname = reader.string();
7749
7887
  continue;
7750
7888
  }
7889
+ case 23: {
7890
+ if (tag !== 186)
7891
+ break;
7892
+ message.reservationPolicy = exports.ReservationPolicy.decode(reader, reader.uint32());
7893
+ continue;
7894
+ }
7751
7895
  default:
7752
7896
  break;
7753
7897
  }
@@ -7805,6 +7949,9 @@ exports.InstanceSpec = {
7805
7949
  hostname: (0, index_1.isSet)(object.hostname ?? object.hostname)
7806
7950
  ? String(object.hostname ?? object.hostname)
7807
7951
  : "",
7952
+ reservationPolicy: (0, index_1.isSet)(object.reservationPolicy ?? object.reservation_policy)
7953
+ ? exports.ReservationPolicy.fromJSON(object.reservationPolicy ?? object.reservation_policy)
7954
+ : undefined,
7808
7955
  });
7809
7956
  },
7810
7957
  toJSON(message, use = "json") {
@@ -7854,6 +8001,11 @@ exports.InstanceSpec = {
7854
8001
  if (message.hostname !== "") {
7855
8002
  obj[pick("hostname", "hostname")] = message.hostname;
7856
8003
  }
8004
+ if (message.reservationPolicy !== undefined) {
8005
+ obj[pick("reservationPolicy", "reservation_policy")] = message.reservationPolicy
8006
+ ? exports.ReservationPolicy.toJSON(message.reservationPolicy, use)
8007
+ : undefined;
8008
+ }
7857
8009
  return obj;
7858
8010
  },
7859
8011
  create(base) {
@@ -7891,6 +8043,9 @@ exports.InstanceSpec = {
7891
8043
  message.hostname = (object.hostname !== undefined && object.hostname !== null)
7892
8044
  ? object.hostname
7893
8045
  : "";
8046
+ message.reservationPolicy = (object.reservationPolicy !== undefined && object.reservationPolicy !== null)
8047
+ ? exports.ReservationPolicy.fromPartial(object.reservationPolicy)
8048
+ : undefined;
7894
8049
  return message;
7895
8050
  },
7896
8051
  };
@@ -7921,6 +8076,8 @@ function InstanceSpecCustomInspect() {
7921
8076
  parts.push("preemptible" + "=" + (0, util_1.inspect)(this.preemptible));
7922
8077
  if (this.hostname !== "")
7923
8078
  parts.push("hostname" + "=" + (0, util_1.inspect)(this.hostname));
8079
+ if (this.reservationPolicy !== undefined)
8080
+ parts.push("reservationPolicy" + "=" + (0, util_1.inspect)(this.reservationPolicy));
7924
8081
  return `${this.$type}(${parts.join(", ")})`;
7925
8082
  }
7926
8083
  function InstanceSpecCustomJson() {
@@ -7951,6 +8108,8 @@ function InstanceSpecCustomJson() {
7951
8108
  obj.preemptible = (0, logging_1.inspectJson)(this.preemptible);
7952
8109
  if (this.hostname !== "")
7953
8110
  obj.hostname = (0, logging_1.inspectJson)(this.hostname);
8111
+ if (this.reservationPolicy !== undefined)
8112
+ obj.reservationPolicy = (0, logging_1.inspectJson)(this.reservationPolicy);
7954
8113
  return obj;
7955
8114
  }
7956
8115
  function applyInstanceSpecCustom(message) {
@@ -7973,6 +8132,7 @@ function createBaseInstanceSpec() {
7973
8132
  recoveryPolicy: exports.InstanceRecoveryPolicy.RECOVER,
7974
8133
  preemptible: undefined,
7975
8134
  hostname: "",
8135
+ reservationPolicy: undefined,
7976
8136
  };
7977
8137
  return applyInstanceSpecCustom(message);
7978
8138
  }
@@ -8871,6 +9031,9 @@ exports.InstanceStatus = {
8871
9031
  if (message.maintenanceEventId !== "") {
8872
9032
  writer.uint32(58).string(message.maintenanceEventId);
8873
9033
  }
9034
+ if (message.reservationId !== "") {
9035
+ writer.uint32(98).string(message.reservationId);
9036
+ }
8874
9037
  if (message.gpuClusterTopology?.$case === undefined) { /* noop */ }
8875
9038
  else if (message.gpuClusterTopology?.$case === "infinibandTopologyPath") {
8876
9039
  const w = writer.uint32(82).fork();
@@ -8914,6 +9077,12 @@ exports.InstanceStatus = {
8914
9077
  message.maintenanceEventId = reader.string();
8915
9078
  continue;
8916
9079
  }
9080
+ case 12: {
9081
+ if (tag !== 98)
9082
+ break;
9083
+ message.reservationId = reader.string();
9084
+ continue;
9085
+ }
8917
9086
  case 10: {
8918
9087
  if (tag !== 82)
8919
9088
  break;
@@ -8956,6 +9125,9 @@ exports.InstanceStatus = {
8956
9125
  maintenanceEventId: (0, index_1.isSet)(object.maintenanceEventId ?? object.maintenance_event_id)
8957
9126
  ? String(object.maintenanceEventId ?? object.maintenance_event_id)
8958
9127
  : "",
9128
+ reservationId: (0, index_1.isSet)(object.reservationId ?? object.reservation_id)
9129
+ ? String(object.reservationId ?? object.reservation_id)
9130
+ : "",
8959
9131
  gpuClusterTopology: (() => {
8960
9132
  if ((0, index_1.isSet)(object.infinibandTopologyPath) || (0, index_1.isSet)(object.infiniband_topology_path)) {
8961
9133
  return {
@@ -8982,6 +9154,9 @@ exports.InstanceStatus = {
8982
9154
  if (message.maintenanceEventId !== "") {
8983
9155
  obj[pick("maintenanceEventId", "maintenance_event_id")] = message.maintenanceEventId;
8984
9156
  }
9157
+ if (message.reservationId !== "") {
9158
+ obj[pick("reservationId", "reservation_id")] = message.reservationId;
9159
+ }
8985
9160
  switch (message.gpuClusterTopology?.$case) {
8986
9161
  case "infinibandTopologyPath": {
8987
9162
  obj[pick("infinibandTopologyPath", "infiniband_topology_path")] = exports.InstanceStatusInfinibandTopologyPath.toJSON(message.gpuClusterTopology.infinibandTopologyPath, use);
@@ -9006,6 +9181,9 @@ exports.InstanceStatus = {
9006
9181
  message.maintenanceEventId = (object.maintenanceEventId !== undefined && object.maintenanceEventId !== null)
9007
9182
  ? object.maintenanceEventId
9008
9183
  : "";
9184
+ message.reservationId = (object.reservationId !== undefined && object.reservationId !== null)
9185
+ ? object.reservationId
9186
+ : "";
9009
9187
  switch (object.gpuClusterTopology?.$case) {
9010
9188
  case "infinibandTopologyPath": {
9011
9189
  if (object.gpuClusterTopology.infinibandTopologyPath !== undefined && object.gpuClusterTopology.infinibandTopologyPath !== null) {
@@ -9032,6 +9210,8 @@ function InstanceStatusCustomInspect() {
9032
9210
  parts.push("reconciling" + "=" + (0, util_1.inspect)(this.reconciling));
9033
9211
  if (this.maintenanceEventId !== "")
9034
9212
  parts.push("maintenanceEventId" + "=" + (0, util_1.inspect)(this.maintenanceEventId));
9213
+ if (this.reservationId !== "")
9214
+ parts.push("reservationId" + "=" + (0, util_1.inspect)(this.reservationId));
9035
9215
  return `${this.$type}(${parts.join(", ")})`;
9036
9216
  }
9037
9217
  function InstanceStatusCustomJson() {
@@ -9046,6 +9226,8 @@ function InstanceStatusCustomJson() {
9046
9226
  obj.reconciling = (0, logging_1.inspectJson)(this.reconciling);
9047
9227
  if (this.maintenanceEventId !== "")
9048
9228
  obj.maintenanceEventId = (0, logging_1.inspectJson)(this.maintenanceEventId);
9229
+ if (this.reservationId !== "")
9230
+ obj.reservationId = (0, logging_1.inspectJson)(this.reservationId);
9049
9231
  return obj;
9050
9232
  }
9051
9233
  function applyInstanceStatusCustom(message) {
@@ -9060,6 +9242,7 @@ function createBaseInstanceStatus() {
9060
9242
  networkInterfaces: [],
9061
9243
  reconciling: false,
9062
9244
  maintenanceEventId: "",
9245
+ reservationId: "",
9063
9246
  gpuClusterTopology: undefined,
9064
9247
  };
9065
9248
  return applyInstanceStatusCustom(message);
@@ -9159,6 +9342,124 @@ function createBaseInstanceStatusInfinibandTopologyPath() {
9159
9342
  };
9160
9343
  return applyInstanceStatusInfinibandTopologyPathCustom(message);
9161
9344
  }
9345
+ exports.ReservationPolicy = {
9346
+ $type: "nebius.compute.v1.ReservationPolicy",
9347
+ encode(message, writer = new index_1.BinaryWriter()) {
9348
+ if ((message.policy ?? exports.ReservationPolicy_Policy.AUTO) !== exports.ReservationPolicy_Policy.AUTO) {
9349
+ exports.ReservationPolicy_Policy.encodeField(writer, 1, message.policy);
9350
+ }
9351
+ for (const v of (message.reservationIds ?? [])) {
9352
+ writer.uint32(18).string(v);
9353
+ }
9354
+ if (message[index_1.unknownFieldsSymbol]) {
9355
+ writer.raw(message[index_1.unknownFieldsSymbol]);
9356
+ }
9357
+ return writer;
9358
+ },
9359
+ decode(input, length) {
9360
+ const reader = input instanceof index_1.BinaryReader ? input : new index_1.BinaryReader(input);
9361
+ const end = length === undefined ? reader.len : reader.pos + length;
9362
+ const message = createBaseReservationPolicy();
9363
+ let writer = undefined;
9364
+ while (reader.pos < end) {
9365
+ const tag = reader.uint32();
9366
+ switch (tag >>> 3) {
9367
+ case 1: {
9368
+ if (tag !== 8)
9369
+ break;
9370
+ message.policy = exports.ReservationPolicy_Policy.fromNumber(reader.int32());
9371
+ continue;
9372
+ }
9373
+ case 2: {
9374
+ if (tag !== 18)
9375
+ break;
9376
+ message.reservationIds.push(reader.string());
9377
+ continue;
9378
+ }
9379
+ default:
9380
+ break;
9381
+ }
9382
+ if ((tag & 7) === 4 || tag === 0) {
9383
+ break;
9384
+ }
9385
+ {
9386
+ if (!writer)
9387
+ writer = new index_1.BinaryWriter();
9388
+ const skipped = reader.skip(tag & 7, tag >>> 3);
9389
+ writer.uint32(tag).raw(skipped);
9390
+ }
9391
+ }
9392
+ if (writer) {
9393
+ message[index_1.unknownFieldsSymbol] = writer.finish();
9394
+ }
9395
+ return message;
9396
+ },
9397
+ fromJSON(object) {
9398
+ return applyReservationPolicyCustom({
9399
+ $type: "nebius.compute.v1.ReservationPolicy",
9400
+ policy: (0, index_1.isSet)(object.policy ?? object.policy)
9401
+ ? exports.ReservationPolicy_Policy.fromJSON(object.policy ?? object.policy)
9402
+ : exports.ReservationPolicy_Policy.AUTO,
9403
+ reservationIds: globalThis.Array.isArray(object?.reservationIds ?? object?.reservation_ids)
9404
+ ? (object.reservationIds ?? object.reservation_ids).map((e) => String(e))
9405
+ : [],
9406
+ });
9407
+ },
9408
+ toJSON(message, use = "json") {
9409
+ const obj = {};
9410
+ const pick = (json, pb) => (use === "json" ? json : pb);
9411
+ if ((message.policy ?? exports.ReservationPolicy_Policy.AUTO) !== exports.ReservationPolicy_Policy.AUTO) {
9412
+ obj[pick("policy", "policy")] = exports.ReservationPolicy_Policy.toJSON(message.policy);
9413
+ }
9414
+ if (message.reservationIds?.length) {
9415
+ obj[pick("reservationIds", "reservation_ids")] = message.reservationIds.map((e) => e);
9416
+ }
9417
+ return obj;
9418
+ },
9419
+ create(base) {
9420
+ return exports.ReservationPolicy.fromPartial(base ?? {});
9421
+ },
9422
+ fromPartial(object) {
9423
+ const message = createBaseReservationPolicy();
9424
+ message.policy = (object.policy !== undefined && object.policy !== null)
9425
+ ? exports.ReservationPolicy_Policy.fromJSON(object.policy.name)
9426
+ : exports.ReservationPolicy_Policy.AUTO;
9427
+ message.reservationIds = object.reservationIds?.map((e) => e) || [];
9428
+ return message;
9429
+ },
9430
+ };
9431
+ protobuf_1.protoRegistry.registerMessage(exports.ReservationPolicy);
9432
+ function ReservationPolicyCustomInspect() {
9433
+ const parts = [];
9434
+ if (this.policy !== undefined)
9435
+ parts.push("policy" + "=" + (0, util_1.inspect)(this.policy));
9436
+ if ((this.reservationIds?.length ?? 0) !== 0)
9437
+ parts.push("reservationIds" + "=" + (0, util_1.inspect)(this.reservationIds));
9438
+ return `${this.$type}(${parts.join(", ")})`;
9439
+ }
9440
+ function ReservationPolicyCustomJson() {
9441
+ const obj = {
9442
+ type: this.$type,
9443
+ };
9444
+ if (this.policy !== undefined)
9445
+ obj.policy = (0, logging_1.inspectJson)(this.policy);
9446
+ if ((this.reservationIds?.length ?? 0) !== 0)
9447
+ obj.reservationIds = (0, logging_1.inspectJson)(this.reservationIds);
9448
+ return obj;
9449
+ }
9450
+ function applyReservationPolicyCustom(message) {
9451
+ message[logging_1.custom] = ReservationPolicyCustomInspect;
9452
+ message[logging_1.customJson] = ReservationPolicyCustomJson;
9453
+ return message;
9454
+ }
9455
+ function createBaseReservationPolicy() {
9456
+ const message = {
9457
+ $type: "nebius.compute.v1.ReservationPolicy",
9458
+ policy: exports.ReservationPolicy_Policy.AUTO,
9459
+ reservationIds: [],
9460
+ };
9461
+ return applyReservationPolicyCustom(message);
9462
+ }
9162
9463
  exports.MaintenanceEvent = {
9163
9464
  $type: "nebius.compute.v1.MaintenanceEvent",
9164
9465
  encode(message, writer = new index_1.BinaryWriter()) {