@nebius/js-sdk 0.2.62 → 0.2.63

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 (43) hide show
  1. package/dist/cjs/api/nebius/ai/v1/index.d.ts +1353 -1
  2. package/dist/cjs/api/nebius/ai/v1/index.d.ts.map +1 -1
  3. package/dist/cjs/api/nebius/ai/v1/index.js +4151 -2
  4. package/dist/cjs/api/nebius/ai/v1/index.js.map +1 -1
  5. package/dist/cjs/api/nebius/applications/v1alpha1/index.d.ts +1639 -0
  6. package/dist/cjs/api/nebius/applications/v1alpha1/index.d.ts.map +1 -1
  7. package/dist/cjs/api/nebius/applications/v1alpha1/index.js +7660 -1
  8. package/dist/cjs/api/nebius/applications/v1alpha1/index.js.map +1 -1
  9. package/dist/cjs/api/nebius/compute/v1/index.d.ts +4 -1
  10. package/dist/cjs/api/nebius/compute/v1/index.d.ts.map +1 -1
  11. package/dist/cjs/api/nebius/compute/v1/index.js.map +1 -1
  12. package/dist/cjs/api/nebius/mk8s/v1/index.d.ts +31 -0
  13. package/dist/cjs/api/nebius/mk8s/v1/index.d.ts.map +1 -1
  14. package/dist/cjs/api/nebius/mk8s/v1/index.js +195 -1
  15. package/dist/cjs/api/nebius/mk8s/v1/index.js.map +1 -1
  16. package/dist/cjs/api/nebius/msp/mlflow/v1alpha1/index.d.ts +128 -0
  17. package/dist/cjs/api/nebius/msp/mlflow/v1alpha1/index.d.ts.map +1 -1
  18. package/dist/cjs/api/nebius/msp/mlflow/v1alpha1/index.js +261 -1
  19. package/dist/cjs/api/nebius/msp/mlflow/v1alpha1/index.js.map +1 -1
  20. package/dist/cjs/version.d.ts +1 -1
  21. package/dist/cjs/version.js +1 -1
  22. package/dist/esm/api/nebius/ai/v1/index.d.ts +1353 -1
  23. package/dist/esm/api/nebius/ai/v1/index.d.ts.map +1 -1
  24. package/dist/esm/api/nebius/ai/v1/index.js +4149 -1
  25. package/dist/esm/api/nebius/ai/v1/index.js.map +1 -1
  26. package/dist/esm/api/nebius/applications/v1alpha1/index.d.ts +1639 -0
  27. package/dist/esm/api/nebius/applications/v1alpha1/index.d.ts.map +1 -1
  28. package/dist/esm/api/nebius/applications/v1alpha1/index.js +7658 -1
  29. package/dist/esm/api/nebius/applications/v1alpha1/index.js.map +1 -1
  30. package/dist/esm/api/nebius/compute/v1/index.d.ts +4 -1
  31. package/dist/esm/api/nebius/compute/v1/index.d.ts.map +1 -1
  32. package/dist/esm/api/nebius/compute/v1/index.js.map +1 -1
  33. package/dist/esm/api/nebius/mk8s/v1/index.d.ts +31 -0
  34. package/dist/esm/api/nebius/mk8s/v1/index.d.ts.map +1 -1
  35. package/dist/esm/api/nebius/mk8s/v1/index.js +194 -0
  36. package/dist/esm/api/nebius/mk8s/v1/index.js.map +1 -1
  37. package/dist/esm/api/nebius/msp/mlflow/v1alpha1/index.d.ts +128 -0
  38. package/dist/esm/api/nebius/msp/mlflow/v1alpha1/index.d.ts.map +1 -1
  39. package/dist/esm/api/nebius/msp/mlflow/v1alpha1/index.js +260 -0
  40. package/dist/esm/api/nebius/msp/mlflow/v1alpha1/index.js.map +1 -1
  41. package/dist/esm/version.d.ts +1 -1
  42. package/dist/esm/version.js +1 -1
  43. package/package.json +1 -1
@@ -6,9 +6,4157 @@ import { custom, customJson, inspectJson } from "../../../../runtime/util/loggin
6
6
  import { makeGenericClientConstructor } from "@grpc/grpc-js";
7
7
  import { Request as SDKRequestClass } from "../../../../runtime/request.js";
8
8
  import { Operation as OperationWrapper } from "../../../../runtime/operation.js";
9
- import { Operation, OperationService, ResourceMetadata, ServiceError } from "../../common/v1/index.js";
9
+ import { GetByNameRequest, Operation, OperationService, ResourceMetadata, ServiceError } from "../../common/v1/index.js";
10
10
  import { DiskSpec_DiskType, InstanceStatus_InstanceState } from "../../compute/v1/index.js";
11
11
  const __deprecatedWarned = new Set();
