@nebius/js-sdk 0.2.27 → 0.2.29

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.
@@ -2,7 +2,7 @@
2
2
  import { BinaryReader, BinaryWriter, isSet, Long, createEnum, unknownFieldsSymbol } from "../../../../runtime/protos/index.js";
3
3
  import { inspect } from "util";
4
4
  import { protoRegistry } from "../../../protobuf.js";
5
- import { custom, customJson, inspectJson } from "../../../../runtime/util/logging.js";
5
+ import { deprecatedWarn, custom, customJson, inspectJson } from "../../../../runtime/util/logging.js";
6
6
  import { makeGenericClientConstructor } from "@grpc/grpc-js";
7
7
  import { Request as SDKRequestClass } from "../../../../runtime/request.js";
8
8
  import { Operation as OperationWrapper } from "../../../../runtime/operation.js";
@@ -15811,6 +15811,18 @@ function createBaseSubnetCidr() {
15811
15811
  export const SubnetStatus = {
15812
15812
  $type: "nebius.vpc.v1.SubnetStatus",
15813
15813
  encode(message, writer = new BinaryWriter()) {
15814
+ if ((message.ipv4PrivateCidrs?.length ?? 0) !== 0) {
15815
+ if (!__deprecatedWarned.has("nebius.vpc.v1.SubnetStatus.ipv4_private_cidrs")) {
15816
+ __deprecatedWarned.add("nebius.vpc.v1.SubnetStatus.ipv4_private_cidrs");
15817
+ deprecatedWarn("Use `ipv4_private_pools.cidrs` instead.", "field", "nebius.vpc.v1.SubnetStatus.ipv4_private_cidrs", "2027-02-01");
15818
+ }
15819
+ }
15820
+ if ((message.ipv4PublicCidrs?.length ?? 0) !== 0) {
15821
+ if (!__deprecatedWarned.has("nebius.vpc.v1.SubnetStatus.ipv4_public_cidrs")) {
15822
+ __deprecatedWarned.add("nebius.vpc.v1.SubnetStatus.ipv4_public_cidrs");
15823
+ deprecatedWarn("Use `ipv4_public_pools.cidrs` instead.", "field", "nebius.vpc.v1.SubnetStatus.ipv4_public_cidrs", "2027-02-01");
15824
+ }
15825
+ }
15814
15826
  if ((message.state ?? SubnetStatus_State.STATE_UNSPECIFIED) !== SubnetStatus_State.STATE_UNSPECIFIED) {
15815
15827
  SubnetStatus_State.encodeField(writer, 1, message.state);
15816
15828
  }
@@ -15825,6 +15837,16 @@ export const SubnetStatus = {
15825
15837
  SubnetAssociatedRouteTable.encode(message.routeTable, w);
15826
15838
  w.join();
15827
15839
  }
15840
+ for (const v of (message.ipv4PrivatePools ?? [])) {
15841
+ const w = writer.uint32(66).fork();
15842
+ SubnetStatusPool.encode(v, w);
15843
+ w.join();
15844
+ }
15845
+ for (const v of (message.ipv4PublicPools ?? [])) {
15846
+ const w = writer.uint32(74).fork();
15847
+ SubnetStatusPool.encode(v, w);
15848
+ w.join();
15849
+ }
15828
15850
  if (message[unknownFieldsSymbol]) {
15829
15851
  writer.raw(message[unknownFieldsSymbol]);
15830
15852
  }
@@ -15862,6 +15884,18 @@ export const SubnetStatus = {
15862
15884
  message.routeTable = SubnetAssociatedRouteTable.decode(reader, reader.uint32());
15863
15885
  continue;
15864
15886
  }
15887
+ case 8: {
15888
+ if (tag !== 66)
15889
+ break;
15890
+ message.ipv4PrivatePools.push(SubnetStatusPool.decode(reader, reader.uint32()));
15891
+ continue;
15892
+ }
15893
+ case 9: {
15894
+ if (tag !== 74)
15895
+ break;
15896
+ message.ipv4PublicPools.push(SubnetStatusPool.decode(reader, reader.uint32()));
15897
+ continue;
15898
+ }
15865
15899
  default:
15866
15900
  break;
15867
15901
  }
@@ -15895,6 +15929,12 @@ export const SubnetStatus = {
15895
15929
  routeTable: isSet(object.routeTable ?? object.route_table)
15896
15930
  ? SubnetAssociatedRouteTable.fromJSON(object.routeTable ?? object.route_table)
15897
15931
  : undefined,
15932
+ ipv4PrivatePools: globalThis.Array.isArray(object?.ipv4PrivatePools ?? object?.ipv4_private_pools)
15933
+ ? (object.ipv4PrivatePools ?? object.ipv4_private_pools).map((e) => SubnetStatusPool.fromJSON(e))
15934
+ : [],
15935
+ ipv4PublicPools: globalThis.Array.isArray(object?.ipv4PublicPools ?? object?.ipv4_public_pools)
15936
+ ? (object.ipv4PublicPools ?? object.ipv4_public_pools).map((e) => SubnetStatusPool.fromJSON(e))
15937
+ : [],
15898
15938
  });
15899
15939
  },
