@nebius/js-sdk 0.2.10 → 0.2.11

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 (37) hide show
  1. package/dist/cjs/api/nebius/compute/v1/index.d.ts +248 -5
  2. package/dist/cjs/api/nebius/compute/v1/index.d.ts.map +1 -1
  3. package/dist/cjs/api/nebius/compute/v1/index.js +1248 -1
  4. package/dist/cjs/api/nebius/compute/v1/index.js.map +1 -1
  5. package/dist/cjs/api/nebius/dns/v1/index.d.ts +270 -1
  6. package/dist/cjs/api/nebius/dns/v1/index.d.ts.map +1 -1
  7. package/dist/cjs/api/nebius/dns/v1/index.js +1407 -499
  8. package/dist/cjs/api/nebius/dns/v1/index.js.map +1 -1
  9. package/dist/cjs/api/nebius/iam/v1/index.d.ts +6 -1
  10. package/dist/cjs/api/nebius/iam/v1/index.d.ts.map +1 -1
  11. package/dist/cjs/api/nebius/iam/v1/index.js +26 -0
  12. package/dist/cjs/api/nebius/iam/v1/index.js.map +1 -1
  13. package/dist/cjs/api/nebius/mk8s/v1/index.d.ts +1 -1
  14. package/dist/cjs/api/nebius/mk8s/v1/index.d.ts.map +1 -1
  15. package/dist/cjs/api/nebius/mk8s/v1/index.js +23 -0
  16. package/dist/cjs/api/nebius/mk8s/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/compute/v1/index.d.ts +248 -5
  20. package/dist/esm/api/nebius/compute/v1/index.d.ts.map +1 -1
  21. package/dist/esm/api/nebius/compute/v1/index.js +1246 -0
  22. package/dist/esm/api/nebius/compute/v1/index.js.map +1 -1
  23. package/dist/esm/api/nebius/dns/v1/index.d.ts +270 -1
  24. package/dist/esm/api/nebius/dns/v1/index.d.ts.map +1 -1
  25. package/dist/esm/api/nebius/dns/v1/index.js +1407 -499
  26. package/dist/esm/api/nebius/dns/v1/index.js.map +1 -1
  27. package/dist/esm/api/nebius/iam/v1/index.d.ts +6 -1
  28. package/dist/esm/api/nebius/iam/v1/index.d.ts.map +1 -1
  29. package/dist/esm/api/nebius/iam/v1/index.js +26 -0
  30. package/dist/esm/api/nebius/iam/v1/index.js.map +1 -1
  31. package/dist/esm/api/nebius/mk8s/v1/index.d.ts +1 -1
  32. package/dist/esm/api/nebius/mk8s/v1/index.d.ts.map +1 -1
  33. package/dist/esm/api/nebius/mk8s/v1/index.js +23 -0
  34. package/dist/esm/api/nebius/mk8s/v1/index.js.map +1 -1
  35. package/dist/esm/version.d.ts +1 -1
  36. package/dist/esm/version.js +1 -1
  37. package/package.json +1 -1
