@nebius/js-sdk 0.2.63 → 0.2.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/google/protobuf/index.d.ts +34 -20
- package/dist/cjs/api/google/protobuf/index.d.ts.map +1 -1
- package/dist/cjs/api/google/protobuf/index.js +32 -0
- package/dist/cjs/api/google/protobuf/index.js.map +1 -1
- package/dist/cjs/api/nebius/ai/v1/index.d.ts +81 -0
- package/dist/cjs/api/nebius/ai/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/ai/v1/index.js +545 -1
- package/dist/cjs/api/nebius/ai/v1/index.js.map +1 -1
- package/dist/cjs/api/nebius/billing/v1/index.d.ts +714 -2
- package/dist/cjs/api/nebius/billing/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/billing/v1/index.js +1970 -1
- package/dist/cjs/api/nebius/billing/v1/index.js.map +1 -1
- package/dist/cjs/api/nebius/compute/v1/index.d.ts +64 -3
- package/dist/cjs/api/nebius/compute/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/compute/v1/index.js +382 -2
- package/dist/cjs/api/nebius/compute/v1/index.js.map +1 -1
- package/dist/cjs/api/nebius/iam/v1/index.d.ts +28 -8
- package/dist/cjs/api/nebius/iam/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/iam/v1/index.js +25 -5
- package/dist/cjs/api/nebius/iam/v1/index.js.map +1 -1
- package/dist/cjs/api/nebius/mk8s/v1/index.d.ts +78 -1
- package/dist/cjs/api/nebius/mk8s/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/mk8s/v1/index.js +340 -2
- package/dist/cjs/api/nebius/mk8s/v1/index.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/api/google/protobuf/index.d.ts +34 -20
- package/dist/esm/api/google/protobuf/index.d.ts.map +1 -1
- package/dist/esm/api/google/protobuf/index.js +32 -0
- package/dist/esm/api/google/protobuf/index.js.map +1 -1
- package/dist/esm/api/nebius/ai/v1/index.d.ts +81 -0
- package/dist/esm/api/nebius/ai/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/ai/v1/index.js +544 -0
- package/dist/esm/api/nebius/ai/v1/index.js.map +1 -1
- package/dist/esm/api/nebius/billing/v1/index.d.ts +714 -2
- package/dist/esm/api/nebius/billing/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/billing/v1/index.js +1970 -2
- package/dist/esm/api/nebius/billing/v1/index.js.map +1 -1
- package/dist/esm/api/nebius/compute/v1/index.d.ts +64 -3
- package/dist/esm/api/nebius/compute/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/compute/v1/index.js +380 -0
- package/dist/esm/api/nebius/compute/v1/index.js.map +1 -1
- package/dist/esm/api/nebius/iam/v1/index.d.ts +28 -8
- package/dist/esm/api/nebius/iam/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/iam/v1/index.js +25 -5
- package/dist/esm/api/nebius/iam/v1/index.js.map +1 -1
- package/dist/esm/api/nebius/mk8s/v1/index.d.ts +78 -1
- package/dist/esm/api/nebius/mk8s/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/mk8s/v1/index.js +339 -1
- package/dist/esm/api/nebius/mk8s/v1/index.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/api/nebius/monitoring/v1/index.d.ts +0 -607
- package/dist/cjs/api/nebius/monitoring/v1/index.d.ts.map +0 -1
- package/dist/cjs/api/nebius/monitoring/v1/index.js +0 -1538
- package/dist/cjs/api/nebius/monitoring/v1/index.js.map +0 -1
- package/dist/cjs/api/nebius/monitoring/v1.d.ts +0 -1
- package/dist/cjs/api/nebius/monitoring/v1.js +0 -2
- package/dist/esm/api/nebius/monitoring/v1/index.d.ts +0 -607
- package/dist/esm/api/nebius/monitoring/v1/index.d.ts.map +0 -1
- package/dist/esm/api/nebius/monitoring/v1/index.js +0 -1534
- package/dist/esm/api/nebius/monitoring/v1/index.js.map +0 -1
- package/dist/esm/api/nebius/monitoring/v1.d.ts +0 -1
- package/dist/esm/api/nebius/monitoring/v1.js +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/* Generated by Nebius TS generator. DO NOT EDIT! */
|
|
2
|
-
import { attachMessageDescriptor, BinaryReader, BinaryWriter, isSet, wkt, createEnum, unknownFieldsSymbol } from "../../../../runtime/protos/index.js";
|
|
2
|
+
import { attachMessageDescriptor, BinaryReader, BinaryWriter, isSet, Long, wkt, createEnum, unknownFieldsSymbol } from "../../../../runtime/protos/index.js";
|
|
3
3
|
import { inspect } from "util";
|
|
4
4
|
import { protoRegistry } from "../../../protobuf.js";
|
|
5
5
|
import { custom, customJson, inspectJson } from "../../../../runtime/util/logging.js";
|
|
6
6
|
import { makeGenericClientConstructor } from "@grpc/grpc-js";
|
|
7
7
|
import { Request as SDKRequestClass } from "../../../../runtime/request.js";
|
|
8
|
-
import {
|
|
8
|
+
import { Operation as OperationWrapper } from "../../../../runtime/operation.js";
|
|
9
|
+
import { GetByNameRequest, Operation, OperationService, ResourceMetadata } from "../../common/v1/index.js";
|
|
9
10
|
const __deprecatedWarned = new Set();
|
|
10
11
|
const EstimateBatchRequest_MESSAGE_DESCRIPTOR = {
|
|
11
12
|
fields: {
|
|
@@ -2358,4 +2359,1971 @@ export const OfferType = createEnum("nebius.billing.v1.OfferType", {
|
|
|
2358
2359
|
OFFER_TYPE_CONTRACT_PRICE: 1,
|
|
2359
2360
|
}, OfferType_VALUE_COMMENTS);
|
|
2360
2361
|
protoRegistry.registerEnum(OfferType);
|
|
2362
|
+
const CreatePricingPolicyRequest_MESSAGE_DESCRIPTOR = {
|
|
2363
|
+
fields: {
|
|
2364
|
+
"metadata": { pbName: "metadata", message: () => ResourceMetadata.$descriptor },
|
|
2365
|
+
"spec": { pbName: "spec", message: () => PricingPolicySpec.$descriptor },
|
|
2366
|
+
},
|
|
2367
|
+
};
|
|
2368
|
+
/** Encodes, decodes, converts, and creates {@link CreatePricingPolicyRequest} messages. */
|
|
2369
|
+
export const CreatePricingPolicyRequest = {
|
|
2370
|
+
$type: "nebius.billing.v1.CreatePricingPolicyRequest",
|
|
2371
|
+
$descriptor: CreatePricingPolicyRequest_MESSAGE_DESCRIPTOR,
|
|
2372
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2373
|
+
if (message.metadata !== undefined) {
|
|
2374
|
+
const w = writer.uint32(10).fork();
|
|
2375
|
+
ResourceMetadata.encode(message.metadata, w);
|
|
2376
|
+
w.join();
|
|
2377
|
+
}
|
|
2378
|
+
if (message.spec !== undefined) {
|
|
2379
|
+
const w = writer.uint32(18).fork();
|
|
2380
|
+
PricingPolicySpec.encode(message.spec, w);
|
|
2381
|
+
w.join();
|
|
2382
|
+
}
|
|
2383
|
+
if (message[unknownFieldsSymbol]) {
|
|
2384
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
2385
|
+
}
|
|
2386
|
+
return writer;
|
|
2387
|
+
},
|
|
2388
|
+
decode(input, length) {
|
|
2389
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2390
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2391
|
+
const message = createBaseCreatePricingPolicyRequest();
|
|
2392
|
+
let writer = undefined;
|
|
2393
|
+
while (reader.pos < end) {
|
|
2394
|
+
const tag = reader.uint32();
|
|
2395
|
+
switch (tag >>> 3) {
|
|
2396
|
+
case 1: {
|
|
2397
|
+
if (tag !== 10)
|
|
2398
|
+
break;
|
|
2399
|
+
message.metadata = ResourceMetadata.decode(reader, reader.uint32());
|
|
2400
|
+
continue;
|
|
2401
|
+
}
|
|
2402
|
+
case 2: {
|
|
2403
|
+
if (tag !== 18)
|
|
2404
|
+
break;
|
|
2405
|
+
message.spec = PricingPolicySpec.decode(reader, reader.uint32());
|
|
2406
|
+
continue;
|
|
2407
|
+
}
|
|
2408
|
+
default:
|
|
2409
|
+
break;
|
|
2410
|
+
}
|
|
2411
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2412
|
+
break;
|
|
2413
|
+
}
|
|
2414
|
+
{
|
|
2415
|
+
if (!writer)
|
|
2416
|
+
writer = new BinaryWriter();
|
|
2417
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
2418
|
+
writer.uint32(tag).raw(skipped);
|
|
2419
|
+
}
|
|
2420
|
+
}
|
|
2421
|
+
if (writer) {
|
|
2422
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
2423
|
+
}
|
|
2424
|
+
return message;
|
|
2425
|
+
},
|
|
2426
|
+
fromJSON(object) {
|
|
2427
|
+
return applyCreatePricingPolicyRequestCustom({
|
|
2428
|
+
$type: "nebius.billing.v1.CreatePricingPolicyRequest",
|
|
2429
|
+
metadata: isSet(object.metadata ?? object.metadata)
|
|
2430
|
+
? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
|
|
2431
|
+
: undefined,
|
|
2432
|
+
spec: isSet(object.spec ?? object.spec)
|
|
2433
|
+
? PricingPolicySpec.fromJSON(object.spec ?? object.spec)
|
|
2434
|
+
: undefined,
|
|
2435
|
+
});
|
|
2436
|
+
},
|
|
2437
|
+
toJSON(message, use = "json") {
|
|
2438
|
+
const obj = {};
|
|
2439
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
2440
|
+
if (message.metadata !== undefined) {
|
|
2441
|
+
obj[pick("metadata", "metadata")] = message.metadata
|
|
2442
|
+
? ResourceMetadata.toJSON(message.metadata, use)
|
|
2443
|
+
: undefined;
|
|
2444
|
+
}
|
|
2445
|
+
if (message.spec !== undefined) {
|
|
2446
|
+
obj[pick("spec", "spec")] = message.spec
|
|
2447
|
+
? PricingPolicySpec.toJSON(message.spec, use)
|
|
2448
|
+
: undefined;
|
|
2449
|
+
}
|
|
2450
|
+
return obj;
|
|
2451
|
+
},
|
|
2452
|
+
create(base) {
|
|
2453
|
+
return CreatePricingPolicyRequest.fromPartial(base ?? {});
|
|
2454
|
+
},
|
|
2455
|
+
fromPartial(object) {
|
|
2456
|
+
const message = createBaseCreatePricingPolicyRequest();
|
|
2457
|
+
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
2458
|
+
? ResourceMetadata.fromPartial(object.metadata)
|
|
2459
|
+
: undefined;
|
|
2460
|
+
message.spec = (object.spec !== undefined && object.spec !== null)
|
|
2461
|
+
? PricingPolicySpec.fromPartial(object.spec)
|
|
2462
|
+
: undefined;
|
|
2463
|
+
return message;
|
|
2464
|
+
},
|
|
2465
|
+
};
|
|
2466
|
+
protoRegistry.registerMessage(CreatePricingPolicyRequest);
|
|
2467
|
+
function CreatePricingPolicyRequestCustomInspect() {
|
|
2468
|
+
const parts = [];
|
|
2469
|
+
if (this.metadata !== undefined)
|
|
2470
|
+
parts.push("metadata" + "=" + inspect(this.metadata));
|
|
2471
|
+
if (this.spec !== undefined)
|
|
2472
|
+
parts.push("spec" + "=" + inspect(this.spec));
|
|
2473
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
2474
|
+
}
|
|
2475
|
+
function CreatePricingPolicyRequestCustomJson() {
|
|
2476
|
+
const obj = {
|
|
2477
|
+
type: this.$type,
|
|
2478
|
+
};
|
|
2479
|
+
if (this.metadata !== undefined)
|
|
2480
|
+
obj.metadata = inspectJson(this.metadata);
|
|
2481
|
+
if (this.spec !== undefined)
|
|
2482
|
+
obj.spec = inspectJson(this.spec);
|
|
2483
|
+
return obj;
|
|
2484
|
+
}
|
|
2485
|
+
function applyCreatePricingPolicyRequestCustom(message) {
|
|
2486
|
+
message[custom] = CreatePricingPolicyRequestCustomInspect;
|
|
2487
|
+
message[customJson] = CreatePricingPolicyRequestCustomJson;
|
|
2488
|
+
return attachMessageDescriptor(message, CreatePricingPolicyRequest.$descriptor);
|
|
2489
|
+
}
|
|
2490
|
+
function createBaseCreatePricingPolicyRequest() {
|
|
2491
|
+
const message = {
|
|
2492
|
+
$type: "nebius.billing.v1.CreatePricingPolicyRequest",
|
|
2493
|
+
metadata: undefined,
|
|
2494
|
+
spec: undefined,
|
|
2495
|
+
};
|
|
2496
|
+
return applyCreatePricingPolicyRequestCustom(message);
|
|
2497
|
+
}
|
|
2498
|
+
const GetPricingPolicyRequest_MESSAGE_DESCRIPTOR = {
|
|
2499
|
+
fields: {
|
|
2500
|
+
"id": { pbName: "id", scalarType: 9 },
|
|
2501
|
+
},
|
|
2502
|
+
};
|
|
2503
|
+
/** Encodes, decodes, converts, and creates {@link GetPricingPolicyRequest} messages. */
|
|
2504
|
+
export const GetPricingPolicyRequest = {
|
|
2505
|
+
$type: "nebius.billing.v1.GetPricingPolicyRequest",
|
|
2506
|
+
$descriptor: GetPricingPolicyRequest_MESSAGE_DESCRIPTOR,
|
|
2507
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2508
|
+
if (message.id !== "") {
|
|
2509
|
+
writer.uint32(10).string(message.id);
|
|
2510
|
+
}
|
|
2511
|
+
if (message[unknownFieldsSymbol]) {
|
|
2512
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
2513
|
+
}
|
|
2514
|
+
return writer;
|
|
2515
|
+
},
|
|
2516
|
+
decode(input, length) {
|
|
2517
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2518
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2519
|
+
const message = createBaseGetPricingPolicyRequest();
|
|
2520
|
+
let writer = undefined;
|
|
2521
|
+
while (reader.pos < end) {
|
|
2522
|
+
const tag = reader.uint32();
|
|
2523
|
+
switch (tag >>> 3) {
|
|
2524
|
+
case 1: {
|
|
2525
|
+
if (tag !== 10)
|
|
2526
|
+
break;
|
|
2527
|
+
message.id = reader.string();
|
|
2528
|
+
continue;
|
|
2529
|
+
}
|
|
2530
|
+
default:
|
|
2531
|
+
break;
|
|
2532
|
+
}
|
|
2533
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2534
|
+
break;
|
|
2535
|
+
}
|
|
2536
|
+
{
|
|
2537
|
+
if (!writer)
|
|
2538
|
+
writer = new BinaryWriter();
|
|
2539
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
2540
|
+
writer.uint32(tag).raw(skipped);
|
|
2541
|
+
}
|
|
2542
|
+
}
|
|
2543
|
+
if (writer) {
|
|
2544
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
2545
|
+
}
|
|
2546
|
+
return message;
|
|
2547
|
+
},
|
|
2548
|
+
fromJSON(object) {
|
|
2549
|
+
return applyGetPricingPolicyRequestCustom({
|
|
2550
|
+
$type: "nebius.billing.v1.GetPricingPolicyRequest",
|
|
2551
|
+
id: isSet(object.id ?? object.id)
|
|
2552
|
+
? String(object.id ?? object.id)
|
|
2553
|
+
: "",
|
|
2554
|
+
});
|
|
2555
|
+
},
|
|
2556
|
+
toJSON(message, use = "json") {
|
|
2557
|
+
const obj = {};
|
|
2558
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
2559
|
+
if (message.id !== "") {
|
|
2560
|
+
obj[pick("id", "id")] = message.id;
|
|
2561
|
+
}
|
|
2562
|
+
return obj;
|
|
2563
|
+
},
|
|
2564
|
+
create(base) {
|
|
2565
|
+
return GetPricingPolicyRequest.fromPartial(base ?? {});
|
|
2566
|
+
},
|
|
2567
|
+
fromPartial(object) {
|
|
2568
|
+
const message = createBaseGetPricingPolicyRequest();
|
|
2569
|
+
message.id = (object.id !== undefined && object.id !== null)
|
|
2570
|
+
? object.id
|
|
2571
|
+
: "";
|
|
2572
|
+
return message;
|
|
2573
|
+
},
|
|
2574
|
+
};
|
|
2575
|
+
protoRegistry.registerMessage(GetPricingPolicyRequest);
|
|
2576
|
+
function GetPricingPolicyRequestCustomInspect() {
|
|
2577
|
+
const parts = [];
|
|
2578
|
+
if (this.id !== "")
|
|
2579
|
+
parts.push("id" + "=" + inspect(this.id));
|
|
2580
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
2581
|
+
}
|
|
2582
|
+
function GetPricingPolicyRequestCustomJson() {
|
|
2583
|
+
const obj = {
|
|
2584
|
+
type: this.$type,
|
|
2585
|
+
};
|
|
2586
|
+
if (this.id !== "")
|
|
2587
|
+
obj.id = inspectJson(this.id);
|
|
2588
|
+
return obj;
|
|
2589
|
+
}
|
|
2590
|
+
function applyGetPricingPolicyRequestCustom(message) {
|
|
2591
|
+
message[custom] = GetPricingPolicyRequestCustomInspect;
|
|
2592
|
+
message[customJson] = GetPricingPolicyRequestCustomJson;
|
|
2593
|
+
return attachMessageDescriptor(message, GetPricingPolicyRequest.$descriptor);
|
|
2594
|
+
}
|
|
2595
|
+
function createBaseGetPricingPolicyRequest() {
|
|
2596
|
+
const message = {
|
|
2597
|
+
$type: "nebius.billing.v1.GetPricingPolicyRequest",
|
|
2598
|
+
id: "",
|
|
2599
|
+
};
|
|
2600
|
+
return applyGetPricingPolicyRequestCustom(message);
|
|
2601
|
+
}
|
|
2602
|
+
const ListPricingPoliciesRequest_MESSAGE_DESCRIPTOR = {
|
|
2603
|
+
fields: {
|
|
2604
|
+
"parentId": { pbName: "parent_id", scalarType: 9 },
|
|
2605
|
+
"pageSize": { pbName: "page_size", scalarType: 3 },
|
|
2606
|
+
"pageToken": { pbName: "page_token", scalarType: 9 },
|
|
2607
|
+
},
|
|
2608
|
+
};
|
|
2609
|
+
/** Encodes, decodes, converts, and creates {@link ListPricingPoliciesRequest} messages. */
|
|
2610
|
+
export const ListPricingPoliciesRequest = {
|
|
2611
|
+
$type: "nebius.billing.v1.ListPricingPoliciesRequest",
|
|
2612
|
+
$descriptor: ListPricingPoliciesRequest_MESSAGE_DESCRIPTOR,
|
|
2613
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2614
|
+
if (message.parentId !== "") {
|
|
2615
|
+
writer.uint32(10).string(message.parentId);
|
|
2616
|
+
}
|
|
2617
|
+
if (message.pageSize !== undefined && !message.pageSize.isZero?.()) {
|
|
2618
|
+
writer.uint32(16).int64(message.pageSize.toString());
|
|
2619
|
+
}
|
|
2620
|
+
if (message.pageToken !== "") {
|
|
2621
|
+
writer.uint32(26).string(message.pageToken);
|
|
2622
|
+
}
|
|
2623
|
+
if (message[unknownFieldsSymbol]) {
|
|
2624
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
2625
|
+
}
|
|
2626
|
+
return writer;
|
|
2627
|
+
},
|
|
2628
|
+
decode(input, length) {
|
|
2629
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2630
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2631
|
+
const message = createBaseListPricingPoliciesRequest();
|
|
2632
|
+
let writer = undefined;
|
|
2633
|
+
while (reader.pos < end) {
|
|
2634
|
+
const tag = reader.uint32();
|
|
2635
|
+
switch (tag >>> 3) {
|
|
2636
|
+
case 1: {
|
|
2637
|
+
if (tag !== 10)
|
|
2638
|
+
break;
|
|
2639
|
+
message.parentId = reader.string();
|
|
2640
|
+
continue;
|
|
2641
|
+
}
|
|
2642
|
+
case 2: {
|
|
2643
|
+
if (tag !== 16)
|
|
2644
|
+
break;
|
|
2645
|
+
message.pageSize = Long.fromValue(reader.int64());
|
|
2646
|
+
continue;
|
|
2647
|
+
}
|
|
2648
|
+
case 3: {
|
|
2649
|
+
if (tag !== 26)
|
|
2650
|
+
break;
|
|
2651
|
+
message.pageToken = reader.string();
|
|
2652
|
+
continue;
|
|
2653
|
+
}
|
|
2654
|
+
default:
|
|
2655
|
+
break;
|
|
2656
|
+
}
|
|
2657
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2658
|
+
break;
|
|
2659
|
+
}
|
|
2660
|
+
{
|
|
2661
|
+
if (!writer)
|
|
2662
|
+
writer = new BinaryWriter();
|
|
2663
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
2664
|
+
writer.uint32(tag).raw(skipped);
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2667
|
+
if (writer) {
|
|
2668
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
2669
|
+
}
|
|
2670
|
+
return message;
|
|
2671
|
+
},
|
|
2672
|
+
fromJSON(object) {
|
|
2673
|
+
return applyListPricingPoliciesRequestCustom({
|
|
2674
|
+
$type: "nebius.billing.v1.ListPricingPoliciesRequest",
|
|
2675
|
+
parentId: isSet(object.parentId ?? object.parent_id)
|
|
2676
|
+
? String(object.parentId ?? object.parent_id)
|
|
2677
|
+
: "",
|
|
2678
|
+
pageSize: isSet(object.pageSize ?? object.page_size)
|
|
2679
|
+
? Long.fromValue(object.pageSize ?? object.page_size)
|
|
2680
|
+
: Long.ZERO,
|
|
2681
|
+
pageToken: isSet(object.pageToken ?? object.page_token)
|
|
2682
|
+
? String(object.pageToken ?? object.page_token)
|
|
2683
|
+
: "",
|
|
2684
|
+
});
|
|
2685
|
+
},
|
|
2686
|
+
toJSON(message, use = "json") {
|
|
2687
|
+
const obj = {};
|
|
2688
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
2689
|
+
if (message.parentId !== "") {
|
|
2690
|
+
obj[pick("parentId", "parent_id")] = message.parentId;
|
|
2691
|
+
}
|
|
2692
|
+
if (!message.pageSize?.isZero?.()) {
|
|
2693
|
+
obj[pick("pageSize", "page_size")] = (message.pageSize || Long.ZERO).toString();
|
|
2694
|
+
}
|
|
2695
|
+
if (message.pageToken !== "") {
|
|
2696
|
+
obj[pick("pageToken", "page_token")] = message.pageToken;
|
|
2697
|
+
}
|
|
2698
|
+
return obj;
|
|
2699
|
+
},
|
|
2700
|
+
create(base) {
|
|
2701
|
+
return ListPricingPoliciesRequest.fromPartial(base ?? {});
|
|
2702
|
+
},
|
|
2703
|
+
fromPartial(object) {
|
|
2704
|
+
const message = createBaseListPricingPoliciesRequest();
|
|
2705
|
+
message.parentId = (object.parentId !== undefined && object.parentId !== null)
|
|
2706
|
+
? object.parentId
|
|
2707
|
+
: "";
|
|
2708
|
+
message.pageSize = (object.pageSize !== undefined && object.pageSize !== null)
|
|
2709
|
+
? Long.fromValue(object.pageSize)
|
|
2710
|
+
: Long.ZERO;
|
|
2711
|
+
message.pageToken = (object.pageToken !== undefined && object.pageToken !== null)
|
|
2712
|
+
? object.pageToken
|
|
2713
|
+
: "";
|
|
2714
|
+
return message;
|
|
2715
|
+
},
|
|
2716
|
+
};
|
|
2717
|
+
protoRegistry.registerMessage(ListPricingPoliciesRequest);
|
|
2718
|
+
function ListPricingPoliciesRequestCustomInspect() {
|
|
2719
|
+
const parts = [];
|
|
2720
|
+
if (this.parentId !== "")
|
|
2721
|
+
parts.push("parentId" + "=" + inspect(this.parentId));
|
|
2722
|
+
if (!this.pageSize?.isZero?.())
|
|
2723
|
+
parts.push("pageSize" + "=" + inspect(this.pageSize));
|
|
2724
|
+
if (this.pageToken !== "")
|
|
2725
|
+
parts.push("pageToken" + "=" + inspect(this.pageToken));
|
|
2726
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
2727
|
+
}
|
|
2728
|
+
function ListPricingPoliciesRequestCustomJson() {
|
|
2729
|
+
const obj = {
|
|
2730
|
+
type: this.$type,
|
|
2731
|
+
};
|
|
2732
|
+
if (this.parentId !== "")
|
|
2733
|
+
obj.parentId = inspectJson(this.parentId);
|
|
2734
|
+
if (!this.pageSize?.isZero?.())
|
|
2735
|
+
obj.pageSize = inspectJson(this.pageSize);
|
|
2736
|
+
if (this.pageToken !== "")
|
|
2737
|
+
obj.pageToken = inspectJson(this.pageToken);
|
|
2738
|
+
return obj;
|
|
2739
|
+
}
|
|
2740
|
+
function applyListPricingPoliciesRequestCustom(message) {
|
|
2741
|
+
message[custom] = ListPricingPoliciesRequestCustomInspect;
|
|
2742
|
+
message[customJson] = ListPricingPoliciesRequestCustomJson;
|
|
2743
|
+
return attachMessageDescriptor(message, ListPricingPoliciesRequest.$descriptor);
|
|
2744
|
+
}
|
|
2745
|
+
function createBaseListPricingPoliciesRequest() {
|
|
2746
|
+
const message = {
|
|
2747
|
+
$type: "nebius.billing.v1.ListPricingPoliciesRequest",
|
|
2748
|
+
parentId: "",
|
|
2749
|
+
pageSize: Long.ZERO,
|
|
2750
|
+
pageToken: "",
|
|
2751
|
+
};
|
|
2752
|
+
return applyListPricingPoliciesRequestCustom(message);
|
|
2753
|
+
}
|
|
2754
|
+
const ListPricingPoliciesResponse_MESSAGE_DESCRIPTOR = {
|
|
2755
|
+
fields: {
|
|
2756
|
+
"items": { pbName: "items", repeated: true, message: () => PricingPolicy.$descriptor },
|
|
2757
|
+
"nextPageToken": { pbName: "next_page_token", scalarType: 9 },
|
|
2758
|
+
},
|
|
2759
|
+
};
|
|
2760
|
+
/** Encodes, decodes, converts, and creates {@link ListPricingPoliciesResponse} messages. */
|
|
2761
|
+
export const ListPricingPoliciesResponse = {
|
|
2762
|
+
$type: "nebius.billing.v1.ListPricingPoliciesResponse",
|
|
2763
|
+
$descriptor: ListPricingPoliciesResponse_MESSAGE_DESCRIPTOR,
|
|
2764
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2765
|
+
for (const v of (message.items ?? [])) {
|
|
2766
|
+
const w = writer.uint32(10).fork();
|
|
2767
|
+
PricingPolicy.encode(v, w);
|
|
2768
|
+
w.join();
|
|
2769
|
+
}
|
|
2770
|
+
if (message.nextPageToken !== "") {
|
|
2771
|
+
writer.uint32(18).string(message.nextPageToken);
|
|
2772
|
+
}
|
|
2773
|
+
if (message[unknownFieldsSymbol]) {
|
|
2774
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
2775
|
+
}
|
|
2776
|
+
return writer;
|
|
2777
|
+
},
|
|
2778
|
+
decode(input, length) {
|
|
2779
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2780
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2781
|
+
const message = createBaseListPricingPoliciesResponse();
|
|
2782
|
+
let writer = undefined;
|
|
2783
|
+
while (reader.pos < end) {
|
|
2784
|
+
const tag = reader.uint32();
|
|
2785
|
+
switch (tag >>> 3) {
|
|
2786
|
+
case 1: {
|
|
2787
|
+
if (tag !== 10)
|
|
2788
|
+
break;
|
|
2789
|
+
message.items.push(PricingPolicy.decode(reader, reader.uint32()));
|
|
2790
|
+
continue;
|
|
2791
|
+
}
|
|
2792
|
+
case 2: {
|
|
2793
|
+
if (tag !== 18)
|
|
2794
|
+
break;
|
|
2795
|
+
message.nextPageToken = reader.string();
|
|
2796
|
+
continue;
|
|
2797
|
+
}
|
|
2798
|
+
default:
|
|
2799
|
+
break;
|
|
2800
|
+
}
|
|
2801
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2802
|
+
break;
|
|
2803
|
+
}
|
|
2804
|
+
{
|
|
2805
|
+
if (!writer)
|
|
2806
|
+
writer = new BinaryWriter();
|
|
2807
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
2808
|
+
writer.uint32(tag).raw(skipped);
|
|
2809
|
+
}
|
|
2810
|
+
}
|
|
2811
|
+
if (writer) {
|
|
2812
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
2813
|
+
}
|
|
2814
|
+
return message;
|
|
2815
|
+
},
|
|
2816
|
+
fromJSON(object) {
|
|
2817
|
+
return applyListPricingPoliciesResponseCustom({
|
|
2818
|
+
$type: "nebius.billing.v1.ListPricingPoliciesResponse",
|
|
2819
|
+
items: globalThis.Array.isArray(object?.items ?? object?.items)
|
|
2820
|
+
? (object.items ?? object.items).map((e) => PricingPolicy.fromJSON(e))
|
|
2821
|
+
: [],
|
|
2822
|
+
nextPageToken: isSet(object.nextPageToken ?? object.next_page_token)
|
|
2823
|
+
? String(object.nextPageToken ?? object.next_page_token)
|
|
2824
|
+
: "",
|
|
2825
|
+
});
|
|
2826
|
+
},
|
|
2827
|
+
toJSON(message, use = "json") {
|
|
2828
|
+
const obj = {};
|
|
2829
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
2830
|
+
if (message.items?.length) {
|
|
2831
|
+
obj[pick("items", "items")] = message.items.map((e) => e ? PricingPolicy.toJSON(e, use) : undefined);
|
|
2832
|
+
}
|
|
2833
|
+
if (message.nextPageToken !== "") {
|
|
2834
|
+
obj[pick("nextPageToken", "next_page_token")] = message.nextPageToken;
|
|
2835
|
+
}
|
|
2836
|
+
return obj;
|
|
2837
|
+
},
|
|
2838
|
+
create(base) {
|
|
2839
|
+
return ListPricingPoliciesResponse.fromPartial(base ?? {});
|
|
2840
|
+
},
|
|
2841
|
+
fromPartial(object) {
|
|
2842
|
+
const message = createBaseListPricingPoliciesResponse();
|
|
2843
|
+
message.items = object.items?.map((e) => PricingPolicy.fromPartial(e)) || [];
|
|
2844
|
+
message.nextPageToken = (object.nextPageToken !== undefined && object.nextPageToken !== null)
|
|
2845
|
+
? object.nextPageToken
|
|
2846
|
+
: "";
|
|
2847
|
+
return message;
|
|
2848
|
+
},
|
|
2849
|
+
};
|
|
2850
|
+
protoRegistry.registerMessage(ListPricingPoliciesResponse);
|
|
2851
|
+
function ListPricingPoliciesResponseCustomInspect() {
|
|
2852
|
+
const parts = [];
|
|
2853
|
+
if ((this.items?.length ?? 0) !== 0)
|
|
2854
|
+
parts.push("items" + "=" + inspect(this.items));
|
|
2855
|
+
if (this.nextPageToken !== "")
|
|
2856
|
+
parts.push("nextPageToken" + "=" + inspect(this.nextPageToken));
|
|
2857
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
2858
|
+
}
|
|
2859
|
+
function ListPricingPoliciesResponseCustomJson() {
|
|
2860
|
+
const obj = {
|
|
2861
|
+
type: this.$type,
|
|
2862
|
+
};
|
|
2863
|
+
if ((this.items?.length ?? 0) !== 0)
|
|
2864
|
+
obj.items = inspectJson(this.items);
|
|
2865
|
+
if (this.nextPageToken !== "")
|
|
2866
|
+
obj.nextPageToken = inspectJson(this.nextPageToken);
|
|
2867
|
+
return obj;
|
|
2868
|
+
}
|
|
2869
|
+
function applyListPricingPoliciesResponseCustom(message) {
|
|
2870
|
+
message[custom] = ListPricingPoliciesResponseCustomInspect;
|
|
2871
|
+
message[customJson] = ListPricingPoliciesResponseCustomJson;
|
|
2872
|
+
return attachMessageDescriptor(message, ListPricingPoliciesResponse.$descriptor);
|
|
2873
|
+
}
|
|
2874
|
+
function createBaseListPricingPoliciesResponse() {
|
|
2875
|
+
const message = {
|
|
2876
|
+
$type: "nebius.billing.v1.ListPricingPoliciesResponse",
|
|
2877
|
+
items: [],
|
|
2878
|
+
nextPageToken: "",
|
|
2879
|
+
};
|
|
2880
|
+
return applyListPricingPoliciesResponseCustom(message);
|
|
2881
|
+
}
|
|
2882
|
+
const UpdatePricingPolicyRequest_MESSAGE_DESCRIPTOR = {
|
|
2883
|
+
fields: {
|
|
2884
|
+
"metadata": { pbName: "metadata", message: () => ResourceMetadata.$descriptor },
|
|
2885
|
+
"spec": { pbName: "spec", message: () => PricingPolicySpec.$descriptor },
|
|
2886
|
+
},
|
|
2887
|
+
};
|
|
2888
|
+
/** Encodes, decodes, converts, and creates {@link UpdatePricingPolicyRequest} messages. */
|
|
2889
|
+
export const UpdatePricingPolicyRequest = {
|
|
2890
|
+
$type: "nebius.billing.v1.UpdatePricingPolicyRequest",
|
|
2891
|
+
$descriptor: UpdatePricingPolicyRequest_MESSAGE_DESCRIPTOR,
|
|
2892
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2893
|
+
if (message.metadata !== undefined) {
|
|
2894
|
+
const w = writer.uint32(10).fork();
|
|
2895
|
+
ResourceMetadata.encode(message.metadata, w);
|
|
2896
|
+
w.join();
|
|
2897
|
+
}
|
|
2898
|
+
if (message.spec !== undefined) {
|
|
2899
|
+
const w = writer.uint32(18).fork();
|
|
2900
|
+
PricingPolicySpec.encode(message.spec, w);
|
|
2901
|
+
w.join();
|
|
2902
|
+
}
|
|
2903
|
+
if (message[unknownFieldsSymbol]) {
|
|
2904
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
2905
|
+
}
|
|
2906
|
+
return writer;
|
|
2907
|
+
},
|
|
2908
|
+
decode(input, length) {
|
|
2909
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2910
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2911
|
+
const message = createBaseUpdatePricingPolicyRequest();
|
|
2912
|
+
let writer = undefined;
|
|
2913
|
+
while (reader.pos < end) {
|
|
2914
|
+
const tag = reader.uint32();
|
|
2915
|
+
switch (tag >>> 3) {
|
|
2916
|
+
case 1: {
|
|
2917
|
+
if (tag !== 10)
|
|
2918
|
+
break;
|
|
2919
|
+
message.metadata = ResourceMetadata.decode(reader, reader.uint32());
|
|
2920
|
+
continue;
|
|
2921
|
+
}
|
|
2922
|
+
case 2: {
|
|
2923
|
+
if (tag !== 18)
|
|
2924
|
+
break;
|
|
2925
|
+
message.spec = PricingPolicySpec.decode(reader, reader.uint32());
|
|
2926
|
+
continue;
|
|
2927
|
+
}
|
|
2928
|
+
default:
|
|
2929
|
+
break;
|
|
2930
|
+
}
|
|
2931
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2932
|
+
break;
|
|
2933
|
+
}
|
|
2934
|
+
{
|
|
2935
|
+
if (!writer)
|
|
2936
|
+
writer = new BinaryWriter();
|
|
2937
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
2938
|
+
writer.uint32(tag).raw(skipped);
|
|
2939
|
+
}
|
|
2940
|
+
}
|
|
2941
|
+
if (writer) {
|
|
2942
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
2943
|
+
}
|
|
2944
|
+
return message;
|
|
2945
|
+
},
|
|
2946
|
+
fromJSON(object) {
|
|
2947
|
+
return applyUpdatePricingPolicyRequestCustom({
|
|
2948
|
+
$type: "nebius.billing.v1.UpdatePricingPolicyRequest",
|
|
2949
|
+
metadata: isSet(object.metadata ?? object.metadata)
|
|
2950
|
+
? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
|
|
2951
|
+
: undefined,
|
|
2952
|
+
spec: isSet(object.spec ?? object.spec)
|
|
2953
|
+
? PricingPolicySpec.fromJSON(object.spec ?? object.spec)
|
|
2954
|
+
: undefined,
|
|
2955
|
+
});
|
|
2956
|
+
},
|
|
2957
|
+
toJSON(message, use = "json") {
|
|
2958
|
+
const obj = {};
|
|
2959
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
2960
|
+
if (message.metadata !== undefined) {
|
|
2961
|
+
obj[pick("metadata", "metadata")] = message.metadata
|
|
2962
|
+
? ResourceMetadata.toJSON(message.metadata, use)
|
|
2963
|
+
: undefined;
|
|
2964
|
+
}
|
|
2965
|
+
if (message.spec !== undefined) {
|
|
2966
|
+
obj[pick("spec", "spec")] = message.spec
|
|
2967
|
+
? PricingPolicySpec.toJSON(message.spec, use)
|
|
2968
|
+
: undefined;
|
|
2969
|
+
}
|
|
2970
|
+
return obj;
|
|
2971
|
+
},
|
|
2972
|
+
create(base) {
|
|
2973
|
+
return UpdatePricingPolicyRequest.fromPartial(base ?? {});
|
|
2974
|
+
},
|
|
2975
|
+
fromPartial(object) {
|
|
2976
|
+
const message = createBaseUpdatePricingPolicyRequest();
|
|
2977
|
+
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
2978
|
+
? ResourceMetadata.fromPartial(object.metadata)
|
|
2979
|
+
: undefined;
|
|
2980
|
+
message.spec = (object.spec !== undefined && object.spec !== null)
|
|
2981
|
+
? PricingPolicySpec.fromPartial(object.spec)
|
|
2982
|
+
: undefined;
|
|
2983
|
+
return message;
|
|
2984
|
+
},
|
|
2985
|
+
};
|
|
2986
|
+
protoRegistry.registerMessage(UpdatePricingPolicyRequest);
|
|
2987
|
+
function UpdatePricingPolicyRequestCustomInspect() {
|
|
2988
|
+
const parts = [];
|
|
2989
|
+
if (this.metadata !== undefined)
|
|
2990
|
+
parts.push("metadata" + "=" + inspect(this.metadata));
|
|
2991
|
+
if (this.spec !== undefined)
|
|
2992
|
+
parts.push("spec" + "=" + inspect(this.spec));
|
|
2993
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
2994
|
+
}
|
|
2995
|
+
function UpdatePricingPolicyRequestCustomJson() {
|
|
2996
|
+
const obj = {
|
|
2997
|
+
type: this.$type,
|
|
2998
|
+
};
|
|
2999
|
+
if (this.metadata !== undefined)
|
|
3000
|
+
obj.metadata = inspectJson(this.metadata);
|
|
3001
|
+
if (this.spec !== undefined)
|
|
3002
|
+
obj.spec = inspectJson(this.spec);
|
|
3003
|
+
return obj;
|
|
3004
|
+
}
|
|
3005
|
+
function applyUpdatePricingPolicyRequestCustom(message) {
|
|
3006
|
+
message[custom] = UpdatePricingPolicyRequestCustomInspect;
|
|
3007
|
+
message[customJson] = UpdatePricingPolicyRequestCustomJson;
|
|
3008
|
+
return attachMessageDescriptor(message, UpdatePricingPolicyRequest.$descriptor);
|
|
3009
|
+
}
|
|
3010
|
+
function createBaseUpdatePricingPolicyRequest() {
|
|
3011
|
+
const message = {
|
|
3012
|
+
$type: "nebius.billing.v1.UpdatePricingPolicyRequest",
|
|
3013
|
+
metadata: undefined,
|
|
3014
|
+
spec: undefined,
|
|
3015
|
+
};
|
|
3016
|
+
return applyUpdatePricingPolicyRequestCustom(message);
|
|
3017
|
+
}
|
|
3018
|
+
const DeletePricingPolicyRequest_MESSAGE_DESCRIPTOR = {
|
|
3019
|
+
fields: {
|
|
3020
|
+
"id": { pbName: "id", scalarType: 9 },
|
|
3021
|
+
},
|
|
3022
|
+
};
|
|
3023
|
+
/** Encodes, decodes, converts, and creates {@link DeletePricingPolicyRequest} messages. */
|
|
3024
|
+
export const DeletePricingPolicyRequest = {
|
|
3025
|
+
$type: "nebius.billing.v1.DeletePricingPolicyRequest",
|
|
3026
|
+
$descriptor: DeletePricingPolicyRequest_MESSAGE_DESCRIPTOR,
|
|
3027
|
+
encode(message, writer = new BinaryWriter()) {
|
|
3028
|
+
if (message.id !== "") {
|
|
3029
|
+
writer.uint32(10).string(message.id);
|
|
3030
|
+
}
|
|
3031
|
+
if (message[unknownFieldsSymbol]) {
|
|
3032
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
3033
|
+
}
|
|
3034
|
+
return writer;
|
|
3035
|
+
},
|
|
3036
|
+
decode(input, length) {
|
|
3037
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3038
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3039
|
+
const message = createBaseDeletePricingPolicyRequest();
|
|
3040
|
+
let writer = undefined;
|
|
3041
|
+
while (reader.pos < end) {
|
|
3042
|
+
const tag = reader.uint32();
|
|
3043
|
+
switch (tag >>> 3) {
|
|
3044
|
+
case 1: {
|
|
3045
|
+
if (tag !== 10)
|
|
3046
|
+
break;
|
|
3047
|
+
message.id = reader.string();
|
|
3048
|
+
continue;
|
|
3049
|
+
}
|
|
3050
|
+
default:
|
|
3051
|
+
break;
|
|
3052
|
+
}
|
|
3053
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3054
|
+
break;
|
|
3055
|
+
}
|
|
3056
|
+
{
|
|
3057
|
+
if (!writer)
|
|
3058
|
+
writer = new BinaryWriter();
|
|
3059
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
3060
|
+
writer.uint32(tag).raw(skipped);
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
if (writer) {
|
|
3064
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
3065
|
+
}
|
|
3066
|
+
return message;
|
|
3067
|
+
},
|
|
3068
|
+
fromJSON(object) {
|
|
3069
|
+
return applyDeletePricingPolicyRequestCustom({
|
|
3070
|
+
$type: "nebius.billing.v1.DeletePricingPolicyRequest",
|
|
3071
|
+
id: isSet(object.id ?? object.id)
|
|
3072
|
+
? String(object.id ?? object.id)
|
|
3073
|
+
: "",
|
|
3074
|
+
});
|
|
3075
|
+
},
|
|
3076
|
+
toJSON(message, use = "json") {
|
|
3077
|
+
const obj = {};
|
|
3078
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
3079
|
+
if (message.id !== "") {
|
|
3080
|
+
obj[pick("id", "id")] = message.id;
|
|
3081
|
+
}
|
|
3082
|
+
return obj;
|
|
3083
|
+
},
|
|
3084
|
+
create(base) {
|
|
3085
|
+
return DeletePricingPolicyRequest.fromPartial(base ?? {});
|
|
3086
|
+
},
|
|
3087
|
+
fromPartial(object) {
|
|
3088
|
+
const message = createBaseDeletePricingPolicyRequest();
|
|
3089
|
+
message.id = (object.id !== undefined && object.id !== null)
|
|
3090
|
+
? object.id
|
|
3091
|
+
: "";
|
|
3092
|
+
return message;
|
|
3093
|
+
},
|
|
3094
|
+
};
|
|
3095
|
+
protoRegistry.registerMessage(DeletePricingPolicyRequest);
|
|
3096
|
+
function DeletePricingPolicyRequestCustomInspect() {
|
|
3097
|
+
const parts = [];
|
|
3098
|
+
if (this.id !== "")
|
|
3099
|
+
parts.push("id" + "=" + inspect(this.id));
|
|
3100
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
3101
|
+
}
|
|
3102
|
+
function DeletePricingPolicyRequestCustomJson() {
|
|
3103
|
+
const obj = {
|
|
3104
|
+
type: this.$type,
|
|
3105
|
+
};
|
|
3106
|
+
if (this.id !== "")
|
|
3107
|
+
obj.id = inspectJson(this.id);
|
|
3108
|
+
return obj;
|
|
3109
|
+
}
|
|
3110
|
+
function applyDeletePricingPolicyRequestCustom(message) {
|
|
3111
|
+
message[custom] = DeletePricingPolicyRequestCustomInspect;
|
|
3112
|
+
message[customJson] = DeletePricingPolicyRequestCustomJson;
|
|
3113
|
+
return attachMessageDescriptor(message, DeletePricingPolicyRequest.$descriptor);
|
|
3114
|
+
}
|
|
3115
|
+
function createBaseDeletePricingPolicyRequest() {
|
|
3116
|
+
const message = {
|
|
3117
|
+
$type: "nebius.billing.v1.DeletePricingPolicyRequest",
|
|
3118
|
+
id: "",
|
|
3119
|
+
};
|
|
3120
|
+
return applyDeletePricingPolicyRequestCustom(message);
|
|
3121
|
+
}
|
|
3122
|
+
/**
|
|
3123
|
+
* Describes the gRPC methods for the `nebius.billing.v1.PricingPolicyService` service.
|
|
3124
|
+
*/
|
|
3125
|
+
export const PricingPolicyServiceServiceDescription = {
|
|
3126
|
+
create: {
|
|
3127
|
+
path: "/nebius.billing.v1.PricingPolicyService/Create",
|
|
3128
|
+
requestStream: false,
|
|
3129
|
+
responseStream: false,
|
|
3130
|
+
requestSerialize: (value) => Buffer.from(CreatePricingPolicyRequest.encode(value).finish()),
|
|
3131
|
+
requestDescriptor: () => CreatePricingPolicyRequest.$descriptor,
|
|
3132
|
+
sendResetMask: false,
|
|
3133
|
+
requestDeserialize: (value) => CreatePricingPolicyRequest.decode(value),
|
|
3134
|
+
responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
|
|
3135
|
+
responseDeserialize: (value) => Operation.decode(value),
|
|
3136
|
+
},
|
|
3137
|
+
get: {
|
|
3138
|
+
path: "/nebius.billing.v1.PricingPolicyService/Get",
|
|
3139
|
+
requestStream: false,
|
|
3140
|
+
responseStream: false,
|
|
3141
|
+
requestSerialize: (value) => Buffer.from(GetPricingPolicyRequest.encode(value).finish()),
|
|
3142
|
+
requestDescriptor: () => GetPricingPolicyRequest.$descriptor,
|
|
3143
|
+
sendResetMask: false,
|
|
3144
|
+
requestDeserialize: (value) => GetPricingPolicyRequest.decode(value),
|
|
3145
|
+
responseSerialize: (value) => Buffer.from(PricingPolicy.encode(value).finish()),
|
|
3146
|
+
responseDeserialize: (value) => PricingPolicy.decode(value),
|
|
3147
|
+
},
|
|
3148
|
+
getByName: {
|
|
3149
|
+
path: "/nebius.billing.v1.PricingPolicyService/GetByName",
|
|
3150
|
+
requestStream: false,
|
|
3151
|
+
responseStream: false,
|
|
3152
|
+
requestSerialize: (value) => Buffer.from(GetByNameRequest.encode(value).finish()),
|
|
3153
|
+
requestDescriptor: () => GetByNameRequest.$descriptor,
|
|
3154
|
+
sendResetMask: false,
|
|
3155
|
+
requestDeserialize: (value) => GetByNameRequest.decode(value),
|
|
3156
|
+
responseSerialize: (value) => Buffer.from(PricingPolicy.encode(value).finish()),
|
|
3157
|
+
responseDeserialize: (value) => PricingPolicy.decode(value),
|
|
3158
|
+
},
|
|
3159
|
+
list: {
|
|
3160
|
+
path: "/nebius.billing.v1.PricingPolicyService/List",
|
|
3161
|
+
requestStream: false,
|
|
3162
|
+
responseStream: false,
|
|
3163
|
+
requestSerialize: (value) => Buffer.from(ListPricingPoliciesRequest.encode(value).finish()),
|
|
3164
|
+
requestDescriptor: () => ListPricingPoliciesRequest.$descriptor,
|
|
3165
|
+
sendResetMask: false,
|
|
3166
|
+
requestDeserialize: (value) => ListPricingPoliciesRequest.decode(value),
|
|
3167
|
+
responseSerialize: (value) => Buffer.from(ListPricingPoliciesResponse.encode(value).finish()),
|
|
3168
|
+
responseDeserialize: (value) => ListPricingPoliciesResponse.decode(value),
|
|
3169
|
+
},
|
|
3170
|
+
update: {
|
|
3171
|
+
path: "/nebius.billing.v1.PricingPolicyService/Update",
|
|
3172
|
+
requestStream: false,
|
|
3173
|
+
responseStream: false,
|
|
3174
|
+
requestSerialize: (value) => Buffer.from(UpdatePricingPolicyRequest.encode(value).finish()),
|
|
3175
|
+
requestDescriptor: () => UpdatePricingPolicyRequest.$descriptor,
|
|
3176
|
+
sendResetMask: true,
|
|
3177
|
+
requestDeserialize: (value) => UpdatePricingPolicyRequest.decode(value),
|
|
3178
|
+
responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
|
|
3179
|
+
responseDeserialize: (value) => Operation.decode(value),
|
|
3180
|
+
},
|
|
3181
|
+
delete: {
|
|
3182
|
+
path: "/nebius.billing.v1.PricingPolicyService/Delete",
|
|
3183
|
+
requestStream: false,
|
|
3184
|
+
responseStream: false,
|
|
3185
|
+
requestSerialize: (value) => Buffer.from(DeletePricingPolicyRequest.encode(value).finish()),
|
|
3186
|
+
requestDescriptor: () => DeletePricingPolicyRequest.$descriptor,
|
|
3187
|
+
sendResetMask: false,
|
|
3188
|
+
requestDeserialize: (value) => DeletePricingPolicyRequest.decode(value),
|
|
3189
|
+
responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
|
|
3190
|
+
responseDeserialize: (value) => Operation.decode(value),
|
|
3191
|
+
},
|
|
3192
|
+
};
|
|
3193
|
+
/**
|
|
3194
|
+
* Creates low-level gRPC clients for the `nebius.billing.v1.PricingPolicyService` service.
|
|
3195
|
+
*/
|
|
3196
|
+
export const PricingPolicyServiceBaseClient = makeGenericClientConstructor(PricingPolicyServiceServiceDescription, "nebius.billing.v1.PricingPolicyService");
|
|
3197
|
+
/**
|
|
3198
|
+
* Calls the `nebius.billing.v1.PricingPolicyService` service through the Nebius SDK.
|
|
3199
|
+
*/
|
|
3200
|
+
export class PricingPolicyService {
|
|
3201
|
+
sdk;
|
|
3202
|
+
$type = "nebius.billing.v1.PricingPolicyService";
|
|
3203
|
+
addr;
|
|
3204
|
+
spec;
|
|
3205
|
+
apiServiceName = "pricing-policies.billing-cpl";
|
|
3206
|
+
/** Creates a client that uses the SDK service address. */
|
|
3207
|
+
constructor(sdk) {
|
|
3208
|
+
this.sdk = sdk;
|
|
3209
|
+
const addr = sdk.getAddressFromServiceName(this.$type, this.apiServiceName);
|
|
3210
|
+
this.addr = addr;
|
|
3211
|
+
this.spec = PricingPolicyServiceServiceDescription;
|
|
3212
|
+
}
|
|
3213
|
+
/** Returns the operation service for this service address. */
|
|
3214
|
+
getOperationService() {
|
|
3215
|
+
return new OperationService(this.sdk, this.addr);
|
|
3216
|
+
}
|
|
3217
|
+
/**
|
|
3218
|
+
* Creates a pricing policy. A bid outside the allowed price range fails
|
|
3219
|
+
* with OUT_OF_RANGE; below the current market price it is accepted but the
|
|
3220
|
+
* policy starts SCHEDULING_STATE_BLOCKED. Policies per tenant are
|
|
3221
|
+
* quota-limited (RESOURCE_EXHAUSTED past the limit).
|
|
3222
|
+
* The Operation completes once the policy is ready to back VMs.
|
|
3223
|
+
*
|
|
3224
|
+
*/
|
|
3225
|
+
create(...args) {
|
|
3226
|
+
const spec = this.spec.create;
|
|
3227
|
+
const request = args[0];
|
|
3228
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
3229
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
3230
|
+
const deserialize = (value) => {
|
|
3231
|
+
const resp = spec.responseDeserialize(value);
|
|
3232
|
+
return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
|
|
3233
|
+
};
|
|
3234
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
3235
|
+
}
|
|
3236
|
+
/**
|
|
3237
|
+
* Calls the `Get` RPC.
|
|
3238
|
+
*/
|
|
3239
|
+
get(...args) {
|
|
3240
|
+
const spec = this.spec.get;
|
|
3241
|
+
const request = args[0];
|
|
3242
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
3243
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
3244
|
+
const deserialize = spec.responseDeserialize;
|
|
3245
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
3246
|
+
}
|
|
3247
|
+
/**
|
|
3248
|
+
* Calls the `GetByName` RPC.
|
|
3249
|
+
*/
|
|
3250
|
+
getByName(...args) {
|
|
3251
|
+
const spec = this.spec.getByName;
|
|
3252
|
+
const request = args[0];
|
|
3253
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
3254
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
3255
|
+
const deserialize = spec.responseDeserialize;
|
|
3256
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
3257
|
+
}
|
|
3258
|
+
/**
|
|
3259
|
+
* Calls the `List` RPC.
|
|
3260
|
+
*/
|
|
3261
|
+
list(...args) {
|
|
3262
|
+
const spec = this.spec.list;
|
|
3263
|
+
const request = args[0];
|
|
3264
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
3265
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
3266
|
+
const deserialize = spec.responseDeserialize;
|
|
3267
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
3268
|
+
}
|
|
3269
|
+
/**
|
|
3270
|
+
* Updates a pricing policy. `metadata.name` may change any time; the bid in
|
|
3271
|
+
* `spec.pricing.max_price_v1` only while `status.running_vm_count` is 0
|
|
3272
|
+
* (FAILED_PRECONDITION otherwise). Other spec fields are immutable
|
|
3273
|
+
* (INVALID_ARGUMENT).
|
|
3274
|
+
*
|
|
3275
|
+
*/
|
|
3276
|
+
update(...args) {
|
|
3277
|
+
const spec = this.spec.update;
|
|
3278
|
+
const request = args[0];
|
|
3279
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
3280
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
3281
|
+
const deserialize = (value) => {
|
|
3282
|
+
const resp = spec.responseDeserialize(value);
|
|
3283
|
+
return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
|
|
3284
|
+
};
|
|
3285
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
3286
|
+
}
|
|
3287
|
+
/**
|
|
3288
|
+
* Deletes a pricing policy. Requires that no VM runs under the policy and
|
|
3289
|
+
* nothing is being preempted (FAILED_PRECONDITION otherwise).
|
|
3290
|
+
*
|
|
3291
|
+
*/
|
|
3292
|
+
delete(...args) {
|
|
3293
|
+
const spec = this.spec.delete;
|
|
3294
|
+
const request = args[0];
|
|
3295
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
3296
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
3297
|
+
const deserialize = (value) => {
|
|
3298
|
+
const resp = spec.responseDeserialize(value);
|
|
3299
|
+
return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
|
|
3300
|
+
};
|
|
3301
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
3302
|
+
}
|
|
3303
|
+
}
|
|
3304
|
+
const PricingPolicyStatus_State_VALUE_COMMENTS = {
|
|
3305
|
+
STATE_CREATING: " Not ready yet; a VM referencing the policy gets a retryable error.\n",
|
|
3306
|
+
STATE_ACTIVE: " Ready; whether VMs may start is `scheduling_state`.\n",
|
|
3307
|
+
STATE_DELETING: " Being deleted; does not accept new VMs.\n",
|
|
3308
|
+
STATE_UPDATING: " The bid is being changed; scheduling is blocked until the change lands.\n",
|
|
3309
|
+
};
|
|
3310
|
+
/** Converts and creates {@link PricingPolicyStatus_State} values. */
|
|
3311
|
+
export const PricingPolicyStatus_State = createEnum("nebius.billing.v1.PricingPolicyStatus.State", {
|
|
3312
|
+
/**
|
|
3313
|
+
* Represents the `STATE_UNSPECIFIED` protobuf enum value.
|
|
3314
|
+
*/
|
|
3315
|
+
STATE_UNSPECIFIED: 0,
|
|
3316
|
+
/**
|
|
3317
|
+
* Not ready yet; a VM referencing the policy gets a retryable error.
|
|
3318
|
+
*
|
|
3319
|
+
*/
|
|
3320
|
+
STATE_CREATING: 1,
|
|
3321
|
+
/**
|
|
3322
|
+
* Ready; whether VMs may start is `scheduling_state`.
|
|
3323
|
+
*
|
|
3324
|
+
*/
|
|
3325
|
+
STATE_ACTIVE: 2,
|
|
3326
|
+
/**
|
|
3327
|
+
* Being deleted; does not accept new VMs.
|
|
3328
|
+
*
|
|
3329
|
+
*/
|
|
3330
|
+
STATE_DELETING: 3,
|
|
3331
|
+
/**
|
|
3332
|
+
* The bid is being changed; scheduling is blocked until the change lands.
|
|
3333
|
+
*
|
|
3334
|
+
*/
|
|
3335
|
+
STATE_UPDATING: 4,
|
|
3336
|
+
}, PricingPolicyStatus_State_VALUE_COMMENTS);
|
|
3337
|
+
protoRegistry.registerEnum(PricingPolicyStatus_State);
|
|
3338
|
+
const PricingPolicyStatus_SchedulingState_VALUE_COMMENTS = {
|
|
3339
|
+
SCHEDULING_STATE_ALLOWED: " New VMs may start.\n",
|
|
3340
|
+
SCHEDULING_STATE_BLOCKED: " The max_price limit is below the current market price; VM creation succeeds once\n the price falls to it.\n",
|
|
3341
|
+
};
|
|
3342
|
+
/** Converts and creates {@link PricingPolicyStatus_SchedulingState} values. */
|
|
3343
|
+
export const PricingPolicyStatus_SchedulingState = createEnum("nebius.billing.v1.PricingPolicyStatus.SchedulingState", {
|
|
3344
|
+
/**
|
|
3345
|
+
* Represents the `SCHEDULING_STATE_UNSPECIFIED` protobuf enum value.
|
|
3346
|
+
*/
|
|
3347
|
+
SCHEDULING_STATE_UNSPECIFIED: 0,
|
|
3348
|
+
/**
|
|
3349
|
+
* New VMs may start.
|
|
3350
|
+
*
|
|
3351
|
+
*/
|
|
3352
|
+
SCHEDULING_STATE_ALLOWED: 1,
|
|
3353
|
+
/**
|
|
3354
|
+
* The max_price limit is below the current market price; VM creation succeeds once
|
|
3355
|
+
* the price falls to it.
|
|
3356
|
+
*
|
|
3357
|
+
*/
|
|
3358
|
+
SCHEDULING_STATE_BLOCKED: 2,
|
|
3359
|
+
}, PricingPolicyStatus_SchedulingState_VALUE_COMMENTS);
|
|
3360
|
+
protoRegistry.registerEnum(PricingPolicyStatus_SchedulingState);
|
|
3361
|
+
const PricingPolicy_MESSAGE_DESCRIPTOR = {
|
|
3362
|
+
fields: {
|
|
3363
|
+
"metadata": { pbName: "metadata", message: () => ResourceMetadata.$descriptor },
|
|
3364
|
+
"spec": { pbName: "spec", message: () => PricingPolicySpec.$descriptor },
|
|
3365
|
+
"status": { pbName: "status", message: () => PricingPolicyStatus.$descriptor },
|
|
3366
|
+
},
|
|
3367
|
+
};
|
|
3368
|
+
/** Encodes, decodes, converts, and creates {@link PricingPolicy} messages. */
|
|
3369
|
+
export const PricingPolicy = {
|
|
3370
|
+
$type: "nebius.billing.v1.PricingPolicy",
|
|
3371
|
+
$descriptor: PricingPolicy_MESSAGE_DESCRIPTOR,
|
|
3372
|
+
encode(message, writer = new BinaryWriter()) {
|
|
3373
|
+
if (message.metadata !== undefined) {
|
|
3374
|
+
const w = writer.uint32(10).fork();
|
|
3375
|
+
ResourceMetadata.encode(message.metadata, w);
|
|
3376
|
+
w.join();
|
|
3377
|
+
}
|
|
3378
|
+
if (message.spec !== undefined) {
|
|
3379
|
+
const w = writer.uint32(18).fork();
|
|
3380
|
+
PricingPolicySpec.encode(message.spec, w);
|
|
3381
|
+
w.join();
|
|
3382
|
+
}
|
|
3383
|
+
if (message.status !== undefined) {
|
|
3384
|
+
const w = writer.uint32(26).fork();
|
|
3385
|
+
PricingPolicyStatus.encode(message.status, w);
|
|
3386
|
+
w.join();
|
|
3387
|
+
}
|
|
3388
|
+
if (message[unknownFieldsSymbol]) {
|
|
3389
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
3390
|
+
}
|
|
3391
|
+
return writer;
|
|
3392
|
+
},
|
|
3393
|
+
decode(input, length) {
|
|
3394
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3395
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3396
|
+
const message = createBasePricingPolicy();
|
|
3397
|
+
let writer = undefined;
|
|
3398
|
+
while (reader.pos < end) {
|
|
3399
|
+
const tag = reader.uint32();
|
|
3400
|
+
switch (tag >>> 3) {
|
|
3401
|
+
case 1: {
|
|
3402
|
+
if (tag !== 10)
|
|
3403
|
+
break;
|
|
3404
|
+
message.metadata = ResourceMetadata.decode(reader, reader.uint32());
|
|
3405
|
+
continue;
|
|
3406
|
+
}
|
|
3407
|
+
case 2: {
|
|
3408
|
+
if (tag !== 18)
|
|
3409
|
+
break;
|
|
3410
|
+
message.spec = PricingPolicySpec.decode(reader, reader.uint32());
|
|
3411
|
+
continue;
|
|
3412
|
+
}
|
|
3413
|
+
case 3: {
|
|
3414
|
+
if (tag !== 26)
|
|
3415
|
+
break;
|
|
3416
|
+
message.status = PricingPolicyStatus.decode(reader, reader.uint32());
|
|
3417
|
+
continue;
|
|
3418
|
+
}
|
|
3419
|
+
default:
|
|
3420
|
+
break;
|
|
3421
|
+
}
|
|
3422
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3423
|
+
break;
|
|
3424
|
+
}
|
|
3425
|
+
{
|
|
3426
|
+
if (!writer)
|
|
3427
|
+
writer = new BinaryWriter();
|
|
3428
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
3429
|
+
writer.uint32(tag).raw(skipped);
|
|
3430
|
+
}
|
|
3431
|
+
}
|
|
3432
|
+
if (writer) {
|
|
3433
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
3434
|
+
}
|
|
3435
|
+
return message;
|
|
3436
|
+
},
|
|
3437
|
+
fromJSON(object) {
|
|
3438
|
+
return applyPricingPolicyCustom({
|
|
3439
|
+
$type: "nebius.billing.v1.PricingPolicy",
|
|
3440
|
+
metadata: isSet(object.metadata ?? object.metadata)
|
|
3441
|
+
? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
|
|
3442
|
+
: undefined,
|
|
3443
|
+
spec: isSet(object.spec ?? object.spec)
|
|
3444
|
+
? PricingPolicySpec.fromJSON(object.spec ?? object.spec)
|
|
3445
|
+
: undefined,
|
|
3446
|
+
status: isSet(object.status ?? object.status)
|
|
3447
|
+
? PricingPolicyStatus.fromJSON(object.status ?? object.status)
|
|
3448
|
+
: undefined,
|
|
3449
|
+
});
|
|
3450
|
+
},
|
|
3451
|
+
toJSON(message, use = "json") {
|
|
3452
|
+
const obj = {};
|
|
3453
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
3454
|
+
if (message.metadata !== undefined) {
|
|
3455
|
+
obj[pick("metadata", "metadata")] = message.metadata
|
|
3456
|
+
? ResourceMetadata.toJSON(message.metadata, use)
|
|
3457
|
+
: undefined;
|
|
3458
|
+
}
|
|
3459
|
+
if (message.spec !== undefined) {
|
|
3460
|
+
obj[pick("spec", "spec")] = message.spec
|
|
3461
|
+
? PricingPolicySpec.toJSON(message.spec, use)
|
|
3462
|
+
: undefined;
|
|
3463
|
+
}
|
|
3464
|
+
if (message.status !== undefined) {
|
|
3465
|
+
obj[pick("status", "status")] = message.status
|
|
3466
|
+
? PricingPolicyStatus.toJSON(message.status, use)
|
|
3467
|
+
: undefined;
|
|
3468
|
+
}
|
|
3469
|
+
return obj;
|
|
3470
|
+
},
|
|
3471
|
+
create(base) {
|
|
3472
|
+
return PricingPolicy.fromPartial(base ?? {});
|
|
3473
|
+
},
|
|
3474
|
+
fromPartial(object) {
|
|
3475
|
+
const message = createBasePricingPolicy();
|
|
3476
|
+
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
3477
|
+
? ResourceMetadata.fromPartial(object.metadata)
|
|
3478
|
+
: undefined;
|
|
3479
|
+
message.spec = (object.spec !== undefined && object.spec !== null)
|
|
3480
|
+
? PricingPolicySpec.fromPartial(object.spec)
|
|
3481
|
+
: undefined;
|
|
3482
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
3483
|
+
? PricingPolicyStatus.fromPartial(object.status)
|
|
3484
|
+
: undefined;
|
|
3485
|
+
return message;
|
|
3486
|
+
},
|
|
3487
|
+
};
|
|
3488
|
+
protoRegistry.registerMessage(PricingPolicy);
|
|
3489
|
+
function PricingPolicyCustomInspect() {
|
|
3490
|
+
const parts = [];
|
|
3491
|
+
if (this.metadata !== undefined)
|
|
3492
|
+
parts.push("metadata" + "=" + inspect(this.metadata));
|
|
3493
|
+
if (this.spec !== undefined)
|
|
3494
|
+
parts.push("spec" + "=" + inspect(this.spec));
|
|
3495
|
+
if (this.status !== undefined)
|
|
3496
|
+
parts.push("status" + "=" + inspect(this.status));
|
|
3497
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
3498
|
+
}
|
|
3499
|
+
function PricingPolicyCustomJson() {
|
|
3500
|
+
const obj = {
|
|
3501
|
+
type: this.$type,
|
|
3502
|
+
};
|
|
3503
|
+
if (this.metadata !== undefined)
|
|
3504
|
+
obj.metadata = inspectJson(this.metadata);
|
|
3505
|
+
if (this.spec !== undefined)
|
|
3506
|
+
obj.spec = inspectJson(this.spec);
|
|
3507
|
+
if (this.status !== undefined)
|
|
3508
|
+
obj.status = inspectJson(this.status);
|
|
3509
|
+
return obj;
|
|
3510
|
+
}
|
|
3511
|
+
function applyPricingPolicyCustom(message) {
|
|
3512
|
+
message[custom] = PricingPolicyCustomInspect;
|
|
3513
|
+
message[customJson] = PricingPolicyCustomJson;
|
|
3514
|
+
return attachMessageDescriptor(message, PricingPolicy.$descriptor);
|
|
3515
|
+
}
|
|
3516
|
+
function createBasePricingPolicy() {
|
|
3517
|
+
const message = {
|
|
3518
|
+
$type: "nebius.billing.v1.PricingPolicy",
|
|
3519
|
+
metadata: undefined,
|
|
3520
|
+
spec: undefined,
|
|
3521
|
+
status: undefined,
|
|
3522
|
+
};
|
|
3523
|
+
return applyPricingPolicyCustom(message);
|
|
3524
|
+
}
|
|
3525
|
+
const PricingPolicySpec_MESSAGE_DESCRIPTOR = {
|
|
3526
|
+
fields: {
|
|
3527
|
+
"computeInstanceSpec": { pbName: "compute_instance_spec", immutable: true, message: () => ComputeInstanceSpec.$descriptor },
|
|
3528
|
+
"pricing": { pbName: "pricing", message: () => PricingMethod.$descriptor },
|
|
3529
|
+
},
|
|
3530
|
+
};
|
|
3531
|
+
/** Encodes, decodes, converts, and creates {@link PricingPolicySpec} messages. */
|
|
3532
|
+
export const PricingPolicySpec = {
|
|
3533
|
+
$type: "nebius.billing.v1.PricingPolicySpec",
|
|
3534
|
+
$descriptor: PricingPolicySpec_MESSAGE_DESCRIPTOR,
|
|
3535
|
+
encode(message, writer = new BinaryWriter()) {
|
|
3536
|
+
if (message.computeInstanceSpec !== undefined) {
|
|
3537
|
+
const w = writer.uint32(10).fork();
|
|
3538
|
+
ComputeInstanceSpec.encode(message.computeInstanceSpec, w);
|
|
3539
|
+
w.join();
|
|
3540
|
+
}
|
|
3541
|
+
if (message.pricing !== undefined) {
|
|
3542
|
+
const w = writer.uint32(18).fork();
|
|
3543
|
+
PricingMethod.encode(message.pricing, w);
|
|
3544
|
+
w.join();
|
|
3545
|
+
}
|
|
3546
|
+
if (message[unknownFieldsSymbol]) {
|
|
3547
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
3548
|
+
}
|
|
3549
|
+
return writer;
|
|
3550
|
+
},
|
|
3551
|
+
decode(input, length) {
|
|
3552
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3553
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3554
|
+
const message = createBasePricingPolicySpec();
|
|
3555
|
+
let writer = undefined;
|
|
3556
|
+
while (reader.pos < end) {
|
|
3557
|
+
const tag = reader.uint32();
|
|
3558
|
+
switch (tag >>> 3) {
|
|
3559
|
+
case 1: {
|
|
3560
|
+
if (tag !== 10)
|
|
3561
|
+
break;
|
|
3562
|
+
message.computeInstanceSpec = ComputeInstanceSpec.decode(reader, reader.uint32());
|
|
3563
|
+
continue;
|
|
3564
|
+
}
|
|
3565
|
+
case 2: {
|
|
3566
|
+
if (tag !== 18)
|
|
3567
|
+
break;
|
|
3568
|
+
message.pricing = PricingMethod.decode(reader, reader.uint32());
|
|
3569
|
+
continue;
|
|
3570
|
+
}
|
|
3571
|
+
default:
|
|
3572
|
+
break;
|
|
3573
|
+
}
|
|
3574
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3575
|
+
break;
|
|
3576
|
+
}
|
|
3577
|
+
{
|
|
3578
|
+
if (!writer)
|
|
3579
|
+
writer = new BinaryWriter();
|
|
3580
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
3581
|
+
writer.uint32(tag).raw(skipped);
|
|
3582
|
+
}
|
|
3583
|
+
}
|
|
3584
|
+
if (writer) {
|
|
3585
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
3586
|
+
}
|
|
3587
|
+
return message;
|
|
3588
|
+
},
|
|
3589
|
+
fromJSON(object) {
|
|
3590
|
+
return applyPricingPolicySpecCustom({
|
|
3591
|
+
$type: "nebius.billing.v1.PricingPolicySpec",
|
|
3592
|
+
computeInstanceSpec: isSet(object.computeInstanceSpec ?? object.compute_instance_spec)
|
|
3593
|
+
? ComputeInstanceSpec.fromJSON(object.computeInstanceSpec ?? object.compute_instance_spec)
|
|
3594
|
+
: undefined,
|
|
3595
|
+
pricing: isSet(object.pricing ?? object.pricing)
|
|
3596
|
+
? PricingMethod.fromJSON(object.pricing ?? object.pricing)
|
|
3597
|
+
: undefined,
|
|
3598
|
+
});
|
|
3599
|
+
},
|
|
3600
|
+
toJSON(message, use = "json") {
|
|
3601
|
+
const obj = {};
|
|
3602
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
3603
|
+
if (message.computeInstanceSpec !== undefined) {
|
|
3604
|
+
obj[pick("computeInstanceSpec", "compute_instance_spec")] = message.computeInstanceSpec
|
|
3605
|
+
? ComputeInstanceSpec.toJSON(message.computeInstanceSpec, use)
|
|
3606
|
+
: undefined;
|
|
3607
|
+
}
|
|
3608
|
+
if (message.pricing !== undefined) {
|
|
3609
|
+
obj[pick("pricing", "pricing")] = message.pricing
|
|
3610
|
+
? PricingMethod.toJSON(message.pricing, use)
|
|
3611
|
+
: undefined;
|
|
3612
|
+
}
|
|
3613
|
+
return obj;
|
|
3614
|
+
},
|
|
3615
|
+
create(base) {
|
|
3616
|
+
return PricingPolicySpec.fromPartial(base ?? {});
|
|
3617
|
+
},
|
|
3618
|
+
fromPartial(object) {
|
|
3619
|
+
const message = createBasePricingPolicySpec();
|
|
3620
|
+
message.computeInstanceSpec = (object.computeInstanceSpec !== undefined && object.computeInstanceSpec !== null)
|
|
3621
|
+
? ComputeInstanceSpec.fromPartial(object.computeInstanceSpec)
|
|
3622
|
+
: undefined;
|
|
3623
|
+
message.pricing = (object.pricing !== undefined && object.pricing !== null)
|
|
3624
|
+
? PricingMethod.fromPartial(object.pricing)
|
|
3625
|
+
: undefined;
|
|
3626
|
+
return message;
|
|
3627
|
+
},
|
|
3628
|
+
};
|
|
3629
|
+
protoRegistry.registerMessage(PricingPolicySpec);
|
|
3630
|
+
function PricingPolicySpecCustomInspect() {
|
|
3631
|
+
const parts = [];
|
|
3632
|
+
if (this.computeInstanceSpec !== undefined)
|
|
3633
|
+
parts.push("computeInstanceSpec" + "=" + inspect(this.computeInstanceSpec));
|
|
3634
|
+
if (this.pricing !== undefined)
|
|
3635
|
+
parts.push("pricing" + "=" + inspect(this.pricing));
|
|
3636
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
3637
|
+
}
|
|
3638
|
+
function PricingPolicySpecCustomJson() {
|
|
3639
|
+
const obj = {
|
|
3640
|
+
type: this.$type,
|
|
3641
|
+
};
|
|
3642
|
+
if (this.computeInstanceSpec !== undefined)
|
|
3643
|
+
obj.computeInstanceSpec = inspectJson(this.computeInstanceSpec);
|
|
3644
|
+
if (this.pricing !== undefined)
|
|
3645
|
+
obj.pricing = inspectJson(this.pricing);
|
|
3646
|
+
return obj;
|
|
3647
|
+
}
|
|
3648
|
+
function applyPricingPolicySpecCustom(message) {
|
|
3649
|
+
message[custom] = PricingPolicySpecCustomInspect;
|
|
3650
|
+
message[customJson] = PricingPolicySpecCustomJson;
|
|
3651
|
+
return attachMessageDescriptor(message, PricingPolicySpec.$descriptor);
|
|
3652
|
+
}
|
|
3653
|
+
function createBasePricingPolicySpec() {
|
|
3654
|
+
const message = {
|
|
3655
|
+
$type: "nebius.billing.v1.PricingPolicySpec",
|
|
3656
|
+
computeInstanceSpec: undefined,
|
|
3657
|
+
pricing: undefined,
|
|
3658
|
+
};
|
|
3659
|
+
return applyPricingPolicySpecCustom(message);
|
|
3660
|
+
}
|
|
3661
|
+
const ComputeInstanceSpec_versions_ONEOF_DESCRIPTOR = {
|
|
3662
|
+
fields: {
|
|
3663
|
+
"v1": { pbName: "v1", message: () => ComputeInstanceSpecV1.$descriptor },
|
|
3664
|
+
},
|
|
3665
|
+
};
|
|
3666
|
+
const ComputeInstanceSpec_MESSAGE_DESCRIPTOR = {
|
|
3667
|
+
fields: {
|
|
3668
|
+
"versions": { pbName: "versions", oneof: true, message: () => ComputeInstanceSpec_versions_ONEOF_DESCRIPTOR },
|
|
3669
|
+
},
|
|
3670
|
+
};
|
|
3671
|
+
/** Encodes, decodes, converts, and creates {@link ComputeInstanceSpec} messages. */
|
|
3672
|
+
export const ComputeInstanceSpec = {
|
|
3673
|
+
$type: "nebius.billing.v1.ComputeInstanceSpec",
|
|
3674
|
+
$descriptor: ComputeInstanceSpec_MESSAGE_DESCRIPTOR,
|
|
3675
|
+
encode(message, writer = new BinaryWriter()) {
|
|
3676
|
+
if (message.versions?.$case === undefined) { /* noop */ }
|
|
3677
|
+
else if (message.versions?.$case === "v1") {
|
|
3678
|
+
const w = writer.uint32(10).fork();
|
|
3679
|
+
ComputeInstanceSpecV1.encode(message.versions.v1, w);
|
|
3680
|
+
w.join();
|
|
3681
|
+
}
|
|
3682
|
+
if (message[unknownFieldsSymbol]) {
|
|
3683
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
3684
|
+
}
|
|
3685
|
+
return writer;
|
|
3686
|
+
},
|
|
3687
|
+
decode(input, length) {
|
|
3688
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3689
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3690
|
+
const message = createBaseComputeInstanceSpec();
|
|
3691
|
+
let writer = undefined;
|
|
3692
|
+
while (reader.pos < end) {
|
|
3693
|
+
const tag = reader.uint32();
|
|
3694
|
+
switch (tag >>> 3) {
|
|
3695
|
+
case 1: {
|
|
3696
|
+
if (tag !== 10)
|
|
3697
|
+
break;
|
|
3698
|
+
message.versions = {
|
|
3699
|
+
$case: "v1",
|
|
3700
|
+
v1: ComputeInstanceSpecV1.decode(reader, reader.uint32())
|
|
3701
|
+
};
|
|
3702
|
+
continue;
|
|
3703
|
+
}
|
|
3704
|
+
default:
|
|
3705
|
+
break;
|
|
3706
|
+
}
|
|
3707
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3708
|
+
break;
|
|
3709
|
+
}
|
|
3710
|
+
{
|
|
3711
|
+
if (!writer)
|
|
3712
|
+
writer = new BinaryWriter();
|
|
3713
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
3714
|
+
writer.uint32(tag).raw(skipped);
|
|
3715
|
+
}
|
|
3716
|
+
}
|
|
3717
|
+
if (writer) {
|
|
3718
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
3719
|
+
}
|
|
3720
|
+
return message;
|
|
3721
|
+
},
|
|
3722
|
+
fromJSON(object) {
|
|
3723
|
+
return applyComputeInstanceSpecCustom({
|
|
3724
|
+
$type: "nebius.billing.v1.ComputeInstanceSpec",
|
|
3725
|
+
versions: (() => {
|
|
3726
|
+
if (isSet(object.v1) || isSet(object.v1)) {
|
|
3727
|
+
return {
|
|
3728
|
+
$case: "v1",
|
|
3729
|
+
v1: ComputeInstanceSpecV1.fromJSON(object.v1 ?? object.v1)
|
|
3730
|
+
};
|
|
3731
|
+
}
|
|
3732
|
+
return undefined;
|
|
3733
|
+
})(),
|
|
3734
|
+
});
|
|
3735
|
+
},
|
|
3736
|
+
toJSON(message, use = "json") {
|
|
3737
|
+
const obj = {};
|
|
3738
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
3739
|
+
switch (message.versions?.$case) {
|
|
3740
|
+
case "v1": {
|
|
3741
|
+
obj[pick("v1", "v1")] = ComputeInstanceSpecV1.toJSON(message.versions.v1, use);
|
|
3742
|
+
break;
|
|
3743
|
+
}
|
|
3744
|
+
default: break;
|
|
3745
|
+
}
|
|
3746
|
+
return obj;
|
|
3747
|
+
},
|
|
3748
|
+
create(base) {
|
|
3749
|
+
return ComputeInstanceSpec.fromPartial(base ?? {});
|
|
3750
|
+
},
|
|
3751
|
+
fromPartial(object) {
|
|
3752
|
+
const message = createBaseComputeInstanceSpec();
|
|
3753
|
+
switch (object.versions?.$case) {
|
|
3754
|
+
case "v1": {
|
|
3755
|
+
if (object.versions.v1 !== undefined && object.versions.v1 !== null) {
|
|
3756
|
+
message.versions = {
|
|
3757
|
+
$case: "v1",
|
|
3758
|
+
v1: ComputeInstanceSpecV1.fromPartial(object.versions.v1),
|
|
3759
|
+
};
|
|
3760
|
+
}
|
|
3761
|
+
break;
|
|
3762
|
+
}
|
|
3763
|
+
default: break;
|
|
3764
|
+
}
|
|
3765
|
+
return message;
|
|
3766
|
+
},
|
|
3767
|
+
};
|
|
3768
|
+
protoRegistry.registerMessage(ComputeInstanceSpec);
|
|
3769
|
+
function ComputeInstanceSpecCustomInspect() {
|
|
3770
|
+
const parts = [];
|
|
3771
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
3772
|
+
}
|
|
3773
|
+
function ComputeInstanceSpecCustomJson() {
|
|
3774
|
+
const obj = {
|
|
3775
|
+
type: this.$type,
|
|
3776
|
+
};
|
|
3777
|
+
return obj;
|
|
3778
|
+
}
|
|
3779
|
+
function applyComputeInstanceSpecCustom(message) {
|
|
3780
|
+
message[custom] = ComputeInstanceSpecCustomInspect;
|
|
3781
|
+
message[customJson] = ComputeInstanceSpecCustomJson;
|
|
3782
|
+
return attachMessageDescriptor(message, ComputeInstanceSpec.$descriptor);
|
|
3783
|
+
}
|
|
3784
|
+
function createBaseComputeInstanceSpec() {
|
|
3785
|
+
const message = {
|
|
3786
|
+
$type: "nebius.billing.v1.ComputeInstanceSpec",
|
|
3787
|
+
versions: undefined,
|
|
3788
|
+
};
|
|
3789
|
+
return applyComputeInstanceSpecCustom(message);
|
|
3790
|
+
}
|
|
3791
|
+
const ComputeInstanceSpecV1_MESSAGE_DESCRIPTOR = {
|
|
3792
|
+
fields: {
|
|
3793
|
+
"platform": { pbName: "platform", scalarType: 9 },
|
|
3794
|
+
},
|
|
3795
|
+
};
|
|
3796
|
+
/** Encodes, decodes, converts, and creates {@link ComputeInstanceSpecV1} messages. */
|
|
3797
|
+
export const ComputeInstanceSpecV1 = {
|
|
3798
|
+
$type: "nebius.billing.v1.ComputeInstanceSpecV1",
|
|
3799
|
+
$descriptor: ComputeInstanceSpecV1_MESSAGE_DESCRIPTOR,
|
|
3800
|
+
encode(message, writer = new BinaryWriter()) {
|
|
3801
|
+
if (message.platform !== "") {
|
|
3802
|
+
writer.uint32(10).string(message.platform);
|
|
3803
|
+
}
|
|
3804
|
+
if (message[unknownFieldsSymbol]) {
|
|
3805
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
3806
|
+
}
|
|
3807
|
+
return writer;
|
|
3808
|
+
},
|
|
3809
|
+
decode(input, length) {
|
|
3810
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3811
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3812
|
+
const message = createBaseComputeInstanceSpecV1();
|
|
3813
|
+
let writer = undefined;
|
|
3814
|
+
while (reader.pos < end) {
|
|
3815
|
+
const tag = reader.uint32();
|
|
3816
|
+
switch (tag >>> 3) {
|
|
3817
|
+
case 1: {
|
|
3818
|
+
if (tag !== 10)
|
|
3819
|
+
break;
|
|
3820
|
+
message.platform = reader.string();
|
|
3821
|
+
continue;
|
|
3822
|
+
}
|
|
3823
|
+
default:
|
|
3824
|
+
break;
|
|
3825
|
+
}
|
|
3826
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3827
|
+
break;
|
|
3828
|
+
}
|
|
3829
|
+
{
|
|
3830
|
+
if (!writer)
|
|
3831
|
+
writer = new BinaryWriter();
|
|
3832
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
3833
|
+
writer.uint32(tag).raw(skipped);
|
|
3834
|
+
}
|
|
3835
|
+
}
|
|
3836
|
+
if (writer) {
|
|
3837
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
3838
|
+
}
|
|
3839
|
+
return message;
|
|
3840
|
+
},
|
|
3841
|
+
fromJSON(object) {
|
|
3842
|
+
return applyComputeInstanceSpecV1Custom({
|
|
3843
|
+
$type: "nebius.billing.v1.ComputeInstanceSpecV1",
|
|
3844
|
+
platform: isSet(object.platform ?? object.platform)
|
|
3845
|
+
? String(object.platform ?? object.platform)
|
|
3846
|
+
: "",
|
|
3847
|
+
});
|
|
3848
|
+
},
|
|
3849
|
+
toJSON(message, use = "json") {
|
|
3850
|
+
const obj = {};
|
|
3851
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
3852
|
+
if (message.platform !== "") {
|
|
3853
|
+
obj[pick("platform", "platform")] = message.platform;
|
|
3854
|
+
}
|
|
3855
|
+
return obj;
|
|
3856
|
+
},
|
|
3857
|
+
create(base) {
|
|
3858
|
+
return ComputeInstanceSpecV1.fromPartial(base ?? {});
|
|
3859
|
+
},
|
|
3860
|
+
fromPartial(object) {
|
|
3861
|
+
const message = createBaseComputeInstanceSpecV1();
|
|
3862
|
+
message.platform = (object.platform !== undefined && object.platform !== null)
|
|
3863
|
+
? object.platform
|
|
3864
|
+
: "";
|
|
3865
|
+
return message;
|
|
3866
|
+
},
|
|
3867
|
+
};
|
|
3868
|
+
protoRegistry.registerMessage(ComputeInstanceSpecV1);
|
|
3869
|
+
function ComputeInstanceSpecV1CustomInspect() {
|
|
3870
|
+
const parts = [];
|
|
3871
|
+
if (this.platform !== "")
|
|
3872
|
+
parts.push("platform" + "=" + inspect(this.platform));
|
|
3873
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
3874
|
+
}
|
|
3875
|
+
function ComputeInstanceSpecV1CustomJson() {
|
|
3876
|
+
const obj = {
|
|
3877
|
+
type: this.$type,
|
|
3878
|
+
};
|
|
3879
|
+
if (this.platform !== "")
|
|
3880
|
+
obj.platform = inspectJson(this.platform);
|
|
3881
|
+
return obj;
|
|
3882
|
+
}
|
|
3883
|
+
function applyComputeInstanceSpecV1Custom(message) {
|
|
3884
|
+
message[custom] = ComputeInstanceSpecV1CustomInspect;
|
|
3885
|
+
message[customJson] = ComputeInstanceSpecV1CustomJson;
|
|
3886
|
+
return attachMessageDescriptor(message, ComputeInstanceSpecV1.$descriptor);
|
|
3887
|
+
}
|
|
3888
|
+
function createBaseComputeInstanceSpecV1() {
|
|
3889
|
+
const message = {
|
|
3890
|
+
$type: "nebius.billing.v1.ComputeInstanceSpecV1",
|
|
3891
|
+
platform: "",
|
|
3892
|
+
};
|
|
3893
|
+
return applyComputeInstanceSpecV1Custom(message);
|
|
3894
|
+
}
|
|
3895
|
+
const PricingMethod_versions_ONEOF_DESCRIPTOR = {
|
|
3896
|
+
fields: {
|
|
3897
|
+
"maxPriceV1": { pbName: "max_price_v1", message: () => MaxPriceV1.$descriptor },
|
|
3898
|
+
},
|
|
3899
|
+
};
|
|
3900
|
+
const PricingMethod_MESSAGE_DESCRIPTOR = {
|
|
3901
|
+
fields: {
|
|
3902
|
+
"versions": { pbName: "versions", oneof: true, message: () => PricingMethod_versions_ONEOF_DESCRIPTOR },
|
|
3903
|
+
},
|
|
3904
|
+
};
|
|
3905
|
+
/** Encodes, decodes, converts, and creates {@link PricingMethod} messages. */
|
|
3906
|
+
export const PricingMethod = {
|
|
3907
|
+
$type: "nebius.billing.v1.PricingMethod",
|
|
3908
|
+
$descriptor: PricingMethod_MESSAGE_DESCRIPTOR,
|
|
3909
|
+
encode(message, writer = new BinaryWriter()) {
|
|
3910
|
+
if (message.versions?.$case === undefined) { /* noop */ }
|
|
3911
|
+
else if (message.versions?.$case === "maxPriceV1") {
|
|
3912
|
+
const w = writer.uint32(10).fork();
|
|
3913
|
+
MaxPriceV1.encode(message.versions.maxPriceV1, w);
|
|
3914
|
+
w.join();
|
|
3915
|
+
}
|
|
3916
|
+
if (message[unknownFieldsSymbol]) {
|
|
3917
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
3918
|
+
}
|
|
3919
|
+
return writer;
|
|
3920
|
+
},
|
|
3921
|
+
decode(input, length) {
|
|
3922
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3923
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3924
|
+
const message = createBasePricingMethod();
|
|
3925
|
+
let writer = undefined;
|
|
3926
|
+
while (reader.pos < end) {
|
|
3927
|
+
const tag = reader.uint32();
|
|
3928
|
+
switch (tag >>> 3) {
|
|
3929
|
+
case 1: {
|
|
3930
|
+
if (tag !== 10)
|
|
3931
|
+
break;
|
|
3932
|
+
message.versions = {
|
|
3933
|
+
$case: "maxPriceV1",
|
|
3934
|
+
maxPriceV1: MaxPriceV1.decode(reader, reader.uint32())
|
|
3935
|
+
};
|
|
3936
|
+
continue;
|
|
3937
|
+
}
|
|
3938
|
+
default:
|
|
3939
|
+
break;
|
|
3940
|
+
}
|
|
3941
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3942
|
+
break;
|
|
3943
|
+
}
|
|
3944
|
+
{
|
|
3945
|
+
if (!writer)
|
|
3946
|
+
writer = new BinaryWriter();
|
|
3947
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
3948
|
+
writer.uint32(tag).raw(skipped);
|
|
3949
|
+
}
|
|
3950
|
+
}
|
|
3951
|
+
if (writer) {
|
|
3952
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
3953
|
+
}
|
|
3954
|
+
return message;
|
|
3955
|
+
},
|
|
3956
|
+
fromJSON(object) {
|
|
3957
|
+
return applyPricingMethodCustom({
|
|
3958
|
+
$type: "nebius.billing.v1.PricingMethod",
|
|
3959
|
+
versions: (() => {
|
|
3960
|
+
if (isSet(object.maxPriceV1) || isSet(object.max_price_v1)) {
|
|
3961
|
+
return {
|
|
3962
|
+
$case: "maxPriceV1",
|
|
3963
|
+
maxPriceV1: MaxPriceV1.fromJSON(object.maxPriceV1 ?? object.max_price_v1)
|
|
3964
|
+
};
|
|
3965
|
+
}
|
|
3966
|
+
return undefined;
|
|
3967
|
+
})(),
|
|
3968
|
+
});
|
|
3969
|
+
},
|
|
3970
|
+
toJSON(message, use = "json") {
|
|
3971
|
+
const obj = {};
|
|
3972
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
3973
|
+
switch (message.versions?.$case) {
|
|
3974
|
+
case "maxPriceV1": {
|
|
3975
|
+
obj[pick("maxPriceV1", "max_price_v1")] = MaxPriceV1.toJSON(message.versions.maxPriceV1, use);
|
|
3976
|
+
break;
|
|
3977
|
+
}
|
|
3978
|
+
default: break;
|
|
3979
|
+
}
|
|
3980
|
+
return obj;
|
|
3981
|
+
},
|
|
3982
|
+
create(base) {
|
|
3983
|
+
return PricingMethod.fromPartial(base ?? {});
|
|
3984
|
+
},
|
|
3985
|
+
fromPartial(object) {
|
|
3986
|
+
const message = createBasePricingMethod();
|
|
3987
|
+
switch (object.versions?.$case) {
|
|
3988
|
+
case "maxPriceV1": {
|
|
3989
|
+
if (object.versions.maxPriceV1 !== undefined && object.versions.maxPriceV1 !== null) {
|
|
3990
|
+
message.versions = {
|
|
3991
|
+
$case: "maxPriceV1",
|
|
3992
|
+
maxPriceV1: MaxPriceV1.fromPartial(object.versions.maxPriceV1),
|
|
3993
|
+
};
|
|
3994
|
+
}
|
|
3995
|
+
break;
|
|
3996
|
+
}
|
|
3997
|
+
default: break;
|
|
3998
|
+
}
|
|
3999
|
+
return message;
|
|
4000
|
+
},
|
|
4001
|
+
};
|
|
4002
|
+
protoRegistry.registerMessage(PricingMethod);
|
|
4003
|
+
function PricingMethodCustomInspect() {
|
|
4004
|
+
const parts = [];
|
|
4005
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
4006
|
+
}
|
|
4007
|
+
function PricingMethodCustomJson() {
|
|
4008
|
+
const obj = {
|
|
4009
|
+
type: this.$type,
|
|
4010
|
+
};
|
|
4011
|
+
return obj;
|
|
4012
|
+
}
|
|
4013
|
+
function applyPricingMethodCustom(message) {
|
|
4014
|
+
message[custom] = PricingMethodCustomInspect;
|
|
4015
|
+
message[customJson] = PricingMethodCustomJson;
|
|
4016
|
+
return attachMessageDescriptor(message, PricingMethod.$descriptor);
|
|
4017
|
+
}
|
|
4018
|
+
function createBasePricingMethod() {
|
|
4019
|
+
const message = {
|
|
4020
|
+
$type: "nebius.billing.v1.PricingMethod",
|
|
4021
|
+
versions: undefined,
|
|
4022
|
+
};
|
|
4023
|
+
return applyPricingMethodCustom(message);
|
|
4024
|
+
}
|
|
4025
|
+
const MaxPriceV1_MESSAGE_DESCRIPTOR = {
|
|
4026
|
+
fields: {
|
|
4027
|
+
"maxPrice": { pbName: "max_price", scalarType: 9 },
|
|
4028
|
+
},
|
|
4029
|
+
};
|
|
4030
|
+
/** Encodes, decodes, converts, and creates {@link MaxPriceV1} messages. */
|
|
4031
|
+
export const MaxPriceV1 = {
|
|
4032
|
+
$type: "nebius.billing.v1.MaxPriceV1",
|
|
4033
|
+
$descriptor: MaxPriceV1_MESSAGE_DESCRIPTOR,
|
|
4034
|
+
encode(message, writer = new BinaryWriter()) {
|
|
4035
|
+
if (message.maxPrice !== "") {
|
|
4036
|
+
writer.uint32(10).string(message.maxPrice);
|
|
4037
|
+
}
|
|
4038
|
+
if (message[unknownFieldsSymbol]) {
|
|
4039
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
4040
|
+
}
|
|
4041
|
+
return writer;
|
|
4042
|
+
},
|
|
4043
|
+
decode(input, length) {
|
|
4044
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4045
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4046
|
+
const message = createBaseMaxPriceV1();
|
|
4047
|
+
let writer = undefined;
|
|
4048
|
+
while (reader.pos < end) {
|
|
4049
|
+
const tag = reader.uint32();
|
|
4050
|
+
switch (tag >>> 3) {
|
|
4051
|
+
case 1: {
|
|
4052
|
+
if (tag !== 10)
|
|
4053
|
+
break;
|
|
4054
|
+
message.maxPrice = reader.string();
|
|
4055
|
+
continue;
|
|
4056
|
+
}
|
|
4057
|
+
default:
|
|
4058
|
+
break;
|
|
4059
|
+
}
|
|
4060
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4061
|
+
break;
|
|
4062
|
+
}
|
|
4063
|
+
{
|
|
4064
|
+
if (!writer)
|
|
4065
|
+
writer = new BinaryWriter();
|
|
4066
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
4067
|
+
writer.uint32(tag).raw(skipped);
|
|
4068
|
+
}
|
|
4069
|
+
}
|
|
4070
|
+
if (writer) {
|
|
4071
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
4072
|
+
}
|
|
4073
|
+
return message;
|
|
4074
|
+
},
|
|
4075
|
+
fromJSON(object) {
|
|
4076
|
+
return applyMaxPriceV1Custom({
|
|
4077
|
+
$type: "nebius.billing.v1.MaxPriceV1",
|
|
4078
|
+
maxPrice: isSet(object.maxPrice ?? object.max_price)
|
|
4079
|
+
? String(object.maxPrice ?? object.max_price)
|
|
4080
|
+
: "",
|
|
4081
|
+
});
|
|
4082
|
+
},
|
|
4083
|
+
toJSON(message, use = "json") {
|
|
4084
|
+
const obj = {};
|
|
4085
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
4086
|
+
if (message.maxPrice !== "") {
|
|
4087
|
+
obj[pick("maxPrice", "max_price")] = message.maxPrice;
|
|
4088
|
+
}
|
|
4089
|
+
return obj;
|
|
4090
|
+
},
|
|
4091
|
+
create(base) {
|
|
4092
|
+
return MaxPriceV1.fromPartial(base ?? {});
|
|
4093
|
+
},
|
|
4094
|
+
fromPartial(object) {
|
|
4095
|
+
const message = createBaseMaxPriceV1();
|
|
4096
|
+
message.maxPrice = (object.maxPrice !== undefined && object.maxPrice !== null)
|
|
4097
|
+
? object.maxPrice
|
|
4098
|
+
: "";
|
|
4099
|
+
return message;
|
|
4100
|
+
},
|
|
4101
|
+
};
|
|
4102
|
+
protoRegistry.registerMessage(MaxPriceV1);
|
|
4103
|
+
function MaxPriceV1CustomInspect() {
|
|
4104
|
+
const parts = [];
|
|
4105
|
+
if (this.maxPrice !== "")
|
|
4106
|
+
parts.push("maxPrice" + "=" + inspect(this.maxPrice));
|
|
4107
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
4108
|
+
}
|
|
4109
|
+
function MaxPriceV1CustomJson() {
|
|
4110
|
+
const obj = {
|
|
4111
|
+
type: this.$type,
|
|
4112
|
+
};
|
|
4113
|
+
if (this.maxPrice !== "")
|
|
4114
|
+
obj.maxPrice = inspectJson(this.maxPrice);
|
|
4115
|
+
return obj;
|
|
4116
|
+
}
|
|
4117
|
+
function applyMaxPriceV1Custom(message) {
|
|
4118
|
+
message[custom] = MaxPriceV1CustomInspect;
|
|
4119
|
+
message[customJson] = MaxPriceV1CustomJson;
|
|
4120
|
+
return attachMessageDescriptor(message, MaxPriceV1.$descriptor);
|
|
4121
|
+
}
|
|
4122
|
+
function createBaseMaxPriceV1() {
|
|
4123
|
+
const message = {
|
|
4124
|
+
$type: "nebius.billing.v1.MaxPriceV1",
|
|
4125
|
+
maxPrice: "",
|
|
4126
|
+
};
|
|
4127
|
+
return applyMaxPriceV1Custom(message);
|
|
4128
|
+
}
|
|
4129
|
+
const PricingPolicyStatus_MESSAGE_DESCRIPTOR = {
|
|
4130
|
+
fields: {
|
|
4131
|
+
"state": { pbName: "state", scalarType: 14 },
|
|
4132
|
+
"skuId": { pbName: "sku_id", scalarType: 9 },
|
|
4133
|
+
"schedulingState": { pbName: "scheduling_state", scalarType: 14 },
|
|
4134
|
+
"runningVmCount": { pbName: "running_vm_count", scalarType: 3 },
|
|
4135
|
+
"currency": { pbName: "currency", scalarType: 9 },
|
|
4136
|
+
},
|
|
4137
|
+
};
|
|
4138
|
+
/** Encodes, decodes, converts, and creates {@link PricingPolicyStatus} messages. */
|
|
4139
|
+
export const PricingPolicyStatus = {
|
|
4140
|
+
$type: "nebius.billing.v1.PricingPolicyStatus",
|
|
4141
|
+
$descriptor: PricingPolicyStatus_MESSAGE_DESCRIPTOR,
|
|
4142
|
+
encode(message, writer = new BinaryWriter()) {
|
|
4143
|
+
if ((message.state ?? PricingPolicyStatus_State.STATE_UNSPECIFIED) !== PricingPolicyStatus_State.STATE_UNSPECIFIED) {
|
|
4144
|
+
PricingPolicyStatus_State.encodeField(writer, 1, message.state);
|
|
4145
|
+
}
|
|
4146
|
+
if (message.skuId !== "") {
|
|
4147
|
+
writer.uint32(18).string(message.skuId);
|
|
4148
|
+
}
|
|
4149
|
+
if ((message.schedulingState ?? PricingPolicyStatus_SchedulingState.SCHEDULING_STATE_UNSPECIFIED) !== PricingPolicyStatus_SchedulingState.SCHEDULING_STATE_UNSPECIFIED) {
|
|
4150
|
+
PricingPolicyStatus_SchedulingState.encodeField(writer, 3, message.schedulingState);
|
|
4151
|
+
}
|
|
4152
|
+
if (message.runningVmCount !== undefined && !message.runningVmCount.isZero?.()) {
|
|
4153
|
+
writer.uint32(32).int64(message.runningVmCount.toString());
|
|
4154
|
+
}
|
|
4155
|
+
if (message.currency !== "") {
|
|
4156
|
+
writer.uint32(42).string(message.currency);
|
|
4157
|
+
}
|
|
4158
|
+
if (message[unknownFieldsSymbol]) {
|
|
4159
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
4160
|
+
}
|
|
4161
|
+
return writer;
|
|
4162
|
+
},
|
|
4163
|
+
decode(input, length) {
|
|
4164
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4165
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4166
|
+
const message = createBasePricingPolicyStatus();
|
|
4167
|
+
let writer = undefined;
|
|
4168
|
+
while (reader.pos < end) {
|
|
4169
|
+
const tag = reader.uint32();
|
|
4170
|
+
switch (tag >>> 3) {
|
|
4171
|
+
case 1: {
|
|
4172
|
+
if (tag !== 8)
|
|
4173
|
+
break;
|
|
4174
|
+
message.state = PricingPolicyStatus_State.fromNumber(reader.int32());
|
|
4175
|
+
continue;
|
|
4176
|
+
}
|
|
4177
|
+
case 2: {
|
|
4178
|
+
if (tag !== 18)
|
|
4179
|
+
break;
|
|
4180
|
+
message.skuId = reader.string();
|
|
4181
|
+
continue;
|
|
4182
|
+
}
|
|
4183
|
+
case 3: {
|
|
4184
|
+
if (tag !== 24)
|
|
4185
|
+
break;
|
|
4186
|
+
message.schedulingState = PricingPolicyStatus_SchedulingState.fromNumber(reader.int32());
|
|
4187
|
+
continue;
|
|
4188
|
+
}
|
|
4189
|
+
case 4: {
|
|
4190
|
+
if (tag !== 32)
|
|
4191
|
+
break;
|
|
4192
|
+
message.runningVmCount = Long.fromValue(reader.int64());
|
|
4193
|
+
continue;
|
|
4194
|
+
}
|
|
4195
|
+
case 5: {
|
|
4196
|
+
if (tag !== 42)
|
|
4197
|
+
break;
|
|
4198
|
+
message.currency = reader.string();
|
|
4199
|
+
continue;
|
|
4200
|
+
}
|
|
4201
|
+
default:
|
|
4202
|
+
break;
|
|
4203
|
+
}
|
|
4204
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4205
|
+
break;
|
|
4206
|
+
}
|
|
4207
|
+
{
|
|
4208
|
+
if (!writer)
|
|
4209
|
+
writer = new BinaryWriter();
|
|
4210
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
4211
|
+
writer.uint32(tag).raw(skipped);
|
|
4212
|
+
}
|
|
4213
|
+
}
|
|
4214
|
+
if (writer) {
|
|
4215
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
4216
|
+
}
|
|
4217
|
+
return message;
|
|
4218
|
+
},
|
|
4219
|
+
fromJSON(object) {
|
|
4220
|
+
return applyPricingPolicyStatusCustom({
|
|
4221
|
+
$type: "nebius.billing.v1.PricingPolicyStatus",
|
|
4222
|
+
state: isSet(object.state ?? object.state)
|
|
4223
|
+
? PricingPolicyStatus_State.fromJSON(object.state ?? object.state)
|
|
4224
|
+
: PricingPolicyStatus_State.STATE_UNSPECIFIED,
|
|
4225
|
+
skuId: isSet(object.skuId ?? object.sku_id)
|
|
4226
|
+
? String(object.skuId ?? object.sku_id)
|
|
4227
|
+
: "",
|
|
4228
|
+
schedulingState: isSet(object.schedulingState ?? object.scheduling_state)
|
|
4229
|
+
? PricingPolicyStatus_SchedulingState.fromJSON(object.schedulingState ?? object.scheduling_state)
|
|
4230
|
+
: PricingPolicyStatus_SchedulingState.SCHEDULING_STATE_UNSPECIFIED,
|
|
4231
|
+
runningVmCount: isSet(object.runningVmCount ?? object.running_vm_count)
|
|
4232
|
+
? Long.fromValue(object.runningVmCount ?? object.running_vm_count)
|
|
4233
|
+
: Long.ZERO,
|
|
4234
|
+
currency: isSet(object.currency ?? object.currency)
|
|
4235
|
+
? String(object.currency ?? object.currency)
|
|
4236
|
+
: "",
|
|
4237
|
+
});
|
|
4238
|
+
},
|
|
4239
|
+
toJSON(message, use = "json") {
|
|
4240
|
+
const obj = {};
|
|
4241
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
4242
|
+
if ((message.state ?? PricingPolicyStatus_State.STATE_UNSPECIFIED) !== PricingPolicyStatus_State.STATE_UNSPECIFIED) {
|
|
4243
|
+
obj[pick("state", "state")] = PricingPolicyStatus_State.toJSON(message.state);
|
|
4244
|
+
}
|
|
4245
|
+
if (message.skuId !== "") {
|
|
4246
|
+
obj[pick("skuId", "sku_id")] = message.skuId;
|
|
4247
|
+
}
|
|
4248
|
+
if ((message.schedulingState ?? PricingPolicyStatus_SchedulingState.SCHEDULING_STATE_UNSPECIFIED) !== PricingPolicyStatus_SchedulingState.SCHEDULING_STATE_UNSPECIFIED) {
|
|
4249
|
+
obj[pick("schedulingState", "scheduling_state")] = PricingPolicyStatus_SchedulingState.toJSON(message.schedulingState);
|
|
4250
|
+
}
|
|
4251
|
+
if (!message.runningVmCount?.isZero?.()) {
|
|
4252
|
+
obj[pick("runningVmCount", "running_vm_count")] = (message.runningVmCount || Long.ZERO).toString();
|
|
4253
|
+
}
|
|
4254
|
+
if (message.currency !== "") {
|
|
4255
|
+
obj[pick("currency", "currency")] = message.currency;
|
|
4256
|
+
}
|
|
4257
|
+
return obj;
|
|
4258
|
+
},
|
|
4259
|
+
create(base) {
|
|
4260
|
+
return PricingPolicyStatus.fromPartial(base ?? {});
|
|
4261
|
+
},
|
|
4262
|
+
fromPartial(object) {
|
|
4263
|
+
const message = createBasePricingPolicyStatus();
|
|
4264
|
+
message.state = (object.state !== undefined && object.state !== null)
|
|
4265
|
+
? PricingPolicyStatus_State.fromJSON(object.state.name)
|
|
4266
|
+
: PricingPolicyStatus_State.STATE_UNSPECIFIED;
|
|
4267
|
+
message.skuId = (object.skuId !== undefined && object.skuId !== null)
|
|
4268
|
+
? object.skuId
|
|
4269
|
+
: "";
|
|
4270
|
+
message.schedulingState = (object.schedulingState !== undefined && object.schedulingState !== null)
|
|
4271
|
+
? PricingPolicyStatus_SchedulingState.fromJSON(object.schedulingState.name)
|
|
4272
|
+
: PricingPolicyStatus_SchedulingState.SCHEDULING_STATE_UNSPECIFIED;
|
|
4273
|
+
message.runningVmCount = (object.runningVmCount !== undefined && object.runningVmCount !== null)
|
|
4274
|
+
? Long.fromValue(object.runningVmCount)
|
|
4275
|
+
: Long.ZERO;
|
|
4276
|
+
message.currency = (object.currency !== undefined && object.currency !== null)
|
|
4277
|
+
? object.currency
|
|
4278
|
+
: "";
|
|
4279
|
+
return message;
|
|
4280
|
+
},
|
|
4281
|
+
};
|
|
4282
|
+
protoRegistry.registerMessage(PricingPolicyStatus);
|
|
4283
|
+
function PricingPolicyStatusCustomInspect() {
|
|
4284
|
+
const parts = [];
|
|
4285
|
+
if (this.state !== undefined)
|
|
4286
|
+
parts.push("state" + "=" + inspect(this.state));
|
|
4287
|
+
if (this.skuId !== "")
|
|
4288
|
+
parts.push("skuId" + "=" + inspect(this.skuId));
|
|
4289
|
+
if (this.schedulingState !== undefined)
|
|
4290
|
+
parts.push("schedulingState" + "=" + inspect(this.schedulingState));
|
|
4291
|
+
if (!this.runningVmCount?.isZero?.())
|
|
4292
|
+
parts.push("runningVmCount" + "=" + inspect(this.runningVmCount));
|
|
4293
|
+
if (this.currency !== "")
|
|
4294
|
+
parts.push("currency" + "=" + inspect(this.currency));
|
|
4295
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
4296
|
+
}
|
|
4297
|
+
function PricingPolicyStatusCustomJson() {
|
|
4298
|
+
const obj = {
|
|
4299
|
+
type: this.$type,
|
|
4300
|
+
};
|
|
4301
|
+
if (this.state !== undefined)
|
|
4302
|
+
obj.state = inspectJson(this.state);
|
|
4303
|
+
if (this.skuId !== "")
|
|
4304
|
+
obj.skuId = inspectJson(this.skuId);
|
|
4305
|
+
if (this.schedulingState !== undefined)
|
|
4306
|
+
obj.schedulingState = inspectJson(this.schedulingState);
|
|
4307
|
+
if (!this.runningVmCount?.isZero?.())
|
|
4308
|
+
obj.runningVmCount = inspectJson(this.runningVmCount);
|
|
4309
|
+
if (this.currency !== "")
|
|
4310
|
+
obj.currency = inspectJson(this.currency);
|
|
4311
|
+
return obj;
|
|
4312
|
+
}
|
|
4313
|
+
function applyPricingPolicyStatusCustom(message) {
|
|
4314
|
+
message[custom] = PricingPolicyStatusCustomInspect;
|
|
4315
|
+
message[customJson] = PricingPolicyStatusCustomJson;
|
|
4316
|
+
return attachMessageDescriptor(message, PricingPolicyStatus.$descriptor);
|
|
4317
|
+
}
|
|
4318
|
+
function createBasePricingPolicyStatus() {
|
|
4319
|
+
const message = {
|
|
4320
|
+
$type: "nebius.billing.v1.PricingPolicyStatus",
|
|
4321
|
+
state: PricingPolicyStatus_State.STATE_UNSPECIFIED,
|
|
4322
|
+
skuId: "",
|
|
4323
|
+
schedulingState: PricingPolicyStatus_SchedulingState.SCHEDULING_STATE_UNSPECIFIED,
|
|
4324
|
+
runningVmCount: Long.ZERO,
|
|
4325
|
+
currency: "",
|
|
4326
|
+
};
|
|
4327
|
+
return applyPricingPolicyStatusCustom(message);
|
|
4328
|
+
}
|
|
2361
4329
|
//# sourceMappingURL=index.js.map
|