15900
15940
  toJSON(message, use = "json") {
@@ -15914,6 +15954,12 @@ export const SubnetStatus = {
15914
15954
  ? SubnetAssociatedRouteTable.toJSON(message.routeTable, use)
15915
15955
  : undefined;
15916
15956
  }
15957
+ if (message.ipv4PrivatePools?.length) {
15958
+ obj[pick("ipv4PrivatePools", "ipv4_private_pools")] = message.ipv4PrivatePools.map((e) => e ? SubnetStatusPool.toJSON(e, use) : undefined);
15959
+ }
15960
+ if (message.ipv4PublicPools?.length) {
15961
+ obj[pick("ipv4PublicPools", "ipv4_public_pools")] = message.ipv4PublicPools.map((e) => e ? SubnetStatusPool.toJSON(e, use) : undefined);
15962
+ }
15917
15963
  return obj;
15918
15964
  },
15919
15965
  create(base) {
@@ -15929,6 +15975,8 @@ export const SubnetStatus = {
15929
15975
  message.routeTable = (object.routeTable !== undefined && object.routeTable !== null)
15930
15976
  ? SubnetAssociatedRouteTable.fromPartial(object.routeTable)
15931
15977
  : undefined;
15978
+ message.ipv4PrivatePools = object.ipv4PrivatePools?.map((e) => SubnetStatusPool.fromPartial(e)) || [];
15979
+ message.ipv4PublicPools = object.ipv4PublicPools?.map((e) => SubnetStatusPool.fromPartial(e)) || [];
15932
15980
  return message;
15933
15981
  },
15934
15982
  };
@@ -15943,6 +15991,10 @@ function SubnetStatusCustomInspect() {
15943
15991
  parts.push("ipv4PublicCidrs" + "=" + inspect(this.ipv4PublicCidrs));
15944
15992
  if (this.routeTable !== undefined)
15945
15993
  parts.push("routeTable" + "=" + inspect(this.routeTable));
15994
+ if ((this.ipv4PrivatePools?.length ?? 0) !== 0)
15995
+ parts.push("ipv4PrivatePools" + "=" + inspect(this.ipv4PrivatePools));
15996
+ if ((this.ipv4PublicPools?.length ?? 0) !== 0)
15997
+ parts.push("ipv4PublicPools" + "=" + inspect(this.ipv4PublicPools));
15946
15998
  return `${this.$type}(${parts.join(", ")})`;
15947
15999
  }