@@ -5,7 +5,8 @@ import { protoRegistry } from "../../../protobuf.js";
5
5
  import { 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
- import { GetByNameRequest, ResourceMetadata } from "../../common/v1/index.js";
8
+ import { Operation as OperationWrapper } from "../../../../runtime/operation.js";
9
+ import { GetByNameRequest, Operation, OperationService, ResourceMetadata } from "../../common/v1/index.js";
9
10
  const __deprecatedWarned = new Set();
10
11
  export const RecordServiceServiceDescription = {
11
12
  get: {
@@ -38,6 +39,36 @@ export const RecordServiceServiceDescription = {
38
39
  responseSerialize: (value) => Buffer.from(ListRecordsResponse.encode(value).finish()),
39
40
  responseDeserialize: (value) => ListRecordsResponse.decode(value),
40
41
  },
42
+ create: {
43
+ path: "/nebius.dns.v1.RecordService/Create",
44
+ requestStream: false,
45
+ responseStream: false,
46
+ requestSerialize: (value) => Buffer.from(CreateRecordRequest.encode(value).finish()),
47
+ sendResetMask: false,
48
+ requestDeserialize: (value) => CreateRecordRequest.decode(value),
49
+ responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
50
+ responseDeserialize: (value) => Operation.decode(value),
51
+ },
52
+ update: {
53
+ path: "/nebius.dns.v1.RecordService/Update",
54
+ requestStream: false,
55
+ responseStream: false,
56
+ requestSerialize: (value) => Buffer.from(UpdateRecordRequest.encode(value).finish()),
57
+ sendResetMask: true,
58
+ requestDeserialize: (value) => UpdateRecordRequest.decode(value),
59
+ responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
60
+ responseDeserialize: (value) => Operation.decode(value),
61
+ },
62
+ delete: {
63
+ path: "/nebius.dns.v1.RecordService/Delete",
64
+ requestStream: false,
65
+ responseStream: false,
66
+ requestSerialize: (value) => Buffer.from(DeleteRecordRequest.encode(value).finish()),
67
+ sendResetMask: false,
68
+ requestDeserialize: (value) => DeleteRecordRequest.decode(value),
69
+ responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
70
+ responseDeserialize: (value) => Operation.decode(value),
71
+ },
41
72
  };
42
73
  export const RecordServiceBaseClient = makeGenericClientConstructor(RecordServiceServiceDescription, "nebius.dns.v1.RecordService");
43
74
  export class RecordService {
@@ -52,6 +83,9 @@ export class RecordService {
52
83
  this.addr = addr;
53
84
  this.spec = RecordServiceServiceDescription;
54
85
  }
86
+ getOperationService() {
87
+ return new OperationService(this.sdk, this.addr);
88
+ }
55
89
  get(...args) {
56
90
  const spec = this.spec.get;
57
91
  const request = args[0];
@@ -76,6 +110,39 @@ export class RecordService {
76
110
  const deserialize = spec.responseDeserialize;
77
111
  return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
78
112
  }
113
+ create(...args) {
114
+ const spec = this.spec.create;
115
+ const request = args[0];
116
+ const metadata = (args.length > 1 ? args[1] : undefined);
117
+ const options = (args.length > 2 ? args[2] : undefined);
118
+ const deserialize = (value) => {
119
+ const resp = spec.responseDeserialize(value);
120
+ return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
121
+ };
122
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
123
+ }
124
+ update(...args) {
125
+ const spec = this.spec.update;
126
+ const request = args[0];
127
+ const metadata = (args.length > 1 ? args[1] : undefined);
128
+ const options = (args.length > 2 ? args[2] : undefined);
129
+ const deserialize = (value) => {
130
+ const resp = spec.responseDeserialize(value);
131
+ return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
132
+ };
133
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
134
+ }
135
+ delete(...args) {
136
+ const spec = this.spec.delete;
137
+ const request = args[0];
138
+ const metadata = (args.length > 1 ? args[1] : undefined);
139
+ const options = (args.length > 2 ? args[2] : undefined);
140
+ const deserialize = (value) => {
141
+ const resp = spec.responseDeserialize(value);
142
+ return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
143
+ };
144
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
145
+ }
79
146
  }
80
147
  const RecordSpec_RecordType_VALUE_COMMENTS = {
81
148
  RECORD_TYPE_UNSPECIFIED: " Record type is not specified\n",
@@ -1031,78 +1098,8 @@ function createBaseListRecordsResponse() {
1031
1098
  };
1032
1099
  return applyListRecordsResponseCustom(message);
1033
1100
  }
1034
- export const ZoneServiceServiceDescription = {
1035
- get: {
1036
- path: "/nebius.dns.v1.ZoneService/Get",
1037
- requestStream: false,
1038
- responseStream: false,
1039
- requestSerialize: (value) => Buffer.from(GetZoneRequest.encode(value).finish()),
1040
- sendResetMask: false,
1041
- requestDeserialize: (value) => GetZoneRequest.decode(value),
1042
- responseSerialize: (value) => Buffer.from(Zone.encode(value).finish()),
1043
- responseDeserialize: (value) => Zone.decode(value),
1044
- },
1045
- getByName: {
1046
- path: "/nebius.dns.v1.ZoneService/GetByName",
1047
- requestStream: false,
1048
- responseStream: false,
1049
- requestSerialize: (value) => Buffer.from(GetByNameRequest.encode(value).finish()),
1050
- sendResetMask: false,
1051
- requestDeserialize: (value) => GetByNameRequest.decode(value),
1052
- responseSerialize: (value) => Buffer.from(Zone.encode(value).finish()),
1053
- responseDeserialize: (value) => Zone.decode(value),
1054
- },
1055
- list: {
1056
- path: "/nebius.dns.v1.ZoneService/List",
1057
- requestStream: false,
1058
- responseStream: false,
1059
- requestSerialize: (value) => Buffer.from(ListZonesRequest.encode(value).finish()),
1060
- sendResetMask: false,
1061
- requestDeserialize: (value) => ListZonesRequest.decode(value),
1062
- responseSerialize: (value) => Buffer.from(ListZonesResponse.encode(value).finish()),
1063
- responseDeserialize: (value) => ListZonesResponse.decode(value),
1064
- },
1065
- };
1066
- export const ZoneServiceBaseClient = makeGenericClientConstructor(ZoneServiceServiceDescription, "nebius.dns.v1.ZoneService");
1067
- export class ZoneService {
1068
- sdk;
1069
- $type = "nebius.dns.v1.ZoneService";
1070
- addr;
1071
- spec;
1072
- apiServiceName = "dns";
1073
- constructor(sdk) {
1074
- this.sdk = sdk;
1075
- const addr = sdk.getAddressFromServiceName(this.$type, this.apiServiceName);
1076
- this.addr = addr;
1077
- this.spec = ZoneServiceServiceDescription;
1078
- }
1079
- get(...args) {
1080
- const spec = this.spec.get;
1081
- const request = args[0];
1082
- const metadata = (args.length > 1 ? args[1] : undefined);
1083
- const options = (args.length > 2 ? args[2] : undefined);
1084
- const deserialize = spec.responseDeserialize;
1085
- return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1086
- }
1087
- getByName(...args) {
1088
- const spec = this.spec.getByName;
1089
- const request = args[0];
1090
- const metadata = (args.length > 1 ? args[1] : undefined);
1091
- const options = (args.length > 2 ? args[2] : undefined);
1092
- const deserialize = spec.responseDeserialize;
1093
- return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1094
- }
1095
- list(...args) {
1096
- const spec = this.spec.list;
1097
- const request = args[0];
1098
- const metadata = (args.length > 1 ? args[1] : undefined);
1099
- const options = (args.length > 2 ? args[2] : undefined);
1100
- const deserialize = spec.responseDeserialize;
1101
- return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1102
- }
1103
- }
1104
- export const Zone = {
1105
- $type: "nebius.dns.v1.Zone",
1101
+ export const CreateRecordRequest = {
1102
+ $type: "nebius.dns.v1.CreateRecordRequest",
1106
1103
  encode(message, writer = new BinaryWriter()) {
1107
1104
  if (message.metadata !== undefined) {
1108
1105
  const w = writer.uint32(10).fork();
@@ -1111,12 +1108,7 @@ export const Zone = {
1111
1108
  }
1112
1109
  if (message.spec !== undefined) {
1113
1110
  const w = writer.uint32(18).fork();
1114
- ZoneSpec.encode(message.spec, w);
1115
- w.join();
1116
- }
1117
- if (message.status !== undefined) {
1118
- const w = writer.uint32(26).fork();
1119
- ZoneStatus.encode(message.status, w);
1111
+ RecordSpec.encode(message.spec, w);
1120
1112
  w.join();
1121
1113
  }
1122
1114
  if (message[unknownFieldsSymbol]) {
@@ -1127,7 +1119,7 @@ export const Zone = {
1127
1119
  decode(input, length) {
1128
1120
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1129
1121
  const end = length === undefined ? reader.len : reader.pos + length;
1130
- const message = createBaseZone();
1122
+ const message = createBaseCreateRecordRequest();
1131
1123
  let writer = undefined;
1132
1124
  while (reader.pos < end) {
1133
1125
  const tag = reader.uint32();
@@ -1141,13 +1133,7 @@ export const Zone = {
1141
1133
  case 2: {
1142
1134
  if (tag !== 18)
1143
1135
  break;
1144
- message.spec = ZoneSpec.decode(reader, reader.uint32());
1145
- continue;
1146
- }
1147
- case 3: {
1148
- if (tag !== 26)
1149
- break;
1150
- message.status = ZoneStatus.decode(reader, reader.uint32());
1136
+ message.spec = RecordSpec.decode(reader, reader.uint32());
1151
1137
  continue;
1152
1138
  }
1153
1139
  default:
@@ -1169,16 +1155,13 @@ export const Zone = {
1169
1155
  return message;
1170
1156
  },
1171
1157
  fromJSON(object) {
1172
- return applyZoneCustom({
1173
- $type: "nebius.dns.v1.Zone",
1158
+ return applyCreateRecordRequestCustom({
1159
+ $type: "nebius.dns.v1.CreateRecordRequest",
1174
1160
  metadata: isSet(object.metadata ?? object.metadata)
1175
1161
  ? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
1176
1162
  : undefined,
1177
1163
  spec: isSet(object.spec ?? object.spec)
1178
- ? ZoneSpec.fromJSON(object.spec ?? object.spec)
1179
- : undefined,
1180
- status: isSet(object.status ?? object.status)
1181
- ? ZoneStatus.fromJSON(object.status ?? object.status)
1164
+ ? RecordSpec.fromJSON(object.spec ?? object.spec)
1182
1165
  : undefined,
1183
1166
  });
1184
1167
  },
@@ -1192,45 +1175,35 @@ export const Zone = {
1192
1175
  }
1193
1176
  if (message.spec !== undefined) {
1194
1177
  obj[pick("spec", "spec")] = message.spec
1195
- ? ZoneSpec.toJSON(message.spec, use)
1196
- : undefined;
1197
- }
1198
- if (message.status !== undefined) {
1199
- obj[pick("status", "status")] = message.status
1200
- ? ZoneStatus.toJSON(message.status, use)
1178
+ ? RecordSpec.toJSON(message.spec, use)
1201
1179
  : undefined;
1202
1180
  }
1203
1181
  return obj;
1204
1182
  },
1205
1183
  create(base) {
1206
- return Zone.fromPartial(base ?? {});
1184
+ return CreateRecordRequest.fromPartial(base ?? {});
1207
1185
  },
1208
1186
  fromPartial(object) {
1209
- const message = createBaseZone();
1187
+ const message = createBaseCreateRecordRequest();
1210
1188
  message.metadata = (object.metadata !== undefined && object.metadata !== null)
1211
1189
  ? ResourceMetadata.fromPartial(object.metadata)
1212
1190
  : undefined;
1213
1191
  message.spec = (object.spec !== undefined && object.spec !== null)
1214
- ? ZoneSpec.fromPartial(object.spec)
1215
- : undefined;
1216
- message.status = (object.status !== undefined && object.status !== null)
1217
- ? ZoneStatus.fromPartial(object.status)
1192
+ ? RecordSpec.fromPartial(object.spec)
1218
1193
  : undefined;
1219
1194
  return message;
1220
1195
  },
1221
1196
  };
1222
- protoRegistry.registerMessage(Zone);
1223
- function ZoneCustomInspect() {
1197
+ protoRegistry.registerMessage(CreateRecordRequest);
1198
+ function CreateRecordRequestCustomInspect() {
1224
1199
  const parts = [];
1225
1200
  if (this.metadata !== undefined)
1226
1201
  parts.push("metadata" + "=" + inspect(this.metadata));
1227
1202
  if (this.spec !== undefined)
1228
1203
  parts.push("spec" + "=" + inspect(this.spec));
1229
- if (this.status !== undefined)
1230
- parts.push("status" + "=" + inspect(this.status));
1231
1204
  return `${this.$type}(${parts.join(", ")})`;
1232
1205
  }
1233
- function ZoneCustomJson() {
1206
+ function CreateRecordRequestCustomJson() {
1234
1207
  const obj = {
1235
1208
  type: this.$type,
1236
1209
  };
@@ -1238,39 +1211,32 @@ function ZoneCustomJson() {
1238
1211
  obj.metadata = inspectJson(this.metadata);
1239
1212
  if (this.spec !== undefined)
1240
1213
  obj.spec = inspectJson(this.spec);
1241
- if (this.status !== undefined)
1242
- obj.status = inspectJson(this.status);
1243
1214
  return obj;
1244
1215
  }
1245
- function applyZoneCustom(message) {
1246
- message[custom] = ZoneCustomInspect;
1247
- message[customJson] = ZoneCustomJson;
1216
+ function applyCreateRecordRequestCustom(message) {
1217
+ message[custom] = CreateRecordRequestCustomInspect;
1218
+ message[customJson] = CreateRecordRequestCustomJson;
1248
1219
  return message;
1249
1220
  }
1250
- function createBaseZone() {
1221
+ function createBaseCreateRecordRequest() {
1251
1222
  const message = {
1252
- $type: "nebius.dns.v1.Zone",
1223
+ $type: "nebius.dns.v1.CreateRecordRequest",
1253
1224
  metadata: undefined,
1254
1225
  spec: undefined,
1255
- status: undefined,
1256
1226
  };
1257
- return applyZoneCustom(message);
1227
+ return applyCreateRecordRequestCustom(message);
1258
1228
  }
1259
- export const ZoneSpec = {
1260
- $type: "nebius.dns.v1.ZoneSpec",
1229
+ export const UpdateRecordRequest = {
1230
+ $type: "nebius.dns.v1.UpdateRecordRequest",
1261
1231
  encode(message, writer = new BinaryWriter()) {
1262
- if (message.domainName !== "") {
1263
- writer.uint32(10).string(message.domainName);
1264
- }
1265
- if (message.soaSpec !== undefined) {
1266
- const w = writer.uint32(242).fork();
1267
- SoaSpec.encode(message.soaSpec, w);
1232
+ if (message.metadata !== undefined) {
1233
+ const w = writer.uint32(10).fork();
1234
+ ResourceMetadata.encode(message.metadata, w);
1268
1235
  w.join();
1269
1236
  }
1270
- if (message.scope?.$case === undefined) { /* noop */ }
1271
- else if (message.scope?.$case === "vpc") {
1272
- const w = writer.uint32(98).fork();
1273
- VpcZoneScope.encode(message.scope.vpc, w);
1237
+ if (message.spec !== undefined) {
1238
+ const w = writer.uint32(18).fork();
1239
+ RecordSpec.encode(message.spec, w);
1274
1240
  w.join();
1275
1241
  }
1276
1242
  if (message[unknownFieldsSymbol]) {
@@ -1281,7 +1247,7 @@ export const ZoneSpec = {
1281
1247
  decode(input, length) {
1282
1248
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1283
1249
  const end = length === undefined ? reader.len : reader.pos + length;
1284
- const message = createBaseZoneSpec();
1250
+ const message = createBaseUpdateRecordRequest();
1285
1251
  let writer = undefined;
1286
1252
  while (reader.pos < end) {
1287
1253
  const tag = reader.uint32();
@@ -1289,22 +1255,13 @@ export const ZoneSpec = {
1289
1255
  case 1: {
1290
1256
  if (tag !== 10)
1291
1257
  break;
1292
- message.domainName = reader.string();
1293
- continue;
1294
- }
1295
- case 30: {
1296
- if (tag !== 242)
1297
- break;
1298
- message.soaSpec = SoaSpec.decode(reader, reader.uint32());
1258
+ message.metadata = ResourceMetadata.decode(reader, reader.uint32());
1299
1259
  continue;
1300
1260
  }
1301
- case 12: {
1302
- if (tag !== 98)
1261
+ case 2: {
1262
+ if (tag !== 18)
1303
1263
  break;
1304
- message.scope = {
1305
- $case: "vpc",
1306
- vpc: VpcZoneScope.decode(reader, reader.uint32())
1307
- };
1264
+ message.spec = RecordSpec.decode(reader, reader.uint32());
1308
1265
  continue;
1309
1266
  }
1310
1267
  default:
@@ -1326,109 +1283,881 @@ export const ZoneSpec = {
1326
1283
  return message;
1327
1284
  },
1328
1285
  fromJSON(object) {
1329
- return applyZoneSpecCustom({
1330
- $type: "nebius.dns.v1.ZoneSpec",
1331
- domainName: isSet(object.domainName ?? object.domain_name)
1332
- ? String(object.domainName ?? object.domain_name)
1333
- : "",
1334
- soaSpec: isSet(object.soaSpec ?? object.soa_spec)
1335
- ? SoaSpec.fromJSON(object.soaSpec ?? object.soa_spec)
1286
+ return applyUpdateRecordRequestCustom({
1287
+ $type: "nebius.dns.v1.UpdateRecordRequest",
1288
+ metadata: isSet(object.metadata ?? object.metadata)
1289
+ ? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
1290
+ : undefined,
1291
+ spec: isSet(object.spec ?? object.spec)
1292
+ ? RecordSpec.fromJSON(object.spec ?? object.spec)
1336
1293
  : undefined,
1337
- scope: (() => {
1338
- if (isSet(object.vpc) || isSet(object.vpc)) {
1339
- return {
1340
- $case: "vpc",
1341
- vpc: VpcZoneScope.fromJSON(object.vpc ?? object.vpc)
1342
- };
1343
- }
1344
- return undefined;
1345
- })(),
1346
1294
  });
1347
1295
  },
1348
1296
  toJSON(message, use = "json") {
1349
1297
  const obj = {};
1350
1298
  const pick = (json, pb) => (use === "json" ? json : pb);
1351
- if (message.domainName !== "") {
1352
- obj[pick("domainName", "domain_name")] = message.domainName;
1353
- }
1354
- if (message.soaSpec !== undefined) {
1355
- obj[pick("soaSpec", "soa_spec")] = message.soaSpec
1356
- ? SoaSpec.toJSON(message.soaSpec, use)
1299
+ if (message.metadata !== undefined) {
1300
+ obj[pick("metadata", "metadata")] = message.metadata
1301
+ ? ResourceMetadata.toJSON(message.metadata, use)
1357
1302
  : undefined;
1358
1303
  }
1359
- switch (message.scope?.$case) {
1360
- case "vpc": {
1361
- obj[pick("vpc", "vpc")] = VpcZoneScope.toJSON(message.scope.vpc, use);
1362
- break;
1363
- }
1364
- default: break;
1304
+ if (message.spec !== undefined) {
1305
+ obj[pick("spec", "spec")] = message.spec
1306
+ ? RecordSpec.toJSON(message.spec, use)
1307
+ : undefined;
1365
1308
  }
1366
1309
  return obj;
1367
1310
  },
1368
1311
  create(base) {
1369
- return ZoneSpec.fromPartial(base ?? {});
1312
+ return UpdateRecordRequest.fromPartial(base ?? {});
1370
1313
  },
1371
1314
  fromPartial(object) {
1372
- const message = createBaseZoneSpec();
1373
- message.domainName = (object.domainName !== undefined && object.domainName !== null)
1374
- ? object.domainName
1375
- : "";
1376
- message.soaSpec = (object.soaSpec !== undefined && object.soaSpec !== null)
1377
- ? SoaSpec.fromPartial(object.soaSpec)
1315
+ const message = createBaseUpdateRecordRequest();
1316
+ message.metadata = (object.metadata !== undefined && object.metadata !== null)
1317
+ ? ResourceMetadata.fromPartial(object.metadata)
1318
+ : undefined;
1319
+ message.spec = (object.spec !== undefined && object.spec !== null)
1320
+ ? RecordSpec.fromPartial(object.spec)
1378
1321
  : undefined;
1379
- switch (object.scope?.$case) {
1380
- case "vpc": {
1381
- if (object.scope.vpc !== undefined && object.scope.vpc !== null) {
1382
- message.scope = {
1383
- $case: "vpc",
1384
- vpc: VpcZoneScope.fromPartial(object.scope.vpc),
1385
- };
1386
- }
1387
- break;
1388
- }
1389
- default: break;
1390
- }
1391
1322
  return message;
1392
1323
  },
1393
1324
  };
1394
- protoRegistry.registerMessage(ZoneSpec);
1395
- function ZoneSpecCustomInspect() {
1325
+ protoRegistry.registerMessage(UpdateRecordRequest);
1326
+ function UpdateRecordRequestCustomInspect() {
1396
1327
  const parts = [];
1397
- if (this.domainName !== "")
1398
- parts.push("domainName" + "=" + inspect(this.domainName));
1399
- if (this.soaSpec !== undefined)
1400
- parts.push("soaSpec" + "=" + inspect(this.soaSpec));
1401
- return `${this.$type}(${parts.join(", ")})`;
1328
+ if (this.metadata !== undefined)
1329
+ parts.push("metadata" + "=" + inspect(this.metadata));
1330
+ if (this.spec !== undefined)
1331
+ parts.push("spec" + "=" + inspect(this.spec));
1332
+ return `${this.$type}(${parts.join(", ")})`;
1333
+ }
1334
+ function UpdateRecordRequestCustomJson() {
1335
+ const obj = {
1336
+ type: this.$type,
1337
+ };
1338
+ if (this.metadata !== undefined)
1339
+ obj.metadata = inspectJson(this.metadata);
1340
+ if (this.spec !== undefined)
1341
+ obj.spec = inspectJson(this.spec);
1342
+ return obj;
1343
+ }
1344
+ function applyUpdateRecordRequestCustom(message) {
1345
+ message[custom] = UpdateRecordRequestCustomInspect;
1346
+ message[customJson] = UpdateRecordRequestCustomJson;
1347
+ return message;
1348
+ }
1349
+ function createBaseUpdateRecordRequest() {
1350
+ const message = {
1351
+ $type: "nebius.dns.v1.UpdateRecordRequest",
1352
+ metadata: undefined,
1353
+ spec: undefined,
1354
+ };
1355
+ return applyUpdateRecordRequestCustom(message);
1356
+ }
1357
+ export const DeleteRecordRequest = {
1358
+ $type: "nebius.dns.v1.DeleteRecordRequest",
1359
+ encode(message, writer = new BinaryWriter()) {
1360
+ if (message.id !== "") {
1361
+ writer.uint32(10).string(message.id);
1362
+ }
1363
+ if (message.resourceVersion !== undefined && !message.resourceVersion.isZero?.()) {
1364
+ writer.uint32(16).int64(message.resourceVersion.toString());
1365
+ }
1366
+ if (message.force === true) {
1367
+ writer.uint32(24).bool(message.force);
1368
+ }
1369
+ if (message[unknownFieldsSymbol]) {
1370
+ writer.raw(message[unknownFieldsSymbol]);
1371
+ }
1372
+ return writer;
1373
+ },
1374
+ decode(input, length) {
1375
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1376
+ const end = length === undefined ? reader.len : reader.pos + length;
1377
+ const message = createBaseDeleteRecordRequest();
1378
+ let writer = undefined;
1379
+ while (reader.pos < end) {
1380
+ const tag = reader.uint32();
1381
+ switch (tag >>> 3) {
1382
+ case 1: {
1383
+ if (tag !== 10)
1384
+ break;
1385
+ message.id = reader.string();
1386
+ continue;
1387
+ }
1388
+ case 2: {
1389
+ if (tag !== 16)
1390
+ break;
1391
+ message.resourceVersion = Long.fromValue(reader.int64());
1392
+ continue;
1393
+ }
1394
+ case 3: {
1395
+ if (tag !== 24)
1396
+ break;
1397
+ message.force = reader.bool();
1398
+ continue;
1399
+ }
1400
+ default:
1401
+ break;
1402
+ }
1403
+ if ((tag & 7) === 4 || tag === 0) {
1404
+ break;
1405
+ }
1406
+ {
1407
+ if (!writer)
1408
+ writer = new BinaryWriter();
1409
+ const skipped = reader.skip(tag & 7, tag >>> 3);
1410
+ writer.uint32(tag).raw(skipped);
1411
+ }
1412
+ }
1413
+ if (writer) {
1414
+ message[unknownFieldsSymbol] = writer.finish();
1415
+ }
1416
+ return message;
1417
+ },
1418
+ fromJSON(object) {
1419
+ return applyDeleteRecordRequestCustom({
1420
+ $type: "nebius.dns.v1.DeleteRecordRequest",
1421
+ id: isSet(object.id ?? object.id)
1422
+ ? String(object.id ?? object.id)
1423
+ : "",
1424
+ resourceVersion: isSet(object.resourceVersion ?? object.resource_version)
1425
+ ? Long.fromValue(object.resourceVersion ?? object.resource_version)
1426
+ : Long.ZERO,
1427
+ force: isSet(object.force ?? object.force)
1428
+ ? Boolean(object.force ?? object.force)
1429
+ : false,
1430
+ });
1431
+ },
1432
+ toJSON(message, use = "json") {
1433
+ const obj = {};
1434
+ const pick = (json, pb) => (use === "json" ? json : pb);
1435
+ if (message.id !== "") {
1436
+ obj[pick("id", "id")] = message.id;
1437
+ }
1438
+ if (!message.resourceVersion?.isZero?.()) {
1439
+ obj[pick("resourceVersion", "resource_version")] = (message.resourceVersion || Long.ZERO).toString();
1440
+ }
1441
+ if (message.force === true) {
1442
+ obj[pick("force", "force")] = message.force;
1443
+ }
1444
+ return obj;
1445
+ },
1446
+ create(base) {
1447
+ return DeleteRecordRequest.fromPartial(base ?? {});
1448
+ },
1449
+ fromPartial(object) {
1450
+ const message = createBaseDeleteRecordRequest();
1451
+ message.id = (object.id !== undefined && object.id !== null)
1452
+ ? object.id
1453
+ : "";
1454
+ message.resourceVersion = (object.resourceVersion !== undefined && object.resourceVersion !== null)
1455
+ ? Long.fromValue(object.resourceVersion)
1456
+ : Long.ZERO;
1457
+ message.force = (object.force !== undefined && object.force !== null)
1458
+ ? object.force
1459
+ : false;
1460
+ return message;
1461
+ },
1462
+ };
1463
+ protoRegistry.registerMessage(DeleteRecordRequest);
1464
+ function DeleteRecordRequestCustomInspect() {
1465
+ const parts = [];
1466
+ if (this.id !== "")
1467
+ parts.push("id" + "=" + inspect(this.id));
1468
+ if (!this.resourceVersion?.isZero?.())
1469
+ parts.push("resourceVersion" + "=" + inspect(this.resourceVersion));
1470
+ if (this.force === true)
1471
+ parts.push("force" + "=" + inspect(this.force));
1472
+ return `${this.$type}(${parts.join(", ")})`;
1473
+ }
1474
+ function DeleteRecordRequestCustomJson() {
1475
+ const obj = {
1476
+ type: this.$type,
1477
+ };
1478
+ if (this.id !== "")
1479
+ obj.id = inspectJson(this.id);
1480
+ if (!this.resourceVersion?.isZero?.())
1481
+ obj.resourceVersion = inspectJson(this.resourceVersion);
1482
+ if (this.force === true)
1483
+ obj.force = inspectJson(this.force);
1484
+ return obj;
1485
+ }
1486
+ function applyDeleteRecordRequestCustom(message) {
1487
+ message[custom] = DeleteRecordRequestCustomInspect;
1488
+ message[customJson] = DeleteRecordRequestCustomJson;
1489
+ return message;
1490
+ }
1491
+ function createBaseDeleteRecordRequest() {
1492
+ const message = {
1493
+ $type: "nebius.dns.v1.DeleteRecordRequest",
1494
+ id: "",
1495
+ resourceVersion: Long.ZERO,
1496
+ force: false,
1497
+ };
1498
+ return applyDeleteRecordRequestCustom(message);
1499
+ }
1500
+ export const ZoneServiceServiceDescription = {
1501
+ get: {
1502
+ path: "/nebius.dns.v1.ZoneService/Get",
1503
+ requestStream: false,
1504
+ responseStream: false,
1505
+ requestSerialize: (value) => Buffer.from(GetZoneRequest.encode(value).finish()),
1506
+ sendResetMask: false,
1507
+ requestDeserialize: (value) => GetZoneRequest.decode(value),
1508
+ responseSerialize: (value) => Buffer.from(Zone.encode(value).finish()),
1509
+ responseDeserialize: (value) => Zone.decode(value),
1510
+ },
1511
+ getByName: {
1512
+ path: "/nebius.dns.v1.ZoneService/GetByName",
1513
+ requestStream: false,
1514
+ responseStream: false,
1515
+ requestSerialize: (value) => Buffer.from(GetByNameRequest.encode(value).finish()),
1516
+ sendResetMask: false,
1517
+ requestDeserialize: (value) => GetByNameRequest.decode(value),
1518
+ responseSerialize: (value) => Buffer.from(Zone.encode(value).finish()),
1519
+ responseDeserialize: (value) => Zone.decode(value),
1520
+ },
1521
+ list: {
1522
+ path: "/nebius.dns.v1.ZoneService/List",
1523
+ requestStream: false,
1524
+ responseStream: false,
1525
+ requestSerialize: (value) => Buffer.from(ListZonesRequest.encode(value).finish()),
1526
+ sendResetMask: false,
1527
+ requestDeserialize: (value) => ListZonesRequest.decode(value),
1528
+ responseSerialize: (value) => Buffer.from(ListZonesResponse.encode(value).finish()),
1529
+ responseDeserialize: (value) => ListZonesResponse.decode(value),
1530
+ },
1531
+ create: {
1532
+ path: "/nebius.dns.v1.ZoneService/Create",
1533
+ requestStream: false,
1534
+ responseStream: false,
1535
+ requestSerialize: (value) => Buffer.from(CreateZoneRequest.encode(value).finish()),
1536
+ sendResetMask: false,
1537
+ requestDeserialize: (value) => CreateZoneRequest.decode(value),
1538
+ responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
1539
+ responseDeserialize: (value) => Operation.decode(value),
1540
+ },
1541
+ update: {
1542
+ path: "/nebius.dns.v1.ZoneService/Update",
1543
+ requestStream: false,
1544
+ responseStream: false,
1545
+ requestSerialize: (value) => Buffer.from(UpdateZoneRequest.encode(value).finish()),
1546
+ sendResetMask: true,
1547
+ requestDeserialize: (value) => UpdateZoneRequest.decode(value),
1548
+ responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
1549
+ responseDeserialize: (value) => Operation.decode(value),
1550
+ },
1551
+ delete: {
1552
+ path: "/nebius.dns.v1.ZoneService/Delete",
1553
+ requestStream: false,
1554
+ responseStream: false,
1555
+ requestSerialize: (value) => Buffer.from(DeleteZoneRequest.encode(value).finish()),
1556
+ sendResetMask: false,
1557
+ requestDeserialize: (value) => DeleteZoneRequest.decode(value),
1558
+ responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
1559
+ responseDeserialize: (value) => Operation.decode(value),
1560
+ },
1561
+ };
1562
+ export const ZoneServiceBaseClient = makeGenericClientConstructor(ZoneServiceServiceDescription, "nebius.dns.v1.ZoneService");
1563
+ export class ZoneService {
1564
+ sdk;
1565
+ $type = "nebius.dns.v1.ZoneService";
1566
+ addr;
1567
+ spec;
1568
+ apiServiceName = "dns";
1569
+ constructor(sdk) {
1570
+ this.sdk = sdk;
1571
+ const addr = sdk.getAddressFromServiceName(this.$type, this.apiServiceName);
1572
+ this.addr = addr;
1573
+ this.spec = ZoneServiceServiceDescription;
1574
+ }
1575
+ getOperationService() {
1576
+ return new OperationService(this.sdk, this.addr);
1577
+ }
1578
+ get(...args) {
1579
+ const spec = this.spec.get;
1580
+ const request = args[0];
1581
+ const metadata = (args.length > 1 ? args[1] : undefined);
1582
+ const options = (args.length > 2 ? args[2] : undefined);
1583
+ const deserialize = spec.responseDeserialize;
1584
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1585
+ }
1586
+ getByName(...args) {
1587
+ const spec = this.spec.getByName;
1588
+ const request = args[0];
1589
+ const metadata = (args.length > 1 ? args[1] : undefined);
1590
+ const options = (args.length > 2 ? args[2] : undefined);
1591
+ const deserialize = spec.responseDeserialize;
1592
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1593
+ }
1594
+ list(...args) {
1595
+ const spec = this.spec.list;
1596
+ const request = args[0];
1597
+ const metadata = (args.length > 1 ? args[1] : undefined);
1598
+ const options = (args.length > 2 ? args[2] : undefined);
1599
+ const deserialize = spec.responseDeserialize;
1600
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1601
+ }
1602
+ create(...args) {
1603
+ const spec = this.spec.create;
1604
+ const request = args[0];
1605
+ const metadata = (args.length > 1 ? args[1] : undefined);
1606
+ const options = (args.length > 2 ? args[2] : undefined);
1607
+ const deserialize = (value) => {
1608
+ const resp = spec.responseDeserialize(value);
1609
+ return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
1610
+ };
1611
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1612
+ }
1613
+ update(...args) {
1614
+ const spec = this.spec.update;
1615
+ const request = args[0];
1616
+ const metadata = (args.length > 1 ? args[1] : undefined);
1617
+ const options = (args.length > 2 ? args[2] : undefined);
1618
+ const deserialize = (value) => {
1619
+ const resp = spec.responseDeserialize(value);
1620
+ return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
1621
+ };
1622
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1623
+ }
1624
+ delete(...args) {
1625
+ const spec = this.spec.delete;
1626
+ const request = args[0];
1627
+ const metadata = (args.length > 1 ? args[1] : undefined);
1628
+ const options = (args.length > 2 ? args[2] : undefined);
1629
+ const deserialize = (value) => {
1630
+ const resp = spec.responseDeserialize(value);
1631
+ return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
1632
+ };
1633
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1634
+ }
1635
+ }
1636
+ export const Zone = {
1637
+ $type: "nebius.dns.v1.Zone",
1638
+ encode(message, writer = new BinaryWriter()) {
1639
+ if (message.metadata !== undefined) {
1640
+ const w = writer.uint32(10).fork();
1641
+ ResourceMetadata.encode(message.metadata, w);
1642
+ w.join();
1643
+ }
1644
+ if (message.spec !== undefined) {
1645
+ const w = writer.uint32(18).fork();
1646
+ ZoneSpec.encode(message.spec, w);
1647
+ w.join();
1648
+ }
1649
+ if (message.status !== undefined) {
1650
+ const w = writer.uint32(26).fork();
1651
+ ZoneStatus.encode(message.status, w);
1652
+ w.join();
1653
+ }
1654
+ if (message[unknownFieldsSymbol]) {
1655
+ writer.raw(message[unknownFieldsSymbol]);
1656
+ }
1657
+ return writer;
1658
+ },
1659
+ decode(input, length) {
1660
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1661
+ const end = length === undefined ? reader.len : reader.pos + length;
1662
+ const message = createBaseZone();
1663
+ let writer = undefined;
1664
+ while (reader.pos < end) {
1665
+ const tag = reader.uint32();
1666
+ switch (tag >>> 3) {
1667
+ case 1: {
1668
+ if (tag !== 10)
1669
+ break;
1670
+ message.metadata = ResourceMetadata.decode(reader, reader.uint32());
1671
+ continue;
1672
+ }
1673
+ case 2: {
1674
+ if (tag !== 18)
1675
+ break;
1676
+ message.spec = ZoneSpec.decode(reader, reader.uint32());
1677
+ continue;
1678
+ }
1679
+ case 3: {
1680
+ if (tag !== 26)
1681
+ break;
1682
+ message.status = ZoneStatus.decode(reader, reader.uint32());
1683
+ continue;
1684
+ }
1685
+ default:
1686
+ break;
1687
+ }
1688
+ if ((tag & 7) === 4 || tag === 0) {
1689
+ break;
1690
+ }
1691
+ {
1692
+ if (!writer)
1693
+ writer = new BinaryWriter();
1694
+ const skipped = reader.skip(tag & 7, tag >>> 3);
1695
+ writer.uint32(tag).raw(skipped);
1696
+ }
1697
+ }
1698
+ if (writer) {
1699
+ message[unknownFieldsSymbol] = writer.finish();
1700
+ }
1701
+ return message;
1702
+ },
1703
+ fromJSON(object) {
1704
+ return applyZoneCustom({
1705
+ $type: "nebius.dns.v1.Zone",
1706
+ metadata: isSet(object.metadata ?? object.metadata)
1707
+ ? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
1708
+ : undefined,
1709
+ spec: isSet(object.spec ?? object.spec)
1710
+ ? ZoneSpec.fromJSON(object.spec ?? object.spec)
1711
+ : undefined,
1712
+ status: isSet(object.status ?? object.status)
1713
+ ? ZoneStatus.fromJSON(object.status ?? object.status)
1714
+ : undefined,
1715
+ });
1716
+ },
1717
+ toJSON(message, use = "json") {
1718
+ const obj = {};
1719
+ const pick = (json, pb) => (use === "json" ? json : pb);
1720
+ if (message.metadata !== undefined) {
1721
+ obj[pick("metadata", "metadata")] = message.metadata
1722
+ ? ResourceMetadata.toJSON(message.metadata, use)
1723
+ : undefined;
1724
+ }
1725
+ if (message.spec !== undefined) {
1726
+ obj[pick("spec", "spec")] = message.spec
1727
+ ? ZoneSpec.toJSON(message.spec, use)
1728
+ : undefined;
1729
+ }
1730
+ if (message.status !== undefined) {
1731
+ obj[pick("status", "status")] = message.status
1732
+ ? ZoneStatus.toJSON(message.status, use)
1733
+ : undefined;
1734
+ }
1735
+ return obj;
1736
+ },
1737
+ create(base) {
1738
+ return Zone.fromPartial(base ?? {});
1739
+ },
1740
+ fromPartial(object) {
1741
+ const message = createBaseZone();
1742
+ message.metadata = (object.metadata !== undefined && object.metadata !== null)
1743
+ ? ResourceMetadata.fromPartial(object.metadata)
1744
+ : undefined;
1745
+ message.spec = (object.spec !== undefined && object.spec !== null)
1746
+ ? ZoneSpec.fromPartial(object.spec)
1747
+ : undefined;
1748
+ message.status = (object.status !== undefined && object.status !== null)
1749
+ ? ZoneStatus.fromPartial(object.status)
1750
+ : undefined;
1751
+ return message;
1752
+ },
1753
+ };
1754
+ protoRegistry.registerMessage(Zone);
1755
+ function ZoneCustomInspect() {
1756
+ const parts = [];
1757
+ if (this.metadata !== undefined)
1758
+ parts.push("metadata" + "=" + inspect(this.metadata));
1759
+ if (this.spec !== undefined)
1760
+ parts.push("spec" + "=" + inspect(this.spec));
1761
+ if (this.status !== undefined)
1762
+ parts.push("status" + "=" + inspect(this.status));
1763
+ return `${this.$type}(${parts.join(", ")})`;
1764
+ }
1765
+ function ZoneCustomJson() {
1766
+ const obj = {
1767
+ type: this.$type,
1768
+ };
1769
+ if (this.metadata !== undefined)
1770
+ obj.metadata = inspectJson(this.metadata);
1771
+ if (this.spec !== undefined)
1772
+ obj.spec = inspectJson(this.spec);
1773
+ if (this.status !== undefined)
1774
+ obj.status = inspectJson(this.status);
1775
+ return obj;
1776
+ }
1777
+ function applyZoneCustom(message) {
1778
+ message[custom] = ZoneCustomInspect;
1779
+ message[customJson] = ZoneCustomJson;
1780
+ return message;
1781
+ }
1782
+ function createBaseZone() {
1783
+ const message = {
1784
+ $type: "nebius.dns.v1.Zone",
1785
+ metadata: undefined,
1786
+ spec: undefined,
1787
+ status: undefined,
1788
+ };
1789
+ return applyZoneCustom(message);
1790
+ }
1791
+ export const ZoneSpec = {
1792
+ $type: "nebius.dns.v1.ZoneSpec",
1793
+ encode(message, writer = new BinaryWriter()) {
1794
+ if (message.domainName !== "") {
1795
+ writer.uint32(10).string(message.domainName);
1796
+ }
1797
+ if (message.soaSpec !== undefined) {
1798
+ const w = writer.uint32(242).fork();
1799
+ SoaSpec.encode(message.soaSpec, w);
1800
+ w.join();
1801
+ }
1802
+ if (message.scope?.$case === undefined) { /* noop */ }
1803
+ else if (message.scope?.$case === "vpc") {
1804
+ const w = writer.uint32(98).fork();
1805
+ VpcZoneScope.encode(message.scope.vpc, w);
1806
+ w.join();
1807
+ }
1808
+ if (message[unknownFieldsSymbol]) {
1809
+ writer.raw(message[unknownFieldsSymbol]);
1810
+ }
1811
+ return writer;
1812
+ },
1813
+ decode(input, length) {
1814
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1815
+ const end = length === undefined ? reader.len : reader.pos + length;
1816
+ const message = createBaseZoneSpec();
1817
+ let writer = undefined;
1818
+ while (reader.pos < end) {
1819
+ const tag = reader.uint32();
1820
+ switch (tag >>> 3) {
1821
+ case 1: {
1822
+ if (tag !== 10)
1823
+ break;
1824
+ message.domainName = reader.string();
1825
+ continue;
1826
+ }
1827
+ case 30: {
1828
+ if (tag !== 242)
1829
+ break;
1830
+ message.soaSpec = SoaSpec.decode(reader, reader.uint32());
1831
+ continue;
1832
+ }
1833
+ case 12: {
1834
+ if (tag !== 98)
1835
+ break;
1836
+ message.scope = {
1837
+ $case: "vpc",
1838
+ vpc: VpcZoneScope.decode(reader, reader.uint32())
1839
+ };
1840
+ continue;
1841
+ }
1842
+ default:
1843
+ break;
1844
+ }
1845
+ if ((tag & 7) === 4 || tag === 0) {
1846
+ break;
1847
+ }
1848
+ {
1849
+ if (!writer)
1850
+ writer = new BinaryWriter();
1851
+ const skipped = reader.skip(tag & 7, tag >>> 3);
1852
+ writer.uint32(tag).raw(skipped);
1853
+ }
1854
+ }
1855
+ if (writer) {
1856
+ message[unknownFieldsSymbol] = writer.finish();
1857
+ }
1858
+ return message;
1859
+ },
1860
+ fromJSON(object) {
1861
+ return applyZoneSpecCustom({
1862
+ $type: "nebius.dns.v1.ZoneSpec",
1863
+ domainName: isSet(object.domainName ?? object.domain_name)
1864
+ ? String(object.domainName ?? object.domain_name)
1865
+ : "",
1866
+ soaSpec: isSet(object.soaSpec ?? object.soa_spec)
1867
+ ? SoaSpec.fromJSON(object.soaSpec ?? object.soa_spec)
1868
+ : undefined,
1869
+ scope: (() => {
1870
+ if (isSet(object.vpc) || isSet(object.vpc)) {
1871
+ return {
1872
+ $case: "vpc",
1873
+ vpc: VpcZoneScope.fromJSON(object.vpc ?? object.vpc)
1874
+ };
1875
+ }
1876
+ return undefined;
1877
+ })(),
1878
+ });
1879
+ },
1880
+ toJSON(message, use = "json") {
1881
+ const obj = {};
1882
+ const pick = (json, pb) => (use === "json" ? json : pb);
1883
+ if (message.domainName !== "") {
1884
+ obj[pick("domainName", "domain_name")] = message.domainName;
1885
+ }
1886
+ if (message.soaSpec !== undefined) {
1887
+ obj[pick("soaSpec", "soa_spec")] = message.soaSpec
1888
+ ? SoaSpec.toJSON(message.soaSpec, use)
1889
+ : undefined;
1890
+ }
1891
+ switch (message.scope?.$case) {
1892
+ case "vpc": {
1893
+ obj[pick("vpc", "vpc")] = VpcZoneScope.toJSON(message.scope.vpc, use);
1894
+ break;
1895
+ }
1896
+ default: break;
1897
+ }
1898
+ return obj;
1899
+ },
1900
+ create(base) {
1901
+ return ZoneSpec.fromPartial(base ?? {});
1902
+ },
1903
+ fromPartial(object) {
1904
+ const message = createBaseZoneSpec();
1905
+ message.domainName = (object.domainName !== undefined && object.domainName !== null)
1906
+ ? object.domainName
1907
+ : "";
1908
+ message.soaSpec = (object.soaSpec !== undefined && object.soaSpec !== null)
1909
+ ? SoaSpec.fromPartial(object.soaSpec)
1910
+ : undefined;
1911
+ switch (object.scope?.$case) {
1912
+ case "vpc": {
1913
+ if (object.scope.vpc !== undefined && object.scope.vpc !== null) {
1914
+ message.scope = {
1915
+ $case: "vpc",
1916
+ vpc: VpcZoneScope.fromPartial(object.scope.vpc),
1917
+ };
1918
+ }
1919
+ break;
1920
+ }
1921
+ default: break;
1922
+ }
1923
+ return message;
1924
+ },
1925
+ };
1926
+ protoRegistry.registerMessage(ZoneSpec);
1927
+ function ZoneSpecCustomInspect() {
1928
+ const parts = [];
1929
+ if (this.domainName !== "")
1930
+ parts.push("domainName" + "=" + inspect(this.domainName));
1931
+ if (this.soaSpec !== undefined)
1932
+ parts.push("soaSpec" + "=" + inspect(this.soaSpec));
1933
+ return `${this.$type}(${parts.join(", ")})`;
1934
+ }
1935
+ function ZoneSpecCustomJson() {
1936
+ const obj = {
1937
+ type: this.$type,
1938
+ };
1939
+ if (this.domainName !== "")
1940
+ obj.domainName = inspectJson(this.domainName);
1941
+ if (this.soaSpec !== undefined)
1942
+ obj.soaSpec = inspectJson(this.soaSpec);
1943
+ return obj;
1944
+ }
1945
+ function applyZoneSpecCustom(message) {
1946
+ message[custom] = ZoneSpecCustomInspect;
1947
+ message[customJson] = ZoneSpecCustomJson;
1948
+ return message;
1949
+ }
1950
+ function createBaseZoneSpec() {
1951
+ const message = {
1952
+ $type: "nebius.dns.v1.ZoneSpec",
1953
+ domainName: "",
1954
+ soaSpec: undefined,
1955
+ scope: undefined,
1956
+ };
1957
+ return applyZoneSpecCustom(message);
1958
+ }
1959
+ export const VpcZoneScope = {
1960
+ $type: "nebius.dns.v1.VpcZoneScope",
1961
+ encode(message, writer = new BinaryWriter()) {
1962
+ if (message.primaryNetworkId !== "") {
1963
+ writer.uint32(10).string(message.primaryNetworkId);
1964
+ }
1965
+ if (message[unknownFieldsSymbol]) {
1966
+ writer.raw(message[unknownFieldsSymbol]);
1967
+ }
1968
+ return writer;
1969
+ },
1970
+ decode(input, length) {
1971
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1972
+ const end = length === undefined ? reader.len : reader.pos + length;
1973
+ const message = createBaseVpcZoneScope();
1974
+ let writer = undefined;
1975
+ while (reader.pos < end) {
1976
+ const tag = reader.uint32();
1977
+ switch (tag >>> 3) {
1978
+ case 1: {
1979
+ if (tag !== 10)
1980
+ break;
1981
+ message.primaryNetworkId = reader.string();
1982
+ continue;
1983
+ }
1984
+ default:
1985
+ break;
1986
+ }
1987
+ if ((tag & 7) === 4 || tag === 0) {
1988
+ break;
1989
+ }
1990
+ {
1991
+ if (!writer)
1992
+ writer = new BinaryWriter();
1993
+ const skipped = reader.skip(tag & 7, tag >>> 3);
1994
+ writer.uint32(tag).raw(skipped);
1995
+ }
1996
+ }
1997
+ if (writer) {
1998
+ message[unknownFieldsSymbol] = writer.finish();
1999
+ }
2000
+ return message;
2001
+ },
2002
+ fromJSON(object) {
2003
+ return applyVpcZoneScopeCustom({
2004
+ $type: "nebius.dns.v1.VpcZoneScope",
2005
+ primaryNetworkId: isSet(object.primaryNetworkId ?? object.primary_network_id)
2006
+ ? String(object.primaryNetworkId ?? object.primary_network_id)
2007
+ : "",
2008
+ });
2009
+ },
2010
+ toJSON(message, use = "json") {
2011
+ const obj = {};
2012
+ const pick = (json, pb) => (use === "json" ? json : pb);
2013
+ if (message.primaryNetworkId !== "") {
2014
+ obj[pick("primaryNetworkId", "primary_network_id")] = message.primaryNetworkId;
2015
+ }
2016
+ return obj;
2017
+ },
2018
+ create(base) {
2019
+ return VpcZoneScope.fromPartial(base ?? {});
2020
+ },
2021
+ fromPartial(object) {
2022
+ const message = createBaseVpcZoneScope();
2023
+ message.primaryNetworkId = (object.primaryNetworkId !== undefined && object.primaryNetworkId !== null)
2024
+ ? object.primaryNetworkId
2025
+ : "";
2026
+ return message;
2027
+ },
2028
+ };
2029
+ protoRegistry.registerMessage(VpcZoneScope);
2030
+ function VpcZoneScopeCustomInspect() {
2031
+ const parts = [];
2032
+ if (this.primaryNetworkId !== "")
2033
+ parts.push("primaryNetworkId" + "=" + inspect(this.primaryNetworkId));
2034
+ return `${this.$type}(${parts.join(", ")})`;
2035
+ }
2036
+ function VpcZoneScopeCustomJson() {
2037
+ const obj = {
2038
+ type: this.$type,
2039
+ };
2040
+ if (this.primaryNetworkId !== "")
2041
+ obj.primaryNetworkId = inspectJson(this.primaryNetworkId);
2042
+ return obj;
2043
+ }
2044
+ function applyVpcZoneScopeCustom(message) {
2045
+ message[custom] = VpcZoneScopeCustomInspect;
2046
+ message[customJson] = VpcZoneScopeCustomJson;
2047
+ return message;
2048
+ }
2049
+ function createBaseVpcZoneScope() {
2050
+ const message = {
2051
+ $type: "nebius.dns.v1.VpcZoneScope",
2052
+ primaryNetworkId: "",
2053
+ };
2054
+ return applyVpcZoneScopeCustom(message);
2055
+ }
2056
+ export const SoaSpec = {
2057
+ $type: "nebius.dns.v1.SoaSpec",
2058
+ encode(message, writer = new BinaryWriter()) {
2059
+ if (message.negativeTtl !== undefined && !message.negativeTtl.isZero?.()) {
2060
+ writer.uint32(240).int64(message.negativeTtl.toString());
2061
+ }
2062
+ if (message[unknownFieldsSymbol]) {
2063
+ writer.raw(message[unknownFieldsSymbol]);
2064
+ }
2065
+ return writer;
2066
+ },
2067
+ decode(input, length) {
2068
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2069
+ const end = length === undefined ? reader.len : reader.pos + length;
2070
+ const message = createBaseSoaSpec();
2071
+ let writer = undefined;
2072
+ while (reader.pos < end) {
2073
+ const tag = reader.uint32();
2074
+ switch (tag >>> 3) {
2075
+ case 30: {
2076
+ if (tag !== 240)
2077
+ break;
2078
+ message.negativeTtl = Long.fromValue(reader.int64());
2079
+ continue;
2080
+ }
2081
+ default:
2082
+ break;
2083
+ }
2084
+ if ((tag & 7) === 4 || tag === 0) {
2085
+ break;
2086
+ }
2087
+ {
2088
+ if (!writer)
2089
+ writer = new BinaryWriter();
2090
+ const skipped = reader.skip(tag & 7, tag >>> 3);
2091
+ writer.uint32(tag).raw(skipped);
2092
+ }
2093
+ }
2094
+ if (writer) {
2095
+ message[unknownFieldsSymbol] = writer.finish();
2096
+ }
2097
+ return message;
2098
+ },
2099
+ fromJSON(object) {
2100
+ return applySoaSpecCustom({
2101
+ $type: "nebius.dns.v1.SoaSpec",
2102
+ negativeTtl: isSet(object.negativeTtl ?? object.negative_ttl)
2103
+ ? Long.fromValue(object.negativeTtl ?? object.negative_ttl)
2104
+ : Long.ZERO,
2105
+ });
2106
+ },
2107
+ toJSON(message, use = "json") {
2108
+ const obj = {};
2109
+ const pick = (json, pb) => (use === "json" ? json : pb);
2110
+ if (!message.negativeTtl?.isZero?.()) {
2111
+ obj[pick("negativeTtl", "negative_ttl")] = (message.negativeTtl || Long.ZERO).toString();
2112
+ }
2113
+ return obj;
2114
+ },
2115
+ create(base) {
2116
+ return SoaSpec.fromPartial(base ?? {});
2117
+ },
2118
+ fromPartial(object) {
2119
+ const message = createBaseSoaSpec();
2120
+ message.negativeTtl = (object.negativeTtl !== undefined && object.negativeTtl !== null)
2121
+ ? Long.fromValue(object.negativeTtl)
2122
+ : Long.ZERO;
2123
+ return message;
2124
+ },
2125
+ };
2126
+ protoRegistry.registerMessage(SoaSpec);
2127
+ function SoaSpecCustomInspect() {
2128
+ const parts = [];
2129
+ if (!this.negativeTtl?.isZero?.())
2130
+ parts.push("negativeTtl" + "=" + inspect(this.negativeTtl));
2131
+ return `${this.$type}(${parts.join(", ")})`;
1402
2132
  }
1403
- function ZoneSpecCustomJson() {
2133
+ function SoaSpecCustomJson() {
1404
2134
  const obj = {
1405
2135
  type: this.$type,
1406
2136
  };
1407
- if (this.domainName !== "")
1408
- obj.domainName = inspectJson(this.domainName);
1409
- if (this.soaSpec !== undefined)
1410
- obj.soaSpec = inspectJson(this.soaSpec);
2137
+ if (!this.negativeTtl?.isZero?.())
2138
+ obj.negativeTtl = inspectJson(this.negativeTtl);
1411
2139
  return obj;
1412
2140
  }
1413
- function applyZoneSpecCustom(message) {
1414
- message[custom] = ZoneSpecCustomInspect;
1415
- message[customJson] = ZoneSpecCustomJson;
2141
+ function applySoaSpecCustom(message) {
2142
+ message[custom] = SoaSpecCustomInspect;
2143
+ message[customJson] = SoaSpecCustomJson;
1416
2144
  return message;
1417
2145
  }
1418
- function createBaseZoneSpec() {
2146
+ function createBaseSoaSpec() {
1419
2147
  const message = {
1420
- $type: "nebius.dns.v1.ZoneSpec",
1421
- domainName: "",
1422
- soaSpec: undefined,
1423
- scope: undefined,
2148
+ $type: "nebius.dns.v1.SoaSpec",
2149
+ negativeTtl: Long.ZERO,
1424
2150
  };
1425
- return applyZoneSpecCustom(message);
2151
+ return applySoaSpecCustom(message);
1426
2152
  }
1427
- export const VpcZoneScope = {
1428
- $type: "nebius.dns.v1.VpcZoneScope",
2153
+ export const ZoneStatus = {
2154
+ $type: "nebius.dns.v1.ZoneStatus",
1429
2155
  encode(message, writer = new BinaryWriter()) {
1430
- if (message.primaryNetworkId !== "") {
1431
- writer.uint32(10).string(message.primaryNetworkId);
2156
+ if (message.recordCount !== undefined && !message.recordCount.isZero?.()) {
2157
+ writer.uint32(160).int64(message.recordCount.toString());
2158
+ }
2159
+ if (message.reconciling === true) {
2160
+ writer.uint32(800).bool(message.reconciling);
1432
2161
  }
1433
2162
  if (message[unknownFieldsSymbol]) {
1434
2163
  writer.raw(message[unknownFieldsSymbol]);
@@ -1438,7 +2167,127 @@ export const VpcZoneScope = {
1438
2167
  decode(input, length) {
1439
2168
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1440
2169
  const end = length === undefined ? reader.len : reader.pos + length;
1441
- const message = createBaseVpcZoneScope();
2170
+ const message = createBaseZoneStatus();
2171
+ let writer = undefined;
2172
+ while (reader.pos < end) {
2173
+ const tag = reader.uint32();
2174
+ switch (tag >>> 3) {
2175
+ case 20: {
2176
+ if (tag !== 160)
2177
+ break;
2178
+ message.recordCount = Long.fromValue(reader.int64());
2179
+ continue;
2180
+ }
2181
+ case 100: {
2182
+ if (tag !== 800)
2183
+ break;
2184
+ message.reconciling = reader.bool();
2185
+ continue;
2186
+ }
2187
+ default:
2188
+ break;
2189
+ }
2190
+ if ((tag & 7) === 4 || tag === 0) {
2191
+ break;
2192
+ }
2193
+ {
2194
+ if (!writer)
2195
+ writer = new BinaryWriter();
2196
+ const skipped = reader.skip(tag & 7, tag >>> 3);
2197
+ writer.uint32(tag).raw(skipped);
2198
+ }
2199
+ }
2200
+ if (writer) {
2201
+ message[unknownFieldsSymbol] = writer.finish();
2202
+ }
2203
+ return message;
2204
+ },
2205
+ fromJSON(object) {
2206
+ return applyZoneStatusCustom({
2207
+ $type: "nebius.dns.v1.ZoneStatus",
2208
+ recordCount: isSet(object.recordCount ?? object.record_count)
2209
+ ? Long.fromValue(object.recordCount ?? object.record_count)
2210
+ : Long.ZERO,
2211
+ reconciling: isSet(object.reconciling ?? object.reconciling)
2212
+ ? Boolean(object.reconciling ?? object.reconciling)
2213
+ : false,
2214
+ });
2215
+ },
2216
+ toJSON(message, use = "json") {
2217
+ const obj = {};
2218
+ const pick = (json, pb) => (use === "json" ? json : pb);
2219
+ if (!message.recordCount?.isZero?.()) {
2220
+ obj[pick("recordCount", "record_count")] = (message.recordCount || Long.ZERO).toString();
2221
+ }
2222
+ if (message.reconciling === true) {
2223
+ obj[pick("reconciling", "reconciling")] = message.reconciling;
2224
+ }
2225
+ return obj;
2226
+ },
2227
+ create(base) {
2228
+ return ZoneStatus.fromPartial(base ?? {});
2229
+ },
2230
+ fromPartial(object) {
2231
+ const message = createBaseZoneStatus();
2232
+ message.recordCount = (object.recordCount !== undefined && object.recordCount !== null)
2233
+ ? Long.fromValue(object.recordCount)
2234
+ : Long.ZERO;
2235
+ message.reconciling = (object.reconciling !== undefined && object.reconciling !== null)
2236
+ ? object.reconciling
2237
+ : false;
2238
+ return message;
2239
+ },
2240
+ };
2241
+ protoRegistry.registerMessage(ZoneStatus);
2242
+ function ZoneStatusCustomInspect() {
2243
+ const parts = [];
2244
+ if (!this.recordCount?.isZero?.())
2245
+ parts.push("recordCount" + "=" + inspect(this.recordCount));
2246
+ if (this.reconciling === true)
2247
+ parts.push("reconciling" + "=" + inspect(this.reconciling));
2248
+ return `${this.$type}(${parts.join(", ")})`;
2249
+ }
2250
+ function ZoneStatusCustomJson() {
2251
+ const obj = {
2252
+ type: this.$type,
2253
+ };
2254
+ if (!this.recordCount?.isZero?.())
2255
+ obj.recordCount = inspectJson(this.recordCount);
2256
+ if (this.reconciling === true)
2257
+ obj.reconciling = inspectJson(this.reconciling);
2258
+ return obj;
2259
+ }
2260
+ function applyZoneStatusCustom(message) {
2261
+ message[custom] = ZoneStatusCustomInspect;
2262
+ message[customJson] = ZoneStatusCustomJson;
2263
+ return message;
2264
+ }
2265
+ function createBaseZoneStatus() {
2266
+ const message = {
2267
+ $type: "nebius.dns.v1.ZoneStatus",
2268
+ recordCount: Long.ZERO,
2269
+ reconciling: false,
2270
+ };
2271
+ return applyZoneStatusCustom(message);
2272
+ }
2273
+ export const GetZoneRequest = {
2274
+ $type: "nebius.dns.v1.GetZoneRequest",
2275
+ encode(message, writer = new BinaryWriter()) {
2276
+ if (message.id !== "") {
2277
+ writer.uint32(10).string(message.id);
2278
+ }
2279
+ if (message.resourceVersion !== undefined && !message.resourceVersion.isZero?.()) {
2280
+ writer.uint32(16).int64(message.resourceVersion.toString());
2281
+ }
2282
+ if (message[unknownFieldsSymbol]) {
2283
+ writer.raw(message[unknownFieldsSymbol]);
2284
+ }
2285
+ return writer;
2286
+ },
2287
+ decode(input, length) {
2288
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2289
+ const end = length === undefined ? reader.len : reader.pos + length;
2290
+ const message = createBaseGetZoneRequest();
1442
2291
  let writer = undefined;
1443
2292
  while (reader.pos < end) {
1444
2293
  const tag = reader.uint32();
@@ -1446,7 +2295,13 @@ export const VpcZoneScope = {
1446
2295
  case 1: {
1447
2296
  if (tag !== 10)
1448
2297
  break;
1449
- message.primaryNetworkId = reader.string();
2298
+ message.id = reader.string();
2299
+ continue;
2300
+ }
2301
+ case 2: {
2302
+ if (tag !== 16)
2303
+ break;
2304
+ message.resourceVersion = Long.fromValue(reader.int64());
1450
2305
  continue;
1451
2306
  }
1452
2307
  default:
@@ -1468,64 +2323,84 @@ export const VpcZoneScope = {
1468
2323
  return message;
1469
2324
  },
1470
2325
  fromJSON(object) {
1471
- return applyVpcZoneScopeCustom({
1472
- $type: "nebius.dns.v1.VpcZoneScope",
1473
- primaryNetworkId: isSet(object.primaryNetworkId ?? object.primary_network_id)
1474
- ? String(object.primaryNetworkId ?? object.primary_network_id)
2326
+ return applyGetZoneRequestCustom({
2327
+ $type: "nebius.dns.v1.GetZoneRequest",
2328
+ id: isSet(object.id ?? object.id)
2329
+ ? String(object.id ?? object.id)
1475
2330
  : "",
2331
+ resourceVersion: isSet(object.resourceVersion ?? object.resource_version)
2332
+ ? Long.fromValue(object.resourceVersion ?? object.resource_version)
2333
+ : Long.ZERO,
1476
2334
  });
1477
2335
  },
1478
2336
  toJSON(message, use = "json") {
1479
2337
  const obj = {};
1480
2338
  const pick = (json, pb) => (use === "json" ? json : pb);
1481
- if (message.primaryNetworkId !== "") {
1482
- obj[pick("primaryNetworkId", "primary_network_id")] = message.primaryNetworkId;
2339
+ if (message.id !== "") {
2340
+ obj[pick("id", "id")] = message.id;
2341
+ }
2342
+ if (!message.resourceVersion?.isZero?.()) {
2343
+ obj[pick("resourceVersion", "resource_version")] = (message.resourceVersion || Long.ZERO).toString();
1483
2344
  }
1484
2345
  return obj;
1485
2346
  },
1486
2347
  create(base) {
1487
- return VpcZoneScope.fromPartial(base ?? {});
2348
+ return GetZoneRequest.fromPartial(base ?? {});
1488
2349
  },
1489
2350
  fromPartial(object) {
1490
- const message = createBaseVpcZoneScope();
1491
- message.primaryNetworkId = (object.primaryNetworkId !== undefined && object.primaryNetworkId !== null)
1492
- ? object.primaryNetworkId
2351
+ const message = createBaseGetZoneRequest();
2352
+ message.id = (object.id !== undefined && object.id !== null)
2353
+ ? object.id
1493
2354
  : "";
2355
+ message.resourceVersion = (object.resourceVersion !== undefined && object.resourceVersion !== null)
2356
+ ? Long.fromValue(object.resourceVersion)
2357
+ : Long.ZERO;
1494
2358
  return message;
1495
2359
  },
1496
2360
  };
1497
- protoRegistry.registerMessage(VpcZoneScope);
1498
- function VpcZoneScopeCustomInspect() {
2361
+ protoRegistry.registerMessage(GetZoneRequest);
2362
+ function GetZoneRequestCustomInspect() {
1499
2363
  const parts = [];
1500
- if (this.primaryNetworkId !== "")
1501
- parts.push("primaryNetworkId" + "=" + inspect(this.primaryNetworkId));
2364
+ if (this.id !== "")
2365
+ parts.push("id" + "=" + inspect(this.id));
2366
+ if (!this.resourceVersion?.isZero?.())
2367
+ parts.push("resourceVersion" + "=" + inspect(this.resourceVersion));
1502
2368
  return `${this.$type}(${parts.join(", ")})`;
1503
2369
  }
1504
- function VpcZoneScopeCustomJson() {
2370
+ function GetZoneRequestCustomJson() {
1505
2371
  const obj = {
1506
2372
  type: this.$type,
1507
2373
  };
1508
- if (this.primaryNetworkId !== "")
1509
- obj.primaryNetworkId = inspectJson(this.primaryNetworkId);
2374
+ if (this.id !== "")
2375
+ obj.id = inspectJson(this.id);
2376
+ if (!this.resourceVersion?.isZero?.())
2377
+ obj.resourceVersion = inspectJson(this.resourceVersion);
1510
2378
  return obj;
1511
2379
  }
1512
- function applyVpcZoneScopeCustom(message) {
1513
- message[custom] = VpcZoneScopeCustomInspect;
1514
- message[customJson] = VpcZoneScopeCustomJson;
2380
+ function applyGetZoneRequestCustom(message) {
2381
+ message[custom] = GetZoneRequestCustomInspect;
2382
+ message[customJson] = GetZoneRequestCustomJson;
1515
2383
  return message;
1516
2384
  }
1517
- function createBaseVpcZoneScope() {
2385
+ function createBaseGetZoneRequest() {
1518
2386
  const message = {
1519
- $type: "nebius.dns.v1.VpcZoneScope",
1520
- primaryNetworkId: "",
2387
+ $type: "nebius.dns.v1.GetZoneRequest",
2388
+ id: "",
2389
+ resourceVersion: Long.ZERO,
1521
2390
  };
1522
- return applyVpcZoneScopeCustom(message);
2391
+ return applyGetZoneRequestCustom(message);
1523
2392
  }
1524
- export const SoaSpec = {
1525
- $type: "nebius.dns.v1.SoaSpec",
2393
+ export const ListZonesRequest = {
2394
+ $type: "nebius.dns.v1.ListZonesRequest",
1526
2395
  encode(message, writer = new BinaryWriter()) {
1527
- if (message.negativeTtl !== undefined && !message.negativeTtl.isZero?.()) {
1528
- writer.uint32(240).int64(message.negativeTtl.toString());
2396
+ if (message.parentId !== "") {
2397
+ writer.uint32(10).string(message.parentId);
2398
+ }
2399
+ if (message.pageSize !== undefined && !message.pageSize.isZero?.()) {
2400
+ writer.uint32(16).int64(message.pageSize.toString());
2401
+ }
2402
+ if (message.pageToken !== "") {
2403
+ writer.uint32(26).string(message.pageToken);
1529
2404
  }
1530
2405
  if (message[unknownFieldsSymbol]) {
1531
2406
  writer.raw(message[unknownFieldsSymbol]);
@@ -1535,15 +2410,27 @@ export const SoaSpec = {
1535
2410
  decode(input, length) {
1536
2411
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1537
2412
  const end = length === undefined ? reader.len : reader.pos + length;
1538
- const message = createBaseSoaSpec();
2413
+ const message = createBaseListZonesRequest();
1539
2414
  let writer = undefined;
1540
2415
  while (reader.pos < end) {
1541
2416
  const tag = reader.uint32();
1542
2417
  switch (tag >>> 3) {
1543
- case 30: {
1544
- if (tag !== 240)
2418
+ case 1: {
2419
+ if (tag !== 10)
1545
2420
  break;
1546
- message.negativeTtl = Long.fromValue(reader.int64());
2421
+ message.parentId = reader.string();
2422
+ continue;
2423
+ }
2424
+ case 2: {
2425
+ if (tag !== 16)
2426
+ break;
2427
+ message.pageSize = Long.fromValue(reader.int64());
2428
+ continue;
2429
+ }
2430
+ case 3: {
2431
+ if (tag !== 26)
2432
+ break;
2433
+ message.pageToken = reader.string();
1547
2434
  continue;
1548
2435
  }
1549
2436
  default:
@@ -1565,67 +2452,97 @@ export const SoaSpec = {
1565
2452
  return message;
1566
2453
  },
1567
2454
  fromJSON(object) {
1568
- return applySoaSpecCustom({
1569
- $type: "nebius.dns.v1.SoaSpec",
1570
- negativeTtl: isSet(object.negativeTtl ?? object.negative_ttl)
1571
- ? Long.fromValue(object.negativeTtl ?? object.negative_ttl)
2455
+ return applyListZonesRequestCustom({
2456
+ $type: "nebius.dns.v1.ListZonesRequest",
2457
+ parentId: isSet(object.parentId ?? object.parent_id)
2458
+ ? String(object.parentId ?? object.parent_id)
2459
+ : "",
2460
+ pageSize: isSet(object.pageSize ?? object.page_size)
2461
+ ? Long.fromValue(object.pageSize ?? object.page_size)
1572
2462
  : Long.ZERO,
2463
+ pageToken: isSet(object.pageToken ?? object.page_token)
2464
+ ? String(object.pageToken ?? object.page_token)
2465
+ : "",
1573
2466
  });
1574
2467
  },
1575
2468
  toJSON(message, use = "json") {
1576
2469
  const obj = {};
1577
2470
  const pick = (json, pb) => (use === "json" ? json : pb);
1578
- if (!message.negativeTtl?.isZero?.()) {
1579
- obj[pick("negativeTtl", "negative_ttl")] = (message.negativeTtl || Long.ZERO).toString();
2471
+ if (message.parentId !== "") {
2472
+ obj[pick("parentId", "parent_id")] = message.parentId;
2473
+ }
2474
+ if (!message.pageSize?.isZero?.()) {
2475
+ obj[pick("pageSize", "page_size")] = (message.pageSize || Long.ZERO).toString();
2476
+ }
2477
+ if (message.pageToken !== "") {
2478
+ obj[pick("pageToken", "page_token")] = message.pageToken;
1580
2479
  }
1581
2480
  return obj;
1582
2481
  },
1583
2482
  create(base) {
1584
- return SoaSpec.fromPartial(base ?? {});
2483
+ return ListZonesRequest.fromPartial(base ?? {});
1585
2484
  },
1586
2485
  fromPartial(object) {
1587
- const message = createBaseSoaSpec();
1588
- message.negativeTtl = (object.negativeTtl !== undefined && object.negativeTtl !== null)
1589
- ? Long.fromValue(object.negativeTtl)
2486
+ const message = createBaseListZonesRequest();
2487
+ message.parentId = (object.parentId !== undefined && object.parentId !== null)
2488
+ ? object.parentId
2489
+ : "";
2490
+ message.pageSize = (object.pageSize !== undefined && object.pageSize !== null)
2491
+ ? Long.fromValue(object.pageSize)
1590
2492
  : Long.ZERO;
2493
+ message.pageToken = (object.pageToken !== undefined && object.pageToken !== null)
2494
+ ? object.pageToken
2495
+ : "";
1591
2496
  return message;
1592
2497
  },
1593
2498
  };
1594
- protoRegistry.registerMessage(SoaSpec);
1595
- function SoaSpecCustomInspect() {
2499
+ protoRegistry.registerMessage(ListZonesRequest);
2500
+ function ListZonesRequestCustomInspect() {
1596
2501
  const parts = [];
1597
- if (!this.negativeTtl?.isZero?.())
1598
- parts.push("negativeTtl" + "=" + inspect(this.negativeTtl));
2502
+ if (this.parentId !== "")
2503
+ parts.push("parentId" + "=" + inspect(this.parentId));
2504
+ if (!this.pageSize?.isZero?.())
2505
+ parts.push("pageSize" + "=" + inspect(this.pageSize));
2506
+ if (this.pageToken !== "")
2507
+ parts.push("pageToken" + "=" + inspect(this.pageToken));
1599
2508
  return `${this.$type}(${parts.join(", ")})`;
1600
2509
  }
1601
- function SoaSpecCustomJson() {
2510
+ function ListZonesRequestCustomJson() {
1602
2511
  const obj = {
1603
2512
  type: this.$type,
1604
2513
  };
1605
- if (!this.negativeTtl?.isZero?.())
1606
- obj.negativeTtl = inspectJson(this.negativeTtl);
2514
+ if (this.parentId !== "")
2515
+ obj.parentId = inspectJson(this.parentId);
2516
+ if (!this.pageSize?.isZero?.())
2517
+ obj.pageSize = inspectJson(this.pageSize);
2518
+ if (this.pageToken !== "")
2519
+ obj.pageToken = inspectJson(this.pageToken);
1607
2520
  return obj;
1608
2521
  }
1609
- function applySoaSpecCustom(message) {
1610
- message[custom] = SoaSpecCustomInspect;
1611
- message[customJson] = SoaSpecCustomJson;
2522
+ function applyListZonesRequestCustom(message) {
2523
+ message[custom] = ListZonesRequestCustomInspect;
2524
+ message[customJson] = ListZonesRequestCustomJson;
1612
2525
  return message;
1613
2526
  }
1614
- function createBaseSoaSpec() {
2527
+ function createBaseListZonesRequest() {
1615
2528
  const message = {
1616
- $type: "nebius.dns.v1.SoaSpec",
1617
- negativeTtl: Long.ZERO,
2529
+ $type: "nebius.dns.v1.ListZonesRequest",
2530
+ parentId: "",
2531
+ pageSize: Long.ZERO,
2532
+ pageToken: "",
1618
2533
  };
1619
- return applySoaSpecCustom(message);
2534
+ return applyListZonesRequestCustom(message);
1620
2535
  }
1621
- export const ZoneStatus = {
1622
- $type: "nebius.dns.v1.ZoneStatus",
2536
+ export const ListZonesResponse = {
2537
+ $type: "nebius.dns.v1.ListZonesResponse",
1623
2538
  encode(message, writer = new BinaryWriter()) {
1624
- if (message.recordCount !== undefined && !message.recordCount.isZero?.()) {
1625
- writer.uint32(160).int64(message.recordCount.toString());
2539
+ for (const v of (message.items ?? [])) {
2540
+ const w = writer.uint32(10).fork();
2541
+ Zone.encode(v, w);
2542
+ w.join();
1626
2543
  }
1627
- if (message.reconciling === true) {
1628
- writer.uint32(800).bool(message.reconciling);
2544
+ if (message.nextPageToken !== "") {
2545
+ writer.uint32(18).string(message.nextPageToken);
1629
2546
  }
1630
2547
  if (message[unknownFieldsSymbol]) {
1631
2548
  writer.raw(message[unknownFieldsSymbol]);
@@ -1635,21 +2552,21 @@ export const ZoneStatus = {
1635
2552
  decode(input, length) {
1636
2553
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1637
2554
  const end = length === undefined ? reader.len : reader.pos + length;
1638
- const message = createBaseZoneStatus();
2555
+ const message = createBaseListZonesResponse();
1639
2556
  let writer = undefined;
1640
2557
  while (reader.pos < end) {
1641
2558
  const tag = reader.uint32();
1642
2559
  switch (tag >>> 3) {
1643
- case 20: {
1644
- if (tag !== 160)
2560
+ case 1: {
2561
+ if (tag !== 10)
1645
2562
  break;
1646
- message.recordCount = Long.fromValue(reader.int64());
2563
+ message.items.push(Zone.decode(reader, reader.uint32()));
1647
2564
  continue;
1648
2565
  }
1649
- case 100: {
1650
- if (tag !== 800)
2566
+ case 2: {
2567
+ if (tag !== 18)
1651
2568
  break;
1652
- message.reconciling = reader.bool();
2569
+ message.nextPageToken = reader.string();
1653
2570
  continue;
1654
2571
  }
1655
2572
  default:
@@ -1671,81 +2588,83 @@ export const ZoneStatus = {
1671
2588
  return message;
1672
2589
  },
1673
2590
  fromJSON(object) {
1674
- return applyZoneStatusCustom({
1675
- $type: "nebius.dns.v1.ZoneStatus",
1676
- recordCount: isSet(object.recordCount ?? object.record_count)
1677
- ? Long.fromValue(object.recordCount ?? object.record_count)
1678
- : Long.ZERO,
1679
- reconciling: isSet(object.reconciling ?? object.reconciling)
1680
- ? Boolean(object.reconciling ?? object.reconciling)
1681
- : false,
2591
+ return applyListZonesResponseCustom({
2592
+ $type: "nebius.dns.v1.ListZonesResponse",
2593
+ items: globalThis.Array.isArray(object?.items ?? object?.items)
2594
+ ? (object.items ?? object.items).map((e) => Zone.fromJSON(e))
2595
+ : [],
2596
+ nextPageToken: isSet(object.nextPageToken ?? object.next_page_token)
2597
+ ? String(object.nextPageToken ?? object.next_page_token)
2598
+ : "",
1682
2599
  });
1683
2600
  },
1684
2601
  toJSON(message, use = "json") {
1685
2602
  const obj = {};
1686
2603
  const pick = (json, pb) => (use === "json" ? json : pb);
1687
- if (!message.recordCount?.isZero?.()) {
1688
- obj[pick("recordCount", "record_count")] = (message.recordCount || Long.ZERO).toString();
2604
+ if (message.items?.length) {
2605
+ obj[pick("items", "items")] = message.items.map((e) => e ? Zone.toJSON(e, use) : undefined);
1689
2606
  }
1690
- if (message.reconciling === true) {
1691
- obj[pick("reconciling", "reconciling")] = message.reconciling;
2607
+ if (message.nextPageToken !== "") {
2608
+ obj[pick("nextPageToken", "next_page_token")] = message.nextPageToken;
1692
2609
  }
1693
2610
  return obj;
1694
2611
  },
1695
2612
  create(base) {
1696
- return ZoneStatus.fromPartial(base ?? {});
2613
+ return ListZonesResponse.fromPartial(base ?? {});
1697
2614
  },
1698
2615
  fromPartial(object) {
1699
- const message = createBaseZoneStatus();
1700
- message.recordCount = (object.recordCount !== undefined && object.recordCount !== null)
1701
- ? Long.fromValue(object.recordCount)
1702
- : Long.ZERO;
1703
- message.reconciling = (object.reconciling !== undefined && object.reconciling !== null)
1704
- ? object.reconciling
1705
- : false;
2616
+ const message = createBaseListZonesResponse();
2617
+ message.items = object.items?.map((e) => Zone.fromPartial(e)) || [];
2618
+ message.nextPageToken = (object.nextPageToken !== undefined && object.nextPageToken !== null)
2619
+ ? object.nextPageToken
2620
+ : "";
1706
2621
  return message;
1707
2622
  },
1708
2623
  };
1709
- protoRegistry.registerMessage(ZoneStatus);
1710
- function ZoneStatusCustomInspect() {
2624
+ protoRegistry.registerMessage(ListZonesResponse);
2625
+ function ListZonesResponseCustomInspect() {
1711
2626
  const parts = [];
1712
- if (!this.recordCount?.isZero?.())
1713
- parts.push("recordCount" + "=" + inspect(this.recordCount));
1714
- if (this.reconciling === true)
1715
- parts.push("reconciling" + "=" + inspect(this.reconciling));
2627
+ if ((this.items?.length ?? 0) !== 0)
2628
+ parts.push("items" + "=" + inspect(this.items));
2629
+ if (this.nextPageToken !== "")
2630
+ parts.push("nextPageToken" + "=" + inspect(this.nextPageToken));
1716
2631
  return `${this.$type}(${parts.join(", ")})`;
1717
2632
  }
1718
- function ZoneStatusCustomJson() {
2633
+ function ListZonesResponseCustomJson() {
1719
2634
  const obj = {
1720
2635
  type: this.$type,
1721
2636
  };
1722
- if (!this.recordCount?.isZero?.())
1723
- obj.recordCount = inspectJson(this.recordCount);
1724
- if (this.reconciling === true)
1725
- obj.reconciling = inspectJson(this.reconciling);
2637
+ if ((this.items?.length ?? 0) !== 0)
2638
+ obj.items = inspectJson(this.items);
2639
+ if (this.nextPageToken !== "")
2640
+ obj.nextPageToken = inspectJson(this.nextPageToken);
1726
2641
  return obj;
1727
2642
  }
1728
- function applyZoneStatusCustom(message) {
1729
- message[custom] = ZoneStatusCustomInspect;
1730
- message[customJson] = ZoneStatusCustomJson;
2643
+ function applyListZonesResponseCustom(message) {
2644
+ message[custom] = ListZonesResponseCustomInspect;
2645
+ message[customJson] = ListZonesResponseCustomJson;
1731
2646
  return message;
1732
2647
  }
1733
- function createBaseZoneStatus() {
2648
+ function createBaseListZonesResponse() {
1734
2649
  const message = {
1735
- $type: "nebius.dns.v1.ZoneStatus",
1736
- recordCount: Long.ZERO,
1737
- reconciling: false,
2650
+ $type: "nebius.dns.v1.ListZonesResponse",
2651
+ items: [],
2652
+ nextPageToken: "",
1738
2653
  };
1739
- return applyZoneStatusCustom(message);
2654
+ return applyListZonesResponseCustom(message);
1740
2655
  }
1741
- export const GetZoneRequest = {
1742
- $type: "nebius.dns.v1.GetZoneRequest",
2656
+ export const CreateZoneRequest = {
2657
+ $type: "nebius.dns.v1.CreateZoneRequest",
1743
2658
  encode(message, writer = new BinaryWriter()) {
1744
- if (message.id !== "") {
1745
- writer.uint32(10).string(message.id);
2659
+ if (message.metadata !== undefined) {
2660
+ const w = writer.uint32(10).fork();
2661
+ ResourceMetadata.encode(message.metadata, w);
2662
+ w.join();
1746
2663
  }
1747
- if (message.resourceVersion !== undefined && !message.resourceVersion.isZero?.()) {
1748
- writer.uint32(16).int64(message.resourceVersion.toString());
2664
+ if (message.spec !== undefined) {
2665
+ const w = writer.uint32(18).fork();
2666
+ ZoneSpec.encode(message.spec, w);
2667
+ w.join();
1749
2668
  }
1750
2669
  if (message[unknownFieldsSymbol]) {
1751
2670
  writer.raw(message[unknownFieldsSymbol]);
@@ -1755,7 +2674,7 @@ export const GetZoneRequest = {
1755
2674
  decode(input, length) {
1756
2675
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1757
2676
  const end = length === undefined ? reader.len : reader.pos + length;
1758
- const message = createBaseGetZoneRequest();
2677
+ const message = createBaseCreateZoneRequest();
1759
2678
  let writer = undefined;
1760
2679
  while (reader.pos < end) {
1761
2680
  const tag = reader.uint32();
@@ -1763,13 +2682,13 @@ export const GetZoneRequest = {
1763
2682
  case 1: {
1764
2683
  if (tag !== 10)
1765
2684
  break;
1766
- message.id = reader.string();
2685
+ message.metadata = ResourceMetadata.decode(reader, reader.uint32());
1767
2686
  continue;
1768
2687
  }
1769
2688
  case 2: {
1770
- if (tag !== 16)
2689
+ if (tag !== 18)
1771
2690
  break;
1772
- message.resourceVersion = Long.fromValue(reader.int64());
2691
+ message.spec = ZoneSpec.decode(reader, reader.uint32());
1773
2692
  continue;
1774
2693
  }
1775
2694
  default:
@@ -1787,88 +2706,93 @@ export const GetZoneRequest = {
1787
2706
  }
1788
2707
  if (writer) {
1789
2708
  message[unknownFieldsSymbol] = writer.finish();
1790
- }
1791
- return message;
1792
- },
1793
- fromJSON(object) {
1794
- return applyGetZoneRequestCustom({
1795
- $type: "nebius.dns.v1.GetZoneRequest",
1796
- id: isSet(object.id ?? object.id)
1797
- ? String(object.id ?? object.id)
1798
- : "",
1799
- resourceVersion: isSet(object.resourceVersion ?? object.resource_version)
1800
- ? Long.fromValue(object.resourceVersion ?? object.resource_version)
1801
- : Long.ZERO,
2709
+ }
2710
+ return message;
2711
+ },
2712
+ fromJSON(object) {
2713
+ return applyCreateZoneRequestCustom({
2714
+ $type: "nebius.dns.v1.CreateZoneRequest",
2715
+ metadata: isSet(object.metadata ?? object.metadata)
2716
+ ? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
2717
+ : undefined,
2718
+ spec: isSet(object.spec ?? object.spec)
2719
+ ? ZoneSpec.fromJSON(object.spec ?? object.spec)
2720
+ : undefined,
1802
2721
  });
1803
2722
  },
1804
2723
  toJSON(message, use = "json") {
1805
2724
  const obj = {};
1806
2725
  const pick = (json, pb) => (use === "json" ? json : pb);
1807
- if (message.id !== "") {
1808
- obj[pick("id", "id")] = message.id;
2726
+ if (message.metadata !== undefined) {
2727
+ obj[pick("metadata", "metadata")] = message.metadata
2728
+ ? ResourceMetadata.toJSON(message.metadata, use)
2729
+ : undefined;
1809
2730
  }
1810
- if (!message.resourceVersion?.isZero?.()) {
1811
- obj[pick("resourceVersion", "resource_version")] = (message.resourceVersion || Long.ZERO).toString();
2731
+ if (message.spec !== undefined) {
2732
+ obj[pick("spec", "spec")] = message.spec
2733
+ ? ZoneSpec.toJSON(message.spec, use)
2734
+ : undefined;
1812
2735
  }
1813
2736
  return obj;
1814
2737
  },
1815
2738
  create(base) {
1816
- return GetZoneRequest.fromPartial(base ?? {});
2739
+ return CreateZoneRequest.fromPartial(base ?? {});
1817
2740
  },
1818
2741
  fromPartial(object) {
1819
- const message = createBaseGetZoneRequest();
1820
- message.id = (object.id !== undefined && object.id !== null)
1821
- ? object.id
1822
- : "";
1823
- message.resourceVersion = (object.resourceVersion !== undefined && object.resourceVersion !== null)
1824
- ? Long.fromValue(object.resourceVersion)
1825
- : Long.ZERO;
2742
+ const message = createBaseCreateZoneRequest();
2743
+ message.metadata = (object.metadata !== undefined && object.metadata !== null)
2744
+ ? ResourceMetadata.fromPartial(object.metadata)
2745
+ : undefined;
2746
+ message.spec = (object.spec !== undefined && object.spec !== null)
2747
+ ? ZoneSpec.fromPartial(object.spec)
2748
+ : undefined;
1826
2749
  return message;
1827
2750
  },
1828
2751
  };
1829
- protoRegistry.registerMessage(GetZoneRequest);
1830
- function GetZoneRequestCustomInspect() {
2752
+ protoRegistry.registerMessage(CreateZoneRequest);
2753
+ function CreateZoneRequestCustomInspect() {
1831
2754
  const parts = [];
1832
- if (this.id !== "")
1833
- parts.push("id" + "=" + inspect(this.id));
1834
- if (!this.resourceVersion?.isZero?.())
1835
- parts.push("resourceVersion" + "=" + inspect(this.resourceVersion));
2755
+ if (this.metadata !== undefined)
2756
+ parts.push("metadata" + "=" + inspect(this.metadata));
2757
+ if (this.spec !== undefined)
2758
+ parts.push("spec" + "=" + inspect(this.spec));
1836
2759
  return `${this.$type}(${parts.join(", ")})`;
1837
2760
  }
1838
- function GetZoneRequestCustomJson() {
2761
+ function CreateZoneRequestCustomJson() {
1839
2762
  const obj = {
1840
2763
  type: this.$type,
1841
2764
  };
1842
- if (this.id !== "")
1843
- obj.id = inspectJson(this.id);
1844
- if (!this.resourceVersion?.isZero?.())
1845
- obj.resourceVersion = inspectJson(this.resourceVersion);
2765
+ if (this.metadata !== undefined)
2766
+ obj.metadata = inspectJson(this.metadata);
2767
+ if (this.spec !== undefined)
2768
+ obj.spec = inspectJson(this.spec);
1846
2769
  return obj;
1847
2770
  }
1848
- function applyGetZoneRequestCustom(message) {
1849
- message[custom] = GetZoneRequestCustomInspect;
1850
- message[customJson] = GetZoneRequestCustomJson;
2771
+ function applyCreateZoneRequestCustom(message) {
2772
+ message[custom] = CreateZoneRequestCustomInspect;
2773
+ message[customJson] = CreateZoneRequestCustomJson;
1851
2774
  return message;
1852
2775
  }
1853
- function createBaseGetZoneRequest() {
2776
+ function createBaseCreateZoneRequest() {
1854
2777
  const message = {
1855
- $type: "nebius.dns.v1.GetZoneRequest",
1856
- id: "",
1857
- resourceVersion: Long.ZERO,
2778
+ $type: "nebius.dns.v1.CreateZoneRequest",
2779
+ metadata: undefined,
2780
+ spec: undefined,
1858
2781
  };
1859
- return applyGetZoneRequestCustom(message);
2782
+ return applyCreateZoneRequestCustom(message);
1860
2783
  }
1861
- export const ListZonesRequest = {
1862
- $type: "nebius.dns.v1.ListZonesRequest",
2784
+ export const UpdateZoneRequest = {
2785
+ $type: "nebius.dns.v1.UpdateZoneRequest",
1863
2786
  encode(message, writer = new BinaryWriter()) {
1864
- if (message.parentId !== "") {
1865
- writer.uint32(10).string(message.parentId);
1866
- }
1867
- if (message.pageSize !== undefined && !message.pageSize.isZero?.()) {
1868
- writer.uint32(16).int64(message.pageSize.toString());
2787
+ if (message.metadata !== undefined) {
2788
+ const w = writer.uint32(10).fork();
2789
+ ResourceMetadata.encode(message.metadata, w);
2790
+ w.join();
1869
2791
  }
1870
- if (message.pageToken !== "") {
1871
- writer.uint32(26).string(message.pageToken);
2792
+ if (message.spec !== undefined) {
2793
+ const w = writer.uint32(18).fork();
2794
+ ZoneSpec.encode(message.spec, w);
2795
+ w.join();
1872
2796
  }
1873
2797
  if (message[unknownFieldsSymbol]) {
1874
2798
  writer.raw(message[unknownFieldsSymbol]);
@@ -1878,7 +2802,7 @@ export const ListZonesRequest = {
1878
2802
  decode(input, length) {
1879
2803
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1880
2804
  const end = length === undefined ? reader.len : reader.pos + length;
1881
- const message = createBaseListZonesRequest();
2805
+ const message = createBaseUpdateZoneRequest();
1882
2806
  let writer = undefined;
1883
2807
  while (reader.pos < end) {
1884
2808
  const tag = reader.uint32();
@@ -1886,19 +2810,13 @@ export const ListZonesRequest = {
1886
2810
  case 1: {
1887
2811
  if (tag !== 10)
1888
2812
  break;
1889
- message.parentId = reader.string();
2813
+ message.metadata = ResourceMetadata.decode(reader, reader.uint32());
1890
2814
  continue;
1891
2815
  }
1892
2816
  case 2: {
1893
- if (tag !== 16)
1894
- break;
1895
- message.pageSize = Long.fromValue(reader.int64());
1896
- continue;
1897
- }
1898
- case 3: {
1899
- if (tag !== 26)
2817
+ if (tag !== 18)
1900
2818
  break;
1901
- message.pageToken = reader.string();
2819
+ message.spec = ZoneSpec.decode(reader, reader.uint32());
1902
2820
  continue;
1903
2821
  }
1904
2822
  default:
@@ -1920,97 +2838,85 @@ export const ListZonesRequest = {
1920
2838
  return message;
1921
2839
  },
1922
2840
  fromJSON(object) {
1923
- return applyListZonesRequestCustom({
1924
- $type: "nebius.dns.v1.ListZonesRequest",
1925
- parentId: isSet(object.parentId ?? object.parent_id)
1926
- ? String(object.parentId ?? object.parent_id)
1927
- : "",
1928
- pageSize: isSet(object.pageSize ?? object.page_size)
1929
- ? Long.fromValue(object.pageSize ?? object.page_size)
1930
- : Long.ZERO,
1931
- pageToken: isSet(object.pageToken ?? object.page_token)
1932
- ? String(object.pageToken ?? object.page_token)
1933
- : "",
2841
+ return applyUpdateZoneRequestCustom({
2842
+ $type: "nebius.dns.v1.UpdateZoneRequest",
2843
+ metadata: isSet(object.metadata ?? object.metadata)
2844
+ ? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
2845
+ : undefined,
2846
+ spec: isSet(object.spec ?? object.spec)
2847
+ ? ZoneSpec.fromJSON(object.spec ?? object.spec)
2848
+ : undefined,
1934
2849
  });
1935
2850
  },
1936
2851
  toJSON(message, use = "json") {
1937
2852
  const obj = {};
1938
2853
  const pick = (json, pb) => (use === "json" ? json : pb);
1939
- if (message.parentId !== "") {
1940
- obj[pick("parentId", "parent_id")] = message.parentId;
1941
- }
1942
- if (!message.pageSize?.isZero?.()) {
1943
- obj[pick("pageSize", "page_size")] = (message.pageSize || Long.ZERO).toString();
2854
+ if (message.metadata !== undefined) {
2855
+ obj[pick("metadata", "metadata")] = message.metadata
2856
+ ? ResourceMetadata.toJSON(message.metadata, use)
2857
+ : undefined;
1944
2858
  }
1945
- if (message.pageToken !== "") {
1946
- obj[pick("pageToken", "page_token")] = message.pageToken;
2859
+ if (message.spec !== undefined) {
2860
+ obj[pick("spec", "spec")] = message.spec
2861
+ ? ZoneSpec.toJSON(message.spec, use)
2862
+ : undefined;
1947
2863
  }
1948
2864
  return obj;
1949
2865
  },
1950
2866
  create(base) {
1951
- return ListZonesRequest.fromPartial(base ?? {});
2867
+ return UpdateZoneRequest.fromPartial(base ?? {});
1952
2868
  },
1953
2869
  fromPartial(object) {
1954
- const message = createBaseListZonesRequest();
1955
- message.parentId = (object.parentId !== undefined && object.parentId !== null)
1956
- ? object.parentId
1957
- : "";
1958
- message.pageSize = (object.pageSize !== undefined && object.pageSize !== null)
1959
- ? Long.fromValue(object.pageSize)
1960
- : Long.ZERO;
1961
- message.pageToken = (object.pageToken !== undefined && object.pageToken !== null)
1962
- ? object.pageToken
1963
- : "";
2870
+ const message = createBaseUpdateZoneRequest();
2871
+ message.metadata = (object.metadata !== undefined && object.metadata !== null)
2872
+ ? ResourceMetadata.fromPartial(object.metadata)
2873
+ : undefined;
2874
+ message.spec = (object.spec !== undefined && object.spec !== null)
2875
+ ? ZoneSpec.fromPartial(object.spec)
2876
+ : undefined;
1964
2877
  return message;
1965
2878
  },
1966
2879
  };
1967
- protoRegistry.registerMessage(ListZonesRequest);
1968
- function ListZonesRequestCustomInspect() {
2880
+ protoRegistry.registerMessage(UpdateZoneRequest);
2881
+ function UpdateZoneRequestCustomInspect() {
1969
2882
  const parts = [];
1970
- if (this.parentId !== "")
1971
- parts.push("parentId" + "=" + inspect(this.parentId));
1972
- if (!this.pageSize?.isZero?.())
1973
- parts.push("pageSize" + "=" + inspect(this.pageSize));
1974
- if (this.pageToken !== "")
1975
- parts.push("pageToken" + "=" + inspect(this.pageToken));
2883
+ if (this.metadata !== undefined)
2884
+ parts.push("metadata" + "=" + inspect(this.metadata));
2885
+ if (this.spec !== undefined)
2886
+ parts.push("spec" + "=" + inspect(this.spec));
1976
2887
  return `${this.$type}(${parts.join(", ")})`;
1977
2888
  }
1978
- function ListZonesRequestCustomJson() {
2889
+ function UpdateZoneRequestCustomJson() {
1979
2890
  const obj = {
1980
2891
  type: this.$type,
1981
2892
  };
1982
- if (this.parentId !== "")
1983
- obj.parentId = inspectJson(this.parentId);
1984
- if (!this.pageSize?.isZero?.())
1985
- obj.pageSize = inspectJson(this.pageSize);
1986
- if (this.pageToken !== "")
1987
- obj.pageToken = inspectJson(this.pageToken);
2893
+ if (this.metadata !== undefined)
2894
+ obj.metadata = inspectJson(this.metadata);
2895
+ if (this.spec !== undefined)
2896
+ obj.spec = inspectJson(this.spec);
1988
2897
  return obj;
1989
2898
  }
1990
- function applyListZonesRequestCustom(message) {
1991
- message[custom] = ListZonesRequestCustomInspect;
1992
- message[customJson] = ListZonesRequestCustomJson;
2899
+ function applyUpdateZoneRequestCustom(message) {
2900
+ message[custom] = UpdateZoneRequestCustomInspect;
2901
+ message[customJson] = UpdateZoneRequestCustomJson;
1993
2902
  return message;
1994
2903
  }
1995
- function createBaseListZonesRequest() {
2904
+ function createBaseUpdateZoneRequest() {
1996
2905
  const message = {
1997
- $type: "nebius.dns.v1.ListZonesRequest",
1998
- parentId: "",
1999
- pageSize: Long.ZERO,
2000
- pageToken: "",
2906
+ $type: "nebius.dns.v1.UpdateZoneRequest",
2907
+ metadata: undefined,
2908
+ spec: undefined,
2001
2909
  };
2002
- return applyListZonesRequestCustom(message);
2910
+ return applyUpdateZoneRequestCustom(message);
2003
2911
  }
2004
- export const ListZonesResponse = {
2005
- $type: "nebius.dns.v1.ListZonesResponse",
2912
+ export const DeleteZoneRequest = {
2913
+ $type: "nebius.dns.v1.DeleteZoneRequest",
2006
2914
  encode(message, writer = new BinaryWriter()) {
2007
- for (const v of (message.items ?? [])) {
2008
- const w = writer.uint32(10).fork();
2009
- Zone.encode(v, w);
2010
- w.join();
2915
+ if (message.id !== "") {
2916
+ writer.uint32(10).string(message.id);
2011
2917
  }
2012
- if (message.nextPageToken !== "") {
2013
- writer.uint32(18).string(message.nextPageToken);
2918
+ if (message.resourceVersion !== undefined && !message.resourceVersion.isZero?.()) {
2919
+ writer.uint32(16).int64(message.resourceVersion.toString());
2014
2920
  }
2015
2921
  if (message[unknownFieldsSymbol]) {
2016
2922
  writer.raw(message[unknownFieldsSymbol]);
@@ -2020,7 +2926,7 @@ export const ListZonesResponse = {
2020
2926
  decode(input, length) {
2021
2927
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2022
2928
  const end = length === undefined ? reader.len : reader.pos + length;
2023
- const message = createBaseListZonesResponse();
2929
+ const message = createBaseDeleteZoneRequest();
2024
2930
  let writer = undefined;
2025
2931
  while (reader.pos < end) {
2026
2932
  const tag = reader.uint32();
@@ -2028,13 +2934,13 @@ export const ListZonesResponse = {
2028
2934
  case 1: {
2029
2935
  if (tag !== 10)
2030
2936
  break;
2031
- message.items.push(Zone.decode(reader, reader.uint32()));
2937
+ message.id = reader.string();
2032
2938
  continue;
2033
2939
  }
2034
2940
  case 2: {
2035
- if (tag !== 18)
2941
+ if (tag !== 16)
2036
2942
  break;
2037
- message.nextPageToken = reader.string();
2943
+ message.resourceVersion = Long.fromValue(reader.int64());
2038
2944
  continue;
2039
2945
  }
2040
2946
  default:
@@ -2056,69 +2962,71 @@ export const ListZonesResponse = {
2056
2962
  return message;
2057
2963
  },
2058
2964
  fromJSON(object) {
2059
- return applyListZonesResponseCustom({
2060
- $type: "nebius.dns.v1.ListZonesResponse",
2061
- items: globalThis.Array.isArray(object?.items ?? object?.items)
2062
- ? (object.items ?? object.items).map((e) => Zone.fromJSON(e))
2063
- : [],
2064
- nextPageToken: isSet(object.nextPageToken ?? object.next_page_token)
2065
- ? String(object.nextPageToken ?? object.next_page_token)
2965
+ return applyDeleteZoneRequestCustom({
2966
+ $type: "nebius.dns.v1.DeleteZoneRequest",
2967
+ id: isSet(object.id ?? object.id)
2968
+ ? String(object.id ?? object.id)
2066
2969
  : "",
2970
+ resourceVersion: isSet(object.resourceVersion ?? object.resource_version)
2971
+ ? Long.fromValue(object.resourceVersion ?? object.resource_version)
2972
+ : Long.ZERO,
2067
2973
  });
2068
2974
  },
2069
2975
  toJSON(message, use = "json") {
2070
2976
  const obj = {};
2071
2977
  const pick = (json, pb) => (use === "json" ? json : pb);
2072
- if (message.items?.length) {
2073
- obj[pick("items", "items")] = message.items.map((e) => e ? Zone.toJSON(e, use) : undefined);
2978
+ if (message.id !== "") {
2979
+ obj[pick("id", "id")] = message.id;
2074
2980
  }
2075
- if (message.nextPageToken !== "") {
2076
- obj[pick("nextPageToken", "next_page_token")] = message.nextPageToken;
2981
+ if (!message.resourceVersion?.isZero?.()) {
2982
+ obj[pick("resourceVersion", "resource_version")] = (message.resourceVersion || Long.ZERO).toString();
2077
2983
  }
2078
2984
  return obj;
2079
2985
  },
2080
2986
  create(base) {
2081
- return ListZonesResponse.fromPartial(base ?? {});
2987
+ return DeleteZoneRequest.fromPartial(base ?? {});
2082
2988
  },
2083
2989
  fromPartial(object) {
2084
- const message = createBaseListZonesResponse();
2085
- message.items = object.items?.map((e) => Zone.fromPartial(e)) || [];
2086
- message.nextPageToken = (object.nextPageToken !== undefined && object.nextPageToken !== null)
2087
- ? object.nextPageToken
2990
+ const message = createBaseDeleteZoneRequest();
2991
+ message.id = (object.id !== undefined && object.id !== null)
2992
+ ? object.id
2088
2993
  : "";
2994
+ message.resourceVersion = (object.resourceVersion !== undefined && object.resourceVersion !== null)
2995
+ ? Long.fromValue(object.resourceVersion)
2996
+ : Long.ZERO;
2089
2997
  return message;
2090
2998
  },
2091
2999
  };
2092
- protoRegistry.registerMessage(ListZonesResponse);
2093
- function ListZonesResponseCustomInspect() {
3000
+ protoRegistry.registerMessage(DeleteZoneRequest);
3001
+ function DeleteZoneRequestCustomInspect() {
2094
3002
  const parts = [];
2095
- if ((this.items?.length ?? 0) !== 0)
2096
- parts.push("items" + "=" + inspect(this.items));
2097
- if (this.nextPageToken !== "")
2098
- parts.push("nextPageToken" + "=" + inspect(this.nextPageToken));
3003
+ if (this.id !== "")
3004
+ parts.push("id" + "=" + inspect(this.id));
3005
+ if (!this.resourceVersion?.isZero?.())
3006
+ parts.push("resourceVersion" + "=" + inspect(this.resourceVersion));
2099
3007
  return `${this.$type}(${parts.join(", ")})`;
2100
3008
  }
2101
- function ListZonesResponseCustomJson() {
3009
+ function DeleteZoneRequestCustomJson() {
2102
3010
  const obj = {
2103
3011
  type: this.$type,
2104
3012
  };
2105
- if ((this.items?.length ?? 0) !== 0)
2106
- obj.items = inspectJson(this.items);
2107
- if (this.nextPageToken !== "")
2108
- obj.nextPageToken = inspectJson(this.nextPageToken);
3013
+ if (this.id !== "")
3014
+ obj.id = inspectJson(this.id);
3015
+ if (!this.resourceVersion?.isZero?.())
3016
+ obj.resourceVersion = inspectJson(this.resourceVersion);
2109
3017
  return obj;
2110
3018
  }
2111
- function applyListZonesResponseCustom(message) {
2112
- message[custom] = ListZonesResponseCustomInspect;
2113
- message[customJson] = ListZonesResponseCustomJson;
3019
+ function applyDeleteZoneRequestCustom(message) {
3020
+ message[custom] = DeleteZoneRequestCustomInspect;
3021
+ message[customJson] = DeleteZoneRequestCustomJson;
2114
3022
  return message;
2115
3023
  }
2116
- function createBaseListZonesResponse() {
3024
+ function createBaseDeleteZoneRequest() {
2117
3025
  const message = {
2118
- $type: "nebius.dns.v1.ListZonesResponse",
2119
- items: [],
2120
- nextPageToken: "",
3026
+ $type: "nebius.dns.v1.DeleteZoneRequest",
3027
+ id: "",
3028
+ resourceVersion: Long.ZERO,
2121
3029
  };
2122
- return applyListZonesResponseCustom(message);
3030
+ return applyDeleteZoneRequestCustom(message);
2123
3031
  }
2124
3032
  //# sourceMappingURL=index.js.map