@nebius/js-sdk 0.2.36 → 0.2.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/nebius/capacity/v1/index.d.ts +431 -1
- package/dist/cjs/api/nebius/capacity/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/capacity/v1/index.js +1670 -1
- package/dist/cjs/api/nebius/capacity/v1/index.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/api/nebius/capacity/v1/index.d.ts +431 -1
- package/dist/esm/api/nebius/capacity/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/capacity/v1/index.js +1668 -1
- package/dist/esm/api/nebius/capacity/v1/index.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -5,8 +5,1675 @@ 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 {
|
|
8
|
+
import { Operation as OperationWrapper } from "../../../../runtime/operation.js";
|
|
9
|
+
import { Operation, OperationService, ResourceMetadata } from "../../common/v1/index.js";
|
|
9
10
|
const __deprecatedWarned = new Set();
|
|
11
|
+
export const ListCapacityAllowancesRequest = {
|
|
12
|
+
$type: "nebius.capacity.v1.ListCapacityAllowancesRequest",
|
|
13
|
+
encode(message, writer = new BinaryWriter()) {
|
|
14
|
+
if (message.parentId !== "") {
|
|
15
|
+
writer.uint32(10).string(message.parentId);
|
|
16
|
+
}
|
|
17
|
+
if (message.pageSize !== undefined && !message.pageSize.isZero?.()) {
|
|
18
|
+
writer.uint32(16).int64(message.pageSize.toString());
|
|
19
|
+
}
|
|
20
|
+
if (message.pageToken !== "") {
|
|
21
|
+
writer.uint32(26).string(message.pageToken);
|
|
22
|
+
}
|
|
23
|
+
if (message[unknownFieldsSymbol]) {
|
|
24
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
25
|
+
}
|
|
26
|
+
return writer;
|
|
27
|
+
},
|
|
28
|
+
decode(input, length) {
|
|
29
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
30
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
31
|
+
const message = createBaseListCapacityAllowancesRequest();
|
|
32
|
+
let writer = undefined;
|
|
33
|
+
while (reader.pos < end) {
|
|
34
|
+
const tag = reader.uint32();
|
|
35
|
+
switch (tag >>> 3) {
|
|
36
|
+
case 1: {
|
|
37
|
+
if (tag !== 10)
|
|
38
|
+
break;
|
|
39
|
+
message.parentId = reader.string();
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
case 2: {
|
|
43
|
+
if (tag !== 16)
|
|
44
|
+
break;
|
|
45
|
+
message.pageSize = Long.fromValue(reader.int64());
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
case 3: {
|
|
49
|
+
if (tag !== 26)
|
|
50
|
+
break;
|
|
51
|
+
message.pageToken = reader.string();
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
default:
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
{
|
|
61
|
+
if (!writer)
|
|
62
|
+
writer = new BinaryWriter();
|
|
63
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
64
|
+
writer.uint32(tag).raw(skipped);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (writer) {
|
|
68
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
69
|
+
}
|
|
70
|
+
return message;
|
|
71
|
+
},
|
|
72
|
+
fromJSON(object) {
|
|
73
|
+
return applyListCapacityAllowancesRequestCustom({
|
|
74
|
+
$type: "nebius.capacity.v1.ListCapacityAllowancesRequest",
|
|
75
|
+
parentId: isSet(object.parentId ?? object.parent_id)
|
|
76
|
+
? String(object.parentId ?? object.parent_id)
|
|
77
|
+
: "",
|
|
78
|
+
pageSize: isSet(object.pageSize ?? object.page_size)
|
|
79
|
+
? Long.fromValue(object.pageSize ?? object.page_size)
|
|
80
|
+
: Long.ZERO,
|
|
81
|
+
pageToken: isSet(object.pageToken ?? object.page_token)
|
|
82
|
+
? String(object.pageToken ?? object.page_token)
|
|
83
|
+
: "",
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
toJSON(message, use = "json") {
|
|
87
|
+
const obj = {};
|
|
88
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
89
|
+
if (message.parentId !== "") {
|
|
90
|
+
obj[pick("parentId", "parent_id")] = message.parentId;
|
|
91
|
+
}
|
|
92
|
+
if (!message.pageSize?.isZero?.()) {
|
|
93
|
+
obj[pick("pageSize", "page_size")] = (message.pageSize || Long.ZERO).toString();
|
|
94
|
+
}
|
|
95
|
+
if (message.pageToken !== "") {
|
|
96
|
+
obj[pick("pageToken", "page_token")] = message.pageToken;
|
|
97
|
+
}
|
|
98
|
+
return obj;
|
|
99
|
+
},
|
|
100
|
+
create(base) {
|
|
101
|
+
return ListCapacityAllowancesRequest.fromPartial(base ?? {});
|
|
102
|
+
},
|
|
103
|
+
fromPartial(object) {
|
|
104
|
+
const message = createBaseListCapacityAllowancesRequest();
|
|
105
|
+
message.parentId = (object.parentId !== undefined && object.parentId !== null)
|
|
106
|
+
? object.parentId
|
|
107
|
+
: "";
|
|
108
|
+
message.pageSize = (object.pageSize !== undefined && object.pageSize !== null)
|
|
109
|
+
? Long.fromValue(object.pageSize)
|
|
110
|
+
: Long.ZERO;
|
|
111
|
+
message.pageToken = (object.pageToken !== undefined && object.pageToken !== null)
|
|
112
|
+
? object.pageToken
|
|
113
|
+
: "";
|
|
114
|
+
return message;
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
protoRegistry.registerMessage(ListCapacityAllowancesRequest);
|
|
118
|
+
function ListCapacityAllowancesRequestCustomInspect() {
|
|
119
|
+
const parts = [];
|
|
120
|
+
if (this.parentId !== "")
|
|
121
|
+
parts.push("parentId" + "=" + inspect(this.parentId));
|
|
122
|
+
if (!this.pageSize?.isZero?.())
|
|
123
|
+
parts.push("pageSize" + "=" + inspect(this.pageSize));
|
|
124
|
+
if (this.pageToken !== "")
|
|
125
|
+
parts.push("pageToken" + "=" + inspect(this.pageToken));
|
|
126
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
127
|
+
}
|
|
128
|
+
function ListCapacityAllowancesRequestCustomJson() {
|
|
129
|
+
const obj = {
|
|
130
|
+
type: this.$type,
|
|
131
|
+
};
|
|
132
|
+
if (this.parentId !== "")
|
|
133
|
+
obj.parentId = inspectJson(this.parentId);
|
|
134
|
+
if (!this.pageSize?.isZero?.())
|
|
135
|
+
obj.pageSize = inspectJson(this.pageSize);
|
|
136
|
+
if (this.pageToken !== "")
|
|
137
|
+
obj.pageToken = inspectJson(this.pageToken);
|
|
138
|
+
return obj;
|
|
139
|
+
}
|
|
140
|
+
function applyListCapacityAllowancesRequestCustom(message) {
|
|
141
|
+
message[custom] = ListCapacityAllowancesRequestCustomInspect;
|
|
142
|
+
message[customJson] = ListCapacityAllowancesRequestCustomJson;
|
|
143
|
+
return message;
|
|
144
|
+
}
|
|
145
|
+
function createBaseListCapacityAllowancesRequest() {
|
|
146
|
+
const message = {
|
|
147
|
+
$type: "nebius.capacity.v1.ListCapacityAllowancesRequest",
|
|
148
|
+
parentId: "",
|
|
149
|
+
pageSize: Long.ZERO,
|
|
150
|
+
pageToken: "",
|
|
151
|
+
};
|
|
152
|
+
return applyListCapacityAllowancesRequestCustom(message);
|
|
153
|
+
}
|
|
154
|
+
export const ListCapacityAllowancesResponse = {
|
|
155
|
+
$type: "nebius.capacity.v1.ListCapacityAllowancesResponse",
|
|
156
|
+
encode(message, writer = new BinaryWriter()) {
|
|
157
|
+
for (const v of (message.items ?? [])) {
|
|
158
|
+
const w = writer.uint32(10).fork();
|
|
159
|
+
CapacityAllowance.encode(v, w);
|
|
160
|
+
w.join();
|
|
161
|
+
}
|
|
162
|
+
if (message.nextPageToken !== "") {
|
|
163
|
+
writer.uint32(18).string(message.nextPageToken);
|
|
164
|
+
}
|
|
165
|
+
if (message[unknownFieldsSymbol]) {
|
|
166
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
167
|
+
}
|
|
168
|
+
return writer;
|
|
169
|
+
},
|
|
170
|
+
decode(input, length) {
|
|
171
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
172
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
173
|
+
const message = createBaseListCapacityAllowancesResponse();
|
|
174
|
+
let writer = undefined;
|
|
175
|
+
while (reader.pos < end) {
|
|
176
|
+
const tag = reader.uint32();
|
|
177
|
+
switch (tag >>> 3) {
|
|
178
|
+
case 1: {
|
|
179
|
+
if (tag !== 10)
|
|
180
|
+
break;
|
|
181
|
+
message.items.push(CapacityAllowance.decode(reader, reader.uint32()));
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
case 2: {
|
|
185
|
+
if (tag !== 18)
|
|
186
|
+
break;
|
|
187
|
+
message.nextPageToken = reader.string();
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
default:
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
{
|
|
197
|
+
if (!writer)
|
|
198
|
+
writer = new BinaryWriter();
|
|
199
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
200
|
+
writer.uint32(tag).raw(skipped);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
if (writer) {
|
|
204
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
205
|
+
}
|
|
206
|
+
return message;
|
|
207
|
+
},
|
|
208
|
+
fromJSON(object) {
|
|
209
|
+
return applyListCapacityAllowancesResponseCustom({
|
|
210
|
+
$type: "nebius.capacity.v1.ListCapacityAllowancesResponse",
|
|
211
|
+
items: globalThis.Array.isArray(object?.items ?? object?.items)
|
|
212
|
+
? (object.items ?? object.items).map((e) => CapacityAllowance.fromJSON(e))
|
|
213
|
+
: [],
|
|
214
|
+
nextPageToken: isSet(object.nextPageToken ?? object.next_page_token)
|
|
215
|
+
? String(object.nextPageToken ?? object.next_page_token)
|
|
216
|
+
: "",
|
|
217
|
+
});
|
|
218
|
+
},
|
|
219
|
+
toJSON(message, use = "json") {
|
|
220
|
+
const obj = {};
|
|
221
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
222
|
+
if (message.items?.length) {
|
|
223
|
+
obj[pick("items", "items")] = message.items.map((e) => e ? CapacityAllowance.toJSON(e, use) : undefined);
|
|
224
|
+
}
|
|
225
|
+
if (message.nextPageToken !== "") {
|
|
226
|
+
obj[pick("nextPageToken", "next_page_token")] = message.nextPageToken;
|
|
227
|
+
}
|
|
228
|
+
return obj;
|
|
229
|
+
},
|
|
230
|
+
create(base) {
|
|
231
|
+
return ListCapacityAllowancesResponse.fromPartial(base ?? {});
|
|
232
|
+
},
|
|
233
|
+
fromPartial(object) {
|
|
234
|
+
const message = createBaseListCapacityAllowancesResponse();
|
|
235
|
+
message.items = object.items?.map((e) => CapacityAllowance.fromPartial(e)) || [];
|
|
236
|
+
message.nextPageToken = (object.nextPageToken !== undefined && object.nextPageToken !== null)
|
|
237
|
+
? object.nextPageToken
|
|
238
|
+
: "";
|
|
239
|
+
return message;
|
|
240
|
+
},
|
|
241
|
+
};
|
|
242
|
+
protoRegistry.registerMessage(ListCapacityAllowancesResponse);
|
|
243
|
+
function ListCapacityAllowancesResponseCustomInspect() {
|
|
244
|
+
const parts = [];
|
|
245
|
+
if ((this.items?.length ?? 0) !== 0)
|
|
246
|
+
parts.push("items" + "=" + inspect(this.items));
|
|
247
|
+
if (this.nextPageToken !== "")
|
|
248
|
+
parts.push("nextPageToken" + "=" + inspect(this.nextPageToken));
|
|
249
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
250
|
+
}
|
|
251
|
+
function ListCapacityAllowancesResponseCustomJson() {
|
|
252
|
+
const obj = {
|
|
253
|
+
type: this.$type,
|
|
254
|
+
};
|
|
255
|
+
if ((this.items?.length ?? 0) !== 0)
|
|
256
|
+
obj.items = inspectJson(this.items);
|
|
257
|
+
if (this.nextPageToken !== "")
|
|
258
|
+
obj.nextPageToken = inspectJson(this.nextPageToken);
|
|
259
|
+
return obj;
|
|
260
|
+
}
|
|
261
|
+
function applyListCapacityAllowancesResponseCustom(message) {
|
|
262
|
+
message[custom] = ListCapacityAllowancesResponseCustomInspect;
|
|
263
|
+
message[customJson] = ListCapacityAllowancesResponseCustomJson;
|
|
264
|
+
return message;
|
|
265
|
+
}
|
|
266
|
+
function createBaseListCapacityAllowancesResponse() {
|
|
267
|
+
const message = {
|
|
268
|
+
$type: "nebius.capacity.v1.ListCapacityAllowancesResponse",
|
|
269
|
+
items: [],
|
|
270
|
+
nextPageToken: "",
|
|
271
|
+
};
|
|
272
|
+
return applyListCapacityAllowancesResponseCustom(message);
|
|
273
|
+
}
|
|
274
|
+
export const ListCapacityAllowancesByCapacityBlockGroupRequest = {
|
|
275
|
+
$type: "nebius.capacity.v1.ListCapacityAllowancesByCapacityBlockGroupRequest",
|
|
276
|
+
encode(message, writer = new BinaryWriter()) {
|
|
277
|
+
if (message.capacityBlockGroupId !== "") {
|
|
278
|
+
writer.uint32(10).string(message.capacityBlockGroupId);
|
|
279
|
+
}
|
|
280
|
+
if (message.pageSize !== undefined && !message.pageSize.isZero?.()) {
|
|
281
|
+
writer.uint32(16).int64(message.pageSize.toString());
|
|
282
|
+
}
|
|
283
|
+
if (message.pageToken !== "") {
|
|
284
|
+
writer.uint32(26).string(message.pageToken);
|
|
285
|
+
}
|
|
286
|
+
if (message[unknownFieldsSymbol]) {
|
|
287
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
288
|
+
}
|
|
289
|
+
return writer;
|
|
290
|
+
},
|
|
291
|
+
decode(input, length) {
|
|
292
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
293
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
294
|
+
const message = createBaseListCapacityAllowancesByCapacityBlockGroupRequest();
|
|
295
|
+
let writer = undefined;
|
|
296
|
+
while (reader.pos < end) {
|
|
297
|
+
const tag = reader.uint32();
|
|
298
|
+
switch (tag >>> 3) {
|
|
299
|
+
case 1: {
|
|
300
|
+
if (tag !== 10)
|
|
301
|
+
break;
|
|
302
|
+
message.capacityBlockGroupId = reader.string();
|
|
303
|
+
continue;
|
|
304
|
+
}
|
|
305
|
+
case 2: {
|
|
306
|
+
if (tag !== 16)
|
|
307
|
+
break;
|
|
308
|
+
message.pageSize = Long.fromValue(reader.int64());
|
|
309
|
+
continue;
|
|
310
|
+
}
|
|
311
|
+
case 3: {
|
|
312
|
+
if (tag !== 26)
|
|
313
|
+
break;
|
|
314
|
+
message.pageToken = reader.string();
|
|
315
|
+
continue;
|
|
316
|
+
}
|
|
317
|
+
default:
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
{
|
|
324
|
+
if (!writer)
|
|
325
|
+
writer = new BinaryWriter();
|
|
326
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
327
|
+
writer.uint32(tag).raw(skipped);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
if (writer) {
|
|
331
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
332
|
+
}
|
|
333
|
+
return message;
|
|
334
|
+
},
|
|
335
|
+
fromJSON(object) {
|
|
336
|
+
return applyListCapacityAllowancesByCapacityBlockGroupRequestCustom({
|
|
337
|
+
$type: "nebius.capacity.v1.ListCapacityAllowancesByCapacityBlockGroupRequest",
|
|
338
|
+
capacityBlockGroupId: isSet(object.capacityBlockGroupId ?? object.capacity_block_group_id)
|
|
339
|
+
? String(object.capacityBlockGroupId ?? object.capacity_block_group_id)
|
|
340
|
+
: "",
|
|
341
|
+
pageSize: isSet(object.pageSize ?? object.page_size)
|
|
342
|
+
? Long.fromValue(object.pageSize ?? object.page_size)
|
|
343
|
+
: Long.ZERO,
|
|
344
|
+
pageToken: isSet(object.pageToken ?? object.page_token)
|
|
345
|
+
? String(object.pageToken ?? object.page_token)
|
|
346
|
+
: "",
|
|
347
|
+
});
|
|
348
|
+
},
|
|
349
|
+
toJSON(message, use = "json") {
|
|
350
|
+
const obj = {};
|
|
351
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
352
|
+
if (message.capacityBlockGroupId !== "") {
|
|
353
|
+
obj[pick("capacityBlockGroupId", "capacity_block_group_id")] = message.capacityBlockGroupId;
|
|
354
|
+
}
|
|
355
|
+
if (!message.pageSize?.isZero?.()) {
|
|
356
|
+
obj[pick("pageSize", "page_size")] = (message.pageSize || Long.ZERO).toString();
|
|
357
|
+
}
|
|
358
|
+
if (message.pageToken !== "") {
|
|
359
|
+
obj[pick("pageToken", "page_token")] = message.pageToken;
|
|
360
|
+
}
|
|
361
|
+
return obj;
|
|
362
|
+
},
|
|
363
|
+
create(base) {
|
|
364
|
+
return ListCapacityAllowancesByCapacityBlockGroupRequest.fromPartial(base ?? {});
|
|
365
|
+
},
|
|
366
|
+
fromPartial(object) {
|
|
367
|
+
const message = createBaseListCapacityAllowancesByCapacityBlockGroupRequest();
|
|
368
|
+
message.capacityBlockGroupId = (object.capacityBlockGroupId !== undefined && object.capacityBlockGroupId !== null)
|
|
369
|
+
? object.capacityBlockGroupId
|
|
370
|
+
: "";
|
|
371
|
+
message.pageSize = (object.pageSize !== undefined && object.pageSize !== null)
|
|
372
|
+
? Long.fromValue(object.pageSize)
|
|
373
|
+
: Long.ZERO;
|
|
374
|
+
message.pageToken = (object.pageToken !== undefined && object.pageToken !== null)
|
|
375
|
+
? object.pageToken
|
|
376
|
+
: "";
|
|
377
|
+
return message;
|
|
378
|
+
},
|
|
379
|
+
};
|
|
380
|
+
protoRegistry.registerMessage(ListCapacityAllowancesByCapacityBlockGroupRequest);
|
|
381
|
+
function ListCapacityAllowancesByCapacityBlockGroupRequestCustomInspect() {
|
|
382
|
+
const parts = [];
|
|
383
|
+
if (this.capacityBlockGroupId !== "")
|
|
384
|
+
parts.push("capacityBlockGroupId" + "=" + inspect(this.capacityBlockGroupId));
|
|
385
|
+
if (!this.pageSize?.isZero?.())
|
|
386
|
+
parts.push("pageSize" + "=" + inspect(this.pageSize));
|
|
387
|
+
if (this.pageToken !== "")
|
|
388
|
+
parts.push("pageToken" + "=" + inspect(this.pageToken));
|
|
389
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
390
|
+
}
|
|
391
|
+
function ListCapacityAllowancesByCapacityBlockGroupRequestCustomJson() {
|
|
392
|
+
const obj = {
|
|
393
|
+
type: this.$type,
|
|
394
|
+
};
|
|
395
|
+
if (this.capacityBlockGroupId !== "")
|
|
396
|
+
obj.capacityBlockGroupId = inspectJson(this.capacityBlockGroupId);
|
|
397
|
+
if (!this.pageSize?.isZero?.())
|
|
398
|
+
obj.pageSize = inspectJson(this.pageSize);
|
|
399
|
+
if (this.pageToken !== "")
|
|
400
|
+
obj.pageToken = inspectJson(this.pageToken);
|
|
401
|
+
return obj;
|
|
402
|
+
}
|
|
403
|
+
function applyListCapacityAllowancesByCapacityBlockGroupRequestCustom(message) {
|
|
404
|
+
message[custom] = ListCapacityAllowancesByCapacityBlockGroupRequestCustomInspect;
|
|
405
|
+
message[customJson] = ListCapacityAllowancesByCapacityBlockGroupRequestCustomJson;
|
|
406
|
+
return message;
|
|
407
|
+
}
|
|
408
|
+
function createBaseListCapacityAllowancesByCapacityBlockGroupRequest() {
|
|
409
|
+
const message = {
|
|
410
|
+
$type: "nebius.capacity.v1.ListCapacityAllowancesByCapacityBlockGroupRequest",
|
|
411
|
+
capacityBlockGroupId: "",
|
|
412
|
+
pageSize: Long.ZERO,
|
|
413
|
+
pageToken: "",
|
|
414
|
+
};
|
|
415
|
+
return applyListCapacityAllowancesByCapacityBlockGroupRequestCustom(message);
|
|
416
|
+
}
|
|
417
|
+
export const GetCapacityAllowanceRequest = {
|
|
418
|
+
$type: "nebius.capacity.v1.GetCapacityAllowanceRequest",
|
|
419
|
+
encode(message, writer = new BinaryWriter()) {
|
|
420
|
+
if (message.id !== "") {
|
|
421
|
+
writer.uint32(10).string(message.id);
|
|
422
|
+
}
|
|
423
|
+
if (message[unknownFieldsSymbol]) {
|
|
424
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
425
|
+
}
|
|
426
|
+
return writer;
|
|
427
|
+
},
|
|
428
|
+
decode(input, length) {
|
|
429
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
430
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
431
|
+
const message = createBaseGetCapacityAllowanceRequest();
|
|
432
|
+
let writer = undefined;
|
|
433
|
+
while (reader.pos < end) {
|
|
434
|
+
const tag = reader.uint32();
|
|
435
|
+
switch (tag >>> 3) {
|
|
436
|
+
case 1: {
|
|
437
|
+
if (tag !== 10)
|
|
438
|
+
break;
|
|
439
|
+
message.id = reader.string();
|
|
440
|
+
continue;
|
|
441
|
+
}
|
|
442
|
+
default:
|
|
443
|
+
break;
|
|
444
|
+
}
|
|
445
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
446
|
+
break;
|
|
447
|
+
}
|
|
448
|
+
{
|
|
449
|
+
if (!writer)
|
|
450
|
+
writer = new BinaryWriter();
|
|
451
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
452
|
+
writer.uint32(tag).raw(skipped);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
if (writer) {
|
|
456
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
457
|
+
}
|
|
458
|
+
return message;
|
|
459
|
+
},
|
|
460
|
+
fromJSON(object) {
|
|
461
|
+
return applyGetCapacityAllowanceRequestCustom({
|
|
462
|
+
$type: "nebius.capacity.v1.GetCapacityAllowanceRequest",
|
|
463
|
+
id: isSet(object.id ?? object.id)
|
|
464
|
+
? String(object.id ?? object.id)
|
|
465
|
+
: "",
|
|
466
|
+
});
|
|
467
|
+
},
|
|
468
|
+
toJSON(message, use = "json") {
|
|
469
|
+
const obj = {};
|
|
470
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
471
|
+
if (message.id !== "") {
|
|
472
|
+
obj[pick("id", "id")] = message.id;
|
|
473
|
+
}
|
|
474
|
+
return obj;
|
|
475
|
+
},
|
|
476
|
+
create(base) {
|
|
477
|
+
return GetCapacityAllowanceRequest.fromPartial(base ?? {});
|
|
478
|
+
},
|
|
479
|
+
fromPartial(object) {
|
|
480
|
+
const message = createBaseGetCapacityAllowanceRequest();
|
|
481
|
+
message.id = (object.id !== undefined && object.id !== null)
|
|
482
|
+
? object.id
|
|
483
|
+
: "";
|
|
484
|
+
return message;
|
|
485
|
+
},
|
|
486
|
+
};
|
|
487
|
+
protoRegistry.registerMessage(GetCapacityAllowanceRequest);
|
|
488
|
+
function GetCapacityAllowanceRequestCustomInspect() {
|
|
489
|
+
const parts = [];
|
|
490
|
+
if (this.id !== "")
|
|
491
|
+
parts.push("id" + "=" + inspect(this.id));
|
|
492
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
493
|
+
}
|
|
494
|
+
function GetCapacityAllowanceRequestCustomJson() {
|
|
495
|
+
const obj = {
|
|
496
|
+
type: this.$type,
|
|
497
|
+
};
|
|
498
|
+
if (this.id !== "")
|
|
499
|
+
obj.id = inspectJson(this.id);
|
|
500
|
+
return obj;
|
|
501
|
+
}
|
|
502
|
+
function applyGetCapacityAllowanceRequestCustom(message) {
|
|
503
|
+
message[custom] = GetCapacityAllowanceRequestCustomInspect;
|
|
504
|
+
message[customJson] = GetCapacityAllowanceRequestCustomJson;
|
|
505
|
+
return message;
|
|
506
|
+
}
|
|
507
|
+
function createBaseGetCapacityAllowanceRequest() {
|
|
508
|
+
const message = {
|
|
509
|
+
$type: "nebius.capacity.v1.GetCapacityAllowanceRequest",
|
|
510
|
+
id: "",
|
|
511
|
+
};
|
|
512
|
+
return applyGetCapacityAllowanceRequestCustom(message);
|
|
513
|
+
}
|
|
514
|
+
export const GetCapacityAllowanceByParentAndCapacityBlockGroupRequest = {
|
|
515
|
+
$type: "nebius.capacity.v1.GetCapacityAllowanceByParentAndCapacityBlockGroupRequest",
|
|
516
|
+
encode(message, writer = new BinaryWriter()) {
|
|
517
|
+
if (message.parentId !== "") {
|
|
518
|
+
writer.uint32(10).string(message.parentId);
|
|
519
|
+
}
|
|
520
|
+
if (message.capacityBlockGroupId !== "") {
|
|
521
|
+
writer.uint32(18).string(message.capacityBlockGroupId);
|
|
522
|
+
}
|
|
523
|
+
if (message[unknownFieldsSymbol]) {
|
|
524
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
525
|
+
}
|
|
526
|
+
return writer;
|
|
527
|
+
},
|
|
528
|
+
decode(input, length) {
|
|
529
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
530
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
531
|
+
const message = createBaseGetCapacityAllowanceByParentAndCapacityBlockGroupRequest();
|
|
532
|
+
let writer = undefined;
|
|
533
|
+
while (reader.pos < end) {
|
|
534
|
+
const tag = reader.uint32();
|
|
535
|
+
switch (tag >>> 3) {
|
|
536
|
+
case 1: {
|
|
537
|
+
if (tag !== 10)
|
|
538
|
+
break;
|
|
539
|
+
message.parentId = reader.string();
|
|
540
|
+
continue;
|
|
541
|
+
}
|
|
542
|
+
case 2: {
|
|
543
|
+
if (tag !== 18)
|
|
544
|
+
break;
|
|
545
|
+
message.capacityBlockGroupId = reader.string();
|
|
546
|
+
continue;
|
|
547
|
+
}
|
|
548
|
+
default:
|
|
549
|
+
break;
|
|
550
|
+
}
|
|
551
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
{
|
|
555
|
+
if (!writer)
|
|
556
|
+
writer = new BinaryWriter();
|
|
557
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
558
|
+
writer.uint32(tag).raw(skipped);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
if (writer) {
|
|
562
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
563
|
+
}
|
|
564
|
+
return message;
|
|
565
|
+
},
|
|
566
|
+
fromJSON(object) {
|
|
567
|
+
return applyGetCapacityAllowanceByParentAndCapacityBlockGroupRequestCustom({
|
|
568
|
+
$type: "nebius.capacity.v1.GetCapacityAllowanceByParentAndCapacityBlockGroupRequest",
|
|
569
|
+
parentId: isSet(object.parentId ?? object.parent_id)
|
|
570
|
+
? String(object.parentId ?? object.parent_id)
|
|
571
|
+
: "",
|
|
572
|
+
capacityBlockGroupId: isSet(object.capacityBlockGroupId ?? object.capacity_block_group_id)
|
|
573
|
+
? String(object.capacityBlockGroupId ?? object.capacity_block_group_id)
|
|
574
|
+
: "",
|
|
575
|
+
});
|
|
576
|
+
},
|
|
577
|
+
toJSON(message, use = "json") {
|
|
578
|
+
const obj = {};
|
|
579
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
580
|
+
if (message.parentId !== "") {
|
|
581
|
+
obj[pick("parentId", "parent_id")] = message.parentId;
|
|
582
|
+
}
|
|
583
|
+
if (message.capacityBlockGroupId !== "") {
|
|
584
|
+
obj[pick("capacityBlockGroupId", "capacity_block_group_id")] = message.capacityBlockGroupId;
|
|
585
|
+
}
|
|
586
|
+
return obj;
|
|
587
|
+
},
|
|
588
|
+
create(base) {
|
|
589
|
+
return GetCapacityAllowanceByParentAndCapacityBlockGroupRequest.fromPartial(base ?? {});
|
|
590
|
+
},
|
|
591
|
+
fromPartial(object) {
|
|
592
|
+
const message = createBaseGetCapacityAllowanceByParentAndCapacityBlockGroupRequest();
|
|
593
|
+
message.parentId = (object.parentId !== undefined && object.parentId !== null)
|
|
594
|
+
? object.parentId
|
|
595
|
+
: "";
|
|
596
|
+
message.capacityBlockGroupId = (object.capacityBlockGroupId !== undefined && object.capacityBlockGroupId !== null)
|
|
597
|
+
? object.capacityBlockGroupId
|
|
598
|
+
: "";
|
|
599
|
+
return message;
|
|
600
|
+
},
|
|
601
|
+
};
|
|
602
|
+
protoRegistry.registerMessage(GetCapacityAllowanceByParentAndCapacityBlockGroupRequest);
|
|
603
|
+
function GetCapacityAllowanceByParentAndCapacityBlockGroupRequestCustomInspect() {
|
|
604
|
+
const parts = [];
|
|
605
|
+
if (this.parentId !== "")
|
|
606
|
+
parts.push("parentId" + "=" + inspect(this.parentId));
|
|
607
|
+
if (this.capacityBlockGroupId !== "")
|
|
608
|
+
parts.push("capacityBlockGroupId" + "=" + inspect(this.capacityBlockGroupId));
|
|
609
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
610
|
+
}
|
|
611
|
+
function GetCapacityAllowanceByParentAndCapacityBlockGroupRequestCustomJson() {
|
|
612
|
+
const obj = {
|
|
613
|
+
type: this.$type,
|
|
614
|
+
};
|
|
615
|
+
if (this.parentId !== "")
|
|
616
|
+
obj.parentId = inspectJson(this.parentId);
|
|
617
|
+
if (this.capacityBlockGroupId !== "")
|
|
618
|
+
obj.capacityBlockGroupId = inspectJson(this.capacityBlockGroupId);
|
|
619
|
+
return obj;
|
|
620
|
+
}
|
|
621
|
+
function applyGetCapacityAllowanceByParentAndCapacityBlockGroupRequestCustom(message) {
|
|
622
|
+
message[custom] = GetCapacityAllowanceByParentAndCapacityBlockGroupRequestCustomInspect;
|
|
623
|
+
message[customJson] = GetCapacityAllowanceByParentAndCapacityBlockGroupRequestCustomJson;
|
|
624
|
+
return message;
|
|
625
|
+
}
|
|
626
|
+
function createBaseGetCapacityAllowanceByParentAndCapacityBlockGroupRequest() {
|
|
627
|
+
const message = {
|
|
628
|
+
$type: "nebius.capacity.v1.GetCapacityAllowanceByParentAndCapacityBlockGroupRequest",
|
|
629
|
+
parentId: "",
|
|
630
|
+
capacityBlockGroupId: "",
|
|
631
|
+
};
|
|
632
|
+
return applyGetCapacityAllowanceByParentAndCapacityBlockGroupRequestCustom(message);
|
|
633
|
+
}
|
|
634
|
+
export const CreateCapacityAllowanceRequest = {
|
|
635
|
+
$type: "nebius.capacity.v1.CreateCapacityAllowanceRequest",
|
|
636
|
+
encode(message, writer = new BinaryWriter()) {
|
|
637
|
+
if (message.metadata !== undefined) {
|
|
638
|
+
const w = writer.uint32(10).fork();
|
|
639
|
+
ResourceMetadata.encode(message.metadata, w);
|
|
640
|
+
w.join();
|
|
641
|
+
}
|
|
642
|
+
if (message.spec !== undefined) {
|
|
643
|
+
const w = writer.uint32(18).fork();
|
|
644
|
+
CapacityAllowanceSpec.encode(message.spec, w);
|
|
645
|
+
w.join();
|
|
646
|
+
}
|
|
647
|
+
if (message[unknownFieldsSymbol]) {
|
|
648
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
649
|
+
}
|
|
650
|
+
return writer;
|
|
651
|
+
},
|
|
652
|
+
decode(input, length) {
|
|
653
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
654
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
655
|
+
const message = createBaseCreateCapacityAllowanceRequest();
|
|
656
|
+
let writer = undefined;
|
|
657
|
+
while (reader.pos < end) {
|
|
658
|
+
const tag = reader.uint32();
|
|
659
|
+
switch (tag >>> 3) {
|
|
660
|
+
case 1: {
|
|
661
|
+
if (tag !== 10)
|
|
662
|
+
break;
|
|
663
|
+
message.metadata = ResourceMetadata.decode(reader, reader.uint32());
|
|
664
|
+
continue;
|
|
665
|
+
}
|
|
666
|
+
case 2: {
|
|
667
|
+
if (tag !== 18)
|
|
668
|
+
break;
|
|
669
|
+
message.spec = CapacityAllowanceSpec.decode(reader, reader.uint32());
|
|
670
|
+
continue;
|
|
671
|
+
}
|
|
672
|
+
default:
|
|
673
|
+
break;
|
|
674
|
+
}
|
|
675
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
676
|
+
break;
|
|
677
|
+
}
|
|
678
|
+
{
|
|
679
|
+
if (!writer)
|
|
680
|
+
writer = new BinaryWriter();
|
|
681
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
682
|
+
writer.uint32(tag).raw(skipped);
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
if (writer) {
|
|
686
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
687
|
+
}
|
|
688
|
+
return message;
|
|
689
|
+
},
|
|
690
|
+
fromJSON(object) {
|
|
691
|
+
return applyCreateCapacityAllowanceRequestCustom({
|
|
692
|
+
$type: "nebius.capacity.v1.CreateCapacityAllowanceRequest",
|
|
693
|
+
metadata: isSet(object.metadata ?? object.metadata)
|
|
694
|
+
? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
|
|
695
|
+
: undefined,
|
|
696
|
+
spec: isSet(object.spec ?? object.spec)
|
|
697
|
+
? CapacityAllowanceSpec.fromJSON(object.spec ?? object.spec)
|
|
698
|
+
: undefined,
|
|
699
|
+
});
|
|
700
|
+
},
|
|
701
|
+
toJSON(message, use = "json") {
|
|
702
|
+
const obj = {};
|
|
703
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
704
|
+
if (message.metadata !== undefined) {
|
|
705
|
+
obj[pick("metadata", "metadata")] = message.metadata
|
|
706
|
+
? ResourceMetadata.toJSON(message.metadata, use)
|
|
707
|
+
: undefined;
|
|
708
|
+
}
|
|
709
|
+
if (message.spec !== undefined) {
|
|
710
|
+
obj[pick("spec", "spec")] = message.spec
|
|
711
|
+
? CapacityAllowanceSpec.toJSON(message.spec, use)
|
|
712
|
+
: undefined;
|
|
713
|
+
}
|
|
714
|
+
return obj;
|
|
715
|
+
},
|
|
716
|
+
create(base) {
|
|
717
|
+
return CreateCapacityAllowanceRequest.fromPartial(base ?? {});
|
|
718
|
+
},
|
|
719
|
+
fromPartial(object) {
|
|
720
|
+
const message = createBaseCreateCapacityAllowanceRequest();
|
|
721
|
+
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
722
|
+
? ResourceMetadata.fromPartial(object.metadata)
|
|
723
|
+
: undefined;
|
|
724
|
+
message.spec = (object.spec !== undefined && object.spec !== null)
|
|
725
|
+
? CapacityAllowanceSpec.fromPartial(object.spec)
|
|
726
|
+
: undefined;
|
|
727
|
+
return message;
|
|
728
|
+
},
|
|
729
|
+
};
|
|
730
|
+
protoRegistry.registerMessage(CreateCapacityAllowanceRequest);
|
|
731
|
+
function CreateCapacityAllowanceRequestCustomInspect() {
|
|
732
|
+
const parts = [];
|
|
733
|
+
if (this.metadata !== undefined)
|
|
734
|
+
parts.push("metadata" + "=" + inspect(this.metadata));
|
|
735
|
+
if (this.spec !== undefined)
|
|
736
|
+
parts.push("spec" + "=" + inspect(this.spec));
|
|
737
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
738
|
+
}
|
|
739
|
+
function CreateCapacityAllowanceRequestCustomJson() {
|
|
740
|
+
const obj = {
|
|
741
|
+
type: this.$type,
|
|
742
|
+
};
|
|
743
|
+
if (this.metadata !== undefined)
|
|
744
|
+
obj.metadata = inspectJson(this.metadata);
|
|
745
|
+
if (this.spec !== undefined)
|
|
746
|
+
obj.spec = inspectJson(this.spec);
|
|
747
|
+
return obj;
|
|
748
|
+
}
|
|
749
|
+
function applyCreateCapacityAllowanceRequestCustom(message) {
|
|
750
|
+
message[custom] = CreateCapacityAllowanceRequestCustomInspect;
|
|
751
|
+
message[customJson] = CreateCapacityAllowanceRequestCustomJson;
|
|
752
|
+
return message;
|
|
753
|
+
}
|
|
754
|
+
function createBaseCreateCapacityAllowanceRequest() {
|
|
755
|
+
const message = {
|
|
756
|
+
$type: "nebius.capacity.v1.CreateCapacityAllowanceRequest",
|
|
757
|
+
metadata: undefined,
|
|
758
|
+
spec: undefined,
|
|
759
|
+
};
|
|
760
|
+
return applyCreateCapacityAllowanceRequestCustom(message);
|
|
761
|
+
}
|
|
762
|
+
export const UpdateCapacityAllowanceRequest = {
|
|
763
|
+
$type: "nebius.capacity.v1.UpdateCapacityAllowanceRequest",
|
|
764
|
+
encode(message, writer = new BinaryWriter()) {
|
|
765
|
+
if (message.metadata !== undefined) {
|
|
766
|
+
const w = writer.uint32(10).fork();
|
|
767
|
+
ResourceMetadata.encode(message.metadata, w);
|
|
768
|
+
w.join();
|
|
769
|
+
}
|
|
770
|
+
if (message.spec !== undefined) {
|
|
771
|
+
const w = writer.uint32(18).fork();
|
|
772
|
+
CapacityAllowanceSpec.encode(message.spec, w);
|
|
773
|
+
w.join();
|
|
774
|
+
}
|
|
775
|
+
if (message[unknownFieldsSymbol]) {
|
|
776
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
777
|
+
}
|
|
778
|
+
return writer;
|
|
779
|
+
},
|
|
780
|
+
decode(input, length) {
|
|
781
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
782
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
783
|
+
const message = createBaseUpdateCapacityAllowanceRequest();
|
|
784
|
+
let writer = undefined;
|
|
785
|
+
while (reader.pos < end) {
|
|
786
|
+
const tag = reader.uint32();
|
|
787
|
+
switch (tag >>> 3) {
|
|
788
|
+
case 1: {
|
|
789
|
+
if (tag !== 10)
|
|
790
|
+
break;
|
|
791
|
+
message.metadata = ResourceMetadata.decode(reader, reader.uint32());
|
|
792
|
+
continue;
|
|
793
|
+
}
|
|
794
|
+
case 2: {
|
|
795
|
+
if (tag !== 18)
|
|
796
|
+
break;
|
|
797
|
+
message.spec = CapacityAllowanceSpec.decode(reader, reader.uint32());
|
|
798
|
+
continue;
|
|
799
|
+
}
|
|
800
|
+
default:
|
|
801
|
+
break;
|
|
802
|
+
}
|
|
803
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
804
|
+
break;
|
|
805
|
+
}
|
|
806
|
+
{
|
|
807
|
+
if (!writer)
|
|
808
|
+
writer = new BinaryWriter();
|
|
809
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
810
|
+
writer.uint32(tag).raw(skipped);
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
if (writer) {
|
|
814
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
815
|
+
}
|
|
816
|
+
return message;
|
|
817
|
+
},
|
|
818
|
+
fromJSON(object) {
|
|
819
|
+
return applyUpdateCapacityAllowanceRequestCustom({
|
|
820
|
+
$type: "nebius.capacity.v1.UpdateCapacityAllowanceRequest",
|
|
821
|
+
metadata: isSet(object.metadata ?? object.metadata)
|
|
822
|
+
? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
|
|
823
|
+
: undefined,
|
|
824
|
+
spec: isSet(object.spec ?? object.spec)
|
|
825
|
+
? CapacityAllowanceSpec.fromJSON(object.spec ?? object.spec)
|
|
826
|
+
: undefined,
|
|
827
|
+
});
|
|
828
|
+
},
|
|
829
|
+
toJSON(message, use = "json") {
|
|
830
|
+
const obj = {};
|
|
831
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
832
|
+
if (message.metadata !== undefined) {
|
|
833
|
+
obj[pick("metadata", "metadata")] = message.metadata
|
|
834
|
+
? ResourceMetadata.toJSON(message.metadata, use)
|
|
835
|
+
: undefined;
|
|
836
|
+
}
|
|
837
|
+
if (message.spec !== undefined) {
|
|
838
|
+
obj[pick("spec", "spec")] = message.spec
|
|
839
|
+
? CapacityAllowanceSpec.toJSON(message.spec, use)
|
|
840
|
+
: undefined;
|
|
841
|
+
}
|
|
842
|
+
return obj;
|
|
843
|
+
},
|
|
844
|
+
create(base) {
|
|
845
|
+
return UpdateCapacityAllowanceRequest.fromPartial(base ?? {});
|
|
846
|
+
},
|
|
847
|
+
fromPartial(object) {
|
|
848
|
+
const message = createBaseUpdateCapacityAllowanceRequest();
|
|
849
|
+
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
850
|
+
? ResourceMetadata.fromPartial(object.metadata)
|
|
851
|
+
: undefined;
|
|
852
|
+
message.spec = (object.spec !== undefined && object.spec !== null)
|
|
853
|
+
? CapacityAllowanceSpec.fromPartial(object.spec)
|
|
854
|
+
: undefined;
|
|
855
|
+
return message;
|
|
856
|
+
},
|
|
857
|
+
};
|
|
858
|
+
protoRegistry.registerMessage(UpdateCapacityAllowanceRequest);
|
|
859
|
+
function UpdateCapacityAllowanceRequestCustomInspect() {
|
|
860
|
+
const parts = [];
|
|
861
|
+
if (this.metadata !== undefined)
|
|
862
|
+
parts.push("metadata" + "=" + inspect(this.metadata));
|
|
863
|
+
if (this.spec !== undefined)
|
|
864
|
+
parts.push("spec" + "=" + inspect(this.spec));
|
|
865
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
866
|
+
}
|
|
867
|
+
function UpdateCapacityAllowanceRequestCustomJson() {
|
|
868
|
+
const obj = {
|
|
869
|
+
type: this.$type,
|
|
870
|
+
};
|
|
871
|
+
if (this.metadata !== undefined)
|
|
872
|
+
obj.metadata = inspectJson(this.metadata);
|
|
873
|
+
if (this.spec !== undefined)
|
|
874
|
+
obj.spec = inspectJson(this.spec);
|
|
875
|
+
return obj;
|
|
876
|
+
}
|
|
877
|
+
function applyUpdateCapacityAllowanceRequestCustom(message) {
|
|
878
|
+
message[custom] = UpdateCapacityAllowanceRequestCustomInspect;
|
|
879
|
+
message[customJson] = UpdateCapacityAllowanceRequestCustomJson;
|
|
880
|
+
return message;
|
|
881
|
+
}
|
|
882
|
+
function createBaseUpdateCapacityAllowanceRequest() {
|
|
883
|
+
const message = {
|
|
884
|
+
$type: "nebius.capacity.v1.UpdateCapacityAllowanceRequest",
|
|
885
|
+
metadata: undefined,
|
|
886
|
+
spec: undefined,
|
|
887
|
+
};
|
|
888
|
+
return applyUpdateCapacityAllowanceRequestCustom(message);
|
|
889
|
+
}
|
|
890
|
+
export const DeleteCapacityAllowanceRequest = {
|
|
891
|
+
$type: "nebius.capacity.v1.DeleteCapacityAllowanceRequest",
|
|
892
|
+
encode(message, writer = new BinaryWriter()) {
|
|
893
|
+
if (message.id !== "") {
|
|
894
|
+
writer.uint32(10).string(message.id);
|
|
895
|
+
}
|
|
896
|
+
if (message[unknownFieldsSymbol]) {
|
|
897
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
898
|
+
}
|
|
899
|
+
return writer;
|
|
900
|
+
},
|
|
901
|
+
decode(input, length) {
|
|
902
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
903
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
904
|
+
const message = createBaseDeleteCapacityAllowanceRequest();
|
|
905
|
+
let writer = undefined;
|
|
906
|
+
while (reader.pos < end) {
|
|
907
|
+
const tag = reader.uint32();
|
|
908
|
+
switch (tag >>> 3) {
|
|
909
|
+
case 1: {
|
|
910
|
+
if (tag !== 10)
|
|
911
|
+
break;
|
|
912
|
+
message.id = reader.string();
|
|
913
|
+
continue;
|
|
914
|
+
}
|
|
915
|
+
default:
|
|
916
|
+
break;
|
|
917
|
+
}
|
|
918
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
919
|
+
break;
|
|
920
|
+
}
|
|
921
|
+
{
|
|
922
|
+
if (!writer)
|
|
923
|
+
writer = new BinaryWriter();
|
|
924
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
925
|
+
writer.uint32(tag).raw(skipped);
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
if (writer) {
|
|
929
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
930
|
+
}
|
|
931
|
+
return message;
|
|
932
|
+
},
|
|
933
|
+
fromJSON(object) {
|
|
934
|
+
return applyDeleteCapacityAllowanceRequestCustom({
|
|
935
|
+
$type: "nebius.capacity.v1.DeleteCapacityAllowanceRequest",
|
|
936
|
+
id: isSet(object.id ?? object.id)
|
|
937
|
+
? String(object.id ?? object.id)
|
|
938
|
+
: "",
|
|
939
|
+
});
|
|
940
|
+
},
|
|
941
|
+
toJSON(message, use = "json") {
|
|
942
|
+
const obj = {};
|
|
943
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
944
|
+
if (message.id !== "") {
|
|
945
|
+
obj[pick("id", "id")] = message.id;
|
|
946
|
+
}
|
|
947
|
+
return obj;
|
|
948
|
+
},
|
|
949
|
+
create(base) {
|
|
950
|
+
return DeleteCapacityAllowanceRequest.fromPartial(base ?? {});
|
|
951
|
+
},
|
|
952
|
+
fromPartial(object) {
|
|
953
|
+
const message = createBaseDeleteCapacityAllowanceRequest();
|
|
954
|
+
message.id = (object.id !== undefined && object.id !== null)
|
|
955
|
+
? object.id
|
|
956
|
+
: "";
|
|
957
|
+
return message;
|
|
958
|
+
},
|
|
959
|
+
};
|
|
960
|
+
protoRegistry.registerMessage(DeleteCapacityAllowanceRequest);
|
|
961
|
+
function DeleteCapacityAllowanceRequestCustomInspect() {
|
|
962
|
+
const parts = [];
|
|
963
|
+
if (this.id !== "")
|
|
964
|
+
parts.push("id" + "=" + inspect(this.id));
|
|
965
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
966
|
+
}
|
|
967
|
+
function DeleteCapacityAllowanceRequestCustomJson() {
|
|
968
|
+
const obj = {
|
|
969
|
+
type: this.$type,
|
|
970
|
+
};
|
|
971
|
+
if (this.id !== "")
|
|
972
|
+
obj.id = inspectJson(this.id);
|
|
973
|
+
return obj;
|
|
974
|
+
}
|
|
975
|
+
function applyDeleteCapacityAllowanceRequestCustom(message) {
|
|
976
|
+
message[custom] = DeleteCapacityAllowanceRequestCustomInspect;
|
|
977
|
+
message[customJson] = DeleteCapacityAllowanceRequestCustomJson;
|
|
978
|
+
return message;
|
|
979
|
+
}
|
|
980
|
+
function createBaseDeleteCapacityAllowanceRequest() {
|
|
981
|
+
const message = {
|
|
982
|
+
$type: "nebius.capacity.v1.DeleteCapacityAllowanceRequest",
|
|
983
|
+
id: "",
|
|
984
|
+
};
|
|
985
|
+
return applyDeleteCapacityAllowanceRequestCustom(message);
|
|
986
|
+
}
|
|
987
|
+
export const CapacityAllowanceServiceServiceDescription = {
|
|
988
|
+
list: {
|
|
989
|
+
path: "/nebius.capacity.v1.CapacityAllowanceService/List",
|
|
990
|
+
requestStream: false,
|
|
991
|
+
responseStream: false,
|
|
992
|
+
requestSerialize: (value) => Buffer.from(ListCapacityAllowancesRequest.encode(value).finish()),
|
|
993
|
+
sendResetMask: false,
|
|
994
|
+
requestDeserialize: (value) => ListCapacityAllowancesRequest.decode(value),
|
|
995
|
+
responseSerialize: (value) => Buffer.from(ListCapacityAllowancesResponse.encode(value).finish()),
|
|
996
|
+
responseDeserialize: (value) => ListCapacityAllowancesResponse.decode(value),
|
|
997
|
+
},
|
|
998
|
+
listByCapacityBlockGroup: {
|
|
999
|
+
path: "/nebius.capacity.v1.CapacityAllowanceService/ListByCapacityBlockGroup",
|
|
1000
|
+
requestStream: false,
|
|
1001
|
+
responseStream: false,
|
|
1002
|
+
requestSerialize: (value) => Buffer.from(ListCapacityAllowancesByCapacityBlockGroupRequest.encode(value).finish()),
|
|
1003
|
+
sendResetMask: false,
|
|
1004
|
+
requestDeserialize: (value) => ListCapacityAllowancesByCapacityBlockGroupRequest.decode(value),
|
|
1005
|
+
responseSerialize: (value) => Buffer.from(ListCapacityAllowancesResponse.encode(value).finish()),
|
|
1006
|
+
responseDeserialize: (value) => ListCapacityAllowancesResponse.decode(value),
|
|
1007
|
+
},
|
|
1008
|
+
get: {
|
|
1009
|
+
path: "/nebius.capacity.v1.CapacityAllowanceService/Get",
|
|
1010
|
+
requestStream: false,
|
|
1011
|
+
responseStream: false,
|
|
1012
|
+
requestSerialize: (value) => Buffer.from(GetCapacityAllowanceRequest.encode(value).finish()),
|
|
1013
|
+
sendResetMask: false,
|
|
1014
|
+
requestDeserialize: (value) => GetCapacityAllowanceRequest.decode(value),
|
|
1015
|
+
responseSerialize: (value) => Buffer.from(CapacityAllowance.encode(value).finish()),
|
|
1016
|
+
responseDeserialize: (value) => CapacityAllowance.decode(value),
|
|
1017
|
+
},
|
|
1018
|
+
getByParentAndCapacityBlockGroup: {
|
|
1019
|
+
path: "/nebius.capacity.v1.CapacityAllowanceService/GetByParentAndCapacityBlockGroup",
|
|
1020
|
+
requestStream: false,
|
|
1021
|
+
responseStream: false,
|
|
1022
|
+
requestSerialize: (value) => Buffer.from(GetCapacityAllowanceByParentAndCapacityBlockGroupRequest.encode(value).finish()),
|
|
1023
|
+
sendResetMask: false,
|
|
1024
|
+
requestDeserialize: (value) => GetCapacityAllowanceByParentAndCapacityBlockGroupRequest.decode(value),
|
|
1025
|
+
responseSerialize: (value) => Buffer.from(CapacityAllowance.encode(value).finish()),
|
|
1026
|
+
responseDeserialize: (value) => CapacityAllowance.decode(value),
|
|
1027
|
+
},
|
|
1028
|
+
create: {
|
|
1029
|
+
path: "/nebius.capacity.v1.CapacityAllowanceService/Create",
|
|
1030
|
+
requestStream: false,
|
|
1031
|
+
responseStream: false,
|
|
1032
|
+
requestSerialize: (value) => Buffer.from(CreateCapacityAllowanceRequest.encode(value).finish()),
|
|
1033
|
+
sendResetMask: false,
|
|
1034
|
+
requestDeserialize: (value) => CreateCapacityAllowanceRequest.decode(value),
|
|
1035
|
+
responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
|
|
1036
|
+
responseDeserialize: (value) => Operation.decode(value),
|
|
1037
|
+
},
|
|
1038
|
+
update: {
|
|
1039
|
+
path: "/nebius.capacity.v1.CapacityAllowanceService/Update",
|
|
1040
|
+
requestStream: false,
|
|
1041
|
+
responseStream: false,
|
|
1042
|
+
requestSerialize: (value) => Buffer.from(UpdateCapacityAllowanceRequest.encode(value).finish()),
|
|
1043
|
+
sendResetMask: true,
|
|
1044
|
+
requestDeserialize: (value) => UpdateCapacityAllowanceRequest.decode(value),
|
|
1045
|
+
responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
|
|
1046
|
+
responseDeserialize: (value) => Operation.decode(value),
|
|
1047
|
+
},
|
|
1048
|
+
delete: {
|
|
1049
|
+
path: "/nebius.capacity.v1.CapacityAllowanceService/Delete",
|
|
1050
|
+
requestStream: false,
|
|
1051
|
+
responseStream: false,
|
|
1052
|
+
requestSerialize: (value) => Buffer.from(DeleteCapacityAllowanceRequest.encode(value).finish()),
|
|
1053
|
+
sendResetMask: false,
|
|
1054
|
+
requestDeserialize: (value) => DeleteCapacityAllowanceRequest.decode(value),
|
|
1055
|
+
responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
|
|
1056
|
+
responseDeserialize: (value) => Operation.decode(value),
|
|
1057
|
+
},
|
|
1058
|
+
};
|
|
1059
|
+
export const CapacityAllowanceServiceBaseClient = makeGenericClientConstructor(CapacityAllowanceServiceServiceDescription, "nebius.capacity.v1.CapacityAllowanceService");
|
|
1060
|
+
export class CapacityAllowanceService {
|
|
1061
|
+
sdk;
|
|
1062
|
+
$type = "nebius.capacity.v1.CapacityAllowanceService";
|
|
1063
|
+
addr;
|
|
1064
|
+
spec;
|
|
1065
|
+
apiServiceName = "capacity-blocks.billing-cpl";
|
|
1066
|
+
constructor(sdk) {
|
|
1067
|
+
this.sdk = sdk;
|
|
1068
|
+
const addr = sdk.getAddressFromServiceName(this.$type, this.apiServiceName);
|
|
1069
|
+
this.addr = addr;
|
|
1070
|
+
this.spec = CapacityAllowanceServiceServiceDescription;
|
|
1071
|
+
}
|
|
1072
|
+
getOperationService() {
|
|
1073
|
+
return new OperationService(this.sdk, this.addr);
|
|
1074
|
+
}
|
|
1075
|
+
list(...args) {
|
|
1076
|
+
const spec = this.spec.list;
|
|
1077
|
+
const request = args[0];
|
|
1078
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
1079
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
1080
|
+
const deserialize = spec.responseDeserialize;
|
|
1081
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
1082
|
+
}
|
|
1083
|
+
listByCapacityBlockGroup(...args) {
|
|
1084
|
+
const spec = this.spec.listByCapacityBlockGroup;
|
|
1085
|
+
const request = args[0];
|
|
1086
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
1087
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
1088
|
+
const deserialize = spec.responseDeserialize;
|
|
1089
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
1090
|
+
}
|
|
1091
|
+
get(...args) {
|
|
1092
|
+
const spec = this.spec.get;
|
|
1093
|
+
const request = args[0];
|
|
1094
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
1095
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
1096
|
+
const deserialize = spec.responseDeserialize;
|
|
1097
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
1098
|
+
}
|
|
1099
|
+
getByParentAndCapacityBlockGroup(...args) {
|
|
1100
|
+
const spec = this.spec.getByParentAndCapacityBlockGroup;
|
|
1101
|
+
const request = args[0];
|
|
1102
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
1103
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
1104
|
+
const deserialize = spec.responseDeserialize;
|
|
1105
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
1106
|
+
}
|
|
1107
|
+
create(...args) {
|
|
1108
|
+
const spec = this.spec.create;
|
|
1109
|
+
const request = args[0];
|
|
1110
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
1111
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
1112
|
+
const deserialize = (value) => {
|
|
1113
|
+
const resp = spec.responseDeserialize(value);
|
|
1114
|
+
return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
|
|
1115
|
+
};
|
|
1116
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
1117
|
+
}
|
|
1118
|
+
update(...args) {
|
|
1119
|
+
const spec = this.spec.update;
|
|
1120
|
+
const request = args[0];
|
|
1121
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
1122
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
1123
|
+
const deserialize = (value) => {
|
|
1124
|
+
const resp = spec.responseDeserialize(value);
|
|
1125
|
+
return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
|
|
1126
|
+
};
|
|
1127
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
1128
|
+
}
|
|
1129
|
+
delete(...args) {
|
|
1130
|
+
const spec = this.spec.delete;
|
|
1131
|
+
const request = args[0];
|
|
1132
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
1133
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
1134
|
+
const deserialize = (value) => {
|
|
1135
|
+
const resp = spec.responseDeserialize(value);
|
|
1136
|
+
return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
|
|
1137
|
+
};
|
|
1138
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
const CapacityAllowanceStatus_State_VALUE_COMMENTS = {
|
|
1142
|
+
STATE_PROVISIONING: " Capacity Allowance is being allocated; the process can take up to several minutes.\n",
|
|
1143
|
+
STATE_ACTIVE: " Capacity Allowance is allocated and can be used.\n",
|
|
1144
|
+
STATE_CONTAINER_DELETED: " The container of the Capacity Allowance is deleted. Capacity Allowance cannot be changed.\n",
|
|
1145
|
+
};
|
|
1146
|
+
export const CapacityAllowanceStatus_State = createEnum("nebius.capacity.v1.CapacityAllowanceStatus.State", {
|
|
1147
|
+
STATE_UNSPECIFIED: 0,
|
|
1148
|
+
/**
|
|
1149
|
+
* Capacity Allowance is being allocated; the process can take up to several minutes.
|
|
1150
|
+
*
|
|
1151
|
+
*/
|
|
1152
|
+
STATE_PROVISIONING: 1,
|
|
1153
|
+
/**
|
|
1154
|
+
* Capacity Allowance is allocated and can be used.
|
|
1155
|
+
*
|
|
1156
|
+
*/
|
|
1157
|
+
STATE_ACTIVE: 2,
|
|
1158
|
+
/**
|
|
1159
|
+
* The container of the Capacity Allowance is deleted. Capacity Allowance cannot be changed.
|
|
1160
|
+
*
|
|
1161
|
+
*/
|
|
1162
|
+
STATE_CONTAINER_DELETED: 100,
|
|
1163
|
+
}, CapacityAllowanceStatus_State_VALUE_COMMENTS);
|
|
1164
|
+
protoRegistry.registerEnum(CapacityAllowanceStatus_State);
|
|
1165
|
+
const CapacityAllowanceStatus_UsageState_VALUE_COMMENTS = {
|
|
1166
|
+
USAGE_STATE_USED: " Capacity allowance is actively in use.\n",
|
|
1167
|
+
USAGE_STATE_NOT_USED: " Capacity allowance is not currently in use.\n",
|
|
1168
|
+
USAGE_STATE_UNKNOWN: " Capacity allowance region is unreachable, the current usage is therefore unknown.\n Please, retry the request later.\n",
|
|
1169
|
+
};
|
|
1170
|
+
export const CapacityAllowanceStatus_UsageState = createEnum("nebius.capacity.v1.CapacityAllowanceStatus.UsageState", {
|
|
1171
|
+
USAGE_STATE_UNSPECIFIED: 0,
|
|
1172
|
+
/**
|
|
1173
|
+
* Capacity allowance is actively in use.
|
|
1174
|
+
*
|
|
1175
|
+
*/
|
|
1176
|
+
USAGE_STATE_USED: 1,
|
|
1177
|
+
/**
|
|
1178
|
+
* Capacity allowance is not currently in use.
|
|
1179
|
+
*
|
|
1180
|
+
*/
|
|
1181
|
+
USAGE_STATE_NOT_USED: 2,
|
|
1182
|
+
/**
|
|
1183
|
+
* Capacity allowance region is unreachable, the current usage is therefore unknown.
|
|
1184
|
+
* Please, retry the request later.
|
|
1185
|
+
*
|
|
1186
|
+
*/
|
|
1187
|
+
USAGE_STATE_UNKNOWN: 3,
|
|
1188
|
+
}, CapacityAllowanceStatus_UsageState_VALUE_COMMENTS);
|
|
1189
|
+
protoRegistry.registerEnum(CapacityAllowanceStatus_UsageState);
|
|
1190
|
+
export const CapacityAllowance = {
|
|
1191
|
+
$type: "nebius.capacity.v1.CapacityAllowance",
|
|
1192
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1193
|
+
if (message.metadata !== undefined) {
|
|
1194
|
+
const w = writer.uint32(10).fork();
|
|
1195
|
+
ResourceMetadata.encode(message.metadata, w);
|
|
1196
|
+
w.join();
|
|
1197
|
+
}
|
|
1198
|
+
if (message.spec !== undefined) {
|
|
1199
|
+
const w = writer.uint32(18).fork();
|
|
1200
|
+
CapacityAllowanceSpec.encode(message.spec, w);
|
|
1201
|
+
w.join();
|
|
1202
|
+
}
|
|
1203
|
+
if (message.status !== undefined) {
|
|
1204
|
+
const w = writer.uint32(26).fork();
|
|
1205
|
+
CapacityAllowanceStatus.encode(message.status, w);
|
|
1206
|
+
w.join();
|
|
1207
|
+
}
|
|
1208
|
+
if (message[unknownFieldsSymbol]) {
|
|
1209
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
1210
|
+
}
|
|
1211
|
+
return writer;
|
|
1212
|
+
},
|
|
1213
|
+
decode(input, length) {
|
|
1214
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1215
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1216
|
+
const message = createBaseCapacityAllowance();
|
|
1217
|
+
let writer = undefined;
|
|
1218
|
+
while (reader.pos < end) {
|
|
1219
|
+
const tag = reader.uint32();
|
|
1220
|
+
switch (tag >>> 3) {
|
|
1221
|
+
case 1: {
|
|
1222
|
+
if (tag !== 10)
|
|
1223
|
+
break;
|
|
1224
|
+
message.metadata = ResourceMetadata.decode(reader, reader.uint32());
|
|
1225
|
+
continue;
|
|
1226
|
+
}
|
|
1227
|
+
case 2: {
|
|
1228
|
+
if (tag !== 18)
|
|
1229
|
+
break;
|
|
1230
|
+
message.spec = CapacityAllowanceSpec.decode(reader, reader.uint32());
|
|
1231
|
+
continue;
|
|
1232
|
+
}
|
|
1233
|
+
case 3: {
|
|
1234
|
+
if (tag !== 26)
|
|
1235
|
+
break;
|
|
1236
|
+
message.status = CapacityAllowanceStatus.decode(reader, reader.uint32());
|
|
1237
|
+
continue;
|
|
1238
|
+
}
|
|
1239
|
+
default:
|
|
1240
|
+
break;
|
|
1241
|
+
}
|
|
1242
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1243
|
+
break;
|
|
1244
|
+
}
|
|
1245
|
+
{
|
|
1246
|
+
if (!writer)
|
|
1247
|
+
writer = new BinaryWriter();
|
|
1248
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
1249
|
+
writer.uint32(tag).raw(skipped);
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
if (writer) {
|
|
1253
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
1254
|
+
}
|
|
1255
|
+
return message;
|
|
1256
|
+
},
|
|
1257
|
+
fromJSON(object) {
|
|
1258
|
+
return applyCapacityAllowanceCustom({
|
|
1259
|
+
$type: "nebius.capacity.v1.CapacityAllowance",
|
|
1260
|
+
metadata: isSet(object.metadata ?? object.metadata)
|
|
1261
|
+
? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
|
|
1262
|
+
: undefined,
|
|
1263
|
+
spec: isSet(object.spec ?? object.spec)
|
|
1264
|
+
? CapacityAllowanceSpec.fromJSON(object.spec ?? object.spec)
|
|
1265
|
+
: undefined,
|
|
1266
|
+
status: isSet(object.status ?? object.status)
|
|
1267
|
+
? CapacityAllowanceStatus.fromJSON(object.status ?? object.status)
|
|
1268
|
+
: undefined,
|
|
1269
|
+
});
|
|
1270
|
+
},
|
|
1271
|
+
toJSON(message, use = "json") {
|
|
1272
|
+
const obj = {};
|
|
1273
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
1274
|
+
if (message.metadata !== undefined) {
|
|
1275
|
+
obj[pick("metadata", "metadata")] = message.metadata
|
|
1276
|
+
? ResourceMetadata.toJSON(message.metadata, use)
|
|
1277
|
+
: undefined;
|
|
1278
|
+
}
|
|
1279
|
+
if (message.spec !== undefined) {
|
|
1280
|
+
obj[pick("spec", "spec")] = message.spec
|
|
1281
|
+
? CapacityAllowanceSpec.toJSON(message.spec, use)
|
|
1282
|
+
: undefined;
|
|
1283
|
+
}
|
|
1284
|
+
if (message.status !== undefined) {
|
|
1285
|
+
obj[pick("status", "status")] = message.status
|
|
1286
|
+
? CapacityAllowanceStatus.toJSON(message.status, use)
|
|
1287
|
+
: undefined;
|
|
1288
|
+
}
|
|
1289
|
+
return obj;
|
|
1290
|
+
},
|
|
1291
|
+
create(base) {
|
|
1292
|
+
return CapacityAllowance.fromPartial(base ?? {});
|
|
1293
|
+
},
|
|
1294
|
+
fromPartial(object) {
|
|
1295
|
+
const message = createBaseCapacityAllowance();
|
|
1296
|
+
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
1297
|
+
? ResourceMetadata.fromPartial(object.metadata)
|
|
1298
|
+
: undefined;
|
|
1299
|
+
message.spec = (object.spec !== undefined && object.spec !== null)
|
|
1300
|
+
? CapacityAllowanceSpec.fromPartial(object.spec)
|
|
1301
|
+
: undefined;
|
|
1302
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
1303
|
+
? CapacityAllowanceStatus.fromPartial(object.status)
|
|
1304
|
+
: undefined;
|
|
1305
|
+
return message;
|
|
1306
|
+
},
|
|
1307
|
+
};
|
|
1308
|
+
protoRegistry.registerMessage(CapacityAllowance);
|
|
1309
|
+
function CapacityAllowanceCustomInspect() {
|
|
1310
|
+
const parts = [];
|
|
1311
|
+
if (this.metadata !== undefined)
|
|
1312
|
+
parts.push("metadata" + "=" + inspect(this.metadata));
|
|
1313
|
+
if (this.spec !== undefined)
|
|
1314
|
+
parts.push("spec" + "=" + inspect(this.spec));
|
|
1315
|
+
if (this.status !== undefined)
|
|
1316
|
+
parts.push("status" + "=" + inspect(this.status));
|
|
1317
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
1318
|
+
}
|
|
1319
|
+
function CapacityAllowanceCustomJson() {
|
|
1320
|
+
const obj = {
|
|
1321
|
+
type: this.$type,
|
|
1322
|
+
};
|
|
1323
|
+
if (this.metadata !== undefined)
|
|
1324
|
+
obj.metadata = inspectJson(this.metadata);
|
|
1325
|
+
if (this.spec !== undefined)
|
|
1326
|
+
obj.spec = inspectJson(this.spec);
|
|
1327
|
+
if (this.status !== undefined)
|
|
1328
|
+
obj.status = inspectJson(this.status);
|
|
1329
|
+
return obj;
|
|
1330
|
+
}
|
|
1331
|
+
function applyCapacityAllowanceCustom(message) {
|
|
1332
|
+
message[custom] = CapacityAllowanceCustomInspect;
|
|
1333
|
+
message[customJson] = CapacityAllowanceCustomJson;
|
|
1334
|
+
return message;
|
|
1335
|
+
}
|
|
1336
|
+
function createBaseCapacityAllowance() {
|
|
1337
|
+
const message = {
|
|
1338
|
+
$type: "nebius.capacity.v1.CapacityAllowance",
|
|
1339
|
+
metadata: undefined,
|
|
1340
|
+
spec: undefined,
|
|
1341
|
+
status: undefined,
|
|
1342
|
+
};
|
|
1343
|
+
return applyCapacityAllowanceCustom(message);
|
|
1344
|
+
}
|
|
1345
|
+
export const CapacityAllowanceSpec = {
|
|
1346
|
+
$type: "nebius.capacity.v1.CapacityAllowanceSpec",
|
|
1347
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1348
|
+
if (message.capacityBlockGroupId !== "") {
|
|
1349
|
+
writer.uint32(10).string(message.capacityBlockGroupId);
|
|
1350
|
+
}
|
|
1351
|
+
if (message.limit !== undefined) {
|
|
1352
|
+
writer.uint32(16).uint64(message.limit.toString());
|
|
1353
|
+
}
|
|
1354
|
+
if (message[unknownFieldsSymbol]) {
|
|
1355
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
1356
|
+
}
|
|
1357
|
+
return writer;
|
|
1358
|
+
},
|
|
1359
|
+
decode(input, length) {
|
|
1360
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1361
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1362
|
+
const message = createBaseCapacityAllowanceSpec();
|
|
1363
|
+
let writer = undefined;
|
|
1364
|
+
while (reader.pos < end) {
|
|
1365
|
+
const tag = reader.uint32();
|
|
1366
|
+
switch (tag >>> 3) {
|
|
1367
|
+
case 1: {
|
|
1368
|
+
if (tag !== 10)
|
|
1369
|
+
break;
|
|
1370
|
+
message.capacityBlockGroupId = reader.string();
|
|
1371
|
+
continue;
|
|
1372
|
+
}
|
|
1373
|
+
case 2: {
|
|
1374
|
+
if (tag !== 16)
|
|
1375
|
+
break;
|
|
1376
|
+
message.limit = Long.fromValue(reader.uint64());
|
|
1377
|
+
continue;
|
|
1378
|
+
}
|
|
1379
|
+
default:
|
|
1380
|
+
break;
|
|
1381
|
+
}
|
|
1382
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1383
|
+
break;
|
|
1384
|
+
}
|
|
1385
|
+
{
|
|
1386
|
+
if (!writer)
|
|
1387
|
+
writer = new BinaryWriter();
|
|
1388
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
1389
|
+
writer.uint32(tag).raw(skipped);
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
if (writer) {
|
|
1393
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
1394
|
+
}
|
|
1395
|
+
return message;
|
|
1396
|
+
},
|
|
1397
|
+
fromJSON(object) {
|
|
1398
|
+
return applyCapacityAllowanceSpecCustom({
|
|
1399
|
+
$type: "nebius.capacity.v1.CapacityAllowanceSpec",
|
|
1400
|
+
capacityBlockGroupId: isSet(object.capacityBlockGroupId ?? object.capacity_block_group_id)
|
|
1401
|
+
? String(object.capacityBlockGroupId ?? object.capacity_block_group_id)
|
|
1402
|
+
: "",
|
|
1403
|
+
limit: isSet(object.limit ?? object.limit)
|
|
1404
|
+
? Long.fromValue(object.limit ?? object.limit)
|
|
1405
|
+
: undefined,
|
|
1406
|
+
});
|
|
1407
|
+
},
|
|
1408
|
+
toJSON(message, use = "json") {
|
|
1409
|
+
const obj = {};
|
|
1410
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
1411
|
+
if (message.capacityBlockGroupId !== "") {
|
|
1412
|
+
obj[pick("capacityBlockGroupId", "capacity_block_group_id")] = message.capacityBlockGroupId;
|
|
1413
|
+
}
|
|
1414
|
+
if (message.limit !== undefined) {
|
|
1415
|
+
obj[pick("limit", "limit")] = (message.limit || Long.ZERO).toString();
|
|
1416
|
+
}
|
|
1417
|
+
return obj;
|
|
1418
|
+
},
|
|
1419
|
+
create(base) {
|
|
1420
|
+
return CapacityAllowanceSpec.fromPartial(base ?? {});
|
|
1421
|
+
},
|
|
1422
|
+
fromPartial(object) {
|
|
1423
|
+
const message = createBaseCapacityAllowanceSpec();
|
|
1424
|
+
message.capacityBlockGroupId = (object.capacityBlockGroupId !== undefined && object.capacityBlockGroupId !== null)
|
|
1425
|
+
? object.capacityBlockGroupId
|
|
1426
|
+
: "";
|
|
1427
|
+
message.limit = (object.limit !== undefined && object.limit !== null)
|
|
1428
|
+
? Long.fromValue(object.limit)
|
|
1429
|
+
: undefined;
|
|
1430
|
+
return message;
|
|
1431
|
+
},
|
|
1432
|
+
};
|
|
1433
|
+
protoRegistry.registerMessage(CapacityAllowanceSpec);
|
|
1434
|
+
function CapacityAllowanceSpecCustomInspect() {
|
|
1435
|
+
const parts = [];
|
|
1436
|
+
if (this.capacityBlockGroupId !== "")
|
|
1437
|
+
parts.push("capacityBlockGroupId" + "=" + inspect(this.capacityBlockGroupId));
|
|
1438
|
+
if (this.limit !== undefined)
|
|
1439
|
+
parts.push("limit" + "=" + inspect(this.limit));
|
|
1440
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
1441
|
+
}
|
|
1442
|
+
function CapacityAllowanceSpecCustomJson() {
|
|
1443
|
+
const obj = {
|
|
1444
|
+
type: this.$type,
|
|
1445
|
+
};
|
|
1446
|
+
if (this.capacityBlockGroupId !== "")
|
|
1447
|
+
obj.capacityBlockGroupId = inspectJson(this.capacityBlockGroupId);
|
|
1448
|
+
if (this.limit !== undefined)
|
|
1449
|
+
obj.limit = inspectJson(this.limit);
|
|
1450
|
+
return obj;
|
|
1451
|
+
}
|
|
1452
|
+
function applyCapacityAllowanceSpecCustom(message) {
|
|
1453
|
+
message[custom] = CapacityAllowanceSpecCustomInspect;
|
|
1454
|
+
message[customJson] = CapacityAllowanceSpecCustomJson;
|
|
1455
|
+
return message;
|
|
1456
|
+
}
|
|
1457
|
+
function createBaseCapacityAllowanceSpec() {
|
|
1458
|
+
const message = {
|
|
1459
|
+
$type: "nebius.capacity.v1.CapacityAllowanceSpec",
|
|
1460
|
+
capacityBlockGroupId: "",
|
|
1461
|
+
limit: undefined,
|
|
1462
|
+
};
|
|
1463
|
+
return applyCapacityAllowanceSpecCustom(message);
|
|
1464
|
+
}
|
|
1465
|
+
export const CapacityAllowanceStatus = {
|
|
1466
|
+
$type: "nebius.capacity.v1.CapacityAllowanceStatus",
|
|
1467
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1468
|
+
if ((message.state ?? CapacityAllowanceStatus_State.STATE_UNSPECIFIED) !== CapacityAllowanceStatus_State.STATE_UNSPECIFIED) {
|
|
1469
|
+
CapacityAllowanceStatus_State.encodeField(writer, 1, message.state);
|
|
1470
|
+
}
|
|
1471
|
+
if (message.usage !== undefined && !message.usage.isZero?.()) {
|
|
1472
|
+
writer.uint32(16).uint64(message.usage.toString());
|
|
1473
|
+
}
|
|
1474
|
+
if (message.usagePercentage !== "") {
|
|
1475
|
+
writer.uint32(26).string(message.usagePercentage);
|
|
1476
|
+
}
|
|
1477
|
+
if ((message.usageState ?? CapacityAllowanceStatus_UsageState.USAGE_STATE_UNSPECIFIED) !== CapacityAllowanceStatus_UsageState.USAGE_STATE_UNSPECIFIED) {
|
|
1478
|
+
CapacityAllowanceStatus_UsageState.encodeField(writer, 4, message.usageState);
|
|
1479
|
+
}
|
|
1480
|
+
if (message.unit !== "") {
|
|
1481
|
+
writer.uint32(42).string(message.unit);
|
|
1482
|
+
}
|
|
1483
|
+
if (message.reconciling === true) {
|
|
1484
|
+
writer.uint32(800).bool(message.reconciling);
|
|
1485
|
+
}
|
|
1486
|
+
if (message[unknownFieldsSymbol]) {
|
|
1487
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
1488
|
+
}
|
|
1489
|
+
return writer;
|
|
1490
|
+
},
|
|
1491
|
+
decode(input, length) {
|
|
1492
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1493
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1494
|
+
const message = createBaseCapacityAllowanceStatus();
|
|
1495
|
+
let writer = undefined;
|
|
1496
|
+
while (reader.pos < end) {
|
|
1497
|
+
const tag = reader.uint32();
|
|
1498
|
+
switch (tag >>> 3) {
|
|
1499
|
+
case 1: {
|
|
1500
|
+
if (tag !== 8)
|
|
1501
|
+
break;
|
|
1502
|
+
message.state = CapacityAllowanceStatus_State.fromNumber(reader.int32());
|
|
1503
|
+
continue;
|
|
1504
|
+
}
|
|
1505
|
+
case 2: {
|
|
1506
|
+
if (tag !== 16)
|
|
1507
|
+
break;
|
|
1508
|
+
message.usage = Long.fromValue(reader.uint64());
|
|
1509
|
+
continue;
|
|
1510
|
+
}
|
|
1511
|
+
case 3: {
|
|
1512
|
+
if (tag !== 26)
|
|
1513
|
+
break;
|
|
1514
|
+
message.usagePercentage = reader.string();
|
|
1515
|
+
continue;
|
|
1516
|
+
}
|
|
1517
|
+
case 4: {
|
|
1518
|
+
if (tag !== 32)
|
|
1519
|
+
break;
|
|
1520
|
+
message.usageState = CapacityAllowanceStatus_UsageState.fromNumber(reader.int32());
|
|
1521
|
+
continue;
|
|
1522
|
+
}
|
|
1523
|
+
case 5: {
|
|
1524
|
+
if (tag !== 42)
|
|
1525
|
+
break;
|
|
1526
|
+
message.unit = reader.string();
|
|
1527
|
+
continue;
|
|
1528
|
+
}
|
|
1529
|
+
case 100: {
|
|
1530
|
+
if (tag !== 800)
|
|
1531
|
+
break;
|
|
1532
|
+
message.reconciling = reader.bool();
|
|
1533
|
+
continue;
|
|
1534
|
+
}
|
|
1535
|
+
default:
|
|
1536
|
+
break;
|
|
1537
|
+
}
|
|
1538
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1539
|
+
break;
|
|
1540
|
+
}
|
|
1541
|
+
{
|
|
1542
|
+
if (!writer)
|
|
1543
|
+
writer = new BinaryWriter();
|
|
1544
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
1545
|
+
writer.uint32(tag).raw(skipped);
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
if (writer) {
|
|
1549
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
1550
|
+
}
|
|
1551
|
+
return message;
|
|
1552
|
+
},
|
|
1553
|
+
fromJSON(object) {
|
|
1554
|
+
return applyCapacityAllowanceStatusCustom({
|
|
1555
|
+
$type: "nebius.capacity.v1.CapacityAllowanceStatus",
|
|
1556
|
+
state: isSet(object.state ?? object.state)
|
|
1557
|
+
? CapacityAllowanceStatus_State.fromJSON(object.state ?? object.state)
|
|
1558
|
+
: CapacityAllowanceStatus_State.STATE_UNSPECIFIED,
|
|
1559
|
+
usage: isSet(object.usage ?? object.usage)
|
|
1560
|
+
? Long.fromValue(object.usage ?? object.usage)
|
|
1561
|
+
: Long.ZERO,
|
|
1562
|
+
usagePercentage: isSet(object.usagePercentage ?? object.usage_percentage)
|
|
1563
|
+
? String(object.usagePercentage ?? object.usage_percentage)
|
|
1564
|
+
: "",
|
|
1565
|
+
usageState: isSet(object.usageState ?? object.usage_state)
|
|
1566
|
+
? CapacityAllowanceStatus_UsageState.fromJSON(object.usageState ?? object.usage_state)
|
|
1567
|
+
: CapacityAllowanceStatus_UsageState.USAGE_STATE_UNSPECIFIED,
|
|
1568
|
+
unit: isSet(object.unit ?? object.unit)
|
|
1569
|
+
? String(object.unit ?? object.unit)
|
|
1570
|
+
: "",
|
|
1571
|
+
reconciling: isSet(object.reconciling ?? object.reconciling)
|
|
1572
|
+
? Boolean(object.reconciling ?? object.reconciling)
|
|
1573
|
+
: false,
|
|
1574
|
+
});
|
|
1575
|
+
},
|
|
1576
|
+
toJSON(message, use = "json") {
|
|
1577
|
+
const obj = {};
|
|
1578
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
1579
|
+
if ((message.state ?? CapacityAllowanceStatus_State.STATE_UNSPECIFIED) !== CapacityAllowanceStatus_State.STATE_UNSPECIFIED) {
|
|
1580
|
+
obj[pick("state", "state")] = CapacityAllowanceStatus_State.toJSON(message.state);
|
|
1581
|
+
}
|
|
1582
|
+
if (!message.usage?.isZero?.()) {
|
|
1583
|
+
obj[pick("usage", "usage")] = (message.usage || Long.ZERO).toString();
|
|
1584
|
+
}
|
|
1585
|
+
if (message.usagePercentage !== "") {
|
|
1586
|
+
obj[pick("usagePercentage", "usage_percentage")] = message.usagePercentage;
|
|
1587
|
+
}
|
|
1588
|
+
if ((message.usageState ?? CapacityAllowanceStatus_UsageState.USAGE_STATE_UNSPECIFIED) !== CapacityAllowanceStatus_UsageState.USAGE_STATE_UNSPECIFIED) {
|
|
1589
|
+
obj[pick("usageState", "usage_state")] = CapacityAllowanceStatus_UsageState.toJSON(message.usageState);
|
|
1590
|
+
}
|
|
1591
|
+
if (message.unit !== "") {
|
|
1592
|
+
obj[pick("unit", "unit")] = message.unit;
|
|
1593
|
+
}
|
|
1594
|
+
if (message.reconciling === true) {
|
|
1595
|
+
obj[pick("reconciling", "reconciling")] = message.reconciling;
|
|
1596
|
+
}
|
|
1597
|
+
return obj;
|
|
1598
|
+
},
|
|
1599
|
+
create(base) {
|
|
1600
|
+
return CapacityAllowanceStatus.fromPartial(base ?? {});
|
|
1601
|
+
},
|
|
1602
|
+
fromPartial(object) {
|
|
1603
|
+
const message = createBaseCapacityAllowanceStatus();
|
|
1604
|
+
message.state = (object.state !== undefined && object.state !== null)
|
|
1605
|
+
? CapacityAllowanceStatus_State.fromJSON(object.state.name)
|
|
1606
|
+
: CapacityAllowanceStatus_State.STATE_UNSPECIFIED;
|
|
1607
|
+
message.usage = (object.usage !== undefined && object.usage !== null)
|
|
1608
|
+
? Long.fromValue(object.usage)
|
|
1609
|
+
: Long.ZERO;
|
|
1610
|
+
message.usagePercentage = (object.usagePercentage !== undefined && object.usagePercentage !== null)
|
|
1611
|
+
? object.usagePercentage
|
|
1612
|
+
: "";
|
|
1613
|
+
message.usageState = (object.usageState !== undefined && object.usageState !== null)
|
|
1614
|
+
? CapacityAllowanceStatus_UsageState.fromJSON(object.usageState.name)
|
|
1615
|
+
: CapacityAllowanceStatus_UsageState.USAGE_STATE_UNSPECIFIED;
|
|
1616
|
+
message.unit = (object.unit !== undefined && object.unit !== null)
|
|
1617
|
+
? object.unit
|
|
1618
|
+
: "";
|
|
1619
|
+
message.reconciling = (object.reconciling !== undefined && object.reconciling !== null)
|
|
1620
|
+
? object.reconciling
|
|
1621
|
+
: false;
|
|
1622
|
+
return message;
|
|
1623
|
+
},
|
|
1624
|
+
};
|
|
1625
|
+
protoRegistry.registerMessage(CapacityAllowanceStatus);
|
|
1626
|
+
function CapacityAllowanceStatusCustomInspect() {
|
|
1627
|
+
const parts = [];
|
|
1628
|
+
if (this.state !== undefined)
|
|
1629
|
+
parts.push("state" + "=" + inspect(this.state));
|
|
1630
|
+
if (!this.usage?.isZero?.())
|
|
1631
|
+
parts.push("usage" + "=" + inspect(this.usage));
|
|
1632
|
+
if (this.usagePercentage !== "")
|
|
1633
|
+
parts.push("usagePercentage" + "=" + inspect(this.usagePercentage));
|
|
1634
|
+
if (this.usageState !== undefined)
|
|
1635
|
+
parts.push("usageState" + "=" + inspect(this.usageState));
|
|
1636
|
+
if (this.unit !== "")
|
|
1637
|
+
parts.push("unit" + "=" + inspect(this.unit));
|
|
1638
|
+
if (this.reconciling === true)
|
|
1639
|
+
parts.push("reconciling" + "=" + inspect(this.reconciling));
|
|
1640
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
1641
|
+
}
|
|
1642
|
+
function CapacityAllowanceStatusCustomJson() {
|
|
1643
|
+
const obj = {
|
|
1644
|
+
type: this.$type,
|
|
1645
|
+
};
|
|
1646
|
+
if (this.state !== undefined)
|
|
1647
|
+
obj.state = inspectJson(this.state);
|
|
1648
|
+
if (!this.usage?.isZero?.())
|
|
1649
|
+
obj.usage = inspectJson(this.usage);
|
|
1650
|
+
if (this.usagePercentage !== "")
|
|
1651
|
+
obj.usagePercentage = inspectJson(this.usagePercentage);
|
|
1652
|
+
if (this.usageState !== undefined)
|
|
1653
|
+
obj.usageState = inspectJson(this.usageState);
|
|
1654
|
+
if (this.unit !== "")
|
|
1655
|
+
obj.unit = inspectJson(this.unit);
|
|
1656
|
+
if (this.reconciling === true)
|
|
1657
|
+
obj.reconciling = inspectJson(this.reconciling);
|
|
1658
|
+
return obj;
|
|
1659
|
+
}
|
|
1660
|
+
function applyCapacityAllowanceStatusCustom(message) {
|
|
1661
|
+
message[custom] = CapacityAllowanceStatusCustomInspect;
|
|
1662
|
+
message[customJson] = CapacityAllowanceStatusCustomJson;
|
|
1663
|
+
return message;
|
|
1664
|
+
}
|
|
1665
|
+
function createBaseCapacityAllowanceStatus() {
|
|
1666
|
+
const message = {
|
|
1667
|
+
$type: "nebius.capacity.v1.CapacityAllowanceStatus",
|
|
1668
|
+
state: CapacityAllowanceStatus_State.STATE_UNSPECIFIED,
|
|
1669
|
+
usage: Long.ZERO,
|
|
1670
|
+
usagePercentage: "",
|
|
1671
|
+
usageState: CapacityAllowanceStatus_UsageState.USAGE_STATE_UNSPECIFIED,
|
|
1672
|
+
unit: "",
|
|
1673
|
+
reconciling: false,
|
|
1674
|
+
};
|
|
1675
|
+
return applyCapacityAllowanceStatusCustom(message);
|
|
1676
|
+
}
|
|
10
1677
|
export const GetCapacityBlockGroupRequest = {
|
|
11
1678
|
$type: "nebius.capacity.v1.GetCapacityBlockGroupRequest",
|
|
12
1679
|
encode(message, writer = new BinaryWriter()) {
|