15948
16000
  function SubnetStatusCustomJson() {
@@ -15957,6 +16009,10 @@ function SubnetStatusCustomJson() {
15957
16009
  obj.ipv4PublicCidrs = inspectJson(this.ipv4PublicCidrs);
15958
16010
  if (this.routeTable !== undefined)
15959
16011
  obj.routeTable = inspectJson(this.routeTable);
16012
+ if ((this.ipv4PrivatePools?.length ?? 0) !== 0)
16013
+ obj.ipv4PrivatePools = inspectJson(this.ipv4PrivatePools);
16014
+ if ((this.ipv4PublicPools?.length ?? 0) !== 0)
16015
+ obj.ipv4PublicPools = inspectJson(this.ipv4PublicPools);
15960
16016
  return obj;
15961
16017
  }
15962
16018
  function applySubnetStatusCustom(message) {
@@ -15971,9 +16027,129 @@ function createBaseSubnetStatus() {
15971
16027
  ipv4PrivateCidrs: [],
15972
16028
  ipv4PublicCidrs: [],
15973
16029
  routeTable: undefined,
16030
+ ipv4PrivatePools: [],
16031
+ ipv4PublicPools: [],
15974
16032
  };
15975
16033
  return applySubnetStatusCustom(message);
15976
16034
  }
16035
+ export const SubnetStatusPool = {
16036
+ $type: "nebius.vpc.v1.SubnetStatusPool",
16037
+ encode(message, writer = new BinaryWriter()) {
16038
+ if (message.poolId !== "") {
16039
+ writer.uint32(10).string(message.poolId);
16040
+ }
16041
+ for (const v of (message.cidrs ?? [])) {
16042
+ writer.uint32(18).string(v);
16043
+ }
16044
+ if (message[unknownFieldsSymbol]) {
16045
+ writer.raw(message[unknownFieldsSymbol]);
16046
+ }
16047
+ return writer;
16048
+ },
16049
+ decode(input, length) {
16050
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
16051
+ const end = length === undefined ? reader.len : reader.pos + length;
16052
+ const message = createBaseSubnetStatusPool();
16053
+ let writer = undefined;
16054
+ while (reader.pos < end) {
16055
+ const tag = reader.uint32();
16056
+ switch (tag >>> 3) {
16057
+ case 1: {
16058
+ if (tag !== 10)
16059
+ break;
16060
+ message.poolId = reader.string();
16061
+ continue;
16062
+ }
16063
+ case 2: {
16064
+ if (tag !== 18)
16065
+ break;
16066
+ message.cidrs.push(reader.string());
16067
+ continue;
16068
+ }
16069
+ default:
16070
+ break;
16071
+ }
16072
+ if ((tag & 7) === 4 || tag === 0) {
16073
+ break;
16074
+ }
16075
+ {
16076
+ if (!writer)
16077
+ writer = new BinaryWriter();
16078
+ const skipped = reader.skip(tag & 7, tag >>> 3);
16079
+ writer.uint32(tag).raw(skipped);
16080
+ }
16081
+ }
16082
+ if (writer) {
16083
+ message[unknownFieldsSymbol] = writer.finish();
16084
+ }
16085
+ return message;
16086
+ },
16087
+ fromJSON(object) {
16088
+ return applySubnetStatusPoolCustom({
16089
+ $type: "nebius.vpc.v1.SubnetStatusPool",
16090
+ poolId: isSet(object.poolId ?? object.pool_id)
16091
+ ? String(object.poolId ?? object.pool_id)
16092
+ : "",
16093
+ cidrs: globalThis.Array.isArray(object?.cidrs ?? object?.cidrs)
16094
+ ? (object.cidrs ?? object.cidrs).map((e) => String(e))
16095
+ : [],
16096
+ });
16097
+ },
16098
+ toJSON(message, use = "json") {
16099
+ const obj = {};
16100
+ const pick = (json, pb) => (use === "json" ? json : pb);
16101
+ if (message.poolId !== "") {
16102
+ obj[pick("poolId", "pool_id")] = message.poolId;
16103
+ }
16104
+ if (message.cidrs?.length) {
16105
+ obj[pick("cidrs", "cidrs")] = message.cidrs.map((e) => e);
16106
+ }
16107
+ return obj;
16108
+ },
16109
+ create(base) {
16110
+ return SubnetStatusPool.fromPartial(base ?? {});
16111
+ },
16112
+ fromPartial(object) {
16113
+ const message = createBaseSubnetStatusPool();
16114
+ message.poolId = (object.poolId !== undefined && object.poolId !== null)
16115
+ ? object.poolId
16116
+ : "";
16117
+ message.cidrs = object.cidrs?.map((e) => e) || [];
16118
+ return message;
16119
+ },
16120
+ };
16121
+ protoRegistry.registerMessage(SubnetStatusPool);
16122
+ function SubnetStatusPoolCustomInspect() {
16123
+ const parts = [];
16124
+ if (this.poolId !== "")
16125
+ parts.push("poolId" + "=" + inspect(this.poolId));
16126
+ if ((this.cidrs?.length ?? 0) !== 0)
16127
+ parts.push("cidrs" + "=" + inspect(this.cidrs));
16128
+ return `${this.$type}(${parts.join(", ")})`;
16129
+ }
16130
+ function SubnetStatusPoolCustomJson() {
16131
+ const obj = {
16132
+ type: this.$type,
16133
+ };
16134
+ if (this.poolId !== "")
16135
+ obj.poolId = inspectJson(this.poolId);
16136
+ if ((this.cidrs?.length ?? 0) !== 0)
16137
+ obj.cidrs = inspectJson(this.cidrs);
16138
+ return obj;
16139
+ }
16140
+ function applySubnetStatusPoolCustom(message) {
16141
+ message[custom] = SubnetStatusPoolCustomInspect;
16142
+ message[customJson] = SubnetStatusPoolCustomJson;
16143
+ return message;
16144
+ }
16145
+ function createBaseSubnetStatusPool() {
16146
+ const message = {
16147
+ $type: "nebius.vpc.v1.SubnetStatusPool",
16148
+ poolId: "",
16149
+ cidrs: [],
16150
+ };
16151
+ return applySubnetStatusPoolCustom(message);
16152
+ }
15977
16153
  export const SubnetAssociatedRouteTable = {
15978
16154
  $type: "nebius.vpc.v1.SubnetAssociatedRouteTable",
15979
16155
  encode(message, writer = new BinaryWriter()) {