12
+ const GetDevlabRequest_View_VALUE_COMMENTS = {
13
+ VIEW_UNSPECIFIED: " Masks environment-variable values and omits injected-file content.\n",
14
+ SECRET: " Includes unmasked environment-variable values and injected-file content.\n Requires the resource.devlab.getSensitiveData permission.\n",
15
+ };
16
+ /** Converts and creates {@link GetDevlabRequest_View} values. */
17
+ export const GetDevlabRequest_View = createEnum("nebius.ai.v1.GetDevlabRequest.View", {
18
+ /**
19
+ * Masks environment-variable values and omits injected-file content.
20
+ *
21
+ */
22
+ VIEW_UNSPECIFIED: 0,
23
+ /**
24
+ * Includes unmasked environment-variable values and injected-file content.
25
+ * Requires the resource.devlab.getSensitiveData permission.
26
+ *
27
+ */
28
+ SECRET: 1,
29
+ }, GetDevlabRequest_View_VALUE_COMMENTS);
30
+ protoRegistry.registerEnum(GetDevlabRequest_View);
31
+ const GetDevlabRequest_MESSAGE_DESCRIPTOR = {
32
+ fields: {
33
+ "id": { pbName: "id", scalarType: 9 },
34
+ "view": { pbName: "view", scalarType: 14 },
35
+ },
36
+ };
37
+ /** Encodes, decodes, converts, and creates {@link GetDevlabRequest} messages. */
38
+ export const GetDevlabRequest = {
39
+ $type: "nebius.ai.v1.GetDevlabRequest",
40
+ $descriptor: GetDevlabRequest_MESSAGE_DESCRIPTOR,
41
+ encode(message, writer = new BinaryWriter()) {
42
+ if (message.id !== "") {
43
+ writer.uint32(10).string(message.id);
44
+ }
45
+ if ((message.view ?? GetDevlabRequest_View.VIEW_UNSPECIFIED) !== GetDevlabRequest_View.VIEW_UNSPECIFIED) {
46
+ GetDevlabRequest_View.encodeField(writer, 101, message.view);
47
+ }
48
+ if (message[unknownFieldsSymbol]) {
49
+ writer.raw(message[unknownFieldsSymbol]);
50
+ }
51
+ return writer;
52
+ },
53
+ decode(input, length) {
54
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
55
+ const end = length === undefined ? reader.len : reader.pos + length;
56
+ const message = createBaseGetDevlabRequest();
57
+ let writer = undefined;
58
+ while (reader.pos < end) {
59
+ const tag = reader.uint32();
60
+ switch (tag >>> 3) {
61
+ case 1: {
62
+ if (tag !== 10)
63
+ break;
64
+ message.id = reader.string();
65
+ continue;
66
+ }
67
+ case 101: {
68
+ if (tag !== 808)
69
+ break;
70
+ message.view = GetDevlabRequest_View.fromNumber(reader.int32());
71
+ continue;
72
+ }
73
+ default:
74
+ break;
75
+ }
76
+ if ((tag & 7) === 4 || tag === 0) {
77
+ break;
78
+ }
79
+ {
80
+ if (!writer)
81
+ writer = new BinaryWriter();
82
+ const skipped = reader.skip(tag & 7, tag >>> 3);
83
+ writer.uint32(tag).raw(skipped);
84
+ }
85
+ }
86
+ if (writer) {
87
+ message[unknownFieldsSymbol] = writer.finish();
88
+ }
89
+ return message;
90
+ },
91
+ fromJSON(object) {
92
+ return applyGetDevlabRequestCustom({
93
+ $type: "nebius.ai.v1.GetDevlabRequest",
94
+ id: isSet(object.id ?? object.id)
95
+ ? String(object.id ?? object.id)
96
+ : "",
97
+ view: isSet(object.view ?? object.view)
98
+ ? GetDevlabRequest_View.fromJSON(object.view ?? object.view)
99
+ : GetDevlabRequest_View.VIEW_UNSPECIFIED,
100
+ });
101
+ },
102
+ toJSON(message, use = "json") {
103
+ const obj = {};
104
+ const pick = (json, pb) => (use === "json" ? json : pb);
105
+ if (message.id !== "") {
106
+ obj[pick("id", "id")] = message.id;
107
+ }
108
+ if ((message.view ?? GetDevlabRequest_View.VIEW_UNSPECIFIED) !== GetDevlabRequest_View.VIEW_UNSPECIFIED) {
109
+ obj[pick("view", "view")] = GetDevlabRequest_View.toJSON(message.view);
110
+ }
111
+ return obj;
112
+ },
113
+ create(base) {
114
+ return GetDevlabRequest.fromPartial(base ?? {});
115
+ },
116
+ fromPartial(object) {
117
+ const message = createBaseGetDevlabRequest();
118
+ message.id = (object.id !== undefined && object.id !== null)
119
+ ? object.id
120
+ : "";
121
+ message.view = (object.view !== undefined && object.view !== null)
122
+ ? GetDevlabRequest_View.fromJSON(object.view.name)
123
+ : GetDevlabRequest_View.VIEW_UNSPECIFIED;
124
+ return message;
125
+ },
126
+ };
127
+ protoRegistry.registerMessage(GetDevlabRequest);
128
+ function GetDevlabRequestCustomInspect() {
129
+ const parts = [];
130
+ if (this.id !== "")
131
+ parts.push("id" + "=" + inspect(this.id));
132
+ if (this.view !== undefined)
133
+ parts.push("view" + "=" + inspect(this.view));
134
+ return `${this.$type}(${parts.join(", ")})`;
135
+ }
136
+ function GetDevlabRequestCustomJson() {
137
+ const obj = {
138
+ type: this.$type,
139
+ };
140
+ if (this.id !== "")
141
+ obj.id = inspectJson(this.id);
142
+ if (this.view !== undefined)
143
+ obj.view = inspectJson(this.view);
144
+ return obj;
145
+ }
146
+ function applyGetDevlabRequestCustom(message) {
147
+ message[custom] = GetDevlabRequestCustomInspect;
148
+ message[customJson] = GetDevlabRequestCustomJson;
149
+ return attachMessageDescriptor(message, GetDevlabRequest.$descriptor);
150
+ }
151
+ function createBaseGetDevlabRequest() {
152
+ const message = {
153
+ $type: "nebius.ai.v1.GetDevlabRequest",
154
+ id: "",
155
+ view: GetDevlabRequest_View.VIEW_UNSPECIFIED,
156
+ };
157
+ return applyGetDevlabRequestCustom(message);
158
+ }
159
+ const ListDevlabsRequest_MESSAGE_DESCRIPTOR = {
160
+ fields: {
161
+ "parentId": { pbName: "parent_id", scalarType: 9 },
162
+ "pageSize": { pbName: "page_size", scalarType: 3 },
163
+ "pageToken": { pbName: "page_token", scalarType: 9 },
164
+ },
165
+ };
166
+ /** Encodes, decodes, converts, and creates {@link ListDevlabsRequest} messages. */
167
+ export const ListDevlabsRequest = {
168
+ $type: "nebius.ai.v1.ListDevlabsRequest",
169
+ $descriptor: ListDevlabsRequest_MESSAGE_DESCRIPTOR,
170
+ encode(message, writer = new BinaryWriter()) {
171
+ if (message.parentId !== "") {
172
+ writer.uint32(10).string(message.parentId);
173
+ }
174
+ if (message.pageSize !== undefined && !message.pageSize.isZero?.()) {
175
+ writer.uint32(16).int64(message.pageSize.toString());
176
+ }
177
+ if (message.pageToken !== "") {
178
+ writer.uint32(26).string(message.pageToken);
179
+ }
180
+ if (message[unknownFieldsSymbol]) {
181
+ writer.raw(message[unknownFieldsSymbol]);
182
+ }
183
+ return writer;
184
+ },
185
+ decode(input, length) {
186
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
187
+ const end = length === undefined ? reader.len : reader.pos + length;
188
+ const message = createBaseListDevlabsRequest();
189
+ let writer = undefined;
190
+ while (reader.pos < end) {
191
+ const tag = reader.uint32();
192
+ switch (tag >>> 3) {
193
+ case 1: {
194
+ if (tag !== 10)
195
+ break;
196
+ message.parentId = reader.string();
197
+ continue;
198
+ }
199
+ case 2: {
200
+ if (tag !== 16)
201
+ break;
202
+ message.pageSize = Long.fromValue(reader.int64());
203
+ continue;
204
+ }
205
+ case 3: {
206
+ if (tag !== 26)
207
+ break;
208
+ message.pageToken = reader.string();
209
+ continue;
210
+ }
211
+ default:
212
+ break;
213
+ }
214
+ if ((tag & 7) === 4 || tag === 0) {
215
+ break;
216
+ }
217
+ {
218
+ if (!writer)
219
+ writer = new BinaryWriter();
220
+ const skipped = reader.skip(tag & 7, tag >>> 3);
221
+ writer.uint32(tag).raw(skipped);
222
+ }
223
+ }
224
+ if (writer) {
225
+ message[unknownFieldsSymbol] = writer.finish();
226
+ }
227
+ return message;
228
+ },
229
+ fromJSON(object) {
230
+ return applyListDevlabsRequestCustom({
231
+ $type: "nebius.ai.v1.ListDevlabsRequest",
232
+ parentId: isSet(object.parentId ?? object.parent_id)
233
+ ? String(object.parentId ?? object.parent_id)
234
+ : "",
235
+ pageSize: isSet(object.pageSize ?? object.page_size)
236
+ ? Long.fromValue(object.pageSize ?? object.page_size)
237
+ : Long.ZERO,
238
+ pageToken: isSet(object.pageToken ?? object.page_token)
239
+ ? String(object.pageToken ?? object.page_token)
240
+ : "",
241
+ });
242
+ },
243
+ toJSON(message, use = "json") {
244
+ const obj = {};
245
+ const pick = (json, pb) => (use === "json" ? json : pb);
246
+ if (message.parentId !== "") {
247
+ obj[pick("parentId", "parent_id")] = message.parentId;
248
+ }
249
+ if (!message.pageSize?.isZero?.()) {
250
+ obj[pick("pageSize", "page_size")] = (message.pageSize || Long.ZERO).toString();
251
+ }
252
+ if (message.pageToken !== "") {
253
+ obj[pick("pageToken", "page_token")] = message.pageToken;
254
+ }
255
+ return obj;
256
+ },
257
+ create(base) {
258
+ return ListDevlabsRequest.fromPartial(base ?? {});
259
+ },
260
+ fromPartial(object) {
261
+ const message = createBaseListDevlabsRequest();
262
+ message.parentId = (object.parentId !== undefined && object.parentId !== null)
263
+ ? object.parentId
264
+ : "";
265
+ message.pageSize = (object.pageSize !== undefined && object.pageSize !== null)
266
+ ? Long.fromValue(object.pageSize)
267
+ : Long.ZERO;
268
+ message.pageToken = (object.pageToken !== undefined && object.pageToken !== null)
269
+ ? object.pageToken
270
+ : "";
271
+ return message;
272
+ },
273
+ };
274
+ protoRegistry.registerMessage(ListDevlabsRequest);
275
+ function ListDevlabsRequestCustomInspect() {
276
+ const parts = [];
277
+ if (this.parentId !== "")
278
+ parts.push("parentId" + "=" + inspect(this.parentId));
279
+ if (!this.pageSize?.isZero?.())
280
+ parts.push("pageSize" + "=" + inspect(this.pageSize));
281
+ if (this.pageToken !== "")
282
+ parts.push("pageToken" + "=" + inspect(this.pageToken));
283
+ return `${this.$type}(${parts.join(", ")})`;
284
+ }
285
+ function ListDevlabsRequestCustomJson() {
286
+ const obj = {
287
+ type: this.$type,
288
+ };
289
+ if (this.parentId !== "")
290
+ obj.parentId = inspectJson(this.parentId);
291
+ if (!this.pageSize?.isZero?.())
292
+ obj.pageSize = inspectJson(this.pageSize);
293
+ if (this.pageToken !== "")
294
+ obj.pageToken = inspectJson(this.pageToken);
295
+ return obj;
296
+ }
297
+ function applyListDevlabsRequestCustom(message) {
298
+ message[custom] = ListDevlabsRequestCustomInspect;
299
+ message[customJson] = ListDevlabsRequestCustomJson;
300
+ return attachMessageDescriptor(message, ListDevlabsRequest.$descriptor);
301
+ }
302
+ function createBaseListDevlabsRequest() {
303
+ const message = {
304
+ $type: "nebius.ai.v1.ListDevlabsRequest",
305
+ parentId: "",
306
+ pageSize: Long.ZERO,
307
+ pageToken: "",
308
+ };
309
+ return applyListDevlabsRequestCustom(message);
310
+ }
311
+ const CreateDevlabRequest_MESSAGE_DESCRIPTOR = {
312
+ fields: {
313
+ "metadata": { pbName: "metadata", message: () => ResourceMetadata.$descriptor },
314
+ "spec": { pbName: "spec", message: () => DevlabSpec.$descriptor },
315
+ "dryRun": { pbName: "dry_run", scalarType: 8 },
316
+ },
317
+ };
318
+ /** Encodes, decodes, converts, and creates {@link CreateDevlabRequest} messages. */
319
+ export const CreateDevlabRequest = {
320
+ $type: "nebius.ai.v1.CreateDevlabRequest",
321
+ $descriptor: CreateDevlabRequest_MESSAGE_DESCRIPTOR,
322
+ encode(message, writer = new BinaryWriter()) {
323
+ if (message.metadata !== undefined) {
324
+ const w = writer.uint32(10).fork();
325
+ ResourceMetadata.encode(message.metadata, w);
326
+ w.join();
327
+ }
328
+ if (message.spec !== undefined) {
329
+ const w = writer.uint32(18).fork();
330
+ DevlabSpec.encode(message.spec, w);
331
+ w.join();
332
+ }
333
+ if (message.dryRun === true) {
334
+ writer.uint32(24).bool(message.dryRun);
335
+ }
336
+ if (message[unknownFieldsSymbol]) {
337
+ writer.raw(message[unknownFieldsSymbol]);
338
+ }
339
+ return writer;
340
+ },
341
+ decode(input, length) {
342
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
343
+ const end = length === undefined ? reader.len : reader.pos + length;
344
+ const message = createBaseCreateDevlabRequest();
345
+ let writer = undefined;
346
+ while (reader.pos < end) {
347
+ const tag = reader.uint32();
348
+ switch (tag >>> 3) {
349
+ case 1: {
350
+ if (tag !== 10)
351
+ break;
352
+ message.metadata = ResourceMetadata.decode(reader, reader.uint32());
353
+ continue;
354
+ }
355
+ case 2: {
356
+ if (tag !== 18)
357
+ break;
358
+ message.spec = DevlabSpec.decode(reader, reader.uint32());
359
+ continue;
360
+ }
361
+ case 3: {
362
+ if (tag !== 24)
363
+ break;
364
+ message.dryRun = reader.bool();
365
+ continue;
366
+ }
367
+ default:
368
+ break;
369
+ }
370
+ if ((tag & 7) === 4 || tag === 0) {
371
+ break;
372
+ }
373
+ {
374
+ if (!writer)
375
+ writer = new BinaryWriter();
376
+ const skipped = reader.skip(tag & 7, tag >>> 3);
377
+ writer.uint32(tag).raw(skipped);
378
+ }
379
+ }
380
+ if (writer) {
381
+ message[unknownFieldsSymbol] = writer.finish();
382
+ }
383
+ return message;
384
+ },
385
+ fromJSON(object) {
386
+ return applyCreateDevlabRequestCustom({
387
+ $type: "nebius.ai.v1.CreateDevlabRequest",
388
+ metadata: isSet(object.metadata ?? object.metadata)
389
+ ? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
390
+ : undefined,
391
+ spec: isSet(object.spec ?? object.spec)
392
+ ? DevlabSpec.fromJSON(object.spec ?? object.spec)
393
+ : undefined,
394
+ dryRun: isSet(object.dryRun ?? object.dry_run)
395
+ ? Boolean(object.dryRun ?? object.dry_run)
396
+ : false,
397
+ });
398
+ },
399
+ toJSON(message, use = "json") {
400
+ const obj = {};
401
+ const pick = (json, pb) => (use === "json" ? json : pb);
402
+ if (message.metadata !== undefined) {
403
+ obj[pick("metadata", "metadata")] = message.metadata
404
+ ? ResourceMetadata.toJSON(message.metadata, use)
405
+ : undefined;
406
+ }
407
+ if (message.spec !== undefined) {
408
+ obj[pick("spec", "spec")] = message.spec
409
+ ? DevlabSpec.toJSON(message.spec, use)
410
+ : undefined;
411
+ }
412
+ if (message.dryRun === true) {
413
+ obj[pick("dryRun", "dry_run")] = message.dryRun;
414
+ }
415
+ return obj;
416
+ },
417
+ create(base) {
418
+ return CreateDevlabRequest.fromPartial(base ?? {});
419
+ },
420
+ fromPartial(object) {
421
+ const message = createBaseCreateDevlabRequest();
422
+ message.metadata = (object.metadata !== undefined && object.metadata !== null)
423
+ ? ResourceMetadata.fromPartial(object.metadata)
424
+ : undefined;
425
+ message.spec = (object.spec !== undefined && object.spec !== null)
426
+ ? DevlabSpec.fromPartial(object.spec)
427
+ : undefined;
428
+ message.dryRun = (object.dryRun !== undefined && object.dryRun !== null)
429
+ ? object.dryRun
430
+ : false;
431
+ return message;
432
+ },
433
+ };
434
+ protoRegistry.registerMessage(CreateDevlabRequest);
435
+ function CreateDevlabRequestCustomInspect() {
436
+ const parts = [];
437
+ if (this.metadata !== undefined)
438
+ parts.push("metadata" + "=" + inspect(this.metadata));
439
+ if (this.spec !== undefined)
440
+ parts.push("spec" + "=" + inspect(this.spec));
441
+ if (this.dryRun === true)
442
+ parts.push("dryRun" + "=" + inspect(this.dryRun));
443
+ return `${this.$type}(${parts.join(", ")})`;
444
+ }
445
+ function CreateDevlabRequestCustomJson() {
446
+ const obj = {
447
+ type: this.$type,
448
+ };
449
+ if (this.metadata !== undefined)
450
+ obj.metadata = inspectJson(this.metadata);
451
+ if (this.spec !== undefined)
452
+ obj.spec = inspectJson(this.spec);
453
+ if (this.dryRun === true)
454
+ obj.dryRun = inspectJson(this.dryRun);
455
+ return obj;
456
+ }
457
+ function applyCreateDevlabRequestCustom(message) {
458
+ message[custom] = CreateDevlabRequestCustomInspect;
459
+ message[customJson] = CreateDevlabRequestCustomJson;
460
+ return attachMessageDescriptor(message, CreateDevlabRequest.$descriptor);
461
+ }
462
+ function createBaseCreateDevlabRequest() {
463
+ const message = {
464
+ $type: "nebius.ai.v1.CreateDevlabRequest",
465
+ metadata: undefined,
466
+ spec: undefined,
467
+ dryRun: false,
468
+ };
469
+ return applyCreateDevlabRequestCustom(message);
470
+ }
471
+ const DeleteDevlabRequest_MESSAGE_DESCRIPTOR = {
472
+ fields: {
473
+ "id": { pbName: "id", scalarType: 9 },
474
+ },
475
+ };
476
+ /** Encodes, decodes, converts, and creates {@link DeleteDevlabRequest} messages. */
477
+ export const DeleteDevlabRequest = {
478
+ $type: "nebius.ai.v1.DeleteDevlabRequest",
479
+ $descriptor: DeleteDevlabRequest_MESSAGE_DESCRIPTOR,
480
+ encode(message, writer = new BinaryWriter()) {
481
+ if (message.id !== "") {
482
+ writer.uint32(10).string(message.id);
483
+ }
484
+ if (message[unknownFieldsSymbol]) {
485
+ writer.raw(message[unknownFieldsSymbol]);
486
+ }
487
+ return writer;
488
+ },
489
+ decode(input, length) {
490
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
491
+ const end = length === undefined ? reader.len : reader.pos + length;
492
+ const message = createBaseDeleteDevlabRequest();
493
+ let writer = undefined;
494
+ while (reader.pos < end) {
495
+ const tag = reader.uint32();
496
+ switch (tag >>> 3) {
497
+ case 1: {
498
+ if (tag !== 10)
499
+ break;
500
+ message.id = reader.string();
501
+ continue;
502
+ }
503
+ default:
504
+ break;
505
+ }
506
+ if ((tag & 7) === 4 || tag === 0) {
507
+ break;
508
+ }
509
+ {
510
+ if (!writer)
511
+ writer = new BinaryWriter();
512
+ const skipped = reader.skip(tag & 7, tag >>> 3);
513
+ writer.uint32(tag).raw(skipped);
514
+ }
515
+ }
516
+ if (writer) {
517
+ message[unknownFieldsSymbol] = writer.finish();
518
+ }
519
+ return message;
520
+ },
521
+ fromJSON(object) {
522
+ return applyDeleteDevlabRequestCustom({
523
+ $type: "nebius.ai.v1.DeleteDevlabRequest",
524
+ id: isSet(object.id ?? object.id)
525
+ ? String(object.id ?? object.id)
526
+ : "",
527
+ });
528
+ },
529
+ toJSON(message, use = "json") {
530
+ const obj = {};
531
+ const pick = (json, pb) => (use === "json" ? json : pb);
532
+ if (message.id !== "") {
533
+ obj[pick("id", "id")] = message.id;
534
+ }
535
+ return obj;
536
+ },
537
+ create(base) {
538
+ return DeleteDevlabRequest.fromPartial(base ?? {});
539
+ },
540
+ fromPartial(object) {
541
+ const message = createBaseDeleteDevlabRequest();
542
+ message.id = (object.id !== undefined && object.id !== null)
543
+ ? object.id
544
+ : "";
545
+ return message;
546
+ },
547
+ };
548
+ protoRegistry.registerMessage(DeleteDevlabRequest);
549
+ function DeleteDevlabRequestCustomInspect() {
550
+ const parts = [];
551
+ if (this.id !== "")
552
+ parts.push("id" + "=" + inspect(this.id));
553
+ return `${this.$type}(${parts.join(", ")})`;
554
+ }
555
+ function DeleteDevlabRequestCustomJson() {
556
+ const obj = {
557
+ type: this.$type,
558
+ };
559
+ if (this.id !== "")
560
+ obj.id = inspectJson(this.id);
561
+ return obj;
562
+ }
563
+ function applyDeleteDevlabRequestCustom(message) {
564
+ message[custom] = DeleteDevlabRequestCustomInspect;
565
+ message[customJson] = DeleteDevlabRequestCustomJson;
566
+ return attachMessageDescriptor(message, DeleteDevlabRequest.$descriptor);
567
+ }
568
+ function createBaseDeleteDevlabRequest() {
569
+ const message = {
570
+ $type: "nebius.ai.v1.DeleteDevlabRequest",
571
+ id: "",
572
+ };
573
+ return applyDeleteDevlabRequestCustom(message);
574
+ }
575
+ const RestartDevlabRequest_MESSAGE_DESCRIPTOR = {
576
+ fields: {
577
+ "id": { pbName: "id", scalarType: 9 },
578
+ },
579
+ };
580
+ /** Encodes, decodes, converts, and creates {@link RestartDevlabRequest} messages. */
581
+ export const RestartDevlabRequest = {
582
+ $type: "nebius.ai.v1.RestartDevlabRequest",
583
+ $descriptor: RestartDevlabRequest_MESSAGE_DESCRIPTOR,
584
+ encode(message, writer = new BinaryWriter()) {
585
+ if (message.id !== "") {
586
+ writer.uint32(10).string(message.id);
587
+ }
588
+ if (message[unknownFieldsSymbol]) {
589
+ writer.raw(message[unknownFieldsSymbol]);
590
+ }
591
+ return writer;
592
+ },
593
+ decode(input, length) {
594
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
595
+ const end = length === undefined ? reader.len : reader.pos + length;
596
+ const message = createBaseRestartDevlabRequest();
597
+ let writer = undefined;
598
+ while (reader.pos < end) {
599
+ const tag = reader.uint32();
600
+ switch (tag >>> 3) {
601
+ case 1: {
602
+ if (tag !== 10)
603
+ break;
604
+ message.id = reader.string();
605
+ continue;
606
+ }
607
+ default:
608
+ break;
609
+ }
610
+ if ((tag & 7) === 4 || tag === 0) {
611
+ break;
612
+ }
613
+ {
614
+ if (!writer)
615
+ writer = new BinaryWriter();
616
+ const skipped = reader.skip(tag & 7, tag >>> 3);
617
+ writer.uint32(tag).raw(skipped);
618
+ }
619
+ }
620
+ if (writer) {
621
+ message[unknownFieldsSymbol] = writer.finish();
622
+ }
623
+ return message;
624
+ },
625
+ fromJSON(object) {
626
+ return applyRestartDevlabRequestCustom({
627
+ $type: "nebius.ai.v1.RestartDevlabRequest",
628
+ id: isSet(object.id ?? object.id)
629
+ ? String(object.id ?? object.id)
630
+ : "",
631
+ });
632
+ },
633
+ toJSON(message, use = "json") {
634
+ const obj = {};
635
+ const pick = (json, pb) => (use === "json" ? json : pb);
636
+ if (message.id !== "") {
637
+ obj[pick("id", "id")] = message.id;
638
+ }
639
+ return obj;
640
+ },
641
+ create(base) {
642
+ return RestartDevlabRequest.fromPartial(base ?? {});
643
+ },
644
+ fromPartial(object) {
645
+ const message = createBaseRestartDevlabRequest();
646
+ message.id = (object.id !== undefined && object.id !== null)
647
+ ? object.id
648
+ : "";
649
+ return message;
650
+ },
651
+ };
652
+ protoRegistry.registerMessage(RestartDevlabRequest);
653
+ function RestartDevlabRequestCustomInspect() {
654
+ const parts = [];
655
+ if (this.id !== "")
656
+ parts.push("id" + "=" + inspect(this.id));
657
+ return `${this.$type}(${parts.join(", ")})`;
658
+ }
659
+ function RestartDevlabRequestCustomJson() {
660
+ const obj = {
661
+ type: this.$type,
662
+ };
663
+ if (this.id !== "")
664
+ obj.id = inspectJson(this.id);
665
+ return obj;
666
+ }
667
+ function applyRestartDevlabRequestCustom(message) {
668
+ message[custom] = RestartDevlabRequestCustomInspect;
669
+ message[customJson] = RestartDevlabRequestCustomJson;
670
+ return attachMessageDescriptor(message, RestartDevlabRequest.$descriptor);
671
+ }
672
+ function createBaseRestartDevlabRequest() {
673
+ const message = {
674
+ $type: "nebius.ai.v1.RestartDevlabRequest",
675
+ id: "",
676
+ };
677
+ return applyRestartDevlabRequestCustom(message);
678
+ }
679
+ const StopDevlabRequest_MESSAGE_DESCRIPTOR = {
680
+ fields: {
681
+ "id": { pbName: "id", scalarType: 9 },
682
+ },
683
+ };
684
+ /** Encodes, decodes, converts, and creates {@link StopDevlabRequest} messages. */
685
+ export const StopDevlabRequest = {
686
+ $type: "nebius.ai.v1.StopDevlabRequest",
687
+ $descriptor: StopDevlabRequest_MESSAGE_DESCRIPTOR,
688
+ encode(message, writer = new BinaryWriter()) {
689
+ if (message.id !== "") {
690
+ writer.uint32(10).string(message.id);
691
+ }
692
+ if (message[unknownFieldsSymbol]) {
693
+ writer.raw(message[unknownFieldsSymbol]);
694
+ }
695
+ return writer;
696
+ },
697
+ decode(input, length) {
698
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
699
+ const end = length === undefined ? reader.len : reader.pos + length;
700
+ const message = createBaseStopDevlabRequest();
701
+ let writer = undefined;
702
+ while (reader.pos < end) {
703
+ const tag = reader.uint32();
704
+ switch (tag >>> 3) {
705
+ case 1: {
706
+ if (tag !== 10)
707
+ break;
708
+ message.id = reader.string();
709
+ continue;
710
+ }
711
+ default:
712
+ break;
713
+ }
714
+ if ((tag & 7) === 4 || tag === 0) {
715
+ break;
716
+ }
717
+ {
718
+ if (!writer)
719
+ writer = new BinaryWriter();
720
+ const skipped = reader.skip(tag & 7, tag >>> 3);
721
+ writer.uint32(tag).raw(skipped);
722
+ }
723
+ }
724
+ if (writer) {
725
+ message[unknownFieldsSymbol] = writer.finish();
726
+ }
727
+ return message;
728
+ },
729
+ fromJSON(object) {
730
+ return applyStopDevlabRequestCustom({
731
+ $type: "nebius.ai.v1.StopDevlabRequest",
732
+ id: isSet(object.id ?? object.id)
733
+ ? String(object.id ?? object.id)
734
+ : "",
735
+ });
736
+ },
737
+ toJSON(message, use = "json") {
738
+ const obj = {};
739
+ const pick = (json, pb) => (use === "json" ? json : pb);
740
+ if (message.id !== "") {
741
+ obj[pick("id", "id")] = message.id;
742
+ }
743
+ return obj;
744
+ },
745
+ create(base) {
746
+ return StopDevlabRequest.fromPartial(base ?? {});
747
+ },
748
+ fromPartial(object) {
749
+ const message = createBaseStopDevlabRequest();
750
+ message.id = (object.id !== undefined && object.id !== null)
751
+ ? object.id
752
+ : "";
753
+ return message;
754
+ },
755
+ };
756
+ protoRegistry.registerMessage(StopDevlabRequest);
757
+ function StopDevlabRequestCustomInspect() {
758
+ const parts = [];
759
+ if (this.id !== "")
760
+ parts.push("id" + "=" + inspect(this.id));
761
+ return `${this.$type}(${parts.join(", ")})`;
762
+ }
763
+ function StopDevlabRequestCustomJson() {
764
+ const obj = {
765
+ type: this.$type,
766
+ };
767
+ if (this.id !== "")
768
+ obj.id = inspectJson(this.id);
769
+ return obj;
770
+ }
771
+ function applyStopDevlabRequestCustom(message) {
772
+ message[custom] = StopDevlabRequestCustomInspect;
773
+ message[customJson] = StopDevlabRequestCustomJson;
774
+ return attachMessageDescriptor(message, StopDevlabRequest.$descriptor);
775
+ }
776
+ function createBaseStopDevlabRequest() {
777
+ const message = {
778
+ $type: "nebius.ai.v1.StopDevlabRequest",
779
+ id: "",
780
+ };
781
+ return applyStopDevlabRequestCustom(message);
782
+ }
783
+ const ListDevlabsResponse_MESSAGE_DESCRIPTOR = {
784
+ fields: {
785
+ "items": { pbName: "items", repeated: true, message: () => Devlab.$descriptor },
786
+ "nextPageToken": { pbName: "next_page_token", scalarType: 9 },
787
+ },
788
+ };
789
+ /** Encodes, decodes, converts, and creates {@link ListDevlabsResponse} messages. */
790
+ export const ListDevlabsResponse = {
791
+ $type: "nebius.ai.v1.ListDevlabsResponse",
792
+ $descriptor: ListDevlabsResponse_MESSAGE_DESCRIPTOR,
793
+ encode(message, writer = new BinaryWriter()) {
794
+ for (const v of (message.items ?? [])) {
795
+ const w = writer.uint32(10).fork();
796
+ Devlab.encode(v, w);
797
+ w.join();
798
+ }
799
+ if (message.nextPageToken !== "") {
800
+ writer.uint32(18).string(message.nextPageToken);
801
+ }
802
+ if (message[unknownFieldsSymbol]) {
803
+ writer.raw(message[unknownFieldsSymbol]);
804
+ }
805
+ return writer;
806
+ },
807
+ decode(input, length) {
808
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
809
+ const end = length === undefined ? reader.len : reader.pos + length;
810
+ const message = createBaseListDevlabsResponse();
811
+ let writer = undefined;
812
+ while (reader.pos < end) {
813
+ const tag = reader.uint32();
814
+ switch (tag >>> 3) {
815
+ case 1: {
816
+ if (tag !== 10)
817
+ break;
818
+ message.items.push(Devlab.decode(reader, reader.uint32()));
819
+ continue;
820
+ }
821
+ case 2: {
822
+ if (tag !== 18)
823
+ break;
824
+ message.nextPageToken = reader.string();
825
+ continue;
826
+ }
827
+ default:
828
+ break;
829
+ }
830
+ if ((tag & 7) === 4 || tag === 0) {
831
+ break;
832
+ }
833
+ {
834
+ if (!writer)
835
+ writer = new BinaryWriter();
836
+ const skipped = reader.skip(tag & 7, tag >>> 3);
837
+ writer.uint32(tag).raw(skipped);
838
+ }
839
+ }
840
+ if (writer) {
841
+ message[unknownFieldsSymbol] = writer.finish();
842
+ }
843
+ return message;
844
+ },
845
+ fromJSON(object) {
846
+ return applyListDevlabsResponseCustom({
847
+ $type: "nebius.ai.v1.ListDevlabsResponse",
848
+ items: globalThis.Array.isArray(object?.items ?? object?.items)
849
+ ? (object.items ?? object.items).map((e) => Devlab.fromJSON(e))
850
+ : [],
851
+ nextPageToken: isSet(object.nextPageToken ?? object.next_page_token)
852
+ ? String(object.nextPageToken ?? object.next_page_token)
853
+ : "",
854
+ });
855
+ },
856
+ toJSON(message, use = "json") {
857
+ const obj = {};
858
+ const pick = (json, pb) => (use === "json" ? json : pb);
859
+ if (message.items?.length) {
860
+ obj[pick("items", "items")] = message.items.map((e) => e ? Devlab.toJSON(e, use) : undefined);
861
+ }
862
+ if (message.nextPageToken !== "") {
863
+ obj[pick("nextPageToken", "next_page_token")] = message.nextPageToken;
864
+ }
865
+ return obj;
866
+ },
867
+ create(base) {
868
+ return ListDevlabsResponse.fromPartial(base ?? {});
869
+ },
870
+ fromPartial(object) {
871
+ const message = createBaseListDevlabsResponse();
872
+ message.items = object.items?.map((e) => Devlab.fromPartial(e)) || [];
873
+ message.nextPageToken = (object.nextPageToken !== undefined && object.nextPageToken !== null)
874
+ ? object.nextPageToken
875
+ : "";
876
+ return message;
877
+ },
878
+ };
879
+ protoRegistry.registerMessage(ListDevlabsResponse);
880
+ function ListDevlabsResponseCustomInspect() {
881
+ const parts = [];
882
+ if ((this.items?.length ?? 0) !== 0)
883
+ parts.push("items" + "=" + inspect(this.items));
884
+ if (this.nextPageToken !== "")
885
+ parts.push("nextPageToken" + "=" + inspect(this.nextPageToken));
886
+ return `${this.$type}(${parts.join(", ")})`;
887
+ }
888
+ function ListDevlabsResponseCustomJson() {
889
+ const obj = {
890
+ type: this.$type,
891
+ };
892
+ if ((this.items?.length ?? 0) !== 0)
893
+ obj.items = inspectJson(this.items);
894
+ if (this.nextPageToken !== "")
895
+ obj.nextPageToken = inspectJson(this.nextPageToken);
896
+ return obj;
897
+ }
898
+ function applyListDevlabsResponseCustom(message) {
899
+ message[custom] = ListDevlabsResponseCustomInspect;
900
+ message[customJson] = ListDevlabsResponseCustomJson;
901
+ return attachMessageDescriptor(message, ListDevlabsResponse.$descriptor);
902
+ }
903
+ function createBaseListDevlabsResponse() {
904
+ const message = {
905
+ $type: "nebius.ai.v1.ListDevlabsResponse",
906
+ items: [],
907
+ nextPageToken: "",
908
+ };
909
+ return applyListDevlabsResponseCustom(message);
910
+ }
911
+ /**
912
+ * Describes the gRPC methods for the `nebius.ai.v1.DevlabService` service.
913
+ */
914
+ export const DevlabServiceServiceDescription = {
915
+ get: {
916
+ path: "/nebius.ai.v1.DevlabService/Get",
917
+ requestStream: false,
918
+ responseStream: false,
919
+ requestSerialize: (value) => Buffer.from(GetDevlabRequest.encode(value).finish()),
920
+ requestDescriptor: () => GetDevlabRequest.$descriptor,
921
+ sendResetMask: false,
922
+ requestDeserialize: (value) => GetDevlabRequest.decode(value),
923
+ responseSerialize: (value) => Buffer.from(Devlab.encode(value).finish()),
924
+ responseDeserialize: (value) => Devlab.decode(value),
925
+ },
926
+ getByName: {
927
+ path: "/nebius.ai.v1.DevlabService/GetByName",
928
+ requestStream: false,
929
+ responseStream: false,
930
+ requestSerialize: (value) => Buffer.from(GetByNameRequest.encode(value).finish()),
931
+ requestDescriptor: () => GetByNameRequest.$descriptor,
932
+ sendResetMask: false,
933
+ requestDeserialize: (value) => GetByNameRequest.decode(value),
934
+ responseSerialize: (value) => Buffer.from(Devlab.encode(value).finish()),
935
+ responseDeserialize: (value) => Devlab.decode(value),
936
+ },
937
+ list: {
938
+ path: "/nebius.ai.v1.DevlabService/List",
939
+ requestStream: false,
940
+ responseStream: false,
941
+ requestSerialize: (value) => Buffer.from(ListDevlabsRequest.encode(value).finish()),
942
+ requestDescriptor: () => ListDevlabsRequest.$descriptor,
943
+ sendResetMask: false,
944
+ requestDeserialize: (value) => ListDevlabsRequest.decode(value),
945
+ responseSerialize: (value) => Buffer.from(ListDevlabsResponse.encode(value).finish()),
946
+ responseDeserialize: (value) => ListDevlabsResponse.decode(value),
947
+ },
948
+ create: {
949
+ path: "/nebius.ai.v1.DevlabService/Create",
950
+ requestStream: false,
951
+ responseStream: false,
952
+ requestSerialize: (value) => Buffer.from(CreateDevlabRequest.encode(value).finish()),
953
+ requestDescriptor: () => CreateDevlabRequest.$descriptor,
954
+ sendResetMask: false,
955
+ requestDeserialize: (value) => CreateDevlabRequest.decode(value),
956
+ responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
957
+ responseDeserialize: (value) => Operation.decode(value),
958
+ },
959
+ delete: {
960
+ path: "/nebius.ai.v1.DevlabService/Delete",
961
+ requestStream: false,
962
+ responseStream: false,
963
+ requestSerialize: (value) => Buffer.from(DeleteDevlabRequest.encode(value).finish()),
964
+ requestDescriptor: () => DeleteDevlabRequest.$descriptor,
965
+ sendResetMask: false,
966
+ requestDeserialize: (value) => DeleteDevlabRequest.decode(value),
967
+ responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
968
+ responseDeserialize: (value) => Operation.decode(value),
969
+ },
970
+ restart: {
971
+ path: "/nebius.ai.v1.DevlabService/Restart",
972
+ requestStream: false,
973
+ responseStream: false,
974
+ requestSerialize: (value) => Buffer.from(RestartDevlabRequest.encode(value).finish()),
975
+ requestDescriptor: () => RestartDevlabRequest.$descriptor,
976
+ sendResetMask: false,
977
+ requestDeserialize: (value) => RestartDevlabRequest.decode(value),
978
+ responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
979
+ responseDeserialize: (value) => Operation.decode(value),
980
+ },
981
+ stop: {
982
+ path: "/nebius.ai.v1.DevlabService/Stop",
983
+ requestStream: false,
984
+ responseStream: false,
985
+ requestSerialize: (value) => Buffer.from(StopDevlabRequest.encode(value).finish()),
986
+ requestDescriptor: () => StopDevlabRequest.$descriptor,
987
+ sendResetMask: false,
988
+ requestDeserialize: (value) => StopDevlabRequest.decode(value),
989
+ responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
990
+ responseDeserialize: (value) => Operation.decode(value),
991
+ },
992
+ };
993
+ /**
994
+ * Creates low-level gRPC clients for the `nebius.ai.v1.DevlabService` service.
995
+ */
996
+ export const DevlabServiceBaseClient = makeGenericClientConstructor(DevlabServiceServiceDescription, "nebius.ai.v1.DevlabService");
997
+ /**
998
+ * Calls the `nebius.ai.v1.DevlabService` service through the Nebius SDK.
999
+ */
1000
+ export class DevlabService {
1001
+ sdk;
1002
+ $type = "nebius.ai.v1.DevlabService";
1003
+ addr;
1004
+ spec;
1005
+ apiServiceName = "apps.msp";
1006
+ /** Creates a client that uses the SDK service address. */
1007
+ constructor(sdk) {
1008
+ this.sdk = sdk;
1009
+ const addr = sdk.getAddressFromServiceName(this.$type, this.apiServiceName);
1010
+ this.addr = addr;
1011
+ this.spec = DevlabServiceServiceDescription;
1012
+ }
1013
+ /** Returns the operation service for this service address. */
1014
+ getOperationService() {
1015
+ return new OperationService(this.sdk, this.addr);
1016
+ }
1017
+ /**
1018
+ * Returns the specified Devlab.
1019
+ *
1020
+ */
1021
+ get(...args) {
1022
+ const spec = this.spec.get;
1023
+ const request = args[0];
1024
+ const metadata = (args.length > 1 ? args[1] : undefined);
1025
+ const options = (args.length > 2 ? args[2] : undefined);
1026
+ const deserialize = spec.responseDeserialize;
1027
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1028
+ }
1029
+ /**
1030
+ * Returns the specified Devlab by name.
1031
+ *
1032
+ */
1033
+ getByName(...args) {
1034
+ const spec = this.spec.getByName;
1035
+ const request = args[0];
1036
+ const metadata = (args.length > 1 ? args[1] : undefined);
1037
+ const options = (args.length > 2 ? args[2] : undefined);
1038
+ const deserialize = spec.responseDeserialize;
1039
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1040
+ }
1041
+ /**
1042
+ * Retrieves a list of Devlabs.
1043
+ *
1044
+ */
1045
+ list(...args) {
1046
+ const spec = this.spec.list;
1047
+ const request = args[0];
1048
+ const metadata = (args.length > 1 ? args[1] : undefined);
1049
+ const options = (args.length > 2 ? args[2] : undefined);
1050
+ const deserialize = spec.responseDeserialize;
1051
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1052
+ }
1053
+ /**
1054
+ * Creates a Devlab.
1055
+ *
1056
+ */
1057
+ create(...args) {
1058
+ const spec = this.spec.create;
1059
+ const request = args[0];
1060
+ const metadata = (args.length > 1 ? args[1] : undefined);
1061
+ const options = (args.length > 2 ? args[2] : undefined);
1062
+ const deserialize = (value) => {
1063
+ const resp = spec.responseDeserialize(value);
1064
+ return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
1065
+ };
1066
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1067
+ }
1068
+ /**
1069
+ * Deletes a Devlab.
1070
+ *
1071
+ */
1072
+ delete(...args) {
1073
+ const spec = this.spec.delete;
1074
+ const request = args[0];
1075
+ const metadata = (args.length > 1 ? args[1] : undefined);
1076
+ const options = (args.length > 2 ? args[2] : undefined);
1077
+ const deserialize = (value) => {
1078
+ const resp = spec.responseDeserialize(value);
1079
+ return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
1080
+ };
1081
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1082
+ }
1083
+ /**
1084
+ * Restarts a Devlab.
1085
+ *
1086
+ */
1087
+ restart(...args) {
1088
+ const spec = this.spec.restart;
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 = (value) => {
1093
+ const resp = spec.responseDeserialize(value);
1094
+ return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
1095
+ };
1096
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1097
+ }
1098
+ /**
1099
+ * Stops a Devlab.
1100
+ *
1101
+ */
1102
+ stop(...args) {
1103
+ const spec = this.spec.stop;
1104
+ const request = args[0];
1105
+ const metadata = (args.length > 1 ? args[1] : undefined);
1106
+ const options = (args.length > 2 ? args[2] : undefined);
1107
+ const deserialize = (value) => {
1108
+ const resp = spec.responseDeserialize(value);
1109
+ return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
1110
+ };
1111
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
1112
+ }
1113
+ }
1114
+ const DevlabSpec_Port_Protocol_VALUE_COMMENTS = {
1115
+ PROTOCOL_UNSPECIFIED: " No protocol selected. Specify HTTP, TCP, or UDP.\n",
1116
+ HTTP: " HTTP protocol.\n",
1117
+ TCP: " TCP protocol.\n",
1118
+ UDP: " UDP protocol.\n",
1119
+ };
1120
+ /** Converts and creates {@link DevlabSpec_Port_Protocol} values. */
1121
+ export const DevlabSpec_Port_Protocol = createEnum("nebius.ai.v1.DevlabSpec.Port.Protocol", {
1122
+ /**
1123
+ * No protocol selected. Specify HTTP, TCP, or UDP.
1124
+ *
1125
+ */
1126
+ PROTOCOL_UNSPECIFIED: 0,
1127
+ /**
1128
+ * HTTP protocol.
1129
+ *
1130
+ */
1131
+ HTTP: 1,
1132
+ /**
1133
+ * TCP protocol.
1134
+ *
1135
+ */
1136
+ TCP: 2,
1137
+ /**
1138
+ * UDP protocol.
1139
+ *
1140
+ */
1141
+ UDP: 3,
1142
+ }, DevlabSpec_Port_Protocol_VALUE_COMMENTS);
1143
+ protoRegistry.registerEnum(DevlabSpec_Port_Protocol);
1144
+ const DevlabSpec_VolumeMount_Mode_VALUE_COMMENTS = {
1145
+ MODE_UNSPECIFIED: " No mount mode selected. Specify READ_WRITE or READ_ONLY.\n",
1146
+ READ_WRITE: " Read-write mode.\n",
1147
+ READ_ONLY: " Read-only mode.\n",
1148
+ };
1149
+ /** Converts and creates {@link DevlabSpec_VolumeMount_Mode} values. */
1150
+ export const DevlabSpec_VolumeMount_Mode = createEnum("nebius.ai.v1.DevlabSpec.VolumeMount.Mode", {
1151
+ /**
1152
+ * No mount mode selected. Specify READ_WRITE or READ_ONLY.
1153
+ *
1154
+ */
1155
+ MODE_UNSPECIFIED: 0,
1156
+ /**
1157
+ * Read-write mode.
1158
+ *
1159
+ */
1160
+ READ_WRITE: 1,
1161
+ /**
1162
+ * Read-only mode.
1163
+ *
1164
+ */
1165
+ READ_ONLY: 2,
1166
+ }, DevlabSpec_VolumeMount_Mode_VALUE_COMMENTS);
1167
+ protoRegistry.registerEnum(DevlabSpec_VolumeMount_Mode);
1168
+ const DevlabStatus_State_VALUE_COMMENTS = {
1169
+ STATE_UNSPECIFIED: " The service did not report the Devlab's state.\n",
1170
+ PROVISIONING: " The Devlab is creating resources.\n",
1171
+ STARTING: " The Devlab is being started.\n",
1172
+ RUNNING: " The Devlab is running.\n",
1173
+ STOPPING: " The Devlab is being stopped.\n",
1174
+ DELETING: " The Devlab is being deleted.\n",
1175
+ STOPPED: " The Devlab has been stopped.\n",
1176
+ FAILED: " The Devlab has failed.\n",
1177
+ ERROR: " The Devlab encountered an error.\n",
1178
+ IMAGE_PULLING: " The Devlab is pulling an image (STARTING -> IMAGE_PULLING -> RUNNING).\n",
1179
+ };
1180
+ /** Converts and creates {@link DevlabStatus_State} values. */
1181
+ export const DevlabStatus_State = createEnum("nebius.ai.v1.DevlabStatus.State", {
1182
+ /**
1183
+ * The service did not report the Devlab's state.
1184
+ *
1185
+ */
1186
+ STATE_UNSPECIFIED: 0,
1187
+ /**
1188
+ * The Devlab is creating resources.
1189
+ *
1190
+ */
1191
+ PROVISIONING: 1,
1192
+ /**
1193
+ * The Devlab is being started.
1194
+ *
1195
+ */
1196
+ STARTING: 2,
1197
+ /**
1198
+ * The Devlab is running.
1199
+ *
1200
+ */
1201
+ RUNNING: 3,
1202
+ /**
1203
+ * The Devlab is being stopped.
1204
+ *
1205
+ */
1206
+ STOPPING: 4,
1207
+ /**
1208
+ * The Devlab is being deleted.
1209
+ *
1210
+ */
1211
+ DELETING: 5,
1212
+ /**
1213
+ * The Devlab has been stopped.
1214
+ *
1215
+ */
1216
+ STOPPED: 6,
1217
+ /**
1218
+ * The Devlab has failed.
1219
+ *
1220
+ */
1221
+ FAILED: 7,
1222
+ /**
1223
+ * The Devlab encountered an error.
1224
+ *
1225
+ */
1226
+ ERROR: 8,
1227
+ /**
1228
+ * The Devlab is pulling an image (STARTING -> IMAGE_PULLING -> RUNNING).
1229
+ *
1230
+ */
1231
+ IMAGE_PULLING: 9,
1232
+ }, DevlabStatus_State_VALUE_COMMENTS);
1233
+ protoRegistry.registerEnum(DevlabStatus_State);
1234
+ const DevlabInstanceStatus_State_VALUE_COMMENTS = {
1235
+ STATE_UNSPECIFIED: " The service did not report the instance's state.\n",
1236
+ PROVISIONING: " The Devlab is creating resources.\n",
1237
+ STARTING: " The Devlab is being started.\n",
1238
+ RUNNING: " The Devlab is running.\n",
1239
+ STOPPING: " The Devlab is being stopped.\n",
1240
+ DELETING: " The Devlab is being deleted.\n",
1241
+ STOPPED: " The Devlab has been stopped.\n",
1242
+ FAILED: " The Devlab has failed.\n",
1243
+ ERROR: " The Devlab encountered an error.\n",
1244
+ IMAGE_PULLING: " The Devlab is pulling an image (STARTING -> IMAGE_PULLING -> RUNNING).\n",
1245
+ };
1246
+ /** Converts and creates {@link DevlabInstanceStatus_State} values. */
1247
+ export const DevlabInstanceStatus_State = createEnum("nebius.ai.v1.DevlabInstanceStatus.State", {
1248
+ /**
1249
+ * The service did not report the instance's state.
1250
+ *
1251
+ */
1252
+ STATE_UNSPECIFIED: 0,
1253
+ /**
1254
+ * The Devlab is creating resources.
1255
+ *
1256
+ */
1257
+ PROVISIONING: 1,
1258
+ /**
1259
+ * The Devlab is being started.
1260
+ *
1261
+ */
1262
+ STARTING: 2,
1263
+ /**
1264
+ * The Devlab is running.
1265
+ *
1266
+ */
1267
+ RUNNING: 3,
1268
+ /**
1269
+ * The Devlab is being stopped.
1270
+ *
1271
+ */
1272
+ STOPPING: 4,
1273
+ /**
1274
+ * The Devlab is being deleted.
1275
+ *
1276
+ */
1277
+ DELETING: 5,
1278
+ /**
1279
+ * The Devlab has been stopped.
1280
+ *
1281
+ */
1282
+ STOPPED: 6,
1283
+ /**
1284
+ * The Devlab has failed.
1285
+ *
1286
+ */
1287
+ FAILED: 7,
1288
+ /**
1289
+ * The Devlab encountered an error.
1290
+ *
1291
+ */
1292
+ ERROR: 8,
1293
+ /**
1294
+ * The Devlab is pulling an image (STARTING -> IMAGE_PULLING -> RUNNING).
1295
+ *
1296
+ */
1297
+ IMAGE_PULLING: 9,
1298
+ }, DevlabInstanceStatus_State_VALUE_COMMENTS);
1299
+ protoRegistry.registerEnum(DevlabInstanceStatus_State);
1300
+ const Devlab_MESSAGE_DESCRIPTOR = {
1301
+ fields: {
1302
+ "metadata": { pbName: "metadata", message: () => ResourceMetadata.$descriptor },
1303
+ "spec": { pbName: "spec", message: () => DevlabSpec.$descriptor },
1304
+ "status": { pbName: "status", message: () => DevlabStatus.$descriptor },
1305
+ },
1306
+ };
1307
+ /** Encodes, decodes, converts, and creates {@link Devlab} messages. */
1308
+ export const Devlab = {
1309
+ $type: "nebius.ai.v1.Devlab",
1310
+ $descriptor: Devlab_MESSAGE_DESCRIPTOR,
1311
+ encode(message, writer = new BinaryWriter()) {
1312
+ if (message.metadata !== undefined) {
1313
+ const w = writer.uint32(10).fork();
1314
+ ResourceMetadata.encode(message.metadata, w);
1315
+ w.join();
1316
+ }
1317
+ if (message.spec !== undefined) {
1318
+ const w = writer.uint32(18).fork();
1319
+ DevlabSpec.encode(message.spec, w);
1320
+ w.join();
1321
+ }
1322
+ if (message.status !== undefined) {
1323
+ const w = writer.uint32(26).fork();
1324
+ DevlabStatus.encode(message.status, w);
1325
+ w.join();
1326
+ }
1327
+ if (message[unknownFieldsSymbol]) {
1328
+ writer.raw(message[unknownFieldsSymbol]);
1329
+ }
1330
+ return writer;
1331
+ },
1332
+ decode(input, length) {
1333
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1334
+ const end = length === undefined ? reader.len : reader.pos + length;
1335
+ const message = createBaseDevlab();
1336
+ let writer = undefined;
1337
+ while (reader.pos < end) {
1338
+ const tag = reader.uint32();
1339
+ switch (tag >>> 3) {
1340
+ case 1: {
1341
+ if (tag !== 10)
1342
+ break;
1343
+ message.metadata = ResourceMetadata.decode(reader, reader.uint32());
1344
+ continue;
1345
+ }
1346
+ case 2: {
1347
+ if (tag !== 18)
1348
+ break;
1349
+ message.spec = DevlabSpec.decode(reader, reader.uint32());
1350
+ continue;
1351
+ }
1352
+ case 3: {
1353
+ if (tag !== 26)
1354
+ break;
1355
+ message.status = DevlabStatus.decode(reader, reader.uint32());
1356
+ continue;
1357
+ }
1358
+ default:
1359
+ break;
1360
+ }
1361
+ if ((tag & 7) === 4 || tag === 0) {
1362
+ break;
1363
+ }
1364
+ {
1365
+ if (!writer)
1366
+ writer = new BinaryWriter();
1367
+ const skipped = reader.skip(tag & 7, tag >>> 3);
1368
+ writer.uint32(tag).raw(skipped);
1369
+ }
1370
+ }
1371
+ if (writer) {
1372
+ message[unknownFieldsSymbol] = writer.finish();
1373
+ }
1374
+ return message;
1375
+ },
1376
+ fromJSON(object) {
1377
+ return applyDevlabCustom({
1378
+ $type: "nebius.ai.v1.Devlab",
1379
+ metadata: isSet(object.metadata ?? object.metadata)
1380
+ ? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
1381
+ : undefined,
1382
+ spec: isSet(object.spec ?? object.spec)
1383
+ ? DevlabSpec.fromJSON(object.spec ?? object.spec)
1384
+ : undefined,
1385
+ status: isSet(object.status ?? object.status)
1386
+ ? DevlabStatus.fromJSON(object.status ?? object.status)
1387
+ : undefined,
1388
+ });
1389
+ },
1390
+ toJSON(message, use = "json") {
1391
+ const obj = {};
1392
+ const pick = (json, pb) => (use === "json" ? json : pb);
1393
+ if (message.metadata !== undefined) {
1394
+ obj[pick("metadata", "metadata")] = message.metadata
1395
+ ? ResourceMetadata.toJSON(message.metadata, use)
1396
+ : undefined;
1397
+ }
1398
+ if (message.spec !== undefined) {
1399
+ obj[pick("spec", "spec")] = message.spec
1400
+ ? DevlabSpec.toJSON(message.spec, use)
1401
+ : undefined;
1402
+ }
1403
+ if (message.status !== undefined) {
1404
+ obj[pick("status", "status")] = message.status
1405
+ ? DevlabStatus.toJSON(message.status, use)
1406
+ : undefined;
1407
+ }
1408
+ return obj;
1409
+ },
1410
+ create(base) {
1411
+ return Devlab.fromPartial(base ?? {});
1412
+ },
1413
+ fromPartial(object) {
1414
+ const message = createBaseDevlab();
1415
+ message.metadata = (object.metadata !== undefined && object.metadata !== null)
1416
+ ? ResourceMetadata.fromPartial(object.metadata)
1417
+ : undefined;
1418
+ message.spec = (object.spec !== undefined && object.spec !== null)
1419
+ ? DevlabSpec.fromPartial(object.spec)
1420
+ : undefined;
1421
+ message.status = (object.status !== undefined && object.status !== null)
1422
+ ? DevlabStatus.fromPartial(object.status)
1423
+ : undefined;
1424
+ return message;
1425
+ },
1426
+ };
1427
+ protoRegistry.registerMessage(Devlab);
1428
+ function DevlabCustomInspect() {
1429
+ const parts = [];
1430
+ if (this.metadata !== undefined)
1431
+ parts.push("metadata" + "=" + inspect(this.metadata));
1432
+ if (this.spec !== undefined)
1433
+ parts.push("spec" + "=" + inspect(this.spec));
1434
+ if (this.status !== undefined)
1435
+ parts.push("status" + "=" + inspect(this.status));
1436
+ return `${this.$type}(${parts.join(", ")})`;
1437
+ }
1438
+ function DevlabCustomJson() {
1439
+ const obj = {
1440
+ type: this.$type,
1441
+ };
1442
+ if (this.metadata !== undefined)
1443
+ obj.metadata = inspectJson(this.metadata);
1444
+ if (this.spec !== undefined)
1445
+ obj.spec = inspectJson(this.spec);
1446
+ if (this.status !== undefined)
1447
+ obj.status = inspectJson(this.status);
1448
+ return obj;
1449
+ }
1450
+ function applyDevlabCustom(message) {
1451
+ message[custom] = DevlabCustomInspect;
1452
+ message[customJson] = DevlabCustomJson;
1453
+ return attachMessageDescriptor(message, Devlab.$descriptor);
1454
+ }
1455
+ function createBaseDevlab() {
1456
+ const message = {
1457
+ $type: "nebius.ai.v1.Devlab",
1458
+ metadata: undefined,
1459
+ spec: undefined,
1460
+ status: undefined,
1461
+ };
1462
+ return applyDevlabCustom(message);
1463
+ }
1464
+ const DevlabSpec_MESSAGE_DESCRIPTOR = {
1465
+ fields: {
1466
+ "image": { pbName: "image", immutable: true, scalarType: 9 },
1467
+ "environmentVariables": { pbName: "environment_variables", immutable: true, repeated: true, message: () => DevlabSpec_EnvironmentVariable.$descriptor },
1468
+ "ports": { pbName: "ports", immutable: true, repeated: true, message: () => DevlabSpec_Port.$descriptor },
1469
+ "containerCommand": { pbName: "container_command", immutable: true, scalarType: 9 },
1470
+ "args": { pbName: "args", immutable: true, scalarType: 9 },
1471
+ "workingDir": { pbName: "working_dir", immutable: true, scalarType: 9 },
1472
+ "volumes": { pbName: "volumes", immutable: true, repeated: true, message: () => DevlabSpec_VolumeMount.$descriptor },
1473
+ "registryCredentials": { pbName: "registry_credentials", immutable: true, message: () => DevlabSpec_RegistryCredentials.$descriptor },
1474
+ "platform": { pbName: "platform", immutable: true, scalarType: 9 },
1475
+ "preset": { pbName: "preset", immutable: true, scalarType: 9 },
1476
+ "shmSizeBytes": { pbName: "shm_size_bytes", immutable: true, scalarType: 3 },
1477
+ "disk": { pbName: "disk", immutable: true, message: () => DevlabSpec_DiskSpec.$descriptor },
1478
+ "subnetId": { pbName: "subnet_id", immutable: true, scalarType: 9 },
1479
+ "publicIp": { pbName: "public_ip", immutable: true, scalarType: 8 },
1480
+ "sshAuthorizedKeys": { pbName: "ssh_authorized_keys", immutable: true, scalarType: 9, repeated: true },
1481
+ "workspace": { pbName: "workspace", immutable: true, message: () => DevlabSpec_Workspace.$descriptor },
1482
+ "primaryRoute": { pbName: "primary_route", immutable: true, message: () => DevlabSpec_PrimaryRoute.$descriptor },
1483
+ "template": { pbName: "template", immutable: true, message: () => DevlabSpec_Template.$descriptor },
1484
+ "injectedFiles": { pbName: "injected_files", immutable: true, repeated: true, message: () => DevlabSpec_FileInjection.$descriptor },
1485
+ "authTokenMysteryboxSecret": { pbName: "auth_token_mysterybox_secret", immutable: true, message: () => DevlabSpec_MysteryBoxSecretRef.$descriptor },
1486
+ },
1487
+ };
1488
+ /** Encodes, decodes, converts, and creates {@link DevlabSpec} messages. */
1489
+ export const DevlabSpec = {
1490
+ $type: "nebius.ai.v1.DevlabSpec",
1491
+ $descriptor: DevlabSpec_MESSAGE_DESCRIPTOR,
1492
+ encode(message, writer = new BinaryWriter()) {
1493
+ if (message.image !== "") {
1494
+ writer.uint32(10).string(message.image);
1495
+ }
1496
+ for (const v of (message.environmentVariables ?? [])) {
1497
+ const w = writer.uint32(18).fork();
1498
+ DevlabSpec_EnvironmentVariable.encode(v, w);
1499
+ w.join();
1500
+ }
1501
+ for (const v of (message.ports ?? [])) {
1502
+ const w = writer.uint32(26).fork();
1503
+ DevlabSpec_Port.encode(v, w);
1504
+ w.join();
1505
+ }
1506
+ if (message.containerCommand !== "") {
1507
+ writer.uint32(34).string(message.containerCommand);
1508
+ }
1509
+ if (message.args !== "") {
1510
+ writer.uint32(42).string(message.args);
1511
+ }
1512
+ if (message.workingDir !== "") {
1513
+ writer.uint32(50).string(message.workingDir);
1514
+ }
1515
+ for (const v of (message.volumes ?? [])) {
1516
+ const w = writer.uint32(58).fork();
1517
+ DevlabSpec_VolumeMount.encode(v, w);
1518
+ w.join();
1519
+ }
1520
+ if (message.registryCredentials !== undefined) {
1521
+ const w = writer.uint32(82).fork();
1522
+ DevlabSpec_RegistryCredentials.encode(message.registryCredentials, w);
1523
+ w.join();
1524
+ }
1525
+ if (message.platform !== "") {
1526
+ writer.uint32(162).string(message.platform);
1527
+ }
1528
+ if (message.preset !== "") {
1529
+ writer.uint32(170).string(message.preset);
1530
+ }
1531
+ if (message.shmSizeBytes !== undefined && !message.shmSizeBytes.isZero?.()) {
1532
+ writer.uint32(176).int64(message.shmSizeBytes.toString());
1533
+ }
1534
+ if (message.disk !== undefined) {
1535
+ const w = writer.uint32(186).fork();
1536
+ DevlabSpec_DiskSpec.encode(message.disk, w);
1537
+ w.join();
1538
+ }
1539
+ if (message.subnetId !== "") {
1540
+ writer.uint32(194).string(message.subnetId);
1541
+ }
1542
+ if (message.publicIp === true) {
1543
+ writer.uint32(200).bool(message.publicIp);
1544
+ }
1545
+ for (const v of (message.sshAuthorizedKeys ?? [])) {
1546
+ writer.uint32(210).string(v);
1547
+ }
1548
+ if (message.workspace !== undefined) {
1549
+ const w = writer.uint32(242).fork();
1550
+ DevlabSpec_Workspace.encode(message.workspace, w);
1551
+ w.join();
1552
+ }
1553
+ if (message.primaryRoute !== undefined) {
1554
+ const w = writer.uint32(250).fork();
1555
+ DevlabSpec_PrimaryRoute.encode(message.primaryRoute, w);
1556
+ w.join();
1557
+ }
1558
+ if (message.template !== undefined) {
1559
+ const w = writer.uint32(258).fork();
1560
+ DevlabSpec_Template.encode(message.template, w);
1561
+ w.join();
1562
+ }
1563
+ for (const v of (message.injectedFiles ?? [])) {
1564
+ const w = writer.uint32(266).fork();
1565
+ DevlabSpec_FileInjection.encode(v, w);
1566
+ w.join();
1567
+ }
1568
+ if (message.authTokenMysteryboxSecret !== undefined) {
1569
+ const w = writer.uint32(274).fork();
1570
+ DevlabSpec_MysteryBoxSecretRef.encode(message.authTokenMysteryboxSecret, w);
1571
+ w.join();
1572
+ }
1573
+ if (message[unknownFieldsSymbol]) {
1574
+ writer.raw(message[unknownFieldsSymbol]);
1575
+ }
1576
+ return writer;
1577
+ },
1578
+ decode(input, length) {
1579
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1580
+ const end = length === undefined ? reader.len : reader.pos + length;
1581
+ const message = createBaseDevlabSpec();
1582
+ let writer = undefined;
1583
+ while (reader.pos < end) {
1584
+ const tag = reader.uint32();
1585
+ switch (tag >>> 3) {
1586
+ case 1: {
1587
+ if (tag !== 10)
1588
+ break;
1589
+ message.image = reader.string();
1590
+ continue;
1591
+ }
1592
+ case 2: {
1593
+ if (tag !== 18)
1594
+ break;
1595
+ message.environmentVariables.push(DevlabSpec_EnvironmentVariable.decode(reader, reader.uint32()));
1596
+ continue;
1597
+ }
1598
+ case 3: {
1599
+ if (tag !== 26)
1600
+ break;
1601
+ message.ports.push(DevlabSpec_Port.decode(reader, reader.uint32()));
1602
+ continue;
1603
+ }
1604
+ case 4: {
1605
+ if (tag !== 34)
1606
+ break;
1607
+ message.containerCommand = reader.string();
1608
+ continue;
1609
+ }
1610
+ case 5: {
1611
+ if (tag !== 42)
1612
+ break;
1613
+ message.args = reader.string();
1614
+ continue;
1615
+ }
1616
+ case 6: {
1617
+ if (tag !== 50)
1618
+ break;
1619
+ message.workingDir = reader.string();
1620
+ continue;
1621
+ }
1622
+ case 7: {
1623
+ if (tag !== 58)
1624
+ break;
1625
+ message.volumes.push(DevlabSpec_VolumeMount.decode(reader, reader.uint32()));
1626
+ continue;
1627
+ }
1628
+ case 10: {
1629
+ if (tag !== 82)
1630
+ break;
1631
+ message.registryCredentials = DevlabSpec_RegistryCredentials.decode(reader, reader.uint32());
1632
+ continue;
1633
+ }
1634
+ case 20: {
1635
+ if (tag !== 162)
1636
+ break;
1637
+ message.platform = reader.string();
1638
+ continue;
1639
+ }
1640
+ case 21: {
1641
+ if (tag !== 170)
1642
+ break;
1643
+ message.preset = reader.string();
1644
+ continue;
1645
+ }
1646
+ case 22: {
1647
+ if (tag !== 176)
1648
+ break;
1649
+ message.shmSizeBytes = Long.fromValue(reader.int64());
1650
+ continue;
1651
+ }
1652
+ case 23: {
1653
+ if (tag !== 186)
1654
+ break;
1655
+ message.disk = DevlabSpec_DiskSpec.decode(reader, reader.uint32());
1656
+ continue;
1657
+ }
1658
+ case 24: {
1659
+ if (tag !== 194)
1660
+ break;
1661
+ message.subnetId = reader.string();
1662
+ continue;
1663
+ }
1664
+ case 25: {
1665
+ if (tag !== 200)
1666
+ break;
1667
+ message.publicIp = reader.bool();
1668
+ continue;
1669
+ }
1670
+ case 26: {
1671
+ if (tag !== 210)
1672
+ break;
1673
+ message.sshAuthorizedKeys.push(reader.string());
1674
+ continue;
1675
+ }
1676
+ case 30: {
1677
+ if (tag !== 242)
1678
+ break;
1679
+ message.workspace = DevlabSpec_Workspace.decode(reader, reader.uint32());
1680
+ continue;
1681
+ }
1682
+ case 31: {
1683
+ if (tag !== 250)
1684
+ break;
1685
+ message.primaryRoute = DevlabSpec_PrimaryRoute.decode(reader, reader.uint32());
1686
+ continue;
1687
+ }
1688
+ case 32: {
1689
+ if (tag !== 258)
1690
+ break;
1691
+ message.template = DevlabSpec_Template.decode(reader, reader.uint32());
1692
+ continue;
1693
+ }
1694
+ case 33: {
1695
+ if (tag !== 266)
1696
+ break;
1697
+ message.injectedFiles.push(DevlabSpec_FileInjection.decode(reader, reader.uint32()));
1698
+ continue;
1699
+ }
1700
+ case 34: {
1701
+ if (tag !== 274)
1702
+ break;
1703
+ message.authTokenMysteryboxSecret = DevlabSpec_MysteryBoxSecretRef.decode(reader, reader.uint32());
1704
+ continue;
1705
+ }
1706
+ default:
1707
+ break;
1708
+ }
1709
+ if ((tag & 7) === 4 || tag === 0) {
1710
+ break;
1711
+ }
1712
+ {
1713
+ if (!writer)
1714
+ writer = new BinaryWriter();
1715
+ const skipped = reader.skip(tag & 7, tag >>> 3);
1716
+ writer.uint32(tag).raw(skipped);
1717
+ }
1718
+ }
1719
+ if (writer) {
1720
+ message[unknownFieldsSymbol] = writer.finish();
1721
+ }
1722
+ return message;
1723
+ },
1724
+ fromJSON(object) {
1725
+ return applyDevlabSpecCustom({
1726
+ $type: "nebius.ai.v1.DevlabSpec",
1727
+ image: isSet(object.image ?? object.image)
1728
+ ? String(object.image ?? object.image)
1729
+ : "",
1730
+ environmentVariables: globalThis.Array.isArray(object?.environmentVariables ?? object?.environment_variables)
1731
+ ? (object.environmentVariables ?? object.environment_variables).map((e) => DevlabSpec_EnvironmentVariable.fromJSON(e))
1732
+ : [],
1733
+ ports: globalThis.Array.isArray(object?.ports ?? object?.ports)
1734
+ ? (object.ports ?? object.ports).map((e) => DevlabSpec_Port.fromJSON(e))
1735
+ : [],
1736
+ containerCommand: isSet(object.containerCommand ?? object.container_command)
1737
+ ? String(object.containerCommand ?? object.container_command)
1738
+ : "",
1739
+ args: isSet(object.args ?? object.args)
1740
+ ? String(object.args ?? object.args)
1741
+ : "",
1742
+ workingDir: isSet(object.workingDir ?? object.working_dir)
1743
+ ? String(object.workingDir ?? object.working_dir)
1744
+ : "",
1745
+ volumes: globalThis.Array.isArray(object?.volumes ?? object?.volumes)
1746
+ ? (object.volumes ?? object.volumes).map((e) => DevlabSpec_VolumeMount.fromJSON(e))
1747
+ : [],
1748
+ registryCredentials: isSet(object.registryCredentials ?? object.registry_credentials)
1749
+ ? DevlabSpec_RegistryCredentials.fromJSON(object.registryCredentials ?? object.registry_credentials)
1750
+ : undefined,
1751
+ platform: isSet(object.platform ?? object.platform)
1752
+ ? String(object.platform ?? object.platform)
1753
+ : "",
1754
+ preset: isSet(object.preset ?? object.preset)
1755
+ ? String(object.preset ?? object.preset)
1756
+ : "",
1757
+ shmSizeBytes: isSet(object.shmSizeBytes ?? object.shm_size_bytes)
1758
+ ? Long.fromValue(object.shmSizeBytes ?? object.shm_size_bytes)
1759
+ : Long.ZERO,
1760
+ disk: isSet(object.disk ?? object.disk)
1761
+ ? DevlabSpec_DiskSpec.fromJSON(object.disk ?? object.disk)
1762
+ : undefined,
1763
+ subnetId: isSet(object.subnetId ?? object.subnet_id)
1764
+ ? String(object.subnetId ?? object.subnet_id)
1765
+ : "",
1766
+ publicIp: isSet(object.publicIp ?? object.public_ip)
1767
+ ? Boolean(object.publicIp ?? object.public_ip)
1768
+ : false,
1769
+ sshAuthorizedKeys: globalThis.Array.isArray(object?.sshAuthorizedKeys ?? object?.ssh_authorized_keys)
1770
+ ? (object.sshAuthorizedKeys ?? object.ssh_authorized_keys).map((e) => String(e))
1771
+ : [],
1772
+ workspace: isSet(object.workspace ?? object.workspace)
1773
+ ? DevlabSpec_Workspace.fromJSON(object.workspace ?? object.workspace)
1774
+ : undefined,
1775
+ primaryRoute: isSet(object.primaryRoute ?? object.primary_route)
1776
+ ? DevlabSpec_PrimaryRoute.fromJSON(object.primaryRoute ?? object.primary_route)
1777
+ : undefined,
1778
+ template: isSet(object.template ?? object.template)
1779
+ ? DevlabSpec_Template.fromJSON(object.template ?? object.template)
1780
+ : undefined,
1781
+ injectedFiles: globalThis.Array.isArray(object?.injectedFiles ?? object?.injected_files)
1782
+ ? (object.injectedFiles ?? object.injected_files).map((e) => DevlabSpec_FileInjection.fromJSON(e))
1783
+ : [],
1784
+ authTokenMysteryboxSecret: isSet(object.authTokenMysteryboxSecret ?? object.auth_token_mysterybox_secret)
1785
+ ? DevlabSpec_MysteryBoxSecretRef.fromJSON(object.authTokenMysteryboxSecret ?? object.auth_token_mysterybox_secret)
1786
+ : undefined,
1787
+ });
1788
+ },
1789
+ toJSON(message, use = "json") {
1790
+ const obj = {};
1791
+ const pick = (json, pb) => (use === "json" ? json : pb);
1792
+ if (message.image !== "") {
1793
+ obj[pick("image", "image")] = message.image;
1794
+ }
1795
+ if (message.environmentVariables?.length) {
1796
+ obj[pick("environmentVariables", "environment_variables")] = message.environmentVariables.map((e) => e ? DevlabSpec_EnvironmentVariable.toJSON(e, use) : undefined);
1797
+ }
1798
+ if (message.ports?.length) {
1799
+ obj[pick("ports", "ports")] = message.ports.map((e) => e ? DevlabSpec_Port.toJSON(e, use) : undefined);
1800
+ }
1801
+ if (message.containerCommand !== "") {
1802
+ obj[pick("containerCommand", "container_command")] = message.containerCommand;
1803
+ }
1804
+ if (message.args !== "") {
1805
+ obj[pick("args", "args")] = message.args;
1806
+ }
1807
+ if (message.workingDir !== "") {
1808
+ obj[pick("workingDir", "working_dir")] = message.workingDir;
1809
+ }
1810
+ if (message.volumes?.length) {
1811
+ obj[pick("volumes", "volumes")] = message.volumes.map((e) => e ? DevlabSpec_VolumeMount.toJSON(e, use) : undefined);
1812
+ }
1813
+ if (message.registryCredentials !== undefined) {
1814
+ obj[pick("registryCredentials", "registry_credentials")] = message.registryCredentials
1815
+ ? DevlabSpec_RegistryCredentials.toJSON(message.registryCredentials, use)
1816
+ : undefined;
1817
+ }
1818
+ if (message.platform !== "") {
1819
+ obj[pick("platform", "platform")] = message.platform;
1820
+ }
1821
+ if (message.preset !== "") {
1822
+ obj[pick("preset", "preset")] = message.preset;
1823
+ }
1824
+ if (!message.shmSizeBytes?.isZero?.()) {
1825
+ obj[pick("shmSizeBytes", "shm_size_bytes")] = (message.shmSizeBytes || Long.ZERO).toString();
1826
+ }
1827
+ if (message.disk !== undefined) {
1828
+ obj[pick("disk", "disk")] = message.disk
1829
+ ? DevlabSpec_DiskSpec.toJSON(message.disk, use)
1830
+ : undefined;
1831
+ }
1832
+ if (message.subnetId !== "") {
1833
+ obj[pick("subnetId", "subnet_id")] = message.subnetId;
1834
+ }
1835
+ if (message.publicIp === true) {
1836
+ obj[pick("publicIp", "public_ip")] = message.publicIp;
1837
+ }
1838
+ if (message.sshAuthorizedKeys?.length) {
1839
+ obj[pick("sshAuthorizedKeys", "ssh_authorized_keys")] = message.sshAuthorizedKeys.map((e) => e);
1840
+ }
1841
+ if (message.workspace !== undefined) {
1842
+ obj[pick("workspace", "workspace")] = message.workspace
1843
+ ? DevlabSpec_Workspace.toJSON(message.workspace, use)
1844
+ : undefined;
1845
+ }
1846
+ if (message.primaryRoute !== undefined) {
1847
+ obj[pick("primaryRoute", "primary_route")] = message.primaryRoute
1848
+ ? DevlabSpec_PrimaryRoute.toJSON(message.primaryRoute, use)
1849
+ : undefined;
1850
+ }
1851
+ if (message.template !== undefined) {
1852
+ obj[pick("template", "template")] = message.template
1853
+ ? DevlabSpec_Template.toJSON(message.template, use)
1854
+ : undefined;
1855
+ }
1856
+ if (message.injectedFiles?.length) {
1857
+ obj[pick("injectedFiles", "injected_files")] = message.injectedFiles.map((e) => e ? DevlabSpec_FileInjection.toJSON(e, use) : undefined);
1858
+ }
1859
+ if (message.authTokenMysteryboxSecret !== undefined) {
1860
+ obj[pick("authTokenMysteryboxSecret", "auth_token_mysterybox_secret")] = message.authTokenMysteryboxSecret
1861
+ ? DevlabSpec_MysteryBoxSecretRef.toJSON(message.authTokenMysteryboxSecret, use)
1862
+ : undefined;
1863
+ }
1864
+ return obj;
1865
+ },
1866
+ create(base) {
1867
+ return DevlabSpec.fromPartial(base ?? {});
1868
+ },
1869
+ fromPartial(object) {
1870
+ const message = createBaseDevlabSpec();
1871
+ message.image = (object.image !== undefined && object.image !== null)
1872
+ ? object.image
1873
+ : "";
1874
+ message.environmentVariables = object.environmentVariables?.map((e) => DevlabSpec_EnvironmentVariable.fromPartial(e)) || [];
1875
+ message.ports = object.ports?.map((e) => DevlabSpec_Port.fromPartial(e)) || [];
1876
+ message.containerCommand = (object.containerCommand !== undefined && object.containerCommand !== null)
1877
+ ? object.containerCommand
1878
+ : "";
1879
+ message.args = (object.args !== undefined && object.args !== null)
1880
+ ? object.args
1881
+ : "";
1882
+ message.workingDir = (object.workingDir !== undefined && object.workingDir !== null)
1883
+ ? object.workingDir
1884
+ : "";
1885
+ message.volumes = object.volumes?.map((e) => DevlabSpec_VolumeMount.fromPartial(e)) || [];
1886
+ message.registryCredentials = (object.registryCredentials !== undefined && object.registryCredentials !== null)
1887
+ ? DevlabSpec_RegistryCredentials.fromPartial(object.registryCredentials)
1888
+ : undefined;
1889
+ message.platform = (object.platform !== undefined && object.platform !== null)
1890
+ ? object.platform
1891
+ : "";
1892
+ message.preset = (object.preset !== undefined && object.preset !== null)
1893
+ ? object.preset
1894
+ : "";
1895
+ message.shmSizeBytes = (object.shmSizeBytes !== undefined && object.shmSizeBytes !== null)
1896
+ ? Long.fromValue(object.shmSizeBytes)
1897
+ : Long.ZERO;
1898
+ message.disk = (object.disk !== undefined && object.disk !== null)
1899
+ ? DevlabSpec_DiskSpec.fromPartial(object.disk)
1900
+ : undefined;
1901
+ message.subnetId = (object.subnetId !== undefined && object.subnetId !== null)
1902
+ ? object.subnetId
1903
+ : "";
1904
+ message.publicIp = (object.publicIp !== undefined && object.publicIp !== null)
1905
+ ? object.publicIp
1906
+ : false;
1907
+ message.sshAuthorizedKeys = object.sshAuthorizedKeys?.map((e) => e) || [];
1908
+ message.workspace = (object.workspace !== undefined && object.workspace !== null)
1909
+ ? DevlabSpec_Workspace.fromPartial(object.workspace)
1910
+ : undefined;
1911
+ message.primaryRoute = (object.primaryRoute !== undefined && object.primaryRoute !== null)
1912
+ ? DevlabSpec_PrimaryRoute.fromPartial(object.primaryRoute)
1913
+ : undefined;
1914
+ message.template = (object.template !== undefined && object.template !== null)
1915
+ ? DevlabSpec_Template.fromPartial(object.template)
1916
+ : undefined;
1917
+ message.injectedFiles = object.injectedFiles?.map((e) => DevlabSpec_FileInjection.fromPartial(e)) || [];
1918
+ message.authTokenMysteryboxSecret = (object.authTokenMysteryboxSecret !== undefined && object.authTokenMysteryboxSecret !== null)
1919
+ ? DevlabSpec_MysteryBoxSecretRef.fromPartial(object.authTokenMysteryboxSecret)
1920
+ : undefined;
1921
+ return message;
1922
+ },
1923
+ };
1924
+ protoRegistry.registerMessage(DevlabSpec);
1925
+ function DevlabSpecCustomInspect() {
1926
+ const parts = [];
1927
+ if (this.image !== "")
1928
+ parts.push("image" + "=" + inspect(this.image));
1929
+ if ((this.environmentVariables?.length ?? 0) !== 0)
1930
+ parts.push("environmentVariables" + "=" + inspect(this.environmentVariables));
1931
+ if ((this.ports?.length ?? 0) !== 0)
1932
+ parts.push("ports" + "=" + inspect(this.ports));
1933
+ if (this.containerCommand !== "")
1934
+ parts.push("containerCommand" + "=" + inspect(this.containerCommand));
1935
+ if (this.args !== "")
1936
+ parts.push("args" + "=" + inspect(this.args));
1937
+ if (this.workingDir !== "")
1938
+ parts.push("workingDir" + "=" + inspect(this.workingDir));
1939
+ if ((this.volumes?.length ?? 0) !== 0)
1940
+ parts.push("volumes" + "=" + inspect(this.volumes));
1941
+ if (this.registryCredentials !== undefined)
1942
+ parts.push("registryCredentials" + "=" + inspect(this.registryCredentials));
1943
+ if (this.platform !== "")
1944
+ parts.push("platform" + "=" + inspect(this.platform));
1945
+ if (this.preset !== "")
1946
+ parts.push("preset" + "=" + inspect(this.preset));
1947
+ if (!this.shmSizeBytes?.isZero?.())
1948
+ parts.push("shmSizeBytes" + "=" + inspect(this.shmSizeBytes));
1949
+ if (this.disk !== undefined)
1950
+ parts.push("disk" + "=" + inspect(this.disk));
1951
+ if (this.subnetId !== "")
1952
+ parts.push("subnetId" + "=" + inspect(this.subnetId));
1953
+ if (this.publicIp === true)
1954
+ parts.push("publicIp" + "=" + inspect(this.publicIp));
1955
+ if ((this.sshAuthorizedKeys?.length ?? 0) !== 0)
1956
+ parts.push("sshAuthorizedKeys" + "=" + inspect(this.sshAuthorizedKeys));
1957
+ if (this.workspace !== undefined)
1958
+ parts.push("workspace" + "=" + inspect(this.workspace));
1959
+ if (this.primaryRoute !== undefined)
1960
+ parts.push("primaryRoute" + "=" + inspect(this.primaryRoute));
1961
+ if (this.template !== undefined)
1962
+ parts.push("template" + "=" + inspect(this.template));
1963
+ if ((this.injectedFiles?.length ?? 0) !== 0)
1964
+ parts.push("injectedFiles" + "=" + inspect(this.injectedFiles));
1965
+ if (this.authTokenMysteryboxSecret !== undefined)
1966
+ parts.push("authTokenMysteryboxSecret" + "=" + inspect(this.authTokenMysteryboxSecret));
1967
+ return `${this.$type}(${parts.join(", ")})`;
1968
+ }
1969
+ function DevlabSpecCustomJson() {
1970
+ const obj = {
1971
+ type: this.$type,
1972
+ };
1973
+ if (this.image !== "")
1974
+ obj.image = inspectJson(this.image);
1975
+ if ((this.environmentVariables?.length ?? 0) !== 0)
1976
+ obj.environmentVariables = inspectJson(this.environmentVariables);
1977
+ if ((this.ports?.length ?? 0) !== 0)
1978
+ obj.ports = inspectJson(this.ports);
1979
+ if (this.containerCommand !== "")
1980
+ obj.containerCommand = inspectJson(this.containerCommand);
1981
+ if (this.args !== "")
1982
+ obj.args = inspectJson(this.args);
1983
+ if (this.workingDir !== "")
1984
+ obj.workingDir = inspectJson(this.workingDir);
1985
+ if ((this.volumes?.length ?? 0) !== 0)
1986
+ obj.volumes = inspectJson(this.volumes);
1987
+ if (this.registryCredentials !== undefined)
1988
+ obj.registryCredentials = inspectJson(this.registryCredentials);
1989
+ if (this.platform !== "")
1990
+ obj.platform = inspectJson(this.platform);
1991
+ if (this.preset !== "")
1992
+ obj.preset = inspectJson(this.preset);
1993
+ if (!this.shmSizeBytes?.isZero?.())
1994
+ obj.shmSizeBytes = inspectJson(this.shmSizeBytes);
1995
+ if (this.disk !== undefined)
1996
+ obj.disk = inspectJson(this.disk);
1997
+ if (this.subnetId !== "")
1998
+ obj.subnetId = inspectJson(this.subnetId);
1999
+ if (this.publicIp === true)
2000
+ obj.publicIp = inspectJson(this.publicIp);
2001
+ if ((this.sshAuthorizedKeys?.length ?? 0) !== 0)
2002
+ obj.sshAuthorizedKeys = inspectJson(this.sshAuthorizedKeys);
2003
+ if (this.workspace !== undefined)
2004
+ obj.workspace = inspectJson(this.workspace);
2005
+ if (this.primaryRoute !== undefined)
2006
+ obj.primaryRoute = inspectJson(this.primaryRoute);
2007
+ if (this.template !== undefined)
2008
+ obj.template = inspectJson(this.template);
2009
+ if ((this.injectedFiles?.length ?? 0) !== 0)
2010
+ obj.injectedFiles = inspectJson(this.injectedFiles);
2011
+ if (this.authTokenMysteryboxSecret !== undefined)
2012
+ obj.authTokenMysteryboxSecret = inspectJson(this.authTokenMysteryboxSecret);
2013
+ return obj;
2014
+ }
2015
+ function applyDevlabSpecCustom(message) {
2016
+ message[custom] = DevlabSpecCustomInspect;
2017
+ message[customJson] = DevlabSpecCustomJson;
2018
+ return attachMessageDescriptor(message, DevlabSpec.$descriptor);
2019
+ }
2020
+ function createBaseDevlabSpec() {
2021
+ const message = {
2022
+ $type: "nebius.ai.v1.DevlabSpec",
2023
+ image: "",
2024
+ environmentVariables: [],
2025
+ ports: [],
2026
+ containerCommand: "",
2027
+ args: "",
2028
+ workingDir: "",
2029
+ volumes: [],
2030
+ registryCredentials: undefined,
2031
+ platform: "",
2032
+ preset: "",
2033
+ shmSizeBytes: Long.ZERO,
2034
+ disk: undefined,
2035
+ subnetId: "",
2036
+ publicIp: false,
2037
+ sshAuthorizedKeys: [],
2038
+ workspace: undefined,
2039
+ primaryRoute: undefined,
2040
+ template: undefined,
2041
+ injectedFiles: [],
2042
+ authTokenMysteryboxSecret: undefined,
2043
+ };
2044
+ return applyDevlabSpecCustom(message);
2045
+ }
2046
+ const DevlabSpec_EnvironmentVariable_valueSource_ONEOF_DESCRIPTOR = {
2047
+ fields: {
2048
+ "value": { pbName: "value", scalarType: 9 },
2049
+ "mysteryboxSecret": { pbName: "mysterybox_secret", message: () => DevlabSpec_MysteryBoxSecretRef.$descriptor },
2050
+ },
2051
+ };
2052
+ const DevlabSpec_EnvironmentVariable_MESSAGE_DESCRIPTOR = {
2053
+ fields: {
2054
+ "name": { pbName: "name", scalarType: 9 },
2055
+ "valueSource": { pbName: "value_source", oneof: true, message: () => DevlabSpec_EnvironmentVariable_valueSource_ONEOF_DESCRIPTOR },
2056
+ },
2057
+ };
2058
+ /** Encodes, decodes, converts, and creates {@link DevlabSpec_EnvironmentVariable} messages. */
2059
+ export const DevlabSpec_EnvironmentVariable = {
2060
+ $type: "nebius.ai.v1.DevlabSpec.EnvironmentVariable",
2061
+ $descriptor: DevlabSpec_EnvironmentVariable_MESSAGE_DESCRIPTOR,
2062
+ encode(message, writer = new BinaryWriter()) {
2063
+ if (message.name !== "") {
2064
+ writer.uint32(10).string(message.name);
2065
+ }
2066
+ if (message.valueSource?.$case === undefined) { /* noop */ }
2067
+ else if (message.valueSource?.$case === "value") {
2068
+ writer.uint32(18).string(message.valueSource.value);
2069
+ }
2070
+ else if (message.valueSource?.$case === "mysteryboxSecret") {
2071
+ const w = writer.uint32(26).fork();
2072
+ DevlabSpec_MysteryBoxSecretRef.encode(message.valueSource.mysteryboxSecret, w);
2073
+ w.join();
2074
+ }
2075
+ if (message[unknownFieldsSymbol]) {
2076
+ writer.raw(message[unknownFieldsSymbol]);
2077
+ }
2078
+ return writer;
2079
+ },
2080
+ decode(input, length) {
2081
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2082
+ const end = length === undefined ? reader.len : reader.pos + length;
2083
+ const message = createBaseDevlabSpec_EnvironmentVariable();
2084
+ let writer = undefined;
2085
+ while (reader.pos < end) {
2086
+ const tag = reader.uint32();
2087
+ switch (tag >>> 3) {
2088
+ case 1: {
2089
+ if (tag !== 10)
2090
+ break;
2091
+ message.name = reader.string();
2092
+ continue;
2093
+ }
2094
+ case 2: {
2095
+ if (tag !== 18)
2096
+ break;
2097
+ message.valueSource = {
2098
+ $case: "value",
2099
+ value: reader.string()
2100
+ };
2101
+ continue;
2102
+ }
2103
+ case 3: {
2104
+ if (tag !== 26)
2105
+ break;
2106
+ message.valueSource = {
2107
+ $case: "mysteryboxSecret",
2108
+ mysteryboxSecret: DevlabSpec_MysteryBoxSecretRef.decode(reader, reader.uint32())
2109
+ };
2110
+ continue;
2111
+ }
2112
+ default:
2113
+ break;
2114
+ }
2115
+ if ((tag & 7) === 4 || tag === 0) {
2116
+ break;
2117
+ }
2118
+ {
2119
+ if (!writer)
2120
+ writer = new BinaryWriter();
2121
+ const skipped = reader.skip(tag & 7, tag >>> 3);
2122
+ writer.uint32(tag).raw(skipped);
2123
+ }
2124
+ }
2125
+ if (writer) {
2126
+ message[unknownFieldsSymbol] = writer.finish();
2127
+ }
2128
+ return message;
2129
+ },
2130
+ fromJSON(object) {
2131
+ return applyDevlabSpec_EnvironmentVariableCustom({
2132
+ $type: "nebius.ai.v1.DevlabSpec.EnvironmentVariable",
2133
+ name: isSet(object.name ?? object.name)
2134
+ ? String(object.name ?? object.name)
2135
+ : "",
2136
+ valueSource: (() => {
2137
+ if (isSet(object.value) || isSet(object.value)) {
2138
+ return {
2139
+ $case: "value",
2140
+ value: String(object.value ?? object.value)
2141
+ };
2142
+ }
2143
+ if (isSet(object.mysteryboxSecret) || isSet(object.mysterybox_secret)) {
2144
+ return {
2145
+ $case: "mysteryboxSecret",
2146
+ mysteryboxSecret: DevlabSpec_MysteryBoxSecretRef.fromJSON(object.mysteryboxSecret ?? object.mysterybox_secret)
2147
+ };
2148
+ }
2149
+ return undefined;
2150
+ })(),
2151
+ });
2152
+ },
2153
+ toJSON(message, use = "json") {
2154
+ const obj = {};
2155
+ const pick = (json, pb) => (use === "json" ? json : pb);
2156
+ if (message.name !== "") {
2157
+ obj[pick("name", "name")] = message.name;
2158
+ }
2159
+ switch (message.valueSource?.$case) {
2160
+ case "value": {
2161
+ obj[pick("value", "value")] = message.valueSource.value;
2162
+ break;
2163
+ }
2164
+ case "mysteryboxSecret": {
2165
+ obj[pick("mysteryboxSecret", "mysterybox_secret")] = DevlabSpec_MysteryBoxSecretRef.toJSON(message.valueSource.mysteryboxSecret, use);
2166
+ break;
2167
+ }
2168
+ default: break;
2169
+ }
2170
+ return obj;
2171
+ },
2172
+ create(base) {
2173
+ return DevlabSpec_EnvironmentVariable.fromPartial(base ?? {});
2174
+ },
2175
+ fromPartial(object) {
2176
+ const message = createBaseDevlabSpec_EnvironmentVariable();
2177
+ message.name = (object.name !== undefined && object.name !== null)
2178
+ ? object.name
2179
+ : "";
2180
+ switch (object.valueSource?.$case) {
2181
+ case "value": {
2182
+ if (object.valueSource?.value !== undefined && object.valueSource?.value !== null) {
2183
+ message.valueSource = {
2184
+ $case: "value",
2185
+ value: object.valueSource.value,
2186
+ };
2187
+ }
2188
+ break;
2189
+ }
2190
+ case "mysteryboxSecret": {
2191
+ if (object.valueSource.mysteryboxSecret !== undefined && object.valueSource.mysteryboxSecret !== null) {
2192
+ message.valueSource = {
2193
+ $case: "mysteryboxSecret",
2194
+ mysteryboxSecret: DevlabSpec_MysteryBoxSecretRef.fromPartial(object.valueSource.mysteryboxSecret),
2195
+ };
2196
+ }
2197
+ break;
2198
+ }
2199
+ default: break;
2200
+ }
2201
+ return message;
2202
+ },
2203
+ };
2204
+ protoRegistry.registerMessage(DevlabSpec_EnvironmentVariable);
2205
+ function DevlabSpec_EnvironmentVariableCustomInspect() {
2206
+ const parts = [];
2207
+ if (this.name !== "")
2208
+ parts.push("name" + "=" + inspect(this.name));
2209
+ return `${this.$type}(${parts.join(", ")})`;
2210
+ }
2211
+ function DevlabSpec_EnvironmentVariableCustomJson() {
2212
+ const obj = {
2213
+ type: this.$type,
2214
+ };
2215
+ if (this.name !== "")
2216
+ obj.name = inspectJson(this.name);
2217
+ return obj;
2218
+ }
2219
+ function applyDevlabSpec_EnvironmentVariableCustom(message) {
2220
+ message[custom] = DevlabSpec_EnvironmentVariableCustomInspect;
2221
+ message[customJson] = DevlabSpec_EnvironmentVariableCustomJson;
2222
+ return attachMessageDescriptor(message, DevlabSpec_EnvironmentVariable.$descriptor);
2223
+ }
2224
+ function createBaseDevlabSpec_EnvironmentVariable() {
2225
+ const message = {
2226
+ $type: "nebius.ai.v1.DevlabSpec.EnvironmentVariable",
2227
+ name: "",
2228
+ valueSource: undefined,
2229
+ };
2230
+ return applyDevlabSpec_EnvironmentVariableCustom(message);
2231
+ }
2232
+ const DevlabSpec_Port_MESSAGE_DESCRIPTOR = {
2233
+ fields: {
2234
+ "containerPort": { pbName: "container_port", scalarType: 5 },
2235
+ "hostPort": { pbName: "host_port", scalarType: 5 },
2236
+ "protocol": { pbName: "protocol", scalarType: 14 },
2237
+ },
2238
+ };
2239
+ /** Encodes, decodes, converts, and creates {@link DevlabSpec_Port} messages. */
2240
+ export const DevlabSpec_Port = {
2241
+ $type: "nebius.ai.v1.DevlabSpec.Port",
2242
+ $descriptor: DevlabSpec_Port_MESSAGE_DESCRIPTOR,
2243
+ encode(message, writer = new BinaryWriter()) {
2244
+ if ((message.containerPort ?? 0) !== 0) {
2245
+ writer.uint32(8).int32(message.containerPort);
2246
+ }
2247
+ if ((message.hostPort ?? 0) !== 0) {
2248
+ writer.uint32(16).int32(message.hostPort);
2249
+ }
2250
+ if ((message.protocol ?? DevlabSpec_Port_Protocol.PROTOCOL_UNSPECIFIED) !== DevlabSpec_Port_Protocol.PROTOCOL_UNSPECIFIED) {
2251
+ DevlabSpec_Port_Protocol.encodeField(writer, 3, message.protocol);
2252
+ }
2253
+ if (message[unknownFieldsSymbol]) {
2254
+ writer.raw(message[unknownFieldsSymbol]);
2255
+ }
2256
+ return writer;
2257
+ },
2258
+ decode(input, length) {
2259
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2260
+ const end = length === undefined ? reader.len : reader.pos + length;
2261
+ const message = createBaseDevlabSpec_Port();
2262
+ let writer = undefined;
2263
+ while (reader.pos < end) {
2264
+ const tag = reader.uint32();
2265
+ switch (tag >>> 3) {
2266
+ case 1: {
2267
+ if (tag !== 8)
2268
+ break;
2269
+ message.containerPort = reader.int32();
2270
+ continue;
2271
+ }
2272
+ case 2: {
2273
+ if (tag !== 16)
2274
+ break;
2275
+ message.hostPort = reader.int32();
2276
+ continue;
2277
+ }
2278
+ case 3: {
2279
+ if (tag !== 24)
2280
+ break;
2281
+ message.protocol = DevlabSpec_Port_Protocol.fromNumber(reader.int32());
2282
+ continue;
2283
+ }
2284
+ default:
2285
+ break;
2286
+ }
2287
+ if ((tag & 7) === 4 || tag === 0) {
2288
+ break;
2289
+ }
2290
+ {
2291
+ if (!writer)
2292
+ writer = new BinaryWriter();
2293
+ const skipped = reader.skip(tag & 7, tag >>> 3);
2294
+ writer.uint32(tag).raw(skipped);
2295
+ }
2296
+ }
2297
+ if (writer) {
2298
+ message[unknownFieldsSymbol] = writer.finish();
2299
+ }
2300
+ return message;
2301
+ },
2302
+ fromJSON(object) {
2303
+ return applyDevlabSpec_PortCustom({
2304
+ $type: "nebius.ai.v1.DevlabSpec.Port",
2305
+ containerPort: isSet(object.containerPort ?? object.container_port)
2306
+ ? Number(object.containerPort ?? object.container_port)
2307
+ : 0,
2308
+ hostPort: isSet(object.hostPort ?? object.host_port)
2309
+ ? Number(object.hostPort ?? object.host_port)
2310
+ : 0,
2311
+ protocol: isSet(object.protocol ?? object.protocol)
2312
+ ? DevlabSpec_Port_Protocol.fromJSON(object.protocol ?? object.protocol)
2313
+ : DevlabSpec_Port_Protocol.PROTOCOL_UNSPECIFIED,
2314
+ });
2315
+ },
2316
+ toJSON(message, use = "json") {
2317
+ const obj = {};
2318
+ const pick = (json, pb) => (use === "json" ? json : pb);
2319
+ if ((message.containerPort ?? 0) !== 0) {
2320
+ obj[pick("containerPort", "container_port")] = message.containerPort;
2321
+ }
2322
+ if ((message.hostPort ?? 0) !== 0) {
2323
+ obj[pick("hostPort", "host_port")] = message.hostPort;
2324
+ }
2325
+ if ((message.protocol ?? DevlabSpec_Port_Protocol.PROTOCOL_UNSPECIFIED) !== DevlabSpec_Port_Protocol.PROTOCOL_UNSPECIFIED) {
2326
+ obj[pick("protocol", "protocol")] = DevlabSpec_Port_Protocol.toJSON(message.protocol);
2327
+ }
2328
+ return obj;
2329
+ },
2330
+ create(base) {
2331
+ return DevlabSpec_Port.fromPartial(base ?? {});
2332
+ },
2333
+ fromPartial(object) {
2334
+ const message = createBaseDevlabSpec_Port();
2335
+ message.containerPort = (object.containerPort !== undefined && object.containerPort !== null)
2336
+ ? object.containerPort
2337
+ : 0;
2338
+ message.hostPort = (object.hostPort !== undefined && object.hostPort !== null)
2339
+ ? object.hostPort
2340
+ : 0;
2341
+ message.protocol = (object.protocol !== undefined && object.protocol !== null)
2342
+ ? DevlabSpec_Port_Protocol.fromJSON(object.protocol.name)
2343
+ : DevlabSpec_Port_Protocol.PROTOCOL_UNSPECIFIED;
2344
+ return message;
2345
+ },
2346
+ };
2347
+ protoRegistry.registerMessage(DevlabSpec_Port);
2348
+ function DevlabSpec_PortCustomInspect() {
2349
+ const parts = [];
2350
+ if ((this.containerPort ?? 0) !== 0)
2351
+ parts.push("containerPort" + "=" + inspect(this.containerPort));
2352
+ if ((this.hostPort ?? 0) !== 0)
2353
+ parts.push("hostPort" + "=" + inspect(this.hostPort));
2354
+ if (this.protocol !== undefined)
2355
+ parts.push("protocol" + "=" + inspect(this.protocol));
2356
+ return `${this.$type}(${parts.join(", ")})`;
2357
+ }
2358
+ function DevlabSpec_PortCustomJson() {
2359
+ const obj = {
2360
+ type: this.$type,
2361
+ };
2362
+ if ((this.containerPort ?? 0) !== 0)
2363
+ obj.containerPort = inspectJson(this.containerPort);
2364
+ if ((this.hostPort ?? 0) !== 0)
2365
+ obj.hostPort = inspectJson(this.hostPort);
2366
+ if (this.protocol !== undefined)
2367
+ obj.protocol = inspectJson(this.protocol);
2368
+ return obj;
2369
+ }
2370
+ function applyDevlabSpec_PortCustom(message) {
2371
+ message[custom] = DevlabSpec_PortCustomInspect;
2372
+ message[customJson] = DevlabSpec_PortCustomJson;
2373
+ return attachMessageDescriptor(message, DevlabSpec_Port.$descriptor);
2374
+ }
2375
+ function createBaseDevlabSpec_Port() {
2376
+ const message = {
2377
+ $type: "nebius.ai.v1.DevlabSpec.Port",
2378
+ containerPort: 0,
2379
+ hostPort: 0,
2380
+ protocol: DevlabSpec_Port_Protocol.PROTOCOL_UNSPECIFIED,
2381
+ };
2382
+ return applyDevlabSpec_PortCustom(message);
2383
+ }
2384
+ const DevlabSpec_VolumeMount_sourceConfig_ONEOF_DESCRIPTOR = {
2385
+ fields: {
2386
+ "s3Config": { pbName: "s3_config", message: () => DevlabSpec_VolumeMount_S3Config.$descriptor },
2387
+ },
2388
+ };
2389
+ const DevlabSpec_VolumeMount_MESSAGE_DESCRIPTOR = {
2390
+ fields: {
2391
+ "source": { pbName: "source", scalarType: 9 },
2392
+ "sourcePath": { pbName: "source_path", scalarType: 9 },
2393
+ "containerPath": { pbName: "container_path", scalarType: 9 },
2394
+ "mode": { pbName: "mode", scalarType: 14 },
2395
+ "sourceConfig": { pbName: "source_config", oneof: true, message: () => DevlabSpec_VolumeMount_sourceConfig_ONEOF_DESCRIPTOR },
2396
+ },
2397
+ };
2398
+ /** Encodes, decodes, converts, and creates {@link DevlabSpec_VolumeMount} messages. */
2399
+ export const DevlabSpec_VolumeMount = {
2400
+ $type: "nebius.ai.v1.DevlabSpec.VolumeMount",
2401
+ $descriptor: DevlabSpec_VolumeMount_MESSAGE_DESCRIPTOR,
2402
+ encode(message, writer = new BinaryWriter()) {
2403
+ if (message.source !== "") {
2404
+ writer.uint32(10).string(message.source);
2405
+ }
2406
+ if (message.sourcePath !== "") {
2407
+ writer.uint32(18).string(message.sourcePath);
2408
+ }
2409
+ if (message.containerPath !== "") {
2410
+ writer.uint32(26).string(message.containerPath);
2411
+ }
2412
+ if ((message.mode ?? DevlabSpec_VolumeMount_Mode.MODE_UNSPECIFIED) !== DevlabSpec_VolumeMount_Mode.MODE_UNSPECIFIED) {
2413
+ DevlabSpec_VolumeMount_Mode.encodeField(writer, 4, message.mode);
2414
+ }
2415
+ if (message.sourceConfig?.$case === undefined) { /* noop */ }
2416
+ else if (message.sourceConfig?.$case === "s3Config") {
2417
+ const w = writer.uint32(42).fork();
2418
+ DevlabSpec_VolumeMount_S3Config.encode(message.sourceConfig.s3Config, w);
2419
+ w.join();
2420
+ }
2421
+ if (message[unknownFieldsSymbol]) {
2422
+ writer.raw(message[unknownFieldsSymbol]);
2423
+ }
2424
+ return writer;
2425
+ },
2426
+ decode(input, length) {
2427
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2428
+ const end = length === undefined ? reader.len : reader.pos + length;
2429
+ const message = createBaseDevlabSpec_VolumeMount();
2430
+ let writer = undefined;
2431
+ while (reader.pos < end) {
2432
+ const tag = reader.uint32();
2433
+ switch (tag >>> 3) {
2434
+ case 1: {
2435
+ if (tag !== 10)
2436
+ break;
2437
+ message.source = reader.string();
2438
+ continue;
2439
+ }
2440
+ case 2: {
2441
+ if (tag !== 18)
2442
+ break;
2443
+ message.sourcePath = reader.string();
2444
+ continue;
2445
+ }
2446
+ case 3: {
2447
+ if (tag !== 26)
2448
+ break;
2449
+ message.containerPath = reader.string();
2450
+ continue;
2451
+ }
2452
+ case 4: {
2453
+ if (tag !== 32)
2454
+ break;
2455
+ message.mode = DevlabSpec_VolumeMount_Mode.fromNumber(reader.int32());
2456
+ continue;
2457
+ }
2458
+ case 5: {
2459
+ if (tag !== 42)
2460
+ break;
2461
+ message.sourceConfig = {
2462
+ $case: "s3Config",
2463
+ s3Config: DevlabSpec_VolumeMount_S3Config.decode(reader, reader.uint32())
2464
+ };
2465
+ continue;
2466
+ }
2467
+ default:
2468
+ break;
2469
+ }
2470
+ if ((tag & 7) === 4 || tag === 0) {
2471
+ break;
2472
+ }
2473
+ {
2474
+ if (!writer)
2475
+ writer = new BinaryWriter();
2476
+ const skipped = reader.skip(tag & 7, tag >>> 3);
2477
+ writer.uint32(tag).raw(skipped);
2478
+ }
2479
+ }
2480
+ if (writer) {
2481
+ message[unknownFieldsSymbol] = writer.finish();
2482
+ }
2483
+ return message;
2484
+ },
2485
+ fromJSON(object) {
2486
+ return applyDevlabSpec_VolumeMountCustom({
2487
+ $type: "nebius.ai.v1.DevlabSpec.VolumeMount",
2488
+ source: isSet(object.source ?? object.source)
2489
+ ? String(object.source ?? object.source)
2490
+ : "",
2491
+ sourcePath: isSet(object.sourcePath ?? object.source_path)
2492
+ ? String(object.sourcePath ?? object.source_path)
2493
+ : "",
2494
+ containerPath: isSet(object.containerPath ?? object.container_path)
2495
+ ? String(object.containerPath ?? object.container_path)
2496
+ : "",
2497
+ mode: isSet(object.mode ?? object.mode)
2498
+ ? DevlabSpec_VolumeMount_Mode.fromJSON(object.mode ?? object.mode)
2499
+ : DevlabSpec_VolumeMount_Mode.MODE_UNSPECIFIED,
2500
+ sourceConfig: (() => {
2501
+ if (isSet(object.s3Config) || isSet(object.s3_config)) {
2502
+ return {
2503
+ $case: "s3Config",
2504
+ s3Config: DevlabSpec_VolumeMount_S3Config.fromJSON(object.s3Config ?? object.s3_config)
2505
+ };
2506
+ }
2507
+ return undefined;
2508
+ })(),
2509
+ });
2510
+ },
2511
+ toJSON(message, use = "json") {
2512
+ const obj = {};
2513
+ const pick = (json, pb) => (use === "json" ? json : pb);
2514
+ if (message.source !== "") {
2515
+ obj[pick("source", "source")] = message.source;
2516
+ }
2517
+ if (message.sourcePath !== "") {
2518
+ obj[pick("sourcePath", "source_path")] = message.sourcePath;
2519
+ }
2520
+ if (message.containerPath !== "") {
2521
+ obj[pick("containerPath", "container_path")] = message.containerPath;
2522
+ }
2523
+ if ((message.mode ?? DevlabSpec_VolumeMount_Mode.MODE_UNSPECIFIED) !== DevlabSpec_VolumeMount_Mode.MODE_UNSPECIFIED) {
2524
+ obj[pick("mode", "mode")] = DevlabSpec_VolumeMount_Mode.toJSON(message.mode);
2525
+ }
2526
+ switch (message.sourceConfig?.$case) {
2527
+ case "s3Config": {
2528
+ obj[pick("s3Config", "s3_config")] = DevlabSpec_VolumeMount_S3Config.toJSON(message.sourceConfig.s3Config, use);
2529
+ break;
2530
+ }
2531
+ default: break;
2532
+ }
2533
+ return obj;
2534
+ },
2535
+ create(base) {
2536
+ return DevlabSpec_VolumeMount.fromPartial(base ?? {});
2537
+ },
2538
+ fromPartial(object) {
2539
+ const message = createBaseDevlabSpec_VolumeMount();
2540
+ message.source = (object.source !== undefined && object.source !== null)
2541
+ ? object.source
2542
+ : "";
2543
+ message.sourcePath = (object.sourcePath !== undefined && object.sourcePath !== null)
2544
+ ? object.sourcePath
2545
+ : "";
2546
+ message.containerPath = (object.containerPath !== undefined && object.containerPath !== null)
2547
+ ? object.containerPath
2548
+ : "";
2549
+ message.mode = (object.mode !== undefined && object.mode !== null)
2550
+ ? DevlabSpec_VolumeMount_Mode.fromJSON(object.mode.name)
2551
+ : DevlabSpec_VolumeMount_Mode.MODE_UNSPECIFIED;
2552
+ switch (object.sourceConfig?.$case) {
2553
+ case "s3Config": {
2554
+ if (object.sourceConfig.s3Config !== undefined && object.sourceConfig.s3Config !== null) {
2555
+ message.sourceConfig = {
2556
+ $case: "s3Config",
2557
+ s3Config: DevlabSpec_VolumeMount_S3Config.fromPartial(object.sourceConfig.s3Config),
2558
+ };
2559
+ }
2560
+ break;
2561
+ }
2562
+ default: break;
2563
+ }
2564
+ return message;
2565
+ },
2566
+ };
2567
+ protoRegistry.registerMessage(DevlabSpec_VolumeMount);
2568
+ function DevlabSpec_VolumeMountCustomInspect() {
2569
+ const parts = [];
2570
+ if (this.source !== "")
2571
+ parts.push("source" + "=" + inspect(this.source));
2572
+ if (this.sourcePath !== "")
2573
+ parts.push("sourcePath" + "=" + inspect(this.sourcePath));
2574
+ if (this.containerPath !== "")
2575
+ parts.push("containerPath" + "=" + inspect(this.containerPath));
2576
+ if (this.mode !== undefined)
2577
+ parts.push("mode" + "=" + inspect(this.mode));
2578
+ return `${this.$type}(${parts.join(", ")})`;
2579
+ }
2580
+ function DevlabSpec_VolumeMountCustomJson() {
2581
+ const obj = {
2582
+ type: this.$type,
2583
+ };
2584
+ if (this.source !== "")
2585
+ obj.source = inspectJson(this.source);
2586
+ if (this.sourcePath !== "")
2587
+ obj.sourcePath = inspectJson(this.sourcePath);
2588
+ if (this.containerPath !== "")
2589
+ obj.containerPath = inspectJson(this.containerPath);
2590
+ if (this.mode !== undefined)
2591
+ obj.mode = inspectJson(this.mode);
2592
+ return obj;
2593
+ }
2594
+ function applyDevlabSpec_VolumeMountCustom(message) {
2595
+ message[custom] = DevlabSpec_VolumeMountCustomInspect;
2596
+ message[customJson] = DevlabSpec_VolumeMountCustomJson;
2597
+ return attachMessageDescriptor(message, DevlabSpec_VolumeMount.$descriptor);
2598
+ }
2599
+ function createBaseDevlabSpec_VolumeMount() {
2600
+ const message = {
2601
+ $type: "nebius.ai.v1.DevlabSpec.VolumeMount",
2602
+ source: "",
2603
+ sourcePath: "",
2604
+ containerPath: "",
2605
+ mode: DevlabSpec_VolumeMount_Mode.MODE_UNSPECIFIED,
2606
+ sourceConfig: undefined,
2607
+ };
2608
+ return applyDevlabSpec_VolumeMountCustom(message);
2609
+ }
2610
+ const DevlabSpec_VolumeMount_S3Config_MESSAGE_DESCRIPTOR = {
2611
+ fields: {
2612
+ "endpoint": { pbName: "endpoint", scalarType: 9 },
2613
+ "region": { pbName: "region", scalarType: 9 },
2614
+ "mysteryboxSecret": { pbName: "mysterybox_secret", message: () => DevlabSpec_MysteryBoxSecretRef.$descriptor },
2615
+ },
2616
+ };
2617
+ /** Encodes, decodes, converts, and creates {@link DevlabSpec_VolumeMount_S3Config} messages. */
2618
+ export const DevlabSpec_VolumeMount_S3Config = {
2619
+ $type: "nebius.ai.v1.DevlabSpec.VolumeMount.S3Config",
2620
+ $descriptor: DevlabSpec_VolumeMount_S3Config_MESSAGE_DESCRIPTOR,
2621
+ encode(message, writer = new BinaryWriter()) {
2622
+ if (message.endpoint !== "") {
2623
+ writer.uint32(10).string(message.endpoint);
2624
+ }
2625
+ if (message.region !== "") {
2626
+ writer.uint32(18).string(message.region);
2627
+ }
2628
+ if (message.mysteryboxSecret !== undefined) {
2629
+ const w = writer.uint32(26).fork();
2630
+ DevlabSpec_MysteryBoxSecretRef.encode(message.mysteryboxSecret, w);
2631
+ w.join();
2632
+ }
2633
+ if (message[unknownFieldsSymbol]) {
2634
+ writer.raw(message[unknownFieldsSymbol]);
2635
+ }
2636
+ return writer;
2637
+ },
2638
+ decode(input, length) {
2639
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2640
+ const end = length === undefined ? reader.len : reader.pos + length;
2641
+ const message = createBaseDevlabSpec_VolumeMount_S3Config();
2642
+ let writer = undefined;
2643
+ while (reader.pos < end) {
2644
+ const tag = reader.uint32();
2645
+ switch (tag >>> 3) {
2646
+ case 1: {
2647
+ if (tag !== 10)
2648
+ break;
2649
+ message.endpoint = reader.string();
2650
+ continue;
2651
+ }
2652
+ case 2: {
2653
+ if (tag !== 18)
2654
+ break;
2655
+ message.region = reader.string();
2656
+ continue;
2657
+ }
2658
+ case 3: {
2659
+ if (tag !== 26)
2660
+ break;
2661
+ message.mysteryboxSecret = DevlabSpec_MysteryBoxSecretRef.decode(reader, reader.uint32());
2662
+ continue;
2663
+ }
2664
+ default:
2665
+ break;
2666
+ }
2667
+ if ((tag & 7) === 4 || tag === 0) {
2668
+ break;
2669
+ }
2670
+ {
2671
+ if (!writer)
2672
+ writer = new BinaryWriter();
2673
+ const skipped = reader.skip(tag & 7, tag >>> 3);
2674
+ writer.uint32(tag).raw(skipped);
2675
+ }
2676
+ }
2677
+ if (writer) {
2678
+ message[unknownFieldsSymbol] = writer.finish();
2679
+ }
2680
+ return message;
2681
+ },
2682
+ fromJSON(object) {
2683
+ return applyDevlabSpec_VolumeMount_S3ConfigCustom({
2684
+ $type: "nebius.ai.v1.DevlabSpec.VolumeMount.S3Config",
2685
+ endpoint: isSet(object.endpoint ?? object.endpoint)
2686
+ ? String(object.endpoint ?? object.endpoint)
2687
+ : "",
2688
+ region: isSet(object.region ?? object.region)
2689
+ ? String(object.region ?? object.region)
2690
+ : "",
2691
+ mysteryboxSecret: isSet(object.mysteryboxSecret ?? object.mysterybox_secret)
2692
+ ? DevlabSpec_MysteryBoxSecretRef.fromJSON(object.mysteryboxSecret ?? object.mysterybox_secret)
2693
+ : undefined,
2694
+ });
2695
+ },
2696
+ toJSON(message, use = "json") {
2697
+ const obj = {};
2698
+ const pick = (json, pb) => (use === "json" ? json : pb);
2699
+ if (message.endpoint !== "") {
2700
+ obj[pick("endpoint", "endpoint")] = message.endpoint;
2701
+ }
2702
+ if (message.region !== "") {
2703
+ obj[pick("region", "region")] = message.region;
2704
+ }
2705
+ if (message.mysteryboxSecret !== undefined) {
2706
+ obj[pick("mysteryboxSecret", "mysterybox_secret")] = message.mysteryboxSecret
2707
+ ? DevlabSpec_MysteryBoxSecretRef.toJSON(message.mysteryboxSecret, use)
2708
+ : undefined;
2709
+ }
2710
+ return obj;
2711
+ },
2712
+ create(base) {
2713
+ return DevlabSpec_VolumeMount_S3Config.fromPartial(base ?? {});
2714
+ },
2715
+ fromPartial(object) {
2716
+ const message = createBaseDevlabSpec_VolumeMount_S3Config();
2717
+ message.endpoint = (object.endpoint !== undefined && object.endpoint !== null)
2718
+ ? object.endpoint
2719
+ : "";
2720
+ message.region = (object.region !== undefined && object.region !== null)
2721
+ ? object.region
2722
+ : "";
2723
+ message.mysteryboxSecret = (object.mysteryboxSecret !== undefined && object.mysteryboxSecret !== null)
2724
+ ? DevlabSpec_MysteryBoxSecretRef.fromPartial(object.mysteryboxSecret)
2725
+ : undefined;
2726
+ return message;
2727
+ },
2728
+ };
2729
+ protoRegistry.registerMessage(DevlabSpec_VolumeMount_S3Config);
2730
+ function DevlabSpec_VolumeMount_S3ConfigCustomInspect() {
2731
+ const parts = [];
2732
+ if (this.endpoint !== "")
2733
+ parts.push("endpoint" + "=" + inspect(this.endpoint));
2734
+ if (this.region !== "")
2735
+ parts.push("region" + "=" + inspect(this.region));
2736
+ if (this.mysteryboxSecret !== undefined)
2737
+ parts.push("mysteryboxSecret" + "=" + inspect(this.mysteryboxSecret));
2738
+ return `${this.$type}(${parts.join(", ")})`;
2739
+ }
2740
+ function DevlabSpec_VolumeMount_S3ConfigCustomJson() {
2741
+ const obj = {
2742
+ type: this.$type,
2743
+ };
2744
+ if (this.endpoint !== "")
2745
+ obj.endpoint = inspectJson(this.endpoint);
2746
+ if (this.region !== "")
2747
+ obj.region = inspectJson(this.region);
2748
+ if (this.mysteryboxSecret !== undefined)
2749
+ obj.mysteryboxSecret = inspectJson(this.mysteryboxSecret);
2750
+ return obj;
2751
+ }
2752
+ function applyDevlabSpec_VolumeMount_S3ConfigCustom(message) {
2753
+ message[custom] = DevlabSpec_VolumeMount_S3ConfigCustomInspect;
2754
+ message[customJson] = DevlabSpec_VolumeMount_S3ConfigCustomJson;
2755
+ return attachMessageDescriptor(message, DevlabSpec_VolumeMount_S3Config.$descriptor);
2756
+ }
2757
+ function createBaseDevlabSpec_VolumeMount_S3Config() {
2758
+ const message = {
2759
+ $type: "nebius.ai.v1.DevlabSpec.VolumeMount.S3Config",
2760
+ endpoint: "",
2761
+ region: "",
2762
+ mysteryboxSecret: undefined,
2763
+ };
2764
+ return applyDevlabSpec_VolumeMount_S3ConfigCustom(message);
2765
+ }
2766
+ const DevlabSpec_DiskSpec_MESSAGE_DESCRIPTOR = {
2767
+ fields: {
2768
+ "type": { pbName: "type", scalarType: 14 },
2769
+ "sizeBytes": { pbName: "size_bytes", scalarType: 3 },
2770
+ },
2771
+ };
2772
+ /** Encodes, decodes, converts, and creates {@link DevlabSpec_DiskSpec} messages. */
2773
+ export const DevlabSpec_DiskSpec = {
2774
+ $type: "nebius.ai.v1.DevlabSpec.DiskSpec",
2775
+ $descriptor: DevlabSpec_DiskSpec_MESSAGE_DESCRIPTOR,
2776
+ encode(message, writer = new BinaryWriter()) {
2777
+ if ((message.type ?? DiskSpec_DiskType.UNSPECIFIED) !== DiskSpec_DiskType.UNSPECIFIED) {
2778
+ DiskSpec_DiskType.encodeField(writer, 1, message.type);
2779
+ }
2780
+ if (message.sizeBytes !== undefined && !message.sizeBytes.isZero?.()) {
2781
+ writer.uint32(16).int64(message.sizeBytes.toString());
2782
+ }
2783
+ if (message[unknownFieldsSymbol]) {
2784
+ writer.raw(message[unknownFieldsSymbol]);
2785
+ }
2786
+ return writer;
2787
+ },
2788
+ decode(input, length) {
2789
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2790
+ const end = length === undefined ? reader.len : reader.pos + length;
2791
+ const message = createBaseDevlabSpec_DiskSpec();
2792
+ let writer = undefined;
2793
+ while (reader.pos < end) {
2794
+ const tag = reader.uint32();
2795
+ switch (tag >>> 3) {
2796
+ case 1: {
2797
+ if (tag !== 8)
2798
+ break;
2799
+ message.type = DiskSpec_DiskType.fromNumber(reader.int32());
2800
+ continue;
2801
+ }
2802
+ case 2: {
2803
+ if (tag !== 16)
2804
+ break;
2805
+ message.sizeBytes = Long.fromValue(reader.int64());
2806
+ continue;
2807
+ }
2808
+ default:
2809
+ break;
2810
+ }
2811
+ if ((tag & 7) === 4 || tag === 0) {
2812
+ break;
2813
+ }
2814
+ {
2815
+ if (!writer)
2816
+ writer = new BinaryWriter();
2817
+ const skipped = reader.skip(tag & 7, tag >>> 3);
2818
+ writer.uint32(tag).raw(skipped);
2819
+ }
2820
+ }
2821
+ if (writer) {
2822
+ message[unknownFieldsSymbol] = writer.finish();
2823
+ }
2824
+ return message;
2825
+ },
2826
+ fromJSON(object) {
2827
+ return applyDevlabSpec_DiskSpecCustom({
2828
+ $type: "nebius.ai.v1.DevlabSpec.DiskSpec",
2829
+ type: isSet(object.type ?? object.type)
2830
+ ? DiskSpec_DiskType.fromJSON(object.type ?? object.type)
2831
+ : DiskSpec_DiskType.UNSPECIFIED,
2832
+ sizeBytes: isSet(object.sizeBytes ?? object.size_bytes)
2833
+ ? Long.fromValue(object.sizeBytes ?? object.size_bytes)
2834
+ : Long.ZERO,
2835
+ });
2836
+ },
2837
+ toJSON(message, use = "json") {
2838
+ const obj = {};
2839
+ const pick = (json, pb) => (use === "json" ? json : pb);
2840
+ if ((message.type ?? DiskSpec_DiskType.UNSPECIFIED) !== DiskSpec_DiskType.UNSPECIFIED) {
2841
+ obj[pick("type", "type")] = DiskSpec_DiskType.toJSON(message.type);
2842
+ }
2843
+ if (!message.sizeBytes?.isZero?.()) {
2844
+ obj[pick("sizeBytes", "size_bytes")] = (message.sizeBytes || Long.ZERO).toString();
2845
+ }
2846
+ return obj;
2847
+ },
2848
+ create(base) {
2849
+ return DevlabSpec_DiskSpec.fromPartial(base ?? {});
2850
+ },
2851
+ fromPartial(object) {
2852
+ const message = createBaseDevlabSpec_DiskSpec();
2853
+ message.type = (object.type !== undefined && object.type !== null)
2854
+ ? DiskSpec_DiskType.fromJSON(object.type.name)
2855
+ : DiskSpec_DiskType.UNSPECIFIED;
2856
+ message.sizeBytes = (object.sizeBytes !== undefined && object.sizeBytes !== null)
2857
+ ? Long.fromValue(object.sizeBytes)
2858
+ : Long.ZERO;
2859
+ return message;
2860
+ },
2861
+ };
2862
+ protoRegistry.registerMessage(DevlabSpec_DiskSpec);
2863
+ function DevlabSpec_DiskSpecCustomInspect() {
2864
+ const parts = [];
2865
+ if (this.type !== undefined)
2866
+ parts.push("type" + "=" + inspect(this.type));
2867
+ if (!this.sizeBytes?.isZero?.())
2868
+ parts.push("sizeBytes" + "=" + inspect(this.sizeBytes));
2869
+ return `${this.$type}(${parts.join(", ")})`;
2870
+ }
2871
+ function DevlabSpec_DiskSpecCustomJson() {
2872
+ const obj = {
2873
+ type: this.$type,
2874
+ };
2875
+ if (this.type !== undefined)
2876
+ obj.type = inspectJson(this.type);
2877
+ if (!this.sizeBytes?.isZero?.())
2878
+ obj.sizeBytes = inspectJson(this.sizeBytes);
2879
+ return obj;
2880
+ }
2881
+ function applyDevlabSpec_DiskSpecCustom(message) {
2882
+ message[custom] = DevlabSpec_DiskSpecCustomInspect;
2883
+ message[customJson] = DevlabSpec_DiskSpecCustomJson;
2884
+ return attachMessageDescriptor(message, DevlabSpec_DiskSpec.$descriptor);
2885
+ }
2886
+ function createBaseDevlabSpec_DiskSpec() {
2887
+ const message = {
2888
+ $type: "nebius.ai.v1.DevlabSpec.DiskSpec",
2889
+ type: DiskSpec_DiskType.UNSPECIFIED,
2890
+ sizeBytes: Long.ZERO,
2891
+ };
2892
+ return applyDevlabSpec_DiskSpecCustom(message);
2893
+ }
2894
+ const DevlabSpec_RegistryCredentials_MESSAGE_DESCRIPTOR = {
2895
+ fields: {
2896
+ "mysteryboxSecretVersion": { pbName: "mysterybox_secret_version", scalarType: 9 },
2897
+ },
2898
+ };
2899
+ /** Encodes, decodes, converts, and creates {@link DevlabSpec_RegistryCredentials} messages. */
2900
+ export const DevlabSpec_RegistryCredentials = {
2901
+ $type: "nebius.ai.v1.DevlabSpec.RegistryCredentials",
2902
+ $descriptor: DevlabSpec_RegistryCredentials_MESSAGE_DESCRIPTOR,
2903
+ encode(message, writer = new BinaryWriter()) {
2904
+ if (message.mysteryboxSecretVersion !== "") {
2905
+ writer.uint32(10).string(message.mysteryboxSecretVersion);
2906
+ }
2907
+ if (message[unknownFieldsSymbol]) {
2908
+ writer.raw(message[unknownFieldsSymbol]);
2909
+ }
2910
+ return writer;
2911
+ },
2912
+ decode(input, length) {
2913
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2914
+ const end = length === undefined ? reader.len : reader.pos + length;
2915
+ const message = createBaseDevlabSpec_RegistryCredentials();
2916
+ let writer = undefined;
2917
+ while (reader.pos < end) {
2918
+ const tag = reader.uint32();
2919
+ switch (tag >>> 3) {
2920
+ case 1: {
2921
+ if (tag !== 10)
2922
+ break;
2923
+ message.mysteryboxSecretVersion = reader.string();
2924
+ continue;
2925
+ }
2926
+ default:
2927
+ break;
2928
+ }
2929
+ if ((tag & 7) === 4 || tag === 0) {
2930
+ break;
2931
+ }
2932
+ {
2933
+ if (!writer)
2934
+ writer = new BinaryWriter();
2935
+ const skipped = reader.skip(tag & 7, tag >>> 3);
2936
+ writer.uint32(tag).raw(skipped);
2937
+ }
2938
+ }
2939
+ if (writer) {
2940
+ message[unknownFieldsSymbol] = writer.finish();
2941
+ }
2942
+ return message;
2943
+ },
2944
+ fromJSON(object) {
2945
+ return applyDevlabSpec_RegistryCredentialsCustom({
2946
+ $type: "nebius.ai.v1.DevlabSpec.RegistryCredentials",
2947
+ mysteryboxSecretVersion: isSet(object.mysteryboxSecretVersion ?? object.mysterybox_secret_version)
2948
+ ? String(object.mysteryboxSecretVersion ?? object.mysterybox_secret_version)
2949
+ : "",
2950
+ });
2951
+ },
2952
+ toJSON(message, use = "json") {
2953
+ const obj = {};
2954
+ const pick = (json, pb) => (use === "json" ? json : pb);
2955
+ if (message.mysteryboxSecretVersion !== "") {
2956
+ obj[pick("mysteryboxSecretVersion", "mysterybox_secret_version")] = message.mysteryboxSecretVersion;
2957
+ }
2958
+ return obj;
2959
+ },
2960
+ create(base) {
2961
+ return DevlabSpec_RegistryCredentials.fromPartial(base ?? {});
2962
+ },
2963
+ fromPartial(object) {
2964
+ const message = createBaseDevlabSpec_RegistryCredentials();
2965
+ message.mysteryboxSecretVersion = (object.mysteryboxSecretVersion !== undefined && object.mysteryboxSecretVersion !== null)
2966
+ ? object.mysteryboxSecretVersion
2967
+ : "";
2968
+ return message;
2969
+ },
2970
+ };
2971
+ protoRegistry.registerMessage(DevlabSpec_RegistryCredentials);
2972
+ function DevlabSpec_RegistryCredentialsCustomInspect() {
2973
+ const parts = [];
2974
+ if (this.mysteryboxSecretVersion !== "")
2975
+ parts.push("mysteryboxSecretVersion" + "=" + inspect(this.mysteryboxSecretVersion));
2976
+ return `${this.$type}(${parts.join(", ")})`;
2977
+ }
2978
+ function DevlabSpec_RegistryCredentialsCustomJson() {
2979
+ const obj = {
2980
+ type: this.$type,
2981
+ };
2982
+ if (this.mysteryboxSecretVersion !== "")
2983
+ obj.mysteryboxSecretVersion = inspectJson(this.mysteryboxSecretVersion);
2984
+ return obj;
2985
+ }
2986
+ function applyDevlabSpec_RegistryCredentialsCustom(message) {
2987
+ message[custom] = DevlabSpec_RegistryCredentialsCustomInspect;
2988
+ message[customJson] = DevlabSpec_RegistryCredentialsCustomJson;
2989
+ return attachMessageDescriptor(message, DevlabSpec_RegistryCredentials.$descriptor);
2990
+ }
2991
+ function createBaseDevlabSpec_RegistryCredentials() {
2992
+ const message = {
2993
+ $type: "nebius.ai.v1.DevlabSpec.RegistryCredentials",
2994
+ mysteryboxSecretVersion: "",
2995
+ };
2996
+ return applyDevlabSpec_RegistryCredentialsCustom(message);
2997
+ }
2998
+ const DevlabSpec_Workspace_MESSAGE_DESCRIPTOR = {
2999
+ fields: {
3000
+ "containerPath": { pbName: "container_path", immutable: true, scalarType: 9 },
3001
+ },
3002
+ };
3003
+ /** Encodes, decodes, converts, and creates {@link DevlabSpec_Workspace} messages. */
3004
+ export const DevlabSpec_Workspace = {
3005
+ $type: "nebius.ai.v1.DevlabSpec.Workspace",
3006
+ $descriptor: DevlabSpec_Workspace_MESSAGE_DESCRIPTOR,
3007
+ encode(message, writer = new BinaryWriter()) {
3008
+ if (message.containerPath !== "") {
3009
+ writer.uint32(10).string(message.containerPath);
3010
+ }
3011
+ if (message[unknownFieldsSymbol]) {
3012
+ writer.raw(message[unknownFieldsSymbol]);
3013
+ }
3014
+ return writer;
3015
+ },
3016
+ decode(input, length) {
3017
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3018
+ const end = length === undefined ? reader.len : reader.pos + length;
3019
+ const message = createBaseDevlabSpec_Workspace();
3020
+ let writer = undefined;
3021
+ while (reader.pos < end) {
3022
+ const tag = reader.uint32();
3023
+ switch (tag >>> 3) {
3024
+ case 1: {
3025
+ if (tag !== 10)
3026
+ break;
3027
+ message.containerPath = reader.string();
3028
+ continue;
3029
+ }
3030
+ default:
3031
+ break;
3032
+ }
3033
+ if ((tag & 7) === 4 || tag === 0) {
3034
+ break;
3035
+ }
3036
+ {
3037
+ if (!writer)
3038
+ writer = new BinaryWriter();
3039
+ const skipped = reader.skip(tag & 7, tag >>> 3);
3040
+ writer.uint32(tag).raw(skipped);
3041
+ }
3042
+ }
3043
+ if (writer) {
3044
+ message[unknownFieldsSymbol] = writer.finish();
3045
+ }
3046
+ return message;
3047
+ },
3048
+ fromJSON(object) {
3049
+ return applyDevlabSpec_WorkspaceCustom({
3050
+ $type: "nebius.ai.v1.DevlabSpec.Workspace",
3051
+ containerPath: isSet(object.containerPath ?? object.container_path)
3052
+ ? String(object.containerPath ?? object.container_path)
3053
+ : "",
3054
+ });
3055
+ },
3056
+ toJSON(message, use = "json") {
3057
+ const obj = {};
3058
+ const pick = (json, pb) => (use === "json" ? json : pb);
3059
+ if (message.containerPath !== "") {
3060
+ obj[pick("containerPath", "container_path")] = message.containerPath;
3061
+ }
3062
+ return obj;
3063
+ },
3064
+ create(base) {
3065
+ return DevlabSpec_Workspace.fromPartial(base ?? {});
3066
+ },
3067
+ fromPartial(object) {
3068
+ const message = createBaseDevlabSpec_Workspace();
3069
+ message.containerPath = (object.containerPath !== undefined && object.containerPath !== null)
3070
+ ? object.containerPath
3071
+ : "";
3072
+ return message;
3073
+ },
3074
+ };
3075
+ protoRegistry.registerMessage(DevlabSpec_Workspace);
3076
+ function DevlabSpec_WorkspaceCustomInspect() {
3077
+ const parts = [];
3078
+ if (this.containerPath !== "")
3079
+ parts.push("containerPath" + "=" + inspect(this.containerPath));
3080
+ return `${this.$type}(${parts.join(", ")})`;
3081
+ }
3082
+ function DevlabSpec_WorkspaceCustomJson() {
3083
+ const obj = {
3084
+ type: this.$type,
3085
+ };
3086
+ if (this.containerPath !== "")
3087
+ obj.containerPath = inspectJson(this.containerPath);
3088
+ return obj;
3089
+ }
3090
+ function applyDevlabSpec_WorkspaceCustom(message) {
3091
+ message[custom] = DevlabSpec_WorkspaceCustomInspect;
3092
+ message[customJson] = DevlabSpec_WorkspaceCustomJson;
3093
+ return attachMessageDescriptor(message, DevlabSpec_Workspace.$descriptor);
3094
+ }
3095
+ function createBaseDevlabSpec_Workspace() {
3096
+ const message = {
3097
+ $type: "nebius.ai.v1.DevlabSpec.Workspace",
3098
+ containerPath: "",
3099
+ };
3100
+ return applyDevlabSpec_WorkspaceCustom(message);
3101
+ }
3102
+ const DevlabSpec_PrimaryRoute_MESSAGE_DESCRIPTOR = {
3103
+ fields: {
3104
+ "containerPort": { pbName: "container_port", immutable: true, scalarType: 5 },
3105
+ },
3106
+ };
3107
+ /** Encodes, decodes, converts, and creates {@link DevlabSpec_PrimaryRoute} messages. */
3108
+ export const DevlabSpec_PrimaryRoute = {
3109
+ $type: "nebius.ai.v1.DevlabSpec.PrimaryRoute",
3110
+ $descriptor: DevlabSpec_PrimaryRoute_MESSAGE_DESCRIPTOR,
3111
+ encode(message, writer = new BinaryWriter()) {
3112
+ if ((message.containerPort ?? 0) !== 0) {
3113
+ writer.uint32(8).int32(message.containerPort);
3114
+ }
3115
+ if (message[unknownFieldsSymbol]) {
3116
+ writer.raw(message[unknownFieldsSymbol]);
3117
+ }
3118
+ return writer;
3119
+ },
3120
+ decode(input, length) {
3121
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3122
+ const end = length === undefined ? reader.len : reader.pos + length;
3123
+ const message = createBaseDevlabSpec_PrimaryRoute();
3124
+ let writer = undefined;
3125
+ while (reader.pos < end) {
3126
+ const tag = reader.uint32();
3127
+ switch (tag >>> 3) {
3128
+ case 1: {
3129
+ if (tag !== 8)
3130
+ break;
3131
+ message.containerPort = reader.int32();
3132
+ continue;
3133
+ }
3134
+ default:
3135
+ break;
3136
+ }
3137
+ if ((tag & 7) === 4 || tag === 0) {
3138
+ break;
3139
+ }
3140
+ {
3141
+ if (!writer)
3142
+ writer = new BinaryWriter();
3143
+ const skipped = reader.skip(tag & 7, tag >>> 3);
3144
+ writer.uint32(tag).raw(skipped);
3145
+ }
3146
+ }
3147
+ if (writer) {
3148
+ message[unknownFieldsSymbol] = writer.finish();
3149
+ }
3150
+ return message;
3151
+ },
3152
+ fromJSON(object) {
3153
+ return applyDevlabSpec_PrimaryRouteCustom({
3154
+ $type: "nebius.ai.v1.DevlabSpec.PrimaryRoute",
3155
+ containerPort: isSet(object.containerPort ?? object.container_port)
3156
+ ? Number(object.containerPort ?? object.container_port)
3157
+ : 0,
3158
+ });
3159
+ },
3160
+ toJSON(message, use = "json") {
3161
+ const obj = {};
3162
+ const pick = (json, pb) => (use === "json" ? json : pb);
3163
+ if ((message.containerPort ?? 0) !== 0) {
3164
+ obj[pick("containerPort", "container_port")] = message.containerPort;
3165
+ }
3166
+ return obj;
3167
+ },
3168
+ create(base) {
3169
+ return DevlabSpec_PrimaryRoute.fromPartial(base ?? {});
3170
+ },
3171
+ fromPartial(object) {
3172
+ const message = createBaseDevlabSpec_PrimaryRoute();
3173
+ message.containerPort = (object.containerPort !== undefined && object.containerPort !== null)
3174
+ ? object.containerPort
3175
+ : 0;
3176
+ return message;
3177
+ },
3178
+ };
3179
+ protoRegistry.registerMessage(DevlabSpec_PrimaryRoute);
3180
+ function DevlabSpec_PrimaryRouteCustomInspect() {
3181
+ const parts = [];
3182
+ if ((this.containerPort ?? 0) !== 0)
3183
+ parts.push("containerPort" + "=" + inspect(this.containerPort));
3184
+ return `${this.$type}(${parts.join(", ")})`;
3185
+ }
3186
+ function DevlabSpec_PrimaryRouteCustomJson() {
3187
+ const obj = {
3188
+ type: this.$type,
3189
+ };
3190
+ if ((this.containerPort ?? 0) !== 0)
3191
+ obj.containerPort = inspectJson(this.containerPort);
3192
+ return obj;
3193
+ }
3194
+ function applyDevlabSpec_PrimaryRouteCustom(message) {
3195
+ message[custom] = DevlabSpec_PrimaryRouteCustomInspect;
3196
+ message[customJson] = DevlabSpec_PrimaryRouteCustomJson;
3197
+ return attachMessageDescriptor(message, DevlabSpec_PrimaryRoute.$descriptor);
3198
+ }
3199
+ function createBaseDevlabSpec_PrimaryRoute() {
3200
+ const message = {
3201
+ $type: "nebius.ai.v1.DevlabSpec.PrimaryRoute",
3202
+ containerPort: 0,
3203
+ };
3204
+ return applyDevlabSpec_PrimaryRouteCustom(message);
3205
+ }
3206
+ const DevlabSpec_FileInjection_MESSAGE_DESCRIPTOR = {
3207
+ fields: {
3208
+ "containerPath": { pbName: "container_path", scalarType: 9 },
3209
+ "content": { pbName: "content", scalarType: 12 },
3210
+ },
3211
+ };
3212
+ /** Encodes, decodes, converts, and creates {@link DevlabSpec_FileInjection} messages. */
3213
+ export const DevlabSpec_FileInjection = {
3214
+ $type: "nebius.ai.v1.DevlabSpec.FileInjection",
3215
+ $descriptor: DevlabSpec_FileInjection_MESSAGE_DESCRIPTOR,
3216
+ encode(message, writer = new BinaryWriter()) {
3217
+ if (message.containerPath !== "") {
3218
+ writer.uint32(10).string(message.containerPath);
3219
+ }
3220
+ if ((message.content?.length ?? 0) !== 0) {
3221
+ writer.uint32(18).bytes(message.content);
3222
+ }
3223
+ if (message[unknownFieldsSymbol]) {
3224
+ writer.raw(message[unknownFieldsSymbol]);
3225
+ }
3226
+ return writer;
3227
+ },
3228
+ decode(input, length) {
3229
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3230
+ const end = length === undefined ? reader.len : reader.pos + length;
3231
+ const message = createBaseDevlabSpec_FileInjection();
3232
+ let writer = undefined;
3233
+ while (reader.pos < end) {
3234
+ const tag = reader.uint32();
3235
+ switch (tag >>> 3) {
3236
+ case 1: {
3237
+ if (tag !== 10)
3238
+ break;
3239
+ message.containerPath = reader.string();
3240
+ continue;
3241
+ }
3242
+ case 2: {
3243
+ if (tag !== 18)
3244
+ break;
3245
+ message.content = reader.bytes();
3246
+ continue;
3247
+ }
3248
+ default:
3249
+ break;
3250
+ }
3251
+ if ((tag & 7) === 4 || tag === 0) {
3252
+ break;
3253
+ }
3254
+ {
3255
+ if (!writer)
3256
+ writer = new BinaryWriter();
3257
+ const skipped = reader.skip(tag & 7, tag >>> 3);
3258
+ writer.uint32(tag).raw(skipped);
3259
+ }
3260
+ }
3261
+ if (writer) {
3262
+ message[unknownFieldsSymbol] = writer.finish();
3263
+ }
3264
+ return message;
3265
+ },
3266
+ fromJSON(object) {
3267
+ return applyDevlabSpec_FileInjectionCustom({
3268
+ $type: "nebius.ai.v1.DevlabSpec.FileInjection",
3269
+ containerPath: isSet(object.containerPath ?? object.container_path)
3270
+ ? String(object.containerPath ?? object.container_path)
3271
+ : "",
3272
+ content: isSet(object.content ?? object.content)
3273
+ ? bytesFromBase64(object.content ?? object.content)
3274
+ : new Uint8Array(0),
3275
+ });
3276
+ },
3277
+ toJSON(message, use = "json") {
3278
+ const obj = {};
3279
+ const pick = (json, pb) => (use === "json" ? json : pb);
3280
+ if (message.containerPath !== "") {
3281
+ obj[pick("containerPath", "container_path")] = message.containerPath;
3282
+ }
3283
+ if ((message.content?.length ?? 0) !== 0) {
3284
+ obj[pick("content", "content")] = base64FromBytes(message.content);
3285
+ }
3286
+ return obj;
3287
+ },
3288
+ create(base) {
3289
+ return DevlabSpec_FileInjection.fromPartial(base ?? {});
3290
+ },
3291
+ fromPartial(object) {
3292
+ const message = createBaseDevlabSpec_FileInjection();
3293
+ message.containerPath = (object.containerPath !== undefined && object.containerPath !== null)
3294
+ ? object.containerPath
3295
+ : "";
3296
+ message.content = (object.content !== undefined && object.content !== null)
3297
+ ? object.content
3298
+ : new Uint8Array(0);
3299
+ return message;
3300
+ },
3301
+ };
3302
+ protoRegistry.registerMessage(DevlabSpec_FileInjection);
3303
+ function DevlabSpec_FileInjectionCustomInspect() {
3304
+ const parts = [];
3305
+ if (this.containerPath !== "")
3306
+ parts.push("containerPath" + "=" + inspect(this.containerPath));
3307
+ if ((this.content?.length ?? 0) !== 0)
3308
+ parts.push("content" + "=***");
3309
+ return `${this.$type}(${parts.join(", ")})`;
3310
+ }
3311
+ function DevlabSpec_FileInjectionCustomJson() {
3312
+ const obj = {
3313
+ type: this.$type,
3314
+ };
3315
+ if (this.containerPath !== "")
3316
+ obj.containerPath = inspectJson(this.containerPath);
3317
+ if ((this.content?.length ?? 0) !== 0)
3318
+ obj.content = "***";
3319
+ return obj;
3320
+ }
3321
+ function applyDevlabSpec_FileInjectionCustom(message) {
3322
+ message[custom] = DevlabSpec_FileInjectionCustomInspect;
3323
+ message[customJson] = DevlabSpec_FileInjectionCustomJson;
3324
+ return attachMessageDescriptor(message, DevlabSpec_FileInjection.$descriptor);
3325
+ }
3326
+ function createBaseDevlabSpec_FileInjection() {
3327
+ const message = {
3328
+ $type: "nebius.ai.v1.DevlabSpec.FileInjection",
3329
+ containerPath: "",
3330
+ content: new Uint8Array(0),
3331
+ };
3332
+ return applyDevlabSpec_FileInjectionCustom(message);
3333
+ }
3334
+ const DevlabSpec_Template_MESSAGE_DESCRIPTOR = {
3335
+ fields: {
3336
+ "id": { pbName: "id", scalarType: 9 },
3337
+ "inputFieldValues": { pbName: "input_field_values", map: true, mapValue: () => wkt[".google.protobuf.Value"].$descriptor },
3338
+ },
3339
+ };
3340
+ /** Encodes, decodes, converts, and creates {@link DevlabSpec_Template} messages. */
3341
+ export const DevlabSpec_Template = {
3342
+ $type: "nebius.ai.v1.DevlabSpec.Template",
3343
+ $descriptor: DevlabSpec_Template_MESSAGE_DESCRIPTOR,
3344
+ encode(message, writer = new BinaryWriter()) {
3345
+ if (message.id !== "") {
3346
+ writer.uint32(10).string(message.id);
3347
+ }
3348
+ for (const [k, v] of Object.entries(message.inputFieldValues ?? {})) {
3349
+ const w = writer.uint32(18).fork();
3350
+ w.uint32(10).string(k);
3351
+ (() => {
3352
+ const w2 = writer.uint32(18).fork();
3353
+ wkt[".google.protobuf.Value"].writeMessage(w2, v);
3354
+ w2.join();
3355
+ })();
3356
+ w.join();
3357
+ }
3358
+ if (message[unknownFieldsSymbol]) {
3359
+ writer.raw(message[unknownFieldsSymbol]);
3360
+ }
3361
+ return writer;
3362
+ },
3363
+ decode(input, length) {
3364
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3365
+ const end = length === undefined ? reader.len : reader.pos + length;
3366
+ const message = createBaseDevlabSpec_Template();
3367
+ let writer = undefined;
3368
+ while (reader.pos < end) {
3369
+ const tag = reader.uint32();
3370
+ switch (tag >>> 3) {
3371
+ case 1: {
3372
+ if (tag !== 10)
3373
+ break;
3374
+ message.id = reader.string();
3375
+ continue;
3376
+ }
3377
+ case 2: {
3378
+ if (tag !== 18)
3379
+ break; // wire type guard
3380
+ const end2 = reader.uint32() + reader.pos;
3381
+ let key = "";
3382
+ let value = undefined;
3383
+ while (reader.pos < end2) {
3384
+ const tag2 = reader.uint32();
3385
+ switch (tag2 >>> 3) {
3386
+ case 1: {
3387
+ key = reader.string();
3388
+ continue;
3389
+ }
3390
+ case 2: {
3391
+ value = wkt[".google.protobuf.Value"].readMessage(reader, reader.uint32());
3392
+ continue;
3393
+ }
3394
+ }
3395
+ if ((tag2 & 7) === 4 || tag2 === 0)
3396
+ break;
3397
+ reader.skip(tag2 & 7);
3398
+ }
3399
+ if (value !== undefined) {
3400
+ const stringKey = String(key);
3401
+ message.inputFieldValues[stringKey] = value;
3402
+ }
3403
+ continue;
3404
+ }
3405
+ default:
3406
+ break;
3407
+ }
3408
+ if ((tag & 7) === 4 || tag === 0) {
3409
+ break;
3410
+ }
3411
+ {
3412
+ if (!writer)
3413
+ writer = new BinaryWriter();
3414
+ const skipped = reader.skip(tag & 7, tag >>> 3);
3415
+ writer.uint32(tag).raw(skipped);
3416
+ }
3417
+ }
3418
+ if (writer) {
3419
+ message[unknownFieldsSymbol] = writer.finish();
3420
+ }
3421
+ return message;
3422
+ },
3423
+ fromJSON(object) {
3424
+ return applyDevlabSpec_TemplateCustom({
3425
+ $type: "nebius.ai.v1.DevlabSpec.Template",
3426
+ id: isSet(object.id ?? object.id)
3427
+ ? String(object.id ?? object.id)
3428
+ : "",
3429
+ inputFieldValues: (isSet(object.inputFieldValues) && typeof object.inputFieldValues === "object" ? object.inputFieldValues
3430
+ : (isSet(object.input_field_values) && typeof object.input_field_values === "object" ? object.input_field_values : undefined))
3431
+ ? Object.entries((object.inputFieldValues ?? object.input_field_values)).reduce((acc, [key, value]) => {
3432
+ acc[key] = wkt[".google.protobuf.Value"].fromJSON(value);
3433
+ return acc;
3434
+ }, {})
3435
+ : {},
3436
+ });
3437
+ },
3438
+ toJSON(message, use = "json") {
3439
+ const obj = {};
3440
+ const pick = (json, pb) => (use === "json" ? json : pb);
3441
+ if (message.id !== "") {
3442
+ obj[pick("id", "id")] = message.id;
3443
+ }
3444
+ if (message.inputFieldValues) {
3445
+ const entries = Object.entries(message.inputFieldValues);
3446
+ if (entries.length > 0) {
3447
+ obj[pick("inputFieldValues", "input_field_values")] = {};
3448
+ entries.forEach(([k, v]) => {
3449
+ obj[pick("inputFieldValues", "input_field_values")][k] = wkt[".google.protobuf.Value"].toJSON(v, use);
3450
+ });
3451
+ }
3452
+ }
3453
+ return obj;
3454
+ },
3455
+ create(base) {
3456
+ return DevlabSpec_Template.fromPartial(base ?? {});
3457
+ },
3458
+ fromPartial(object) {
3459
+ const message = createBaseDevlabSpec_Template();
3460
+ message.id = (object.id !== undefined && object.id !== null)
3461
+ ? object.id
3462
+ : "";
3463
+ message.inputFieldValues = Object.entries(object.inputFieldValues ?? {}).reduce((acc, [key, value]) => {
3464
+ if (value !== undefined) {
3465
+ acc[key] = value;
3466
+ }
3467
+ return acc;
3468
+ }, {});
3469
+ return message;
3470
+ },
3471
+ };
3472
+ protoRegistry.registerMessage(DevlabSpec_Template);
3473
+ function DevlabSpec_TemplateCustomInspect() {
3474
+ const parts = [];
3475
+ if (this.id !== "")
3476
+ parts.push("id" + "=" + inspect(this.id));
3477
+ if (Object.keys(this.inputFieldValues || {}).length)
3478
+ parts.push("inputFieldValues" + "=***");
3479
+ return `${this.$type}(${parts.join(", ")})`;
3480
+ }
3481
+ function DevlabSpec_TemplateCustomJson() {
3482
+ const obj = {
3483
+ type: this.$type,
3484
+ };
3485
+ if (this.id !== "")
3486
+ obj.id = inspectJson(this.id);
3487
+ if (Object.keys(this.inputFieldValues || {}).length)
3488
+ obj.inputFieldValues = "***";
3489
+ return obj;
3490
+ }
3491
+ function applyDevlabSpec_TemplateCustom(message) {
3492
+ message[custom] = DevlabSpec_TemplateCustomInspect;
3493
+ message[customJson] = DevlabSpec_TemplateCustomJson;
3494
+ return attachMessageDescriptor(message, DevlabSpec_Template.$descriptor);
3495
+ }
3496
+ function createBaseDevlabSpec_Template() {
3497
+ const message = {
3498
+ $type: "nebius.ai.v1.DevlabSpec.Template",
3499
+ id: "",
3500
+ inputFieldValues: {},
3501
+ };
3502
+ return applyDevlabSpec_TemplateCustom(message);
3503
+ }
3504
+ const DevlabSpec_MysteryBoxSecretRef_MESSAGE_DESCRIPTOR = {
3505
+ fields: {
3506
+ "secretId": { pbName: "secret_id", scalarType: 9 },
3507
+ "versionId": { pbName: "version_id", scalarType: 9 },
3508
+ },
3509
+ };
3510
+ /** Encodes, decodes, converts, and creates {@link DevlabSpec_MysteryBoxSecretRef} messages. */
3511
+ export const DevlabSpec_MysteryBoxSecretRef = {
3512
+ $type: "nebius.ai.v1.DevlabSpec.MysteryBoxSecretRef",
3513
+ $descriptor: DevlabSpec_MysteryBoxSecretRef_MESSAGE_DESCRIPTOR,
3514
+ encode(message, writer = new BinaryWriter()) {
3515
+ if (message.secretId !== "") {
3516
+ writer.uint32(10).string(message.secretId);
3517
+ }
3518
+ if (message.versionId !== "") {
3519
+ writer.uint32(18).string(message.versionId);
3520
+ }
3521
+ if (message[unknownFieldsSymbol]) {
3522
+ writer.raw(message[unknownFieldsSymbol]);
3523
+ }
3524
+ return writer;
3525
+ },
3526
+ decode(input, length) {
3527
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3528
+ const end = length === undefined ? reader.len : reader.pos + length;
3529
+ const message = createBaseDevlabSpec_MysteryBoxSecretRef();
3530
+ let writer = undefined;
3531
+ while (reader.pos < end) {
3532
+ const tag = reader.uint32();
3533
+ switch (tag >>> 3) {
3534
+ case 1: {
3535
+ if (tag !== 10)
3536
+ break;
3537
+ message.secretId = reader.string();
3538
+ continue;
3539
+ }
3540
+ case 2: {
3541
+ if (tag !== 18)
3542
+ break;
3543
+ message.versionId = reader.string();
3544
+ continue;
3545
+ }
3546
+ default:
3547
+ break;
3548
+ }
3549
+ if ((tag & 7) === 4 || tag === 0) {
3550
+ break;
3551
+ }
3552
+ {
3553
+ if (!writer)
3554
+ writer = new BinaryWriter();
3555
+ const skipped = reader.skip(tag & 7, tag >>> 3);
3556
+ writer.uint32(tag).raw(skipped);
3557
+ }
3558
+ }
3559
+ if (writer) {
3560
+ message[unknownFieldsSymbol] = writer.finish();
3561
+ }
3562
+ return message;
3563
+ },
3564
+ fromJSON(object) {
3565
+ return applyDevlabSpec_MysteryBoxSecretRefCustom({
3566
+ $type: "nebius.ai.v1.DevlabSpec.MysteryBoxSecretRef",
3567
+ secretId: isSet(object.secretId ?? object.secret_id)
3568
+ ? String(object.secretId ?? object.secret_id)
3569
+ : "",
3570
+ versionId: isSet(object.versionId ?? object.version_id)
3571
+ ? String(object.versionId ?? object.version_id)
3572
+ : "",
3573
+ });
3574
+ },
3575
+ toJSON(message, use = "json") {
3576
+ const obj = {};
3577
+ const pick = (json, pb) => (use === "json" ? json : pb);
3578
+ if (message.secretId !== "") {
3579
+ obj[pick("secretId", "secret_id")] = message.secretId;
3580
+ }
3581
+ if (message.versionId !== "") {
3582
+ obj[pick("versionId", "version_id")] = message.versionId;
3583
+ }
3584
+ return obj;
3585
+ },
3586
+ create(base) {
3587
+ return DevlabSpec_MysteryBoxSecretRef.fromPartial(base ?? {});
3588
+ },
3589
+ fromPartial(object) {
3590
+ const message = createBaseDevlabSpec_MysteryBoxSecretRef();
3591
+ message.secretId = (object.secretId !== undefined && object.secretId !== null)
3592
+ ? object.secretId
3593
+ : "";
3594
+ message.versionId = (object.versionId !== undefined && object.versionId !== null)
3595
+ ? object.versionId
3596
+ : "";
3597
+ return message;
3598
+ },
3599
+ };
3600
+ protoRegistry.registerMessage(DevlabSpec_MysteryBoxSecretRef);
3601
+ function DevlabSpec_MysteryBoxSecretRefCustomInspect() {
3602
+ const parts = [];
3603
+ if (this.secretId !== "")
3604
+ parts.push("secretId" + "=" + inspect(this.secretId));
3605
+ if (this.versionId !== "")
3606
+ parts.push("versionId" + "=" + inspect(this.versionId));
3607
+ return `${this.$type}(${parts.join(", ")})`;
3608
+ }
3609
+ function DevlabSpec_MysteryBoxSecretRefCustomJson() {
3610
+ const obj = {
3611
+ type: this.$type,
3612
+ };
3613
+ if (this.secretId !== "")
3614
+ obj.secretId = inspectJson(this.secretId);
3615
+ if (this.versionId !== "")
3616
+ obj.versionId = inspectJson(this.versionId);
3617
+ return obj;
3618
+ }
3619
+ function applyDevlabSpec_MysteryBoxSecretRefCustom(message) {
3620
+ message[custom] = DevlabSpec_MysteryBoxSecretRefCustomInspect;
3621
+ message[customJson] = DevlabSpec_MysteryBoxSecretRefCustomJson;
3622
+ return attachMessageDescriptor(message, DevlabSpec_MysteryBoxSecretRef.$descriptor);
3623
+ }
3624
+ function createBaseDevlabSpec_MysteryBoxSecretRef() {
3625
+ const message = {
3626
+ $type: "nebius.ai.v1.DevlabSpec.MysteryBoxSecretRef",
3627
+ secretId: "",
3628
+ versionId: "",
3629
+ };
3630
+ return applyDevlabSpec_MysteryBoxSecretRefCustom(message);
3631
+ }
3632
+ const DevlabStatus_MESSAGE_DESCRIPTOR = {
3633
+ fields: {
3634
+ "privateEndpoints": { pbName: "private_endpoints", scalarType: 9, repeated: true },
3635
+ "publicEndpoints": { pbName: "public_endpoints", scalarType: 9, repeated: true },
3636
+ "instances": { pbName: "instances", repeated: true, message: () => DevlabInstanceStatus.$descriptor },
3637
+ "state": { pbName: "state", scalarType: 14 },
3638
+ "stateDetails": { pbName: "state_details", message: () => DevlabStateDetails.$descriptor },
3639
+ },
3640
+ };
3641
+ /** Encodes, decodes, converts, and creates {@link DevlabStatus} messages. */
3642
+ export const DevlabStatus = {
3643
+ $type: "nebius.ai.v1.DevlabStatus",
3644
+ $descriptor: DevlabStatus_MESSAGE_DESCRIPTOR,
3645
+ encode(message, writer = new BinaryWriter()) {
3646
+ for (const v of (message.privateEndpoints ?? [])) {
3647
+ writer.uint32(10).string(v);
3648
+ }
3649
+ for (const v of (message.publicEndpoints ?? [])) {
3650
+ writer.uint32(18).string(v);
3651
+ }
3652
+ for (const v of (message.instances ?? [])) {
3653
+ const w = writer.uint32(82).fork();
3654
+ DevlabInstanceStatus.encode(v, w);
3655
+ w.join();
3656
+ }
3657
+ if ((message.state ?? DevlabStatus_State.STATE_UNSPECIFIED) !== DevlabStatus_State.STATE_UNSPECIFIED) {
3658
+ DevlabStatus_State.encodeField(writer, 20, message.state);
3659
+ }
3660
+ if (message.stateDetails !== undefined) {
3661
+ const w = writer.uint32(170).fork();
3662
+ DevlabStateDetails.encode(message.stateDetails, w);
3663
+ w.join();
3664
+ }
3665
+ if (message[unknownFieldsSymbol]) {
3666
+ writer.raw(message[unknownFieldsSymbol]);
3667
+ }
3668
+ return writer;
3669
+ },
3670
+ decode(input, length) {
3671
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3672
+ const end = length === undefined ? reader.len : reader.pos + length;
3673
+ const message = createBaseDevlabStatus();
3674
+ let writer = undefined;
3675
+ while (reader.pos < end) {
3676
+ const tag = reader.uint32();
3677
+ switch (tag >>> 3) {
3678
+ case 1: {
3679
+ if (tag !== 10)
3680
+ break;
3681
+ message.privateEndpoints.push(reader.string());
3682
+ continue;
3683
+ }
3684
+ case 2: {
3685
+ if (tag !== 18)
3686
+ break;
3687
+ message.publicEndpoints.push(reader.string());
3688
+ continue;
3689
+ }
3690
+ case 10: {
3691
+ if (tag !== 82)
3692
+ break;
3693
+ message.instances.push(DevlabInstanceStatus.decode(reader, reader.uint32()));
3694
+ continue;
3695
+ }
3696
+ case 20: {
3697
+ if (tag !== 160)
3698
+ break;
3699
+ message.state = DevlabStatus_State.fromNumber(reader.int32());
3700
+ continue;
3701
+ }
3702
+ case 21: {
3703
+ if (tag !== 170)
3704
+ break;
3705
+ message.stateDetails = DevlabStateDetails.decode(reader, reader.uint32());
3706
+ continue;
3707
+ }
3708
+ default:
3709
+ break;
3710
+ }
3711
+ if ((tag & 7) === 4 || tag === 0) {
3712
+ break;
3713
+ }
3714
+ {
3715
+ if (!writer)
3716
+ writer = new BinaryWriter();
3717
+ const skipped = reader.skip(tag & 7, tag >>> 3);
3718
+ writer.uint32(tag).raw(skipped);
3719
+ }
3720
+ }
3721
+ if (writer) {
3722
+ message[unknownFieldsSymbol] = writer.finish();
3723
+ }
3724
+ return message;
3725
+ },
3726
+ fromJSON(object) {
3727
+ return applyDevlabStatusCustom({
3728
+ $type: "nebius.ai.v1.DevlabStatus",
3729
+ privateEndpoints: globalThis.Array.isArray(object?.privateEndpoints ?? object?.private_endpoints)
3730
+ ? (object.privateEndpoints ?? object.private_endpoints).map((e) => String(e))
3731
+ : [],
3732
+ publicEndpoints: globalThis.Array.isArray(object?.publicEndpoints ?? object?.public_endpoints)
3733
+ ? (object.publicEndpoints ?? object.public_endpoints).map((e) => String(e))
3734
+ : [],
3735
+ instances: globalThis.Array.isArray(object?.instances ?? object?.instances)
3736
+ ? (object.instances ?? object.instances).map((e) => DevlabInstanceStatus.fromJSON(e))
3737
+ : [],
3738
+ state: isSet(object.state ?? object.state)
3739
+ ? DevlabStatus_State.fromJSON(object.state ?? object.state)
3740
+ : DevlabStatus_State.STATE_UNSPECIFIED,
3741
+ stateDetails: isSet(object.stateDetails ?? object.state_details)
3742
+ ? DevlabStateDetails.fromJSON(object.stateDetails ?? object.state_details)
3743
+ : undefined,
3744
+ });
3745
+ },
3746
+ toJSON(message, use = "json") {
3747
+ const obj = {};
3748
+ const pick = (json, pb) => (use === "json" ? json : pb);
3749
+ if (message.privateEndpoints?.length) {
3750
+ obj[pick("privateEndpoints", "private_endpoints")] = message.privateEndpoints.map((e) => e);
3751
+ }
3752
+ if (message.publicEndpoints?.length) {
3753
+ obj[pick("publicEndpoints", "public_endpoints")] = message.publicEndpoints.map((e) => e);
3754
+ }
3755
+ if (message.instances?.length) {
3756
+ obj[pick("instances", "instances")] = message.instances.map((e) => e ? DevlabInstanceStatus.toJSON(e, use) : undefined);
3757
+ }
3758
+ if ((message.state ?? DevlabStatus_State.STATE_UNSPECIFIED) !== DevlabStatus_State.STATE_UNSPECIFIED) {
3759
+ obj[pick("state", "state")] = DevlabStatus_State.toJSON(message.state);
3760
+ }
3761
+ if (message.stateDetails !== undefined) {
3762
+ obj[pick("stateDetails", "state_details")] = message.stateDetails
3763
+ ? DevlabStateDetails.toJSON(message.stateDetails, use)
3764
+ : undefined;
3765
+ }
3766
+ return obj;
3767
+ },
3768
+ create(base) {
3769
+ return DevlabStatus.fromPartial(base ?? {});
3770
+ },
3771
+ fromPartial(object) {
3772
+ const message = createBaseDevlabStatus();
3773
+ message.privateEndpoints = object.privateEndpoints?.map((e) => e) || [];
3774
+ message.publicEndpoints = object.publicEndpoints?.map((e) => e) || [];
3775
+ message.instances = object.instances?.map((e) => DevlabInstanceStatus.fromPartial(e)) || [];
3776
+ message.state = (object.state !== undefined && object.state !== null)
3777
+ ? DevlabStatus_State.fromJSON(object.state.name)
3778
+ : DevlabStatus_State.STATE_UNSPECIFIED;
3779
+ message.stateDetails = (object.stateDetails !== undefined && object.stateDetails !== null)
3780
+ ? DevlabStateDetails.fromPartial(object.stateDetails)
3781
+ : undefined;
3782
+ return message;
3783
+ },
3784
+ };
3785
+ protoRegistry.registerMessage(DevlabStatus);
3786
+ function DevlabStatusCustomInspect() {
3787
+ const parts = [];
3788
+ if ((this.privateEndpoints?.length ?? 0) !== 0)
3789
+ parts.push("privateEndpoints" + "=" + inspect(this.privateEndpoints));
3790
+ if ((this.publicEndpoints?.length ?? 0) !== 0)
3791
+ parts.push("publicEndpoints" + "=" + inspect(this.publicEndpoints));
3792
+ if ((this.instances?.length ?? 0) !== 0)
3793
+ parts.push("instances" + "=" + inspect(this.instances));
3794
+ if (this.state !== undefined)
3795
+ parts.push("state" + "=" + inspect(this.state));
3796
+ if (this.stateDetails !== undefined)
3797
+ parts.push("stateDetails" + "=" + inspect(this.stateDetails));
3798
+ return `${this.$type}(${parts.join(", ")})`;
3799
+ }
3800
+ function DevlabStatusCustomJson() {
3801
+ const obj = {
3802
+ type: this.$type,
3803
+ };
3804
+ if ((this.privateEndpoints?.length ?? 0) !== 0)
3805
+ obj.privateEndpoints = inspectJson(this.privateEndpoints);
3806
+ if ((this.publicEndpoints?.length ?? 0) !== 0)
3807
+ obj.publicEndpoints = inspectJson(this.publicEndpoints);
3808
+ if ((this.instances?.length ?? 0) !== 0)
3809
+ obj.instances = inspectJson(this.instances);
3810
+ if (this.state !== undefined)
3811
+ obj.state = inspectJson(this.state);
3812
+ if (this.stateDetails !== undefined)
3813
+ obj.stateDetails = inspectJson(this.stateDetails);
3814
+ return obj;
3815
+ }
3816
+ function applyDevlabStatusCustom(message) {
3817
+ message[custom] = DevlabStatusCustomInspect;
3818
+ message[customJson] = DevlabStatusCustomJson;
3819
+ return attachMessageDescriptor(message, DevlabStatus.$descriptor);
3820
+ }
3821
+ function createBaseDevlabStatus() {
3822
+ const message = {
3823
+ $type: "nebius.ai.v1.DevlabStatus",
3824
+ privateEndpoints: [],
3825
+ publicEndpoints: [],
3826
+ instances: [],
3827
+ state: DevlabStatus_State.STATE_UNSPECIFIED,
3828
+ stateDetails: undefined,
3829
+ };
3830
+ return applyDevlabStatusCustom(message);
3831
+ }
3832
+ const DevlabStateDetails_MESSAGE_DESCRIPTOR = {
3833
+ fields: {
3834
+ "code": { pbName: "code", scalarType: 9 },
3835
+ "message": { pbName: "message", scalarType: 9 },
3836
+ },
3837
+ };
3838
+ /** Encodes, decodes, converts, and creates {@link DevlabStateDetails} messages. */
3839
+ export const DevlabStateDetails = {
3840
+ $type: "nebius.ai.v1.DevlabStateDetails",
3841
+ $descriptor: DevlabStateDetails_MESSAGE_DESCRIPTOR,
3842
+ encode(message, writer = new BinaryWriter()) {
3843
+ if (message.code !== "") {
3844
+ writer.uint32(10).string(message.code);
3845
+ }
3846
+ if (message.message !== "") {
3847
+ writer.uint32(18).string(message.message);
3848
+ }
3849
+ if (message[unknownFieldsSymbol]) {
3850
+ writer.raw(message[unknownFieldsSymbol]);
3851
+ }
3852
+ return writer;
3853
+ },
3854
+ decode(input, length) {
3855
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3856
+ const end = length === undefined ? reader.len : reader.pos + length;
3857
+ const message = createBaseDevlabStateDetails();
3858
+ let writer = undefined;
3859
+ while (reader.pos < end) {
3860
+ const tag = reader.uint32();
3861
+ switch (tag >>> 3) {
3862
+ case 1: {
3863
+ if (tag !== 10)
3864
+ break;
3865
+ message.code = reader.string();
3866
+ continue;
3867
+ }
3868
+ case 2: {
3869
+ if (tag !== 18)
3870
+ break;
3871
+ message.message = reader.string();
3872
+ continue;
3873
+ }
3874
+ default:
3875
+ break;
3876
+ }
3877
+ if ((tag & 7) === 4 || tag === 0) {
3878
+ break;
3879
+ }
3880
+ {
3881
+ if (!writer)
3882
+ writer = new BinaryWriter();
3883
+ const skipped = reader.skip(tag & 7, tag >>> 3);
3884
+ writer.uint32(tag).raw(skipped);
3885
+ }
3886
+ }
3887
+ if (writer) {
3888
+ message[unknownFieldsSymbol] = writer.finish();
3889
+ }
3890
+ return message;
3891
+ },
3892
+ fromJSON(object) {
3893
+ return applyDevlabStateDetailsCustom({
3894
+ $type: "nebius.ai.v1.DevlabStateDetails",
3895
+ code: isSet(object.code ?? object.code)
3896
+ ? String(object.code ?? object.code)
3897
+ : "",
3898
+ message: isSet(object.message ?? object.message)
3899
+ ? String(object.message ?? object.message)
3900
+ : "",
3901
+ });
3902
+ },
3903
+ toJSON(message, use = "json") {
3904
+ const obj = {};
3905
+ const pick = (json, pb) => (use === "json" ? json : pb);
3906
+ if (message.code !== "") {
3907
+ obj[pick("code", "code")] = message.code;
3908
+ }
3909
+ if (message.message !== "") {
3910
+ obj[pick("message", "message")] = message.message;
3911
+ }
3912
+ return obj;
3913
+ },
3914
+ create(base) {
3915
+ return DevlabStateDetails.fromPartial(base ?? {});
3916
+ },
3917
+ fromPartial(object) {
3918
+ const message = createBaseDevlabStateDetails();
3919
+ message.code = (object.code !== undefined && object.code !== null)
3920
+ ? object.code
3921
+ : "";
3922
+ message.message = (object.message !== undefined && object.message !== null)
3923
+ ? object.message
3924
+ : "";
3925
+ return message;
3926
+ },
3927
+ };
3928
+ protoRegistry.registerMessage(DevlabStateDetails);
3929
+ function DevlabStateDetailsCustomInspect() {
3930
+ const parts = [];
3931
+ if (this.code !== "")
3932
+ parts.push("code" + "=" + inspect(this.code));
3933
+ if (this.message !== "")
3934
+ parts.push("message" + "=" + inspect(this.message));
3935
+ return `${this.$type}(${parts.join(", ")})`;
3936
+ }
3937
+ function DevlabStateDetailsCustomJson() {
3938
+ const obj = {
3939
+ type: this.$type,
3940
+ };
3941
+ if (this.code !== "")
3942
+ obj.code = inspectJson(this.code);
3943
+ if (this.message !== "")
3944
+ obj.message = inspectJson(this.message);
3945
+ return obj;
3946
+ }
3947
+ function applyDevlabStateDetailsCustom(message) {
3948
+ message[custom] = DevlabStateDetailsCustomInspect;
3949
+ message[customJson] = DevlabStateDetailsCustomJson;
3950
+ return attachMessageDescriptor(message, DevlabStateDetails.$descriptor);
3951
+ }
3952
+ function createBaseDevlabStateDetails() {
3953
+ const message = {
3954
+ $type: "nebius.ai.v1.DevlabStateDetails",
3955
+ code: "",
3956
+ message: "",
3957
+ };
3958
+ return applyDevlabStateDetailsCustom(message);
3959
+ }
3960
+ const DevlabInstanceStatus_MESSAGE_DESCRIPTOR = {
3961
+ fields: {
3962
+ "state": { pbName: "state", scalarType: 14 },
3963
+ "computeInstanceId": { pbName: "compute_instance_id", scalarType: 9 },
3964
+ "computeInstanceState": { pbName: "compute_instance_state", scalarType: 14 },
3965
+ "privateIp": { pbName: "private_ip", scalarType: 9 },
3966
+ "publicIp": { pbName: "public_ip", scalarType: 9 },
3967
+ },
3968
+ };
3969
+ /** Encodes, decodes, converts, and creates {@link DevlabInstanceStatus} messages. */
3970
+ export const DevlabInstanceStatus = {
3971
+ $type: "nebius.ai.v1.DevlabInstanceStatus",
3972
+ $descriptor: DevlabInstanceStatus_MESSAGE_DESCRIPTOR,
3973
+ encode(message, writer = new BinaryWriter()) {
3974
+ if ((message.state ?? DevlabInstanceStatus_State.STATE_UNSPECIFIED) !== DevlabInstanceStatus_State.STATE_UNSPECIFIED) {
3975
+ DevlabInstanceStatus_State.encodeField(writer, 1, message.state);
3976
+ }
3977
+ if (message.computeInstanceId !== "") {
3978
+ writer.uint32(82).string(message.computeInstanceId);
3979
+ }
3980
+ if ((message.computeInstanceState ?? InstanceStatus_InstanceState.UNSPECIFIED) !== InstanceStatus_InstanceState.UNSPECIFIED) {
3981
+ InstanceStatus_InstanceState.encodeField(writer, 11, message.computeInstanceState);
3982
+ }
3983
+ if (message.privateIp !== "") {
3984
+ writer.uint32(98).string(message.privateIp);
3985
+ }
3986
+ if (message.publicIp !== "") {
3987
+ writer.uint32(106).string(message.publicIp);
3988
+ }
3989
+ if (message[unknownFieldsSymbol]) {
3990
+ writer.raw(message[unknownFieldsSymbol]);
3991
+ }
3992
+ return writer;
3993
+ },
3994
+ decode(input, length) {
3995
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3996
+ const end = length === undefined ? reader.len : reader.pos + length;
3997
+ const message = createBaseDevlabInstanceStatus();
3998
+ let writer = undefined;
3999
+ while (reader.pos < end) {
4000
+ const tag = reader.uint32();
4001
+ switch (tag >>> 3) {
4002
+ case 1: {
4003
+ if (tag !== 8)
4004
+ break;
4005
+ message.state = DevlabInstanceStatus_State.fromNumber(reader.int32());
4006
+ continue;
4007
+ }
4008
+ case 10: {
4009
+ if (tag !== 82)
4010
+ break;
4011
+ message.computeInstanceId = reader.string();
4012
+ continue;
4013
+ }
4014
+ case 11: {
4015
+ if (tag !== 88)
4016
+ break;
4017
+ message.computeInstanceState = InstanceStatus_InstanceState.fromNumber(reader.int32());
4018
+ continue;
4019
+ }
4020
+ case 12: {
4021
+ if (tag !== 98)
4022
+ break;
4023
+ message.privateIp = reader.string();
4024
+ continue;
4025
+ }
4026
+ case 13: {
4027
+ if (tag !== 106)
4028
+ break;
4029
+ message.publicIp = reader.string();
4030
+ continue;
4031
+ }
4032
+ default:
4033
+ break;
4034
+ }
4035
+ if ((tag & 7) === 4 || tag === 0) {
4036
+ break;
4037
+ }
4038
+ {
4039
+ if (!writer)
4040
+ writer = new BinaryWriter();
4041
+ const skipped = reader.skip(tag & 7, tag >>> 3);
4042
+ writer.uint32(tag).raw(skipped);
4043
+ }
4044
+ }
4045
+ if (writer) {
4046
+ message[unknownFieldsSymbol] = writer.finish();
4047
+ }
4048
+ return message;
4049
+ },
4050
+ fromJSON(object) {
4051
+ return applyDevlabInstanceStatusCustom({
4052
+ $type: "nebius.ai.v1.DevlabInstanceStatus",
4053
+ state: isSet(object.state ?? object.state)
4054
+ ? DevlabInstanceStatus_State.fromJSON(object.state ?? object.state)
4055
+ : DevlabInstanceStatus_State.STATE_UNSPECIFIED,
4056
+ computeInstanceId: isSet(object.computeInstanceId ?? object.compute_instance_id)
4057
+ ? String(object.computeInstanceId ?? object.compute_instance_id)
4058
+ : "",
4059
+ computeInstanceState: isSet(object.computeInstanceState ?? object.compute_instance_state)
4060
+ ? InstanceStatus_InstanceState.fromJSON(object.computeInstanceState ?? object.compute_instance_state)
4061
+ : InstanceStatus_InstanceState.UNSPECIFIED,
4062
+ privateIp: isSet(object.privateIp ?? object.private_ip)
4063
+ ? String(object.privateIp ?? object.private_ip)
4064
+ : "",
4065
+ publicIp: isSet(object.publicIp ?? object.public_ip)
4066
+ ? String(object.publicIp ?? object.public_ip)
4067
+ : "",
4068
+ });
4069
+ },
4070
+ toJSON(message, use = "json") {
4071
+ const obj = {};
4072
+ const pick = (json, pb) => (use === "json" ? json : pb);
4073
+ if ((message.state ?? DevlabInstanceStatus_State.STATE_UNSPECIFIED) !== DevlabInstanceStatus_State.STATE_UNSPECIFIED) {
4074
+ obj[pick("state", "state")] = DevlabInstanceStatus_State.toJSON(message.state);
4075
+ }
4076
+ if (message.computeInstanceId !== "") {
4077
+ obj[pick("computeInstanceId", "compute_instance_id")] = message.computeInstanceId;
4078
+ }
4079
+ if ((message.computeInstanceState ?? InstanceStatus_InstanceState.UNSPECIFIED) !== InstanceStatus_InstanceState.UNSPECIFIED) {
4080
+ obj[pick("computeInstanceState", "compute_instance_state")] = InstanceStatus_InstanceState.toJSON(message.computeInstanceState);
4081
+ }
4082
+ if (message.privateIp !== "") {
4083
+ obj[pick("privateIp", "private_ip")] = message.privateIp;
4084
+ }
4085
+ if (message.publicIp !== "") {
4086
+ obj[pick("publicIp", "public_ip")] = message.publicIp;
4087
+ }
4088
+ return obj;
4089
+ },
4090
+ create(base) {
4091
+ return DevlabInstanceStatus.fromPartial(base ?? {});
4092
+ },
4093
+ fromPartial(object) {
4094
+ const message = createBaseDevlabInstanceStatus();
4095
+ message.state = (object.state !== undefined && object.state !== null)
4096
+ ? DevlabInstanceStatus_State.fromJSON(object.state.name)
4097
+ : DevlabInstanceStatus_State.STATE_UNSPECIFIED;
4098
+ message.computeInstanceId = (object.computeInstanceId !== undefined && object.computeInstanceId !== null)
4099
+ ? object.computeInstanceId
4100
+ : "";
4101
+ message.computeInstanceState = (object.computeInstanceState !== undefined && object.computeInstanceState !== null)
4102
+ ? InstanceStatus_InstanceState.fromJSON(object.computeInstanceState.name)
4103
+ : InstanceStatus_InstanceState.UNSPECIFIED;
4104
+ message.privateIp = (object.privateIp !== undefined && object.privateIp !== null)
4105
+ ? object.privateIp
4106
+ : "";
4107
+ message.publicIp = (object.publicIp !== undefined && object.publicIp !== null)
4108
+ ? object.publicIp
4109
+ : "";
4110
+ return message;
4111
+ },
4112
+ };
4113
+ protoRegistry.registerMessage(DevlabInstanceStatus);
4114
+ function DevlabInstanceStatusCustomInspect() {
4115
+ const parts = [];
4116
+ if (this.state !== undefined)
4117
+ parts.push("state" + "=" + inspect(this.state));
4118
+ if (this.computeInstanceId !== "")
4119
+ parts.push("computeInstanceId" + "=" + inspect(this.computeInstanceId));
4120
+ if (this.computeInstanceState !== undefined)
4121
+ parts.push("computeInstanceState" + "=" + inspect(this.computeInstanceState));
4122
+ if (this.privateIp !== "")
4123
+ parts.push("privateIp" + "=" + inspect(this.privateIp));
4124
+ if (this.publicIp !== "")
4125
+ parts.push("publicIp" + "=" + inspect(this.publicIp));
4126
+ return `${this.$type}(${parts.join(", ")})`;
4127
+ }
4128
+ function DevlabInstanceStatusCustomJson() {
4129
+ const obj = {
4130
+ type: this.$type,
4131
+ };
4132
+ if (this.state !== undefined)
4133
+ obj.state = inspectJson(this.state);
4134
+ if (this.computeInstanceId !== "")
4135
+ obj.computeInstanceId = inspectJson(this.computeInstanceId);
4136
+ if (this.computeInstanceState !== undefined)
4137
+ obj.computeInstanceState = inspectJson(this.computeInstanceState);
4138
+ if (this.privateIp !== "")
4139
+ obj.privateIp = inspectJson(this.privateIp);
4140
+ if (this.publicIp !== "")
4141
+ obj.publicIp = inspectJson(this.publicIp);
4142
+ return obj;
4143
+ }
4144
+ function applyDevlabInstanceStatusCustom(message) {
4145
+ message[custom] = DevlabInstanceStatusCustomInspect;
4146
+ message[customJson] = DevlabInstanceStatusCustomJson;
4147
+ return attachMessageDescriptor(message, DevlabInstanceStatus.$descriptor);
4148
+ }
4149
+ function createBaseDevlabInstanceStatus() {
4150
+ const message = {
4151
+ $type: "nebius.ai.v1.DevlabInstanceStatus",
4152
+ state: DevlabInstanceStatus_State.STATE_UNSPECIFIED,
4153
+ computeInstanceId: "",
4154
+ computeInstanceState: InstanceStatus_InstanceState.UNSPECIFIED,
4155
+ privateIp: "",
4156
+ publicIp: "",
4157
+ };
4158
+ return applyDevlabInstanceStatusCustom(message);
4159
+ }
12
4160
  /** Converts and creates {@link GetEndpointRequest_View} values. */
13
4161
  export const GetEndpointRequest_View = createEnum("nebius.ai.v1.GetEndpointRequest.View", {
14
4162
  /**