@nebius/js-sdk 0.2.80 → 0.2.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/nebius/applications/v1alpha1/index.d.ts +5 -2
- package/dist/cjs/api/nebius/applications/v1alpha1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/applications/v1alpha1/index.js.map +1 -1
- package/dist/cjs/api/nebius/billing/v1alpha1/index.d.ts +540 -0
- package/dist/cjs/api/nebius/billing/v1alpha1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/billing/v1alpha1/index.js +1990 -1
- package/dist/cjs/api/nebius/billing/v1alpha1/index.js.map +1 -1
- package/dist/cjs/api/nebius/mk8s/v1/index.d.ts +2 -2
- package/dist/cjs/api/nebius/mk8s/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/mk8s/v1/index.js +12 -0
- 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/nebius/applications/v1alpha1/index.d.ts +5 -2
- package/dist/esm/api/nebius/applications/v1alpha1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/applications/v1alpha1/index.js.map +1 -1
- package/dist/esm/api/nebius/billing/v1alpha1/index.d.ts +540 -0
- package/dist/esm/api/nebius/billing/v1alpha1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/billing/v1alpha1/index.js +1988 -0
- package/dist/esm/api/nebius/billing/v1alpha1/index.js.map +1 -1
- package/dist/esm/api/nebius/mk8s/v1/index.d.ts +2 -2
- package/dist/esm/api/nebius/mk8s/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/mk8s/v1/index.js +13 -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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* Generated by Nebius TS generator. DO NOT EDIT! */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.OneTimeExportStateDetails = exports.OneTimeExportStatus = exports.OneTimeExportSpec = exports.OneTimeExport = exports.OneTimeExportState = exports.OneTimeExportService = exports.OneTimeExportServiceBaseClient = exports.OneTimeExportServiceServiceDescription = exports.ListOneTimeExportsResponse = exports.ListOneTimeExportsRequest = exports.GetOneTimeExportRequest = exports.CreateOneTimeExportRequest = exports.OfferType = exports.CostBreakdown = exports.GeneralResourceCost = exports.GeneralTotalCost = exports.ResourceGroupCost = exports.ResourceSpec = exports.CalculatorService = exports.CalculatorServiceBaseClient = exports.CalculatorServiceServiceDescription = exports.EstimateBatchResponse = exports.EstimateBatchRequest = exports.EstimateResponse = exports.EstimateRequest = exports.ExportFormat = void 0;
|
|
4
|
+
exports.SpotPricePoint = exports.SpotPriceSeries = exports.SpotPriceValue = exports.SpotPriceComputeInstance = exports.SpotPrice = exports.SpotPriceService = exports.SpotPriceServiceBaseClient = exports.SpotPriceServiceServiceDescription = exports.ListSpotPriceSeriesResponse = exports.ListSpotPriceSeriesRequest_Aggregation = exports.ListSpotPriceSeriesRequest_Filters = exports.ListSpotPriceSeriesRequest = exports.ListSpotPricesResponse = exports.ListSpotPricesRequest = exports.ListSpotPriceSeriesRequest_Aggregation_Method = exports.ListSpotPriceSeriesRequest_Aggregation_Granularity = exports.OneTimeExportStateDetails = exports.OneTimeExportStatus = exports.OneTimeExportSpec = exports.OneTimeExport = exports.OneTimeExportState = exports.OneTimeExportService = exports.OneTimeExportServiceBaseClient = exports.OneTimeExportServiceServiceDescription = exports.ListOneTimeExportsResponse = exports.ListOneTimeExportsRequest = exports.GetOneTimeExportRequest = exports.CreateOneTimeExportRequest = exports.OfferType = exports.CostBreakdown = exports.GeneralResourceCost = exports.GeneralTotalCost = exports.ResourceGroupCost = exports.ResourceSpec = exports.CalculatorService = exports.CalculatorServiceBaseClient = exports.CalculatorServiceServiceDescription = exports.EstimateBatchResponse = exports.EstimateBatchRequest = exports.EstimateResponse = exports.EstimateRequest = exports.ExportFormat = void 0;
|
|
5
5
|
const index_js_1 = require("../../../../runtime/protos/index.js");
|
|
6
6
|
const util_1 = require("util");
|
|
7
7
|
const protobuf_js_1 = require("../../../protobuf.js");
|
|
@@ -2849,4 +2849,1993 @@ function createBaseOneTimeExportStateDetails() {
|
|
|
2849
2849
|
};
|
|
2850
2850
|
return applyOneTimeExportStateDetailsCustom(message);
|
|
2851
2851
|
}
|
|
2852
|
+
const ListSpotPriceSeriesRequest_Aggregation_Granularity_VALUE_COMMENTS = {
|
|
2853
|
+
GRANULARITY_UNSPECIFIED: " Not specified.\n",
|
|
2854
|
+
GRANULARITY_MINUTE_15: " 15 minutes. Allowed for a time interval of up to 7 days.\n",
|
|
2855
|
+
GRANULARITY_HOUR_1: " 1 hour.\n",
|
|
2856
|
+
};
|
|
2857
|
+
/** Converts and creates {@link ListSpotPriceSeriesRequest_Aggregation_Granularity} values. */
|
|
2858
|
+
exports.ListSpotPriceSeriesRequest_Aggregation_Granularity = (0, index_js_1.createEnum)("nebius.billing.v1alpha1.ListSpotPriceSeriesRequest.Aggregation.Granularity", {
|
|
2859
|
+
/**
|
|
2860
|
+
* Not specified.
|
|
2861
|
+
*
|
|
2862
|
+
*/
|
|
2863
|
+
GRANULARITY_UNSPECIFIED: 0,
|
|
2864
|
+
/**
|
|
2865
|
+
* 15 minutes. Allowed for a time interval of up to 7 days.
|
|
2866
|
+
*
|
|
2867
|
+
*/
|
|
2868
|
+
GRANULARITY_MINUTE_15: 1,
|
|
2869
|
+
/**
|
|
2870
|
+
* 1 hour.
|
|
2871
|
+
*
|
|
2872
|
+
*/
|
|
2873
|
+
GRANULARITY_HOUR_1: 2,
|
|
2874
|
+
}, ListSpotPriceSeriesRequest_Aggregation_Granularity_VALUE_COMMENTS);
|
|
2875
|
+
protobuf_js_1.protoRegistry.registerEnum(exports.ListSpotPriceSeriesRequest_Aggregation_Granularity);
|
|
2876
|
+
const ListSpotPriceSeriesRequest_Aggregation_Method_VALUE_COMMENTS = {
|
|
2877
|
+
METHOD_UNSPECIFIED: " Not specified.\n",
|
|
2878
|
+
METHOD_FIRST_PRICE: " First price in the time step.\n",
|
|
2879
|
+
METHOD_LAST_PRICE: " Last price in the time step.\n",
|
|
2880
|
+
METHOD_AVG_PRICE: " Mean of the prices in the time step, not weighted by time.\n",
|
|
2881
|
+
};
|
|
2882
|
+
/** Converts and creates {@link ListSpotPriceSeriesRequest_Aggregation_Method} values. */
|
|
2883
|
+
exports.ListSpotPriceSeriesRequest_Aggregation_Method = (0, index_js_1.createEnum)("nebius.billing.v1alpha1.ListSpotPriceSeriesRequest.Aggregation.Method", {
|
|
2884
|
+
/**
|
|
2885
|
+
* Not specified.
|
|
2886
|
+
*
|
|
2887
|
+
*/
|
|
2888
|
+
METHOD_UNSPECIFIED: 0,
|
|
2889
|
+
/**
|
|
2890
|
+
* First price in the time step.
|
|
2891
|
+
*
|
|
2892
|
+
*/
|
|
2893
|
+
METHOD_FIRST_PRICE: 1,
|
|
2894
|
+
/**
|
|
2895
|
+
* Last price in the time step.
|
|
2896
|
+
*
|
|
2897
|
+
*/
|
|
2898
|
+
METHOD_LAST_PRICE: 2,
|
|
2899
|
+
/**
|
|
2900
|
+
* Mean of the prices in the time step, not weighted by time.
|
|
2901
|
+
*
|
|
2902
|
+
*/
|
|
2903
|
+
METHOD_AVG_PRICE: 3,
|
|
2904
|
+
}, ListSpotPriceSeriesRequest_Aggregation_Method_VALUE_COMMENTS);
|
|
2905
|
+
protobuf_js_1.protoRegistry.registerEnum(exports.ListSpotPriceSeriesRequest_Aggregation_Method);
|
|
2906
|
+
const ListSpotPricesRequest_MESSAGE_DESCRIPTOR = {
|
|
2907
|
+
type: "nebius.billing.v1alpha1.ListSpotPricesRequest",
|
|
2908
|
+
create: () => createBaseListSpotPricesRequest(),
|
|
2909
|
+
fields: {
|
|
2910
|
+
"pageSize": { pbName: "page_size", jsonName: "pageSize", scalarType: 3 },
|
|
2911
|
+
"pageToken": { pbName: "page_token", jsonName: "pageToken", scalarType: 9 },
|
|
2912
|
+
},
|
|
2913
|
+
};
|
|
2914
|
+
/** Encodes, decodes, converts, and creates {@link ListSpotPricesRequest} messages. */
|
|
2915
|
+
exports.ListSpotPricesRequest = {
|
|
2916
|
+
$type: "nebius.billing.v1alpha1.ListSpotPricesRequest",
|
|
2917
|
+
$descriptor: ListSpotPricesRequest_MESSAGE_DESCRIPTOR,
|
|
2918
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
2919
|
+
if (message.pageSize !== undefined && !message.pageSize.isZero?.()) {
|
|
2920
|
+
writer.uint32(16).int64(message.pageSize.toString());
|
|
2921
|
+
}
|
|
2922
|
+
if (message.pageToken !== "") {
|
|
2923
|
+
writer.uint32(26).string(message.pageToken);
|
|
2924
|
+
}
|
|
2925
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
2926
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
2927
|
+
}
|
|
2928
|
+
return writer;
|
|
2929
|
+
},
|
|
2930
|
+
decode(input, length, base) {
|
|
2931
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
2932
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2933
|
+
const message = base ?? createBaseListSpotPricesRequest();
|
|
2934
|
+
let writer = undefined;
|
|
2935
|
+
if (message[index_js_1.unknownFieldsSymbol])
|
|
2936
|
+
writer = new index_js_1.BinaryWriter().raw(message[index_js_1.unknownFieldsSymbol]);
|
|
2937
|
+
while (reader.pos < end) {
|
|
2938
|
+
const tag = reader.uint32();
|
|
2939
|
+
switch (tag >>> 3) {
|
|
2940
|
+
case 2: {
|
|
2941
|
+
if (tag !== 16)
|
|
2942
|
+
break;
|
|
2943
|
+
message.pageSize = index_js_1.Long.fromValue(reader.int64(), false);
|
|
2944
|
+
continue;
|
|
2945
|
+
}
|
|
2946
|
+
case 3: {
|
|
2947
|
+
if (tag !== 26)
|
|
2948
|
+
break;
|
|
2949
|
+
message.pageToken = reader.string();
|
|
2950
|
+
continue;
|
|
2951
|
+
}
|
|
2952
|
+
default:
|
|
2953
|
+
break;
|
|
2954
|
+
}
|
|
2955
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2956
|
+
break;
|
|
2957
|
+
}
|
|
2958
|
+
{
|
|
2959
|
+
if (!writer)
|
|
2960
|
+
writer = new index_js_1.BinaryWriter();
|
|
2961
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
2962
|
+
writer.uint32(tag).raw(skipped);
|
|
2963
|
+
}
|
|
2964
|
+
}
|
|
2965
|
+
if (writer) {
|
|
2966
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
2967
|
+
}
|
|
2968
|
+
return message;
|
|
2969
|
+
},
|
|
2970
|
+
fromJSON(object) {
|
|
2971
|
+
return applyListSpotPricesRequestCustom({
|
|
2972
|
+
$type: "nebius.billing.v1alpha1.ListSpotPricesRequest",
|
|
2973
|
+
pageSize: (0, index_js_1.isSet)(object.pageSize ?? object.page_size)
|
|
2974
|
+
? index_js_1.Long.fromValue(object.pageSize ?? object.page_size, false)
|
|
2975
|
+
: index_js_1.Long.ZERO,
|
|
2976
|
+
pageToken: (0, index_js_1.isSet)(object.pageToken ?? object.page_token)
|
|
2977
|
+
? String(object.pageToken ?? object.page_token)
|
|
2978
|
+
: "",
|
|
2979
|
+
});
|
|
2980
|
+
},
|
|
2981
|
+
toJSON(message, use = "json") {
|
|
2982
|
+
const obj = {};
|
|
2983
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
2984
|
+
if (!message.pageSize?.isZero?.()) {
|
|
2985
|
+
obj[pick("pageSize", "page_size")] = (message.pageSize || index_js_1.Long.ZERO).toString();
|
|
2986
|
+
}
|
|
2987
|
+
if (message.pageToken !== "") {
|
|
2988
|
+
obj[pick("pageToken", "page_token")] = message.pageToken;
|
|
2989
|
+
}
|
|
2990
|
+
return obj;
|
|
2991
|
+
},
|
|
2992
|
+
create(base) {
|
|
2993
|
+
return exports.ListSpotPricesRequest.fromPartial(base ?? {});
|
|
2994
|
+
},
|
|
2995
|
+
fromPartial(object) {
|
|
2996
|
+
const message = createBaseListSpotPricesRequest();
|
|
2997
|
+
message.pageSize = (object.pageSize !== undefined && object.pageSize !== null)
|
|
2998
|
+
? index_js_1.Long.fromValue(object.pageSize, false)
|
|
2999
|
+
: index_js_1.Long.ZERO;
|
|
3000
|
+
message.pageToken = (object.pageToken !== undefined && object.pageToken !== null)
|
|
3001
|
+
? object.pageToken
|
|
3002
|
+
: "";
|
|
3003
|
+
for (const ext of protobuf_js_1.protoRegistry.listExtensions("nebius.billing.v1alpha1.ListSpotPricesRequest"))
|
|
3004
|
+
ext.fromPartial?.(message, object);
|
|
3005
|
+
return message;
|
|
3006
|
+
},
|
|
3007
|
+
};
|
|
3008
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.ListSpotPricesRequest);
|
|
3009
|
+
function ListSpotPricesRequestCustomInspect() {
|
|
3010
|
+
const parts = [];
|
|
3011
|
+
if (!this.pageSize?.isZero?.())
|
|
3012
|
+
parts.push("pageSize" + "=" + (0, util_1.inspect)(this.pageSize));
|
|
3013
|
+
if (this.pageToken !== "")
|
|
3014
|
+
parts.push("pageToken" + "=" + (0, util_1.inspect)(this.pageToken));
|
|
3015
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
3016
|
+
}
|
|
3017
|
+
function ListSpotPricesRequestCustomJson() {
|
|
3018
|
+
const obj = {
|
|
3019
|
+
type: this.$type,
|
|
3020
|
+
};
|
|
3021
|
+
if (!this.pageSize?.isZero?.())
|
|
3022
|
+
obj.pageSize = (0, logging_js_1.inspectJson)(this.pageSize);
|
|
3023
|
+
if (this.pageToken !== "")
|
|
3024
|
+
obj.pageToken = (0, logging_js_1.inspectJson)(this.pageToken);
|
|
3025
|
+
return obj;
|
|
3026
|
+
}
|
|
3027
|
+
function applyListSpotPricesRequestCustom(message) {
|
|
3028
|
+
message[logging_js_1.custom] = ListSpotPricesRequestCustomInspect;
|
|
3029
|
+
message[logging_js_1.customJson] = ListSpotPricesRequestCustomJson;
|
|
3030
|
+
return (0, index_js_1.attachMessageDescriptor)(message, exports.ListSpotPricesRequest.$descriptor);
|
|
3031
|
+
}
|
|
3032
|
+
function createBaseListSpotPricesRequest() {
|
|
3033
|
+
const message = {
|
|
3034
|
+
$type: "nebius.billing.v1alpha1.ListSpotPricesRequest",
|
|
3035
|
+
pageSize: index_js_1.Long.ZERO,
|
|
3036
|
+
pageToken: "",
|
|
3037
|
+
};
|
|
3038
|
+
return applyListSpotPricesRequestCustom(message);
|
|
3039
|
+
}
|
|
3040
|
+
const ListSpotPricesResponse_MESSAGE_DESCRIPTOR = {
|
|
3041
|
+
type: "nebius.billing.v1alpha1.ListSpotPricesResponse",
|
|
3042
|
+
create: () => createBaseListSpotPricesResponse(),
|
|
3043
|
+
fields: {
|
|
3044
|
+
"items": { pbName: "items", jsonName: "items", repeated: true, message: () => exports.SpotPrice.$descriptor },
|
|
3045
|
+
"nextPageToken": { pbName: "next_page_token", jsonName: "nextPageToken", scalarType: 9 },
|
|
3046
|
+
"snapshotTime": { pbName: "snapshot_time", jsonName: "snapshotTime", presence: true, message: () => index_js_1.wkt[".google.protobuf.Timestamp"].$descriptor },
|
|
3047
|
+
},
|
|
3048
|
+
};
|
|
3049
|
+
/** Encodes, decodes, converts, and creates {@link ListSpotPricesResponse} messages. */
|
|
3050
|
+
exports.ListSpotPricesResponse = {
|
|
3051
|
+
$type: "nebius.billing.v1alpha1.ListSpotPricesResponse",
|
|
3052
|
+
$descriptor: ListSpotPricesResponse_MESSAGE_DESCRIPTOR,
|
|
3053
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
3054
|
+
for (const v of (message.items ?? [])) {
|
|
3055
|
+
const w = writer.uint32(10).fork();
|
|
3056
|
+
exports.SpotPrice.encode(v, w);
|
|
3057
|
+
w.join();
|
|
3058
|
+
}
|
|
3059
|
+
if (message.nextPageToken !== "") {
|
|
3060
|
+
writer.uint32(18).string(message.nextPageToken);
|
|
3061
|
+
}
|
|
3062
|
+
if (message.snapshotTime !== undefined) {
|
|
3063
|
+
const w = writer.uint32(26).fork();
|
|
3064
|
+
index_js_1.wkt[".google.protobuf.Timestamp"].writeMessage(w, message.snapshotTime);
|
|
3065
|
+
w.join();
|
|
3066
|
+
}
|
|
3067
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
3068
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
3069
|
+
}
|
|
3070
|
+
return writer;
|
|
3071
|
+
},
|
|
3072
|
+
decode(input, length, base) {
|
|
3073
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
3074
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3075
|
+
const message = base ?? createBaseListSpotPricesResponse();
|
|
3076
|
+
let writer = undefined;
|
|
3077
|
+
if (message[index_js_1.unknownFieldsSymbol])
|
|
3078
|
+
writer = new index_js_1.BinaryWriter().raw(message[index_js_1.unknownFieldsSymbol]);
|
|
3079
|
+
while (reader.pos < end) {
|
|
3080
|
+
const tag = reader.uint32();
|
|
3081
|
+
switch (tag >>> 3) {
|
|
3082
|
+
case 1: {
|
|
3083
|
+
if (tag !== 10)
|
|
3084
|
+
break;
|
|
3085
|
+
message.items.push(exports.SpotPrice.decode(reader, reader.uint32()));
|
|
3086
|
+
continue;
|
|
3087
|
+
}
|
|
3088
|
+
case 2: {
|
|
3089
|
+
if (tag !== 18)
|
|
3090
|
+
break;
|
|
3091
|
+
message.nextPageToken = reader.string();
|
|
3092
|
+
continue;
|
|
3093
|
+
}
|
|
3094
|
+
case 3: {
|
|
3095
|
+
if (tag !== 26)
|
|
3096
|
+
break;
|
|
3097
|
+
const len = reader.uint32();
|
|
3098
|
+
message.snapshotTime = index_js_1.wkt[".google.protobuf.Timestamp"].readMessage(reader, len, message.snapshotTime);
|
|
3099
|
+
continue;
|
|
3100
|
+
}
|
|
3101
|
+
default:
|
|
3102
|
+
break;
|
|
3103
|
+
}
|
|
3104
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3105
|
+
break;
|
|
3106
|
+
}
|
|
3107
|
+
{
|
|
3108
|
+
if (!writer)
|
|
3109
|
+
writer = new index_js_1.BinaryWriter();
|
|
3110
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
3111
|
+
writer.uint32(tag).raw(skipped);
|
|
3112
|
+
}
|
|
3113
|
+
}
|
|
3114
|
+
if (writer) {
|
|
3115
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
3116
|
+
}
|
|
3117
|
+
return message;
|
|
3118
|
+
},
|
|
3119
|
+
fromJSON(object) {
|
|
3120
|
+
return applyListSpotPricesResponseCustom({
|
|
3121
|
+
$type: "nebius.billing.v1alpha1.ListSpotPricesResponse",
|
|
3122
|
+
items: globalThis.Array.isArray(object?.items ?? object?.items)
|
|
3123
|
+
? (object.items ?? object.items).map((e) => exports.SpotPrice.fromJSON(e))
|
|
3124
|
+
: [],
|
|
3125
|
+
nextPageToken: (0, index_js_1.isSet)(object.nextPageToken ?? object.next_page_token)
|
|
3126
|
+
? String(object.nextPageToken ?? object.next_page_token)
|
|
3127
|
+
: "",
|
|
3128
|
+
snapshotTime: (0, index_js_1.isSet)(object.snapshotTime ?? object.snapshot_time)
|
|
3129
|
+
? index_js_1.wkt[".google.protobuf.Timestamp"].fromJSON(object.snapshotTime ?? object.snapshot_time)
|
|
3130
|
+
: undefined,
|
|
3131
|
+
});
|
|
3132
|
+
},
|
|
3133
|
+
toJSON(message, use = "json") {
|
|
3134
|
+
const obj = {};
|
|
3135
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
3136
|
+
if (message.items?.length) {
|
|
3137
|
+
obj[pick("items", "items")] = message.items.map((e) => e ? exports.SpotPrice.toJSON(e, use) : undefined);
|
|
3138
|
+
}
|
|
3139
|
+
if (message.nextPageToken !== "") {
|
|
3140
|
+
obj[pick("nextPageToken", "next_page_token")] = message.nextPageToken;
|
|
3141
|
+
}
|
|
3142
|
+
if (message.snapshotTime !== undefined) {
|
|
3143
|
+
obj[pick("snapshotTime", "snapshot_time")] = index_js_1.wkt[".google.protobuf.Timestamp"].toJSON(message.snapshotTime, use);
|
|
3144
|
+
}
|
|
3145
|
+
return obj;
|
|
3146
|
+
},
|
|
3147
|
+
create(base) {
|
|
3148
|
+
return exports.ListSpotPricesResponse.fromPartial(base ?? {});
|
|
3149
|
+
},
|
|
3150
|
+
fromPartial(object) {
|
|
3151
|
+
const message = createBaseListSpotPricesResponse();
|
|
3152
|
+
message.items = object.items?.map((e) => exports.SpotPrice.fromPartial(e)) || [];
|
|
3153
|
+
message.nextPageToken = (object.nextPageToken !== undefined && object.nextPageToken !== null)
|
|
3154
|
+
? object.nextPageToken
|
|
3155
|
+
: "";
|
|
3156
|
+
message.snapshotTime = (object.snapshotTime !== undefined && object.snapshotTime !== null)
|
|
3157
|
+
? index_js_1.wkt[".google.protobuf.Timestamp"].fromPartial(object.snapshotTime)
|
|
3158
|
+
: undefined;
|
|
3159
|
+
for (const ext of protobuf_js_1.protoRegistry.listExtensions("nebius.billing.v1alpha1.ListSpotPricesResponse"))
|
|
3160
|
+
ext.fromPartial?.(message, object);
|
|
3161
|
+
return message;
|
|
3162
|
+
},
|
|
3163
|
+
};
|
|
3164
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.ListSpotPricesResponse);
|
|
3165
|
+
function ListSpotPricesResponseCustomInspect() {
|
|
3166
|
+
const parts = [];
|
|
3167
|
+
if ((this.items?.length ?? 0) !== 0)
|
|
3168
|
+
parts.push("items" + "=" + (0, util_1.inspect)(this.items));
|
|
3169
|
+
if (this.nextPageToken !== "")
|
|
3170
|
+
parts.push("nextPageToken" + "=" + (0, util_1.inspect)(this.nextPageToken));
|
|
3171
|
+
if (this.snapshotTime !== undefined)
|
|
3172
|
+
parts.push("snapshotTime" + "=" + (0, util_1.inspect)(this.snapshotTime));
|
|
3173
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
3174
|
+
}
|
|
3175
|
+
function ListSpotPricesResponseCustomJson() {
|
|
3176
|
+
const obj = {
|
|
3177
|
+
type: this.$type,
|
|
3178
|
+
};
|
|
3179
|
+
if ((this.items?.length ?? 0) !== 0)
|
|
3180
|
+
obj.items = (0, logging_js_1.inspectJson)(this.items);
|
|
3181
|
+
if (this.nextPageToken !== "")
|
|
3182
|
+
obj.nextPageToken = (0, logging_js_1.inspectJson)(this.nextPageToken);
|
|
3183
|
+
if (this.snapshotTime !== undefined)
|
|
3184
|
+
obj.snapshotTime = (0, logging_js_1.inspectJson)(this.snapshotTime);
|
|
3185
|
+
return obj;
|
|
3186
|
+
}
|
|
3187
|
+
function applyListSpotPricesResponseCustom(message) {
|
|
3188
|
+
message[logging_js_1.custom] = ListSpotPricesResponseCustomInspect;
|
|
3189
|
+
message[logging_js_1.customJson] = ListSpotPricesResponseCustomJson;
|
|
3190
|
+
return (0, index_js_1.attachMessageDescriptor)(message, exports.ListSpotPricesResponse.$descriptor);
|
|
3191
|
+
}
|
|
3192
|
+
function createBaseListSpotPricesResponse() {
|
|
3193
|
+
const message = {
|
|
3194
|
+
$type: "nebius.billing.v1alpha1.ListSpotPricesResponse",
|
|
3195
|
+
items: [],
|
|
3196
|
+
nextPageToken: "",
|
|
3197
|
+
snapshotTime: undefined,
|
|
3198
|
+
};
|
|
3199
|
+
return applyListSpotPricesResponseCustom(message);
|
|
3200
|
+
}
|
|
3201
|
+
const ListSpotPriceSeriesRequest_MESSAGE_DESCRIPTOR = {
|
|
3202
|
+
type: "nebius.billing.v1alpha1.ListSpotPriceSeriesRequest",
|
|
3203
|
+
create: () => createBaseListSpotPriceSeriesRequest(),
|
|
3204
|
+
fields: {
|
|
3205
|
+
"pageSize": { pbName: "page_size", jsonName: "pageSize", scalarType: 3 },
|
|
3206
|
+
"pageToken": { pbName: "page_token", jsonName: "pageToken", scalarType: 9 },
|
|
3207
|
+
"filters": { pbName: "filters", jsonName: "filters", presence: true, message: () => exports.ListSpotPriceSeriesRequest_Filters.$descriptor },
|
|
3208
|
+
"aggregation": { pbName: "aggregation", jsonName: "aggregation", presence: true, message: () => exports.ListSpotPriceSeriesRequest_Aggregation.$descriptor },
|
|
3209
|
+
},
|
|
3210
|
+
};
|
|
3211
|
+
/** Encodes, decodes, converts, and creates {@link ListSpotPriceSeriesRequest} messages. */
|
|
3212
|
+
exports.ListSpotPriceSeriesRequest = {
|
|
3213
|
+
$type: "nebius.billing.v1alpha1.ListSpotPriceSeriesRequest",
|
|
3214
|
+
$descriptor: ListSpotPriceSeriesRequest_MESSAGE_DESCRIPTOR,
|
|
3215
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
3216
|
+
if (message.pageSize !== undefined && !message.pageSize.isZero?.()) {
|
|
3217
|
+
writer.uint32(16).int64(message.pageSize.toString());
|
|
3218
|
+
}
|
|
3219
|
+
if (message.pageToken !== "") {
|
|
3220
|
+
writer.uint32(26).string(message.pageToken);
|
|
3221
|
+
}
|
|
3222
|
+
if (message.filters !== undefined) {
|
|
3223
|
+
const w = writer.uint32(34).fork();
|
|
3224
|
+
exports.ListSpotPriceSeriesRequest_Filters.encode(message.filters, w);
|
|
3225
|
+
w.join();
|
|
3226
|
+
}
|
|
3227
|
+
if (message.aggregation !== undefined) {
|
|
3228
|
+
const w = writer.uint32(42).fork();
|
|
3229
|
+
exports.ListSpotPriceSeriesRequest_Aggregation.encode(message.aggregation, w);
|
|
3230
|
+
w.join();
|
|
3231
|
+
}
|
|
3232
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
3233
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
3234
|
+
}
|
|
3235
|
+
return writer;
|
|
3236
|
+
},
|
|
3237
|
+
decode(input, length, base) {
|
|
3238
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
3239
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3240
|
+
const message = base ?? createBaseListSpotPriceSeriesRequest();
|
|
3241
|
+
let writer = undefined;
|
|
3242
|
+
if (message[index_js_1.unknownFieldsSymbol])
|
|
3243
|
+
writer = new index_js_1.BinaryWriter().raw(message[index_js_1.unknownFieldsSymbol]);
|
|
3244
|
+
while (reader.pos < end) {
|
|
3245
|
+
const tag = reader.uint32();
|
|
3246
|
+
switch (tag >>> 3) {
|
|
3247
|
+
case 2: {
|
|
3248
|
+
if (tag !== 16)
|
|
3249
|
+
break;
|
|
3250
|
+
message.pageSize = index_js_1.Long.fromValue(reader.int64(), false);
|
|
3251
|
+
continue;
|
|
3252
|
+
}
|
|
3253
|
+
case 3: {
|
|
3254
|
+
if (tag !== 26)
|
|
3255
|
+
break;
|
|
3256
|
+
message.pageToken = reader.string();
|
|
3257
|
+
continue;
|
|
3258
|
+
}
|
|
3259
|
+
case 4: {
|
|
3260
|
+
if (tag !== 34)
|
|
3261
|
+
break;
|
|
3262
|
+
message.filters = exports.ListSpotPriceSeriesRequest_Filters.decode(reader, reader.uint32(), message.filters);
|
|
3263
|
+
continue;
|
|
3264
|
+
}
|
|
3265
|
+
case 5: {
|
|
3266
|
+
if (tag !== 42)
|
|
3267
|
+
break;
|
|
3268
|
+
message.aggregation = exports.ListSpotPriceSeriesRequest_Aggregation.decode(reader, reader.uint32(), message.aggregation);
|
|
3269
|
+
continue;
|
|
3270
|
+
}
|
|
3271
|
+
default:
|
|
3272
|
+
break;
|
|
3273
|
+
}
|
|
3274
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3275
|
+
break;
|
|
3276
|
+
}
|
|
3277
|
+
{
|
|
3278
|
+
if (!writer)
|
|
3279
|
+
writer = new index_js_1.BinaryWriter();
|
|
3280
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
3281
|
+
writer.uint32(tag).raw(skipped);
|
|
3282
|
+
}
|
|
3283
|
+
}
|
|
3284
|
+
if (writer) {
|
|
3285
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
3286
|
+
}
|
|
3287
|
+
return message;
|
|
3288
|
+
},
|
|
3289
|
+
fromJSON(object) {
|
|
3290
|
+
return applyListSpotPriceSeriesRequestCustom({
|
|
3291
|
+
$type: "nebius.billing.v1alpha1.ListSpotPriceSeriesRequest",
|
|
3292
|
+
pageSize: (0, index_js_1.isSet)(object.pageSize ?? object.page_size)
|
|
3293
|
+
? index_js_1.Long.fromValue(object.pageSize ?? object.page_size, false)
|
|
3294
|
+
: index_js_1.Long.ZERO,
|
|
3295
|
+
pageToken: (0, index_js_1.isSet)(object.pageToken ?? object.page_token)
|
|
3296
|
+
? String(object.pageToken ?? object.page_token)
|
|
3297
|
+
: "",
|
|
3298
|
+
filters: (0, index_js_1.isSet)(object.filters ?? object.filters)
|
|
3299
|
+
? exports.ListSpotPriceSeriesRequest_Filters.fromJSON(object.filters ?? object.filters)
|
|
3300
|
+
: undefined,
|
|
3301
|
+
aggregation: (0, index_js_1.isSet)(object.aggregation ?? object.aggregation)
|
|
3302
|
+
? exports.ListSpotPriceSeriesRequest_Aggregation.fromJSON(object.aggregation ?? object.aggregation)
|
|
3303
|
+
: undefined,
|
|
3304
|
+
});
|
|
3305
|
+
},
|
|
3306
|
+
toJSON(message, use = "json") {
|
|
3307
|
+
const obj = {};
|
|
3308
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
3309
|
+
if (!message.pageSize?.isZero?.()) {
|
|
3310
|
+
obj[pick("pageSize", "page_size")] = (message.pageSize || index_js_1.Long.ZERO).toString();
|
|
3311
|
+
}
|
|
3312
|
+
if (message.pageToken !== "") {
|
|
3313
|
+
obj[pick("pageToken", "page_token")] = message.pageToken;
|
|
3314
|
+
}
|
|
3315
|
+
if (message.filters !== undefined) {
|
|
3316
|
+
obj[pick("filters", "filters")] = message.filters
|
|
3317
|
+
? exports.ListSpotPriceSeriesRequest_Filters.toJSON(message.filters, use)
|
|
3318
|
+
: undefined;
|
|
3319
|
+
}
|
|
3320
|
+
if (message.aggregation !== undefined) {
|
|
3321
|
+
obj[pick("aggregation", "aggregation")] = message.aggregation
|
|
3322
|
+
? exports.ListSpotPriceSeriesRequest_Aggregation.toJSON(message.aggregation, use)
|
|
3323
|
+
: undefined;
|
|
3324
|
+
}
|
|
3325
|
+
return obj;
|
|
3326
|
+
},
|
|
3327
|
+
create(base) {
|
|
3328
|
+
return exports.ListSpotPriceSeriesRequest.fromPartial(base ?? {});
|
|
3329
|
+
},
|
|
3330
|
+
fromPartial(object) {
|
|
3331
|
+
const message = createBaseListSpotPriceSeriesRequest();
|
|
3332
|
+
message.pageSize = (object.pageSize !== undefined && object.pageSize !== null)
|
|
3333
|
+
? index_js_1.Long.fromValue(object.pageSize, false)
|
|
3334
|
+
: index_js_1.Long.ZERO;
|
|
3335
|
+
message.pageToken = (object.pageToken !== undefined && object.pageToken !== null)
|
|
3336
|
+
? object.pageToken
|
|
3337
|
+
: "";
|
|
3338
|
+
message.filters = (object.filters !== undefined && object.filters !== null)
|
|
3339
|
+
? exports.ListSpotPriceSeriesRequest_Filters.fromPartial(object.filters)
|
|
3340
|
+
: undefined;
|
|
3341
|
+
message.aggregation = (object.aggregation !== undefined && object.aggregation !== null)
|
|
3342
|
+
? exports.ListSpotPriceSeriesRequest_Aggregation.fromPartial(object.aggregation)
|
|
3343
|
+
: undefined;
|
|
3344
|
+
for (const ext of protobuf_js_1.protoRegistry.listExtensions("nebius.billing.v1alpha1.ListSpotPriceSeriesRequest"))
|
|
3345
|
+
ext.fromPartial?.(message, object);
|
|
3346
|
+
return message;
|
|
3347
|
+
},
|
|
3348
|
+
};
|
|
3349
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.ListSpotPriceSeriesRequest);
|
|
3350
|
+
function ListSpotPriceSeriesRequestCustomInspect() {
|
|
3351
|
+
const parts = [];
|
|
3352
|
+
if (!this.pageSize?.isZero?.())
|
|
3353
|
+
parts.push("pageSize" + "=" + (0, util_1.inspect)(this.pageSize));
|
|
3354
|
+
if (this.pageToken !== "")
|
|
3355
|
+
parts.push("pageToken" + "=" + (0, util_1.inspect)(this.pageToken));
|
|
3356
|
+
if (this.filters !== undefined)
|
|
3357
|
+
parts.push("filters" + "=" + (0, util_1.inspect)(this.filters));
|
|
3358
|
+
if (this.aggregation !== undefined)
|
|
3359
|
+
parts.push("aggregation" + "=" + (0, util_1.inspect)(this.aggregation));
|
|
3360
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
3361
|
+
}
|
|
3362
|
+
function ListSpotPriceSeriesRequestCustomJson() {
|
|
3363
|
+
const obj = {
|
|
3364
|
+
type: this.$type,
|
|
3365
|
+
};
|
|
3366
|
+
if (!this.pageSize?.isZero?.())
|
|
3367
|
+
obj.pageSize = (0, logging_js_1.inspectJson)(this.pageSize);
|
|
3368
|
+
if (this.pageToken !== "")
|
|
3369
|
+
obj.pageToken = (0, logging_js_1.inspectJson)(this.pageToken);
|
|
3370
|
+
if (this.filters !== undefined)
|
|
3371
|
+
obj.filters = (0, logging_js_1.inspectJson)(this.filters);
|
|
3372
|
+
if (this.aggregation !== undefined)
|
|
3373
|
+
obj.aggregation = (0, logging_js_1.inspectJson)(this.aggregation);
|
|
3374
|
+
return obj;
|
|
3375
|
+
}
|
|
3376
|
+
function applyListSpotPriceSeriesRequestCustom(message) {
|
|
3377
|
+
message[logging_js_1.custom] = ListSpotPriceSeriesRequestCustomInspect;
|
|
3378
|
+
message[logging_js_1.customJson] = ListSpotPriceSeriesRequestCustomJson;
|
|
3379
|
+
return (0, index_js_1.attachMessageDescriptor)(message, exports.ListSpotPriceSeriesRequest.$descriptor);
|
|
3380
|
+
}
|
|
3381
|
+
function createBaseListSpotPriceSeriesRequest() {
|
|
3382
|
+
const message = {
|
|
3383
|
+
$type: "nebius.billing.v1alpha1.ListSpotPriceSeriesRequest",
|
|
3384
|
+
pageSize: index_js_1.Long.ZERO,
|
|
3385
|
+
pageToken: "",
|
|
3386
|
+
filters: undefined,
|
|
3387
|
+
aggregation: undefined,
|
|
3388
|
+
};
|
|
3389
|
+
return applyListSpotPriceSeriesRequestCustom(message);
|
|
3390
|
+
}
|
|
3391
|
+
const ListSpotPriceSeriesRequest_Filters_MESSAGE_DESCRIPTOR = {
|
|
3392
|
+
type: "nebius.billing.v1alpha1.ListSpotPriceSeriesRequest.Filters",
|
|
3393
|
+
create: () => createBaseListSpotPriceSeriesRequest_Filters(),
|
|
3394
|
+
fields: {
|
|
3395
|
+
"skuIds": { pbName: "sku_ids", jsonName: "skuIds", elementDefault: () => "", nid: { "resource": ["sku"], "parentResource": [] }, scalarType: 9, repeated: true },
|
|
3396
|
+
"startTime": { pbName: "start_time", jsonName: "startTime", presence: true, message: () => index_js_1.wkt[".google.protobuf.Timestamp"].$descriptor },
|
|
3397
|
+
"endTime": { pbName: "end_time", jsonName: "endTime", presence: true, message: () => index_js_1.wkt[".google.protobuf.Timestamp"].$descriptor },
|
|
3398
|
+
},
|
|
3399
|
+
};
|
|
3400
|
+
/** Encodes, decodes, converts, and creates {@link ListSpotPriceSeriesRequest_Filters} messages. */
|
|
3401
|
+
exports.ListSpotPriceSeriesRequest_Filters = {
|
|
3402
|
+
$type: "nebius.billing.v1alpha1.ListSpotPriceSeriesRequest.Filters",
|
|
3403
|
+
$descriptor: ListSpotPriceSeriesRequest_Filters_MESSAGE_DESCRIPTOR,
|
|
3404
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
3405
|
+
for (const v of (message.skuIds ?? [])) {
|
|
3406
|
+
writer.uint32(10).string(v);
|
|
3407
|
+
}
|
|
3408
|
+
if (message.startTime !== undefined) {
|
|
3409
|
+
const w = writer.uint32(18).fork();
|
|
3410
|
+
index_js_1.wkt[".google.protobuf.Timestamp"].writeMessage(w, message.startTime);
|
|
3411
|
+
w.join();
|
|
3412
|
+
}
|
|
3413
|
+
if (message.endTime !== undefined) {
|
|
3414
|
+
const w = writer.uint32(26).fork();
|
|
3415
|
+
index_js_1.wkt[".google.protobuf.Timestamp"].writeMessage(w, message.endTime);
|
|
3416
|
+
w.join();
|
|
3417
|
+
}
|
|
3418
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
3419
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
3420
|
+
}
|
|
3421
|
+
return writer;
|
|
3422
|
+
},
|
|
3423
|
+
decode(input, length, base) {
|
|
3424
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
3425
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3426
|
+
const message = base ?? createBaseListSpotPriceSeriesRequest_Filters();
|
|
3427
|
+
let writer = undefined;
|
|
3428
|
+
if (message[index_js_1.unknownFieldsSymbol])
|
|
3429
|
+
writer = new index_js_1.BinaryWriter().raw(message[index_js_1.unknownFieldsSymbol]);
|
|
3430
|
+
while (reader.pos < end) {
|
|
3431
|
+
const tag = reader.uint32();
|
|
3432
|
+
switch (tag >>> 3) {
|
|
3433
|
+
case 1: {
|
|
3434
|
+
if (tag !== 10)
|
|
3435
|
+
break;
|
|
3436
|
+
message.skuIds.push(reader.string());
|
|
3437
|
+
continue;
|
|
3438
|
+
}
|
|
3439
|
+
case 2: {
|
|
3440
|
+
if (tag !== 18)
|
|
3441
|
+
break;
|
|
3442
|
+
const len = reader.uint32();
|
|
3443
|
+
message.startTime = index_js_1.wkt[".google.protobuf.Timestamp"].readMessage(reader, len, message.startTime);
|
|
3444
|
+
continue;
|
|
3445
|
+
}
|
|
3446
|
+
case 3: {
|
|
3447
|
+
if (tag !== 26)
|
|
3448
|
+
break;
|
|
3449
|
+
const len = reader.uint32();
|
|
3450
|
+
message.endTime = index_js_1.wkt[".google.protobuf.Timestamp"].readMessage(reader, len, message.endTime);
|
|
3451
|
+
continue;
|
|
3452
|
+
}
|
|
3453
|
+
default:
|
|
3454
|
+
break;
|
|
3455
|
+
}
|
|
3456
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3457
|
+
break;
|
|
3458
|
+
}
|
|
3459
|
+
{
|
|
3460
|
+
if (!writer)
|
|
3461
|
+
writer = new index_js_1.BinaryWriter();
|
|
3462
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
3463
|
+
writer.uint32(tag).raw(skipped);
|
|
3464
|
+
}
|
|
3465
|
+
}
|
|
3466
|
+
if (writer) {
|
|
3467
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
3468
|
+
}
|
|
3469
|
+
return message;
|
|
3470
|
+
},
|
|
3471
|
+
fromJSON(object) {
|
|
3472
|
+
return applyListSpotPriceSeriesRequest_FiltersCustom({
|
|
3473
|
+
$type: "nebius.billing.v1alpha1.ListSpotPriceSeriesRequest.Filters",
|
|
3474
|
+
skuIds: globalThis.Array.isArray(object?.skuIds ?? object?.sku_ids)
|
|
3475
|
+
? (object.skuIds ?? object.sku_ids).map((e) => String(e))
|
|
3476
|
+
: [],
|
|
3477
|
+
startTime: (0, index_js_1.isSet)(object.startTime ?? object.start_time)
|
|
3478
|
+
? index_js_1.wkt[".google.protobuf.Timestamp"].fromJSON(object.startTime ?? object.start_time)
|
|
3479
|
+
: undefined,
|
|
3480
|
+
endTime: (0, index_js_1.isSet)(object.endTime ?? object.end_time)
|
|
3481
|
+
? index_js_1.wkt[".google.protobuf.Timestamp"].fromJSON(object.endTime ?? object.end_time)
|
|
3482
|
+
: undefined,
|
|
3483
|
+
});
|
|
3484
|
+
},
|
|
3485
|
+
toJSON(message, use = "json") {
|
|
3486
|
+
const obj = {};
|
|
3487
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
3488
|
+
if (message.skuIds?.length) {
|
|
3489
|
+
obj[pick("skuIds", "sku_ids")] = message.skuIds.map((e) => e);
|
|
3490
|
+
}
|
|
3491
|
+
if (message.startTime !== undefined) {
|
|
3492
|
+
obj[pick("startTime", "start_time")] = index_js_1.wkt[".google.protobuf.Timestamp"].toJSON(message.startTime, use);
|
|
3493
|
+
}
|
|
3494
|
+
if (message.endTime !== undefined) {
|
|
3495
|
+
obj[pick("endTime", "end_time")] = index_js_1.wkt[".google.protobuf.Timestamp"].toJSON(message.endTime, use);
|
|
3496
|
+
}
|
|
3497
|
+
return obj;
|
|
3498
|
+
},
|
|
3499
|
+
create(base) {
|
|
3500
|
+
return exports.ListSpotPriceSeriesRequest_Filters.fromPartial(base ?? {});
|
|
3501
|
+
},
|
|
3502
|
+
fromPartial(object) {
|
|
3503
|
+
const message = createBaseListSpotPriceSeriesRequest_Filters();
|
|
3504
|
+
message.skuIds = object.skuIds?.map((e) => e) || [];
|
|
3505
|
+
message.startTime = (object.startTime !== undefined && object.startTime !== null)
|
|
3506
|
+
? index_js_1.wkt[".google.protobuf.Timestamp"].fromPartial(object.startTime)
|
|
3507
|
+
: undefined;
|
|
3508
|
+
message.endTime = (object.endTime !== undefined && object.endTime !== null)
|
|
3509
|
+
? index_js_1.wkt[".google.protobuf.Timestamp"].fromPartial(object.endTime)
|
|
3510
|
+
: undefined;
|
|
3511
|
+
for (const ext of protobuf_js_1.protoRegistry.listExtensions("nebius.billing.v1alpha1.ListSpotPriceSeriesRequest.Filters"))
|
|
3512
|
+
ext.fromPartial?.(message, object);
|
|
3513
|
+
return message;
|
|
3514
|
+
},
|
|
3515
|
+
};
|
|
3516
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.ListSpotPriceSeriesRequest_Filters);
|
|
3517
|
+
function ListSpotPriceSeriesRequest_FiltersCustomInspect() {
|
|
3518
|
+
const parts = [];
|
|
3519
|
+
if ((this.skuIds?.length ?? 0) !== 0)
|
|
3520
|
+
parts.push("skuIds" + "=" + (0, util_1.inspect)(this.skuIds));
|
|
3521
|
+
if (this.startTime !== undefined)
|
|
3522
|
+
parts.push("startTime" + "=" + (0, util_1.inspect)(this.startTime));
|
|
3523
|
+
if (this.endTime !== undefined)
|
|
3524
|
+
parts.push("endTime" + "=" + (0, util_1.inspect)(this.endTime));
|
|
3525
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
3526
|
+
}
|
|
3527
|
+
function ListSpotPriceSeriesRequest_FiltersCustomJson() {
|
|
3528
|
+
const obj = {
|
|
3529
|
+
type: this.$type,
|
|
3530
|
+
};
|
|
3531
|
+
if ((this.skuIds?.length ?? 0) !== 0)
|
|
3532
|
+
obj.skuIds = (0, logging_js_1.inspectJson)(this.skuIds);
|
|
3533
|
+
if (this.startTime !== undefined)
|
|
3534
|
+
obj.startTime = (0, logging_js_1.inspectJson)(this.startTime);
|
|
3535
|
+
if (this.endTime !== undefined)
|
|
3536
|
+
obj.endTime = (0, logging_js_1.inspectJson)(this.endTime);
|
|
3537
|
+
return obj;
|
|
3538
|
+
}
|
|
3539
|
+
function applyListSpotPriceSeriesRequest_FiltersCustom(message) {
|
|
3540
|
+
message[logging_js_1.custom] = ListSpotPriceSeriesRequest_FiltersCustomInspect;
|
|
3541
|
+
message[logging_js_1.customJson] = ListSpotPriceSeriesRequest_FiltersCustomJson;
|
|
3542
|
+
return (0, index_js_1.attachMessageDescriptor)(message, exports.ListSpotPriceSeriesRequest_Filters.$descriptor);
|
|
3543
|
+
}
|
|
3544
|
+
function createBaseListSpotPriceSeriesRequest_Filters() {
|
|
3545
|
+
const message = {
|
|
3546
|
+
$type: "nebius.billing.v1alpha1.ListSpotPriceSeriesRequest.Filters",
|
|
3547
|
+
skuIds: [],
|
|
3548
|
+
startTime: undefined,
|
|
3549
|
+
endTime: undefined,
|
|
3550
|
+
};
|
|
3551
|
+
return applyListSpotPriceSeriesRequest_FiltersCustom(message);
|
|
3552
|
+
}
|
|
3553
|
+
const ListSpotPriceSeriesRequest_Aggregation_MESSAGE_DESCRIPTOR = {
|
|
3554
|
+
type: "nebius.billing.v1alpha1.ListSpotPriceSeriesRequest.Aggregation",
|
|
3555
|
+
create: () => createBaseListSpotPriceSeriesRequest_Aggregation(),
|
|
3556
|
+
fields: {
|
|
3557
|
+
"granularity": { pbName: "granularity", jsonName: "granularity", scalarType: 14, enumNames: ["GRANULARITY_UNSPECIFIED", "GRANULARITY_MINUTE_15", "GRANULARITY_HOUR_1"] },
|
|
3558
|
+
"method": { pbName: "method", jsonName: "method", scalarType: 14, enumNames: ["METHOD_UNSPECIFIED", "METHOD_FIRST_PRICE", "METHOD_LAST_PRICE", "METHOD_AVG_PRICE"] },
|
|
3559
|
+
},
|
|
3560
|
+
};
|
|
3561
|
+
/** Encodes, decodes, converts, and creates {@link ListSpotPriceSeriesRequest_Aggregation} messages. */
|
|
3562
|
+
exports.ListSpotPriceSeriesRequest_Aggregation = {
|
|
3563
|
+
$type: "nebius.billing.v1alpha1.ListSpotPriceSeriesRequest.Aggregation",
|
|
3564
|
+
$descriptor: ListSpotPriceSeriesRequest_Aggregation_MESSAGE_DESCRIPTOR,
|
|
3565
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
3566
|
+
if ((message.granularity ?? exports.ListSpotPriceSeriesRequest_Aggregation_Granularity.GRANULARITY_UNSPECIFIED) !== exports.ListSpotPriceSeriesRequest_Aggregation_Granularity.GRANULARITY_UNSPECIFIED) {
|
|
3567
|
+
exports.ListSpotPriceSeriesRequest_Aggregation_Granularity.encodeField(writer, 1, message.granularity);
|
|
3568
|
+
}
|
|
3569
|
+
if ((message.method ?? exports.ListSpotPriceSeriesRequest_Aggregation_Method.METHOD_UNSPECIFIED) !== exports.ListSpotPriceSeriesRequest_Aggregation_Method.METHOD_UNSPECIFIED) {
|
|
3570
|
+
exports.ListSpotPriceSeriesRequest_Aggregation_Method.encodeField(writer, 2, message.method);
|
|
3571
|
+
}
|
|
3572
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
3573
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
3574
|
+
}
|
|
3575
|
+
return writer;
|
|
3576
|
+
},
|
|
3577
|
+
decode(input, length, base) {
|
|
3578
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
3579
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3580
|
+
const message = base ?? createBaseListSpotPriceSeriesRequest_Aggregation();
|
|
3581
|
+
let writer = undefined;
|
|
3582
|
+
if (message[index_js_1.unknownFieldsSymbol])
|
|
3583
|
+
writer = new index_js_1.BinaryWriter().raw(message[index_js_1.unknownFieldsSymbol]);
|
|
3584
|
+
while (reader.pos < end) {
|
|
3585
|
+
const tag = reader.uint32();
|
|
3586
|
+
switch (tag >>> 3) {
|
|
3587
|
+
case 1: {
|
|
3588
|
+
if (tag !== 8)
|
|
3589
|
+
break;
|
|
3590
|
+
message.granularity = exports.ListSpotPriceSeriesRequest_Aggregation_Granularity.fromNumber(reader.int32());
|
|
3591
|
+
continue;
|
|
3592
|
+
}
|
|
3593
|
+
case 2: {
|
|
3594
|
+
if (tag !== 16)
|
|
3595
|
+
break;
|
|
3596
|
+
message.method = exports.ListSpotPriceSeriesRequest_Aggregation_Method.fromNumber(reader.int32());
|
|
3597
|
+
continue;
|
|
3598
|
+
}
|
|
3599
|
+
default:
|
|
3600
|
+
break;
|
|
3601
|
+
}
|
|
3602
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3603
|
+
break;
|
|
3604
|
+
}
|
|
3605
|
+
{
|
|
3606
|
+
if (!writer)
|
|
3607
|
+
writer = new index_js_1.BinaryWriter();
|
|
3608
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
3609
|
+
writer.uint32(tag).raw(skipped);
|
|
3610
|
+
}
|
|
3611
|
+
}
|
|
3612
|
+
if (writer) {
|
|
3613
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
3614
|
+
}
|
|
3615
|
+
return message;
|
|
3616
|
+
},
|
|
3617
|
+
fromJSON(object) {
|
|
3618
|
+
return applyListSpotPriceSeriesRequest_AggregationCustom({
|
|
3619
|
+
$type: "nebius.billing.v1alpha1.ListSpotPriceSeriesRequest.Aggregation",
|
|
3620
|
+
granularity: (0, index_js_1.isSet)(object.granularity ?? object.granularity)
|
|
3621
|
+
? exports.ListSpotPriceSeriesRequest_Aggregation_Granularity.fromJSON(object.granularity ?? object.granularity)
|
|
3622
|
+
: exports.ListSpotPriceSeriesRequest_Aggregation_Granularity.GRANULARITY_UNSPECIFIED,
|
|
3623
|
+
method: (0, index_js_1.isSet)(object.method ?? object.method)
|
|
3624
|
+
? exports.ListSpotPriceSeriesRequest_Aggregation_Method.fromJSON(object.method ?? object.method)
|
|
3625
|
+
: exports.ListSpotPriceSeriesRequest_Aggregation_Method.METHOD_UNSPECIFIED,
|
|
3626
|
+
});
|
|
3627
|
+
},
|
|
3628
|
+
toJSON(message, use = "json") {
|
|
3629
|
+
const obj = {};
|
|
3630
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
3631
|
+
if ((message.granularity ?? exports.ListSpotPriceSeriesRequest_Aggregation_Granularity.GRANULARITY_UNSPECIFIED) !== exports.ListSpotPriceSeriesRequest_Aggregation_Granularity.GRANULARITY_UNSPECIFIED) {
|
|
3632
|
+
obj[pick("granularity", "granularity")] = exports.ListSpotPriceSeriesRequest_Aggregation_Granularity.toJSON(message.granularity);
|
|
3633
|
+
}
|
|
3634
|
+
if ((message.method ?? exports.ListSpotPriceSeriesRequest_Aggregation_Method.METHOD_UNSPECIFIED) !== exports.ListSpotPriceSeriesRequest_Aggregation_Method.METHOD_UNSPECIFIED) {
|
|
3635
|
+
obj[pick("method", "method")] = exports.ListSpotPriceSeriesRequest_Aggregation_Method.toJSON(message.method);
|
|
3636
|
+
}
|
|
3637
|
+
return obj;
|
|
3638
|
+
},
|
|
3639
|
+
create(base) {
|
|
3640
|
+
return exports.ListSpotPriceSeriesRequest_Aggregation.fromPartial(base ?? {});
|
|
3641
|
+
},
|
|
3642
|
+
fromPartial(object) {
|
|
3643
|
+
const message = createBaseListSpotPriceSeriesRequest_Aggregation();
|
|
3644
|
+
message.granularity = (object.granularity !== undefined && object.granularity !== null)
|
|
3645
|
+
? exports.ListSpotPriceSeriesRequest_Aggregation_Granularity.fromJSON(object.granularity.code ?? object.granularity.name)
|
|
3646
|
+
: exports.ListSpotPriceSeriesRequest_Aggregation_Granularity.GRANULARITY_UNSPECIFIED;
|
|
3647
|
+
message.method = (object.method !== undefined && object.method !== null)
|
|
3648
|
+
? exports.ListSpotPriceSeriesRequest_Aggregation_Method.fromJSON(object.method.code ?? object.method.name)
|
|
3649
|
+
: exports.ListSpotPriceSeriesRequest_Aggregation_Method.METHOD_UNSPECIFIED;
|
|
3650
|
+
for (const ext of protobuf_js_1.protoRegistry.listExtensions("nebius.billing.v1alpha1.ListSpotPriceSeriesRequest.Aggregation"))
|
|
3651
|
+
ext.fromPartial?.(message, object);
|
|
3652
|
+
return message;
|
|
3653
|
+
},
|
|
3654
|
+
};
|
|
3655
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.ListSpotPriceSeriesRequest_Aggregation);
|
|
3656
|
+
function ListSpotPriceSeriesRequest_AggregationCustomInspect() {
|
|
3657
|
+
const parts = [];
|
|
3658
|
+
if (this.granularity !== undefined)
|
|
3659
|
+
parts.push("granularity" + "=" + (0, util_1.inspect)(this.granularity));
|
|
3660
|
+
if (this.method !== undefined)
|
|
3661
|
+
parts.push("method" + "=" + (0, util_1.inspect)(this.method));
|
|
3662
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
3663
|
+
}
|
|
3664
|
+
function ListSpotPriceSeriesRequest_AggregationCustomJson() {
|
|
3665
|
+
const obj = {
|
|
3666
|
+
type: this.$type,
|
|
3667
|
+
};
|
|
3668
|
+
if (this.granularity !== undefined)
|
|
3669
|
+
obj.granularity = (0, logging_js_1.inspectJson)(this.granularity);
|
|
3670
|
+
if (this.method !== undefined)
|
|
3671
|
+
obj.method = (0, logging_js_1.inspectJson)(this.method);
|
|
3672
|
+
return obj;
|
|
3673
|
+
}
|
|
3674
|
+
function applyListSpotPriceSeriesRequest_AggregationCustom(message) {
|
|
3675
|
+
message[logging_js_1.custom] = ListSpotPriceSeriesRequest_AggregationCustomInspect;
|
|
3676
|
+
message[logging_js_1.customJson] = ListSpotPriceSeriesRequest_AggregationCustomJson;
|
|
3677
|
+
return (0, index_js_1.attachMessageDescriptor)(message, exports.ListSpotPriceSeriesRequest_Aggregation.$descriptor);
|
|
3678
|
+
}
|
|
3679
|
+
function createBaseListSpotPriceSeriesRequest_Aggregation() {
|
|
3680
|
+
const message = {
|
|
3681
|
+
$type: "nebius.billing.v1alpha1.ListSpotPriceSeriesRequest.Aggregation",
|
|
3682
|
+
granularity: exports.ListSpotPriceSeriesRequest_Aggregation_Granularity.GRANULARITY_UNSPECIFIED,
|
|
3683
|
+
method: exports.ListSpotPriceSeriesRequest_Aggregation_Method.METHOD_UNSPECIFIED,
|
|
3684
|
+
};
|
|
3685
|
+
return applyListSpotPriceSeriesRequest_AggregationCustom(message);
|
|
3686
|
+
}
|
|
3687
|
+
const ListSpotPriceSeriesResponse_MESSAGE_DESCRIPTOR = {
|
|
3688
|
+
type: "nebius.billing.v1alpha1.ListSpotPriceSeriesResponse",
|
|
3689
|
+
create: () => createBaseListSpotPriceSeriesResponse(),
|
|
3690
|
+
fields: {
|
|
3691
|
+
"items": { pbName: "items", jsonName: "items", repeated: true, message: () => exports.SpotPriceSeries.$descriptor },
|
|
3692
|
+
"nextPageToken": { pbName: "next_page_token", jsonName: "nextPageToken", scalarType: 9 },
|
|
3693
|
+
"snapshotTime": { pbName: "snapshot_time", jsonName: "snapshotTime", presence: true, message: () => index_js_1.wkt[".google.protobuf.Timestamp"].$descriptor },
|
|
3694
|
+
},
|
|
3695
|
+
};
|
|
3696
|
+
/** Encodes, decodes, converts, and creates {@link ListSpotPriceSeriesResponse} messages. */
|
|
3697
|
+
exports.ListSpotPriceSeriesResponse = {
|
|
3698
|
+
$type: "nebius.billing.v1alpha1.ListSpotPriceSeriesResponse",
|
|
3699
|
+
$descriptor: ListSpotPriceSeriesResponse_MESSAGE_DESCRIPTOR,
|
|
3700
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
3701
|
+
for (const v of (message.items ?? [])) {
|
|
3702
|
+
const w = writer.uint32(10).fork();
|
|
3703
|
+
exports.SpotPriceSeries.encode(v, w);
|
|
3704
|
+
w.join();
|
|
3705
|
+
}
|
|
3706
|
+
if (message.nextPageToken !== "") {
|
|
3707
|
+
writer.uint32(18).string(message.nextPageToken);
|
|
3708
|
+
}
|
|
3709
|
+
if (message.snapshotTime !== undefined) {
|
|
3710
|
+
const w = writer.uint32(26).fork();
|
|
3711
|
+
index_js_1.wkt[".google.protobuf.Timestamp"].writeMessage(w, message.snapshotTime);
|
|
3712
|
+
w.join();
|
|
3713
|
+
}
|
|
3714
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
3715
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
3716
|
+
}
|
|
3717
|
+
return writer;
|
|
3718
|
+
},
|
|
3719
|
+
decode(input, length, base) {
|
|
3720
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
3721
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3722
|
+
const message = base ?? createBaseListSpotPriceSeriesResponse();
|
|
3723
|
+
let writer = undefined;
|
|
3724
|
+
if (message[index_js_1.unknownFieldsSymbol])
|
|
3725
|
+
writer = new index_js_1.BinaryWriter().raw(message[index_js_1.unknownFieldsSymbol]);
|
|
3726
|
+
while (reader.pos < end) {
|
|
3727
|
+
const tag = reader.uint32();
|
|
3728
|
+
switch (tag >>> 3) {
|
|
3729
|
+
case 1: {
|
|
3730
|
+
if (tag !== 10)
|
|
3731
|
+
break;
|
|
3732
|
+
message.items.push(exports.SpotPriceSeries.decode(reader, reader.uint32()));
|
|
3733
|
+
continue;
|
|
3734
|
+
}
|
|
3735
|
+
case 2: {
|
|
3736
|
+
if (tag !== 18)
|
|
3737
|
+
break;
|
|
3738
|
+
message.nextPageToken = reader.string();
|
|
3739
|
+
continue;
|
|
3740
|
+
}
|
|
3741
|
+
case 3: {
|
|
3742
|
+
if (tag !== 26)
|
|
3743
|
+
break;
|
|
3744
|
+
const len = reader.uint32();
|
|
3745
|
+
message.snapshotTime = index_js_1.wkt[".google.protobuf.Timestamp"].readMessage(reader, len, message.snapshotTime);
|
|
3746
|
+
continue;
|
|
3747
|
+
}
|
|
3748
|
+
default:
|
|
3749
|
+
break;
|
|
3750
|
+
}
|
|
3751
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3752
|
+
break;
|
|
3753
|
+
}
|
|
3754
|
+
{
|
|
3755
|
+
if (!writer)
|
|
3756
|
+
writer = new index_js_1.BinaryWriter();
|
|
3757
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
3758
|
+
writer.uint32(tag).raw(skipped);
|
|
3759
|
+
}
|
|
3760
|
+
}
|
|
3761
|
+
if (writer) {
|
|
3762
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
3763
|
+
}
|
|
3764
|
+
return message;
|
|
3765
|
+
},
|
|
3766
|
+
fromJSON(object) {
|
|
3767
|
+
return applyListSpotPriceSeriesResponseCustom({
|
|
3768
|
+
$type: "nebius.billing.v1alpha1.ListSpotPriceSeriesResponse",
|
|
3769
|
+
items: globalThis.Array.isArray(object?.items ?? object?.items)
|
|
3770
|
+
? (object.items ?? object.items).map((e) => exports.SpotPriceSeries.fromJSON(e))
|
|
3771
|
+
: [],
|
|
3772
|
+
nextPageToken: (0, index_js_1.isSet)(object.nextPageToken ?? object.next_page_token)
|
|
3773
|
+
? String(object.nextPageToken ?? object.next_page_token)
|
|
3774
|
+
: "",
|
|
3775
|
+
snapshotTime: (0, index_js_1.isSet)(object.snapshotTime ?? object.snapshot_time)
|
|
3776
|
+
? index_js_1.wkt[".google.protobuf.Timestamp"].fromJSON(object.snapshotTime ?? object.snapshot_time)
|
|
3777
|
+
: undefined,
|
|
3778
|
+
});
|
|
3779
|
+
},
|
|
3780
|
+
toJSON(message, use = "json") {
|
|
3781
|
+
const obj = {};
|
|
3782
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
3783
|
+
if (message.items?.length) {
|
|
3784
|
+
obj[pick("items", "items")] = message.items.map((e) => e ? exports.SpotPriceSeries.toJSON(e, use) : undefined);
|
|
3785
|
+
}
|
|
3786
|
+
if (message.nextPageToken !== "") {
|
|
3787
|
+
obj[pick("nextPageToken", "next_page_token")] = message.nextPageToken;
|
|
3788
|
+
}
|
|
3789
|
+
if (message.snapshotTime !== undefined) {
|
|
3790
|
+
obj[pick("snapshotTime", "snapshot_time")] = index_js_1.wkt[".google.protobuf.Timestamp"].toJSON(message.snapshotTime, use);
|
|
3791
|
+
}
|
|
3792
|
+
return obj;
|
|
3793
|
+
},
|
|
3794
|
+
create(base) {
|
|
3795
|
+
return exports.ListSpotPriceSeriesResponse.fromPartial(base ?? {});
|
|
3796
|
+
},
|
|
3797
|
+
fromPartial(object) {
|
|
3798
|
+
const message = createBaseListSpotPriceSeriesResponse();
|
|
3799
|
+
message.items = object.items?.map((e) => exports.SpotPriceSeries.fromPartial(e)) || [];
|
|
3800
|
+
message.nextPageToken = (object.nextPageToken !== undefined && object.nextPageToken !== null)
|
|
3801
|
+
? object.nextPageToken
|
|
3802
|
+
: "";
|
|
3803
|
+
message.snapshotTime = (object.snapshotTime !== undefined && object.snapshotTime !== null)
|
|
3804
|
+
? index_js_1.wkt[".google.protobuf.Timestamp"].fromPartial(object.snapshotTime)
|
|
3805
|
+
: undefined;
|
|
3806
|
+
for (const ext of protobuf_js_1.protoRegistry.listExtensions("nebius.billing.v1alpha1.ListSpotPriceSeriesResponse"))
|
|
3807
|
+
ext.fromPartial?.(message, object);
|
|
3808
|
+
return message;
|
|
3809
|
+
},
|
|
3810
|
+
};
|
|
3811
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.ListSpotPriceSeriesResponse);
|
|
3812
|
+
function ListSpotPriceSeriesResponseCustomInspect() {
|
|
3813
|
+
const parts = [];
|
|
3814
|
+
if ((this.items?.length ?? 0) !== 0)
|
|
3815
|
+
parts.push("items" + "=" + (0, util_1.inspect)(this.items));
|
|
3816
|
+
if (this.nextPageToken !== "")
|
|
3817
|
+
parts.push("nextPageToken" + "=" + (0, util_1.inspect)(this.nextPageToken));
|
|
3818
|
+
if (this.snapshotTime !== undefined)
|
|
3819
|
+
parts.push("snapshotTime" + "=" + (0, util_1.inspect)(this.snapshotTime));
|
|
3820
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
3821
|
+
}
|
|
3822
|
+
function ListSpotPriceSeriesResponseCustomJson() {
|
|
3823
|
+
const obj = {
|
|
3824
|
+
type: this.$type,
|
|
3825
|
+
};
|
|
3826
|
+
if ((this.items?.length ?? 0) !== 0)
|
|
3827
|
+
obj.items = (0, logging_js_1.inspectJson)(this.items);
|
|
3828
|
+
if (this.nextPageToken !== "")
|
|
3829
|
+
obj.nextPageToken = (0, logging_js_1.inspectJson)(this.nextPageToken);
|
|
3830
|
+
if (this.snapshotTime !== undefined)
|
|
3831
|
+
obj.snapshotTime = (0, logging_js_1.inspectJson)(this.snapshotTime);
|
|
3832
|
+
return obj;
|
|
3833
|
+
}
|
|
3834
|
+
function applyListSpotPriceSeriesResponseCustom(message) {
|
|
3835
|
+
message[logging_js_1.custom] = ListSpotPriceSeriesResponseCustomInspect;
|
|
3836
|
+
message[logging_js_1.customJson] = ListSpotPriceSeriesResponseCustomJson;
|
|
3837
|
+
return (0, index_js_1.attachMessageDescriptor)(message, exports.ListSpotPriceSeriesResponse.$descriptor);
|
|
3838
|
+
}
|
|
3839
|
+
function createBaseListSpotPriceSeriesResponse() {
|
|
3840
|
+
const message = {
|
|
3841
|
+
$type: "nebius.billing.v1alpha1.ListSpotPriceSeriesResponse",
|
|
3842
|
+
items: [],
|
|
3843
|
+
nextPageToken: "",
|
|
3844
|
+
snapshotTime: undefined,
|
|
3845
|
+
};
|
|
3846
|
+
return applyListSpotPriceSeriesResponseCustom(message);
|
|
3847
|
+
}
|
|
3848
|
+
/**
|
|
3849
|
+
* Describes the gRPC methods for the `nebius.billing.v1alpha1.SpotPriceService` service.
|
|
3850
|
+
*/
|
|
3851
|
+
exports.SpotPriceServiceServiceDescription = {
|
|
3852
|
+
list: {
|
|
3853
|
+
path: "/nebius.billing.v1alpha1.SpotPriceService/List",
|
|
3854
|
+
requestStream: false,
|
|
3855
|
+
responseStream: false,
|
|
3856
|
+
requestSerialize: (value) => Buffer.from(exports.ListSpotPricesRequest.encode(value).finish()),
|
|
3857
|
+
requestDescriptor: () => exports.ListSpotPricesRequest.$descriptor,
|
|
3858
|
+
sendResetMask: false,
|
|
3859
|
+
requestDeserialize: (value) => exports.ListSpotPricesRequest.decode(value),
|
|
3860
|
+
responseSerialize: (value) => Buffer.from(exports.ListSpotPricesResponse.encode(value).finish()),
|
|
3861
|
+
responseDeserialize: (value) => exports.ListSpotPricesResponse.decode(value),
|
|
3862
|
+
},
|
|
3863
|
+
listSeries: {
|
|
3864
|
+
path: "/nebius.billing.v1alpha1.SpotPriceService/ListSeries",
|
|
3865
|
+
requestStream: false,
|
|
3866
|
+
responseStream: false,
|
|
3867
|
+
requestSerialize: (value) => Buffer.from(exports.ListSpotPriceSeriesRequest.encode(value).finish()),
|
|
3868
|
+
requestDescriptor: () => exports.ListSpotPriceSeriesRequest.$descriptor,
|
|
3869
|
+
sendResetMask: false,
|
|
3870
|
+
requestDeserialize: (value) => exports.ListSpotPriceSeriesRequest.decode(value),
|
|
3871
|
+
responseSerialize: (value) => Buffer.from(exports.ListSpotPriceSeriesResponse.encode(value).finish()),
|
|
3872
|
+
responseDeserialize: (value) => exports.ListSpotPriceSeriesResponse.decode(value),
|
|
3873
|
+
},
|
|
3874
|
+
};
|
|
3875
|
+
/**
|
|
3876
|
+
* Creates low-level gRPC clients for the `nebius.billing.v1alpha1.SpotPriceService` service.
|
|
3877
|
+
*/
|
|
3878
|
+
exports.SpotPriceServiceBaseClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.SpotPriceServiceServiceDescription, "nebius.billing.v1alpha1.SpotPriceService");
|
|
3879
|
+
/**
|
|
3880
|
+
* Calls the `nebius.billing.v1alpha1.SpotPriceService` service through the Nebius SDK.
|
|
3881
|
+
*/
|
|
3882
|
+
class SpotPriceService {
|
|
3883
|
+
sdk;
|
|
3884
|
+
$type = "nebius.billing.v1alpha1.SpotPriceService";
|
|
3885
|
+
addr;
|
|
3886
|
+
spec;
|
|
3887
|
+
apiServiceName = "pricing-policies.billing-cpl";
|
|
3888
|
+
/** Creates a client that uses the SDK service address. */
|
|
3889
|
+
constructor(sdk) {
|
|
3890
|
+
this.sdk = sdk;
|
|
3891
|
+
const addr = sdk.getAddressFromServiceName(this.$type, this.apiServiceName);
|
|
3892
|
+
this.addr = addr;
|
|
3893
|
+
this.spec = exports.SpotPriceServiceServiceDescription;
|
|
3894
|
+
}
|
|
3895
|
+
/**
|
|
3896
|
+
* Lists the current spot prices, one item for each SKU. Authentication is not required.
|
|
3897
|
+
*
|
|
3898
|
+
*/
|
|
3899
|
+
list(...args) {
|
|
3900
|
+
const spec = this.spec.list;
|
|
3901
|
+
const request = args[0];
|
|
3902
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
3903
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
3904
|
+
const deserialize = spec.responseDeserialize;
|
|
3905
|
+
return new request_js_1.Request(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
3906
|
+
}
|
|
3907
|
+
/**
|
|
3908
|
+
* Lists the spot prices at regular time steps, one series for each SKU. Authentication is not required.
|
|
3909
|
+
*
|
|
3910
|
+
*/
|
|
3911
|
+
listSeries(...args) {
|
|
3912
|
+
const spec = this.spec.listSeries;
|
|
3913
|
+
const request = args[0];
|
|
3914
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
3915
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
3916
|
+
const deserialize = spec.responseDeserialize;
|
|
3917
|
+
return new request_js_1.Request(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
3918
|
+
}
|
|
3919
|
+
/** Yields list items across pages, without changing the supplied request. */
|
|
3920
|
+
async *filter(request, metadata, options) {
|
|
3921
|
+
const req = exports.ListSpotPricesRequest.decode(exports.ListSpotPricesRequest.encode(request).finish());
|
|
3922
|
+
if (!('pageToken' in req))
|
|
3923
|
+
throw new TypeError('List request does not support pagination.');
|
|
3924
|
+
const key = "items";
|
|
3925
|
+
for (;;) {
|
|
3926
|
+
const page = await this.list(req, metadata ?? new grpc_js_1.Metadata(), options ?? {}).result;
|
|
3927
|
+
for (const item of page[key])
|
|
3928
|
+
yield item;
|
|
3929
|
+
const token = page.nextPageToken;
|
|
3930
|
+
if (!token)
|
|
3931
|
+
return;
|
|
3932
|
+
req.pageToken = token;
|
|
3933
|
+
}
|
|
3934
|
+
}
|
|
3935
|
+
}
|
|
3936
|
+
exports.SpotPriceService = SpotPriceService;
|
|
3937
|
+
const SpotPrice_MESSAGE_DESCRIPTOR = {
|
|
3938
|
+
type: "nebius.billing.v1alpha1.SpotPrice",
|
|
3939
|
+
create: () => createBaseSpotPrice(),
|
|
3940
|
+
fields: {
|
|
3941
|
+
"skuId": { pbName: "sku_id", jsonName: "skuId", nid: { "resource": ["sku"], "parentResource": [] }, scalarType: 9 },
|
|
3942
|
+
"productTitle": { pbName: "product_title", jsonName: "productTitle", scalarType: 9 },
|
|
3943
|
+
"region": { pbName: "region", jsonName: "region", scalarType: 9 },
|
|
3944
|
+
"computeInstance": { pbName: "compute_instance", jsonName: "computeInstance", presence: true, message: () => exports.SpotPriceComputeInstance.$descriptor },
|
|
3945
|
+
"price": { pbName: "price", jsonName: "price", presence: true, message: () => exports.SpotPriceValue.$descriptor },
|
|
3946
|
+
"effectiveTime": { pbName: "effective_time", jsonName: "effectiveTime", presence: true, message: () => index_js_1.wkt[".google.protobuf.Timestamp"].$descriptor },
|
|
3947
|
+
},
|
|
3948
|
+
};
|
|
3949
|
+
/** Encodes, decodes, converts, and creates {@link SpotPrice} messages. */
|
|
3950
|
+
exports.SpotPrice = {
|
|
3951
|
+
$type: "nebius.billing.v1alpha1.SpotPrice",
|
|
3952
|
+
$descriptor: SpotPrice_MESSAGE_DESCRIPTOR,
|
|
3953
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
3954
|
+
if (message.skuId !== "") {
|
|
3955
|
+
writer.uint32(10).string(message.skuId);
|
|
3956
|
+
}
|
|
3957
|
+
if (message.productTitle !== "") {
|
|
3958
|
+
writer.uint32(18).string(message.productTitle);
|
|
3959
|
+
}
|
|
3960
|
+
if (message.region !== "") {
|
|
3961
|
+
writer.uint32(26).string(message.region);
|
|
3962
|
+
}
|
|
3963
|
+
if (message.computeInstance !== undefined) {
|
|
3964
|
+
const w = writer.uint32(34).fork();
|
|
3965
|
+
exports.SpotPriceComputeInstance.encode(message.computeInstance, w);
|
|
3966
|
+
w.join();
|
|
3967
|
+
}
|
|
3968
|
+
if (message.price !== undefined) {
|
|
3969
|
+
const w = writer.uint32(42).fork();
|
|
3970
|
+
exports.SpotPriceValue.encode(message.price, w);
|
|
3971
|
+
w.join();
|
|
3972
|
+
}
|
|
3973
|
+
if (message.effectiveTime !== undefined) {
|
|
3974
|
+
const w = writer.uint32(50).fork();
|
|
3975
|
+
index_js_1.wkt[".google.protobuf.Timestamp"].writeMessage(w, message.effectiveTime);
|
|
3976
|
+
w.join();
|
|
3977
|
+
}
|
|
3978
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
3979
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
3980
|
+
}
|
|
3981
|
+
return writer;
|
|
3982
|
+
},
|
|
3983
|
+
decode(input, length, base) {
|
|
3984
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
3985
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3986
|
+
const message = base ?? createBaseSpotPrice();
|
|
3987
|
+
let writer = undefined;
|
|
3988
|
+
if (message[index_js_1.unknownFieldsSymbol])
|
|
3989
|
+
writer = new index_js_1.BinaryWriter().raw(message[index_js_1.unknownFieldsSymbol]);
|
|
3990
|
+
while (reader.pos < end) {
|
|
3991
|
+
const tag = reader.uint32();
|
|
3992
|
+
switch (tag >>> 3) {
|
|
3993
|
+
case 1: {
|
|
3994
|
+
if (tag !== 10)
|
|
3995
|
+
break;
|
|
3996
|
+
message.skuId = reader.string();
|
|
3997
|
+
continue;
|
|
3998
|
+
}
|
|
3999
|
+
case 2: {
|
|
4000
|
+
if (tag !== 18)
|
|
4001
|
+
break;
|
|
4002
|
+
message.productTitle = reader.string();
|
|
4003
|
+
continue;
|
|
4004
|
+
}
|
|
4005
|
+
case 3: {
|
|
4006
|
+
if (tag !== 26)
|
|
4007
|
+
break;
|
|
4008
|
+
message.region = reader.string();
|
|
4009
|
+
continue;
|
|
4010
|
+
}
|
|
4011
|
+
case 4: {
|
|
4012
|
+
if (tag !== 34)
|
|
4013
|
+
break;
|
|
4014
|
+
message.computeInstance = exports.SpotPriceComputeInstance.decode(reader, reader.uint32(), message.computeInstance);
|
|
4015
|
+
continue;
|
|
4016
|
+
}
|
|
4017
|
+
case 5: {
|
|
4018
|
+
if (tag !== 42)
|
|
4019
|
+
break;
|
|
4020
|
+
message.price = exports.SpotPriceValue.decode(reader, reader.uint32(), message.price);
|
|
4021
|
+
continue;
|
|
4022
|
+
}
|
|
4023
|
+
case 6: {
|
|
4024
|
+
if (tag !== 50)
|
|
4025
|
+
break;
|
|
4026
|
+
const len = reader.uint32();
|
|
4027
|
+
message.effectiveTime = index_js_1.wkt[".google.protobuf.Timestamp"].readMessage(reader, len, message.effectiveTime);
|
|
4028
|
+
continue;
|
|
4029
|
+
}
|
|
4030
|
+
default:
|
|
4031
|
+
break;
|
|
4032
|
+
}
|
|
4033
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4034
|
+
break;
|
|
4035
|
+
}
|
|
4036
|
+
{
|
|
4037
|
+
if (!writer)
|
|
4038
|
+
writer = new index_js_1.BinaryWriter();
|
|
4039
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
4040
|
+
writer.uint32(tag).raw(skipped);
|
|
4041
|
+
}
|
|
4042
|
+
}
|
|
4043
|
+
if (writer) {
|
|
4044
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
4045
|
+
}
|
|
4046
|
+
return message;
|
|
4047
|
+
},
|
|
4048
|
+
fromJSON(object) {
|
|
4049
|
+
return applySpotPriceCustom({
|
|
4050
|
+
$type: "nebius.billing.v1alpha1.SpotPrice",
|
|
4051
|
+
skuId: (0, index_js_1.isSet)(object.skuId ?? object.sku_id)
|
|
4052
|
+
? String(object.skuId ?? object.sku_id)
|
|
4053
|
+
: "",
|
|
4054
|
+
productTitle: (0, index_js_1.isSet)(object.productTitle ?? object.product_title)
|
|
4055
|
+
? String(object.productTitle ?? object.product_title)
|
|
4056
|
+
: "",
|
|
4057
|
+
region: (0, index_js_1.isSet)(object.region ?? object.region)
|
|
4058
|
+
? String(object.region ?? object.region)
|
|
4059
|
+
: "",
|
|
4060
|
+
computeInstance: (0, index_js_1.isSet)(object.computeInstance ?? object.compute_instance)
|
|
4061
|
+
? exports.SpotPriceComputeInstance.fromJSON(object.computeInstance ?? object.compute_instance)
|
|
4062
|
+
: undefined,
|
|
4063
|
+
price: (0, index_js_1.isSet)(object.price ?? object.price)
|
|
4064
|
+
? exports.SpotPriceValue.fromJSON(object.price ?? object.price)
|
|
4065
|
+
: undefined,
|
|
4066
|
+
effectiveTime: (0, index_js_1.isSet)(object.effectiveTime ?? object.effective_time)
|
|
4067
|
+
? index_js_1.wkt[".google.protobuf.Timestamp"].fromJSON(object.effectiveTime ?? object.effective_time)
|
|
4068
|
+
: undefined,
|
|
4069
|
+
});
|
|
4070
|
+
},
|
|
4071
|
+
toJSON(message, use = "json") {
|
|
4072
|
+
const obj = {};
|
|
4073
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
4074
|
+
if (message.skuId !== "") {
|
|
4075
|
+
obj[pick("skuId", "sku_id")] = message.skuId;
|
|
4076
|
+
}
|
|
4077
|
+
if (message.productTitle !== "") {
|
|
4078
|
+
obj[pick("productTitle", "product_title")] = message.productTitle;
|
|
4079
|
+
}
|
|
4080
|
+
if (message.region !== "") {
|
|
4081
|
+
obj[pick("region", "region")] = message.region;
|
|
4082
|
+
}
|
|
4083
|
+
if (message.computeInstance !== undefined) {
|
|
4084
|
+
obj[pick("computeInstance", "compute_instance")] = message.computeInstance
|
|
4085
|
+
? exports.SpotPriceComputeInstance.toJSON(message.computeInstance, use)
|
|
4086
|
+
: undefined;
|
|
4087
|
+
}
|
|
4088
|
+
if (message.price !== undefined) {
|
|
4089
|
+
obj[pick("price", "price")] = message.price
|
|
4090
|
+
? exports.SpotPriceValue.toJSON(message.price, use)
|
|
4091
|
+
: undefined;
|
|
4092
|
+
}
|
|
4093
|
+
if (message.effectiveTime !== undefined) {
|
|
4094
|
+
obj[pick("effectiveTime", "effective_time")] = index_js_1.wkt[".google.protobuf.Timestamp"].toJSON(message.effectiveTime, use);
|
|
4095
|
+
}
|
|
4096
|
+
return obj;
|
|
4097
|
+
},
|
|
4098
|
+
create(base) {
|
|
4099
|
+
return exports.SpotPrice.fromPartial(base ?? {});
|
|
4100
|
+
},
|
|
4101
|
+
fromPartial(object) {
|
|
4102
|
+
const message = createBaseSpotPrice();
|
|
4103
|
+
message.skuId = (object.skuId !== undefined && object.skuId !== null)
|
|
4104
|
+
? object.skuId
|
|
4105
|
+
: "";
|
|
4106
|
+
message.productTitle = (object.productTitle !== undefined && object.productTitle !== null)
|
|
4107
|
+
? object.productTitle
|
|
4108
|
+
: "";
|
|
4109
|
+
message.region = (object.region !== undefined && object.region !== null)
|
|
4110
|
+
? object.region
|
|
4111
|
+
: "";
|
|
4112
|
+
message.computeInstance = (object.computeInstance !== undefined && object.computeInstance !== null)
|
|
4113
|
+
? exports.SpotPriceComputeInstance.fromPartial(object.computeInstance)
|
|
4114
|
+
: undefined;
|
|
4115
|
+
message.price = (object.price !== undefined && object.price !== null)
|
|
4116
|
+
? exports.SpotPriceValue.fromPartial(object.price)
|
|
4117
|
+
: undefined;
|
|
4118
|
+
message.effectiveTime = (object.effectiveTime !== undefined && object.effectiveTime !== null)
|
|
4119
|
+
? index_js_1.wkt[".google.protobuf.Timestamp"].fromPartial(object.effectiveTime)
|
|
4120
|
+
: undefined;
|
|
4121
|
+
for (const ext of protobuf_js_1.protoRegistry.listExtensions("nebius.billing.v1alpha1.SpotPrice"))
|
|
4122
|
+
ext.fromPartial?.(message, object);
|
|
4123
|
+
return message;
|
|
4124
|
+
},
|
|
4125
|
+
};
|
|
4126
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.SpotPrice);
|
|
4127
|
+
function SpotPriceCustomInspect() {
|
|
4128
|
+
const parts = [];
|
|
4129
|
+
if (this.skuId !== "")
|
|
4130
|
+
parts.push("skuId" + "=" + (0, util_1.inspect)(this.skuId));
|
|
4131
|
+
if (this.productTitle !== "")
|
|
4132
|
+
parts.push("productTitle" + "=" + (0, util_1.inspect)(this.productTitle));
|
|
4133
|
+
if (this.region !== "")
|
|
4134
|
+
parts.push("region" + "=" + (0, util_1.inspect)(this.region));
|
|
4135
|
+
if (this.computeInstance !== undefined)
|
|
4136
|
+
parts.push("computeInstance" + "=" + (0, util_1.inspect)(this.computeInstance));
|
|
4137
|
+
if (this.price !== undefined)
|
|
4138
|
+
parts.push("price" + "=" + (0, util_1.inspect)(this.price));
|
|
4139
|
+
if (this.effectiveTime !== undefined)
|
|
4140
|
+
parts.push("effectiveTime" + "=" + (0, util_1.inspect)(this.effectiveTime));
|
|
4141
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
4142
|
+
}
|
|
4143
|
+
function SpotPriceCustomJson() {
|
|
4144
|
+
const obj = {
|
|
4145
|
+
type: this.$type,
|
|
4146
|
+
};
|
|
4147
|
+
if (this.skuId !== "")
|
|
4148
|
+
obj.skuId = (0, logging_js_1.inspectJson)(this.skuId);
|
|
4149
|
+
if (this.productTitle !== "")
|
|
4150
|
+
obj.productTitle = (0, logging_js_1.inspectJson)(this.productTitle);
|
|
4151
|
+
if (this.region !== "")
|
|
4152
|
+
obj.region = (0, logging_js_1.inspectJson)(this.region);
|
|
4153
|
+
if (this.computeInstance !== undefined)
|
|
4154
|
+
obj.computeInstance = (0, logging_js_1.inspectJson)(this.computeInstance);
|
|
4155
|
+
if (this.price !== undefined)
|
|
4156
|
+
obj.price = (0, logging_js_1.inspectJson)(this.price);
|
|
4157
|
+
if (this.effectiveTime !== undefined)
|
|
4158
|
+
obj.effectiveTime = (0, logging_js_1.inspectJson)(this.effectiveTime);
|
|
4159
|
+
return obj;
|
|
4160
|
+
}
|
|
4161
|
+
function applySpotPriceCustom(message) {
|
|
4162
|
+
message[logging_js_1.custom] = SpotPriceCustomInspect;
|
|
4163
|
+
message[logging_js_1.customJson] = SpotPriceCustomJson;
|
|
4164
|
+
return (0, index_js_1.attachMessageDescriptor)(message, exports.SpotPrice.$descriptor);
|
|
4165
|
+
}
|
|
4166
|
+
function createBaseSpotPrice() {
|
|
4167
|
+
const message = {
|
|
4168
|
+
$type: "nebius.billing.v1alpha1.SpotPrice",
|
|
4169
|
+
skuId: "",
|
|
4170
|
+
productTitle: "",
|
|
4171
|
+
region: "",
|
|
4172
|
+
computeInstance: undefined,
|
|
4173
|
+
price: undefined,
|
|
4174
|
+
effectiveTime: undefined,
|
|
4175
|
+
};
|
|
4176
|
+
return applySpotPriceCustom(message);
|
|
4177
|
+
}
|
|
4178
|
+
const SpotPriceComputeInstance_MESSAGE_DESCRIPTOR = {
|
|
4179
|
+
type: "nebius.billing.v1alpha1.SpotPriceComputeInstance",
|
|
4180
|
+
create: () => createBaseSpotPriceComputeInstance(),
|
|
4181
|
+
fields: {
|
|
4182
|
+
"platform": { pbName: "platform", jsonName: "platform", scalarType: 9 },
|
|
4183
|
+
},
|
|
4184
|
+
};
|
|
4185
|
+
/** Encodes, decodes, converts, and creates {@link SpotPriceComputeInstance} messages. */
|
|
4186
|
+
exports.SpotPriceComputeInstance = {
|
|
4187
|
+
$type: "nebius.billing.v1alpha1.SpotPriceComputeInstance",
|
|
4188
|
+
$descriptor: SpotPriceComputeInstance_MESSAGE_DESCRIPTOR,
|
|
4189
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
4190
|
+
if (message.platform !== "") {
|
|
4191
|
+
writer.uint32(10).string(message.platform);
|
|
4192
|
+
}
|
|
4193
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
4194
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
4195
|
+
}
|
|
4196
|
+
return writer;
|
|
4197
|
+
},
|
|
4198
|
+
decode(input, length, base) {
|
|
4199
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
4200
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4201
|
+
const message = base ?? createBaseSpotPriceComputeInstance();
|
|
4202
|
+
let writer = undefined;
|
|
4203
|
+
if (message[index_js_1.unknownFieldsSymbol])
|
|
4204
|
+
writer = new index_js_1.BinaryWriter().raw(message[index_js_1.unknownFieldsSymbol]);
|
|
4205
|
+
while (reader.pos < end) {
|
|
4206
|
+
const tag = reader.uint32();
|
|
4207
|
+
switch (tag >>> 3) {
|
|
4208
|
+
case 1: {
|
|
4209
|
+
if (tag !== 10)
|
|
4210
|
+
break;
|
|
4211
|
+
message.platform = reader.string();
|
|
4212
|
+
continue;
|
|
4213
|
+
}
|
|
4214
|
+
default:
|
|
4215
|
+
break;
|
|
4216
|
+
}
|
|
4217
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4218
|
+
break;
|
|
4219
|
+
}
|
|
4220
|
+
{
|
|
4221
|
+
if (!writer)
|
|
4222
|
+
writer = new index_js_1.BinaryWriter();
|
|
4223
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
4224
|
+
writer.uint32(tag).raw(skipped);
|
|
4225
|
+
}
|
|
4226
|
+
}
|
|
4227
|
+
if (writer) {
|
|
4228
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
4229
|
+
}
|
|
4230
|
+
return message;
|
|
4231
|
+
},
|
|
4232
|
+
fromJSON(object) {
|
|
4233
|
+
return applySpotPriceComputeInstanceCustom({
|
|
4234
|
+
$type: "nebius.billing.v1alpha1.SpotPriceComputeInstance",
|
|
4235
|
+
platform: (0, index_js_1.isSet)(object.platform ?? object.platform)
|
|
4236
|
+
? String(object.platform ?? object.platform)
|
|
4237
|
+
: "",
|
|
4238
|
+
});
|
|
4239
|
+
},
|
|
4240
|
+
toJSON(message, use = "json") {
|
|
4241
|
+
const obj = {};
|
|
4242
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
4243
|
+
if (message.platform !== "") {
|
|
4244
|
+
obj[pick("platform", "platform")] = message.platform;
|
|
4245
|
+
}
|
|
4246
|
+
return obj;
|
|
4247
|
+
},
|
|
4248
|
+
create(base) {
|
|
4249
|
+
return exports.SpotPriceComputeInstance.fromPartial(base ?? {});
|
|
4250
|
+
},
|
|
4251
|
+
fromPartial(object) {
|
|
4252
|
+
const message = createBaseSpotPriceComputeInstance();
|
|
4253
|
+
message.platform = (object.platform !== undefined && object.platform !== null)
|
|
4254
|
+
? object.platform
|
|
4255
|
+
: "";
|
|
4256
|
+
for (const ext of protobuf_js_1.protoRegistry.listExtensions("nebius.billing.v1alpha1.SpotPriceComputeInstance"))
|
|
4257
|
+
ext.fromPartial?.(message, object);
|
|
4258
|
+
return message;
|
|
4259
|
+
},
|
|
4260
|
+
};
|
|
4261
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.SpotPriceComputeInstance);
|
|
4262
|
+
function SpotPriceComputeInstanceCustomInspect() {
|
|
4263
|
+
const parts = [];
|
|
4264
|
+
if (this.platform !== "")
|
|
4265
|
+
parts.push("platform" + "=" + (0, util_1.inspect)(this.platform));
|
|
4266
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
4267
|
+
}
|
|
4268
|
+
function SpotPriceComputeInstanceCustomJson() {
|
|
4269
|
+
const obj = {
|
|
4270
|
+
type: this.$type,
|
|
4271
|
+
};
|
|
4272
|
+
if (this.platform !== "")
|
|
4273
|
+
obj.platform = (0, logging_js_1.inspectJson)(this.platform);
|
|
4274
|
+
return obj;
|
|
4275
|
+
}
|
|
4276
|
+
function applySpotPriceComputeInstanceCustom(message) {
|
|
4277
|
+
message[logging_js_1.custom] = SpotPriceComputeInstanceCustomInspect;
|
|
4278
|
+
message[logging_js_1.customJson] = SpotPriceComputeInstanceCustomJson;
|
|
4279
|
+
return (0, index_js_1.attachMessageDescriptor)(message, exports.SpotPriceComputeInstance.$descriptor);
|
|
4280
|
+
}
|
|
4281
|
+
function createBaseSpotPriceComputeInstance() {
|
|
4282
|
+
const message = {
|
|
4283
|
+
$type: "nebius.billing.v1alpha1.SpotPriceComputeInstance",
|
|
4284
|
+
platform: "",
|
|
4285
|
+
};
|
|
4286
|
+
return applySpotPriceComputeInstanceCustom(message);
|
|
4287
|
+
}
|
|
4288
|
+
const SpotPriceValue_MESSAGE_DESCRIPTOR = {
|
|
4289
|
+
type: "nebius.billing.v1alpha1.SpotPriceValue",
|
|
4290
|
+
create: () => createBaseSpotPriceValue(),
|
|
4291
|
+
fields: {
|
|
4292
|
+
"value": { pbName: "value", jsonName: "value", scalarType: 9 },
|
|
4293
|
+
"currency": { pbName: "currency", jsonName: "currency", scalarType: 9 },
|
|
4294
|
+
"unitTitle": { pbName: "unit_title", jsonName: "unitTitle", scalarType: 9 },
|
|
4295
|
+
},
|
|
4296
|
+
};
|
|
4297
|
+
/** Encodes, decodes, converts, and creates {@link SpotPriceValue} messages. */
|
|
4298
|
+
exports.SpotPriceValue = {
|
|
4299
|
+
$type: "nebius.billing.v1alpha1.SpotPriceValue",
|
|
4300
|
+
$descriptor: SpotPriceValue_MESSAGE_DESCRIPTOR,
|
|
4301
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
4302
|
+
if (message.value !== "") {
|
|
4303
|
+
writer.uint32(10).string(message.value);
|
|
4304
|
+
}
|
|
4305
|
+
if (message.currency !== "") {
|
|
4306
|
+
writer.uint32(18).string(message.currency);
|
|
4307
|
+
}
|
|
4308
|
+
if (message.unitTitle !== "") {
|
|
4309
|
+
writer.uint32(26).string(message.unitTitle);
|
|
4310
|
+
}
|
|
4311
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
4312
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
4313
|
+
}
|
|
4314
|
+
return writer;
|
|
4315
|
+
},
|
|
4316
|
+
decode(input, length, base) {
|
|
4317
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
4318
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4319
|
+
const message = base ?? createBaseSpotPriceValue();
|
|
4320
|
+
let writer = undefined;
|
|
4321
|
+
if (message[index_js_1.unknownFieldsSymbol])
|
|
4322
|
+
writer = new index_js_1.BinaryWriter().raw(message[index_js_1.unknownFieldsSymbol]);
|
|
4323
|
+
while (reader.pos < end) {
|
|
4324
|
+
const tag = reader.uint32();
|
|
4325
|
+
switch (tag >>> 3) {
|
|
4326
|
+
case 1: {
|
|
4327
|
+
if (tag !== 10)
|
|
4328
|
+
break;
|
|
4329
|
+
message.value = reader.string();
|
|
4330
|
+
continue;
|
|
4331
|
+
}
|
|
4332
|
+
case 2: {
|
|
4333
|
+
if (tag !== 18)
|
|
4334
|
+
break;
|
|
4335
|
+
message.currency = reader.string();
|
|
4336
|
+
continue;
|
|
4337
|
+
}
|
|
4338
|
+
case 3: {
|
|
4339
|
+
if (tag !== 26)
|
|
4340
|
+
break;
|
|
4341
|
+
message.unitTitle = reader.string();
|
|
4342
|
+
continue;
|
|
4343
|
+
}
|
|
4344
|
+
default:
|
|
4345
|
+
break;
|
|
4346
|
+
}
|
|
4347
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4348
|
+
break;
|
|
4349
|
+
}
|
|
4350
|
+
{
|
|
4351
|
+
if (!writer)
|
|
4352
|
+
writer = new index_js_1.BinaryWriter();
|
|
4353
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
4354
|
+
writer.uint32(tag).raw(skipped);
|
|
4355
|
+
}
|
|
4356
|
+
}
|
|
4357
|
+
if (writer) {
|
|
4358
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
4359
|
+
}
|
|
4360
|
+
return message;
|
|
4361
|
+
},
|
|
4362
|
+
fromJSON(object) {
|
|
4363
|
+
return applySpotPriceValueCustom({
|
|
4364
|
+
$type: "nebius.billing.v1alpha1.SpotPriceValue",
|
|
4365
|
+
value: (0, index_js_1.isSet)(object.value ?? object.value)
|
|
4366
|
+
? String(object.value ?? object.value)
|
|
4367
|
+
: "",
|
|
4368
|
+
currency: (0, index_js_1.isSet)(object.currency ?? object.currency)
|
|
4369
|
+
? String(object.currency ?? object.currency)
|
|
4370
|
+
: "",
|
|
4371
|
+
unitTitle: (0, index_js_1.isSet)(object.unitTitle ?? object.unit_title)
|
|
4372
|
+
? String(object.unitTitle ?? object.unit_title)
|
|
4373
|
+
: "",
|
|
4374
|
+
});
|
|
4375
|
+
},
|
|
4376
|
+
toJSON(message, use = "json") {
|
|
4377
|
+
const obj = {};
|
|
4378
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
4379
|
+
if (message.value !== "") {
|
|
4380
|
+
obj[pick("value", "value")] = message.value;
|
|
4381
|
+
}
|
|
4382
|
+
if (message.currency !== "") {
|
|
4383
|
+
obj[pick("currency", "currency")] = message.currency;
|
|
4384
|
+
}
|
|
4385
|
+
if (message.unitTitle !== "") {
|
|
4386
|
+
obj[pick("unitTitle", "unit_title")] = message.unitTitle;
|
|
4387
|
+
}
|
|
4388
|
+
return obj;
|
|
4389
|
+
},
|
|
4390
|
+
create(base) {
|
|
4391
|
+
return exports.SpotPriceValue.fromPartial(base ?? {});
|
|
4392
|
+
},
|
|
4393
|
+
fromPartial(object) {
|
|
4394
|
+
const message = createBaseSpotPriceValue();
|
|
4395
|
+
message.value = (object.value !== undefined && object.value !== null)
|
|
4396
|
+
? object.value
|
|
4397
|
+
: "";
|
|
4398
|
+
message.currency = (object.currency !== undefined && object.currency !== null)
|
|
4399
|
+
? object.currency
|
|
4400
|
+
: "";
|
|
4401
|
+
message.unitTitle = (object.unitTitle !== undefined && object.unitTitle !== null)
|
|
4402
|
+
? object.unitTitle
|
|
4403
|
+
: "";
|
|
4404
|
+
for (const ext of protobuf_js_1.protoRegistry.listExtensions("nebius.billing.v1alpha1.SpotPriceValue"))
|
|
4405
|
+
ext.fromPartial?.(message, object);
|
|
4406
|
+
return message;
|
|
4407
|
+
},
|
|
4408
|
+
};
|
|
4409
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.SpotPriceValue);
|
|
4410
|
+
function SpotPriceValueCustomInspect() {
|
|
4411
|
+
const parts = [];
|
|
4412
|
+
if (this.value !== "")
|
|
4413
|
+
parts.push("value" + "=" + (0, util_1.inspect)(this.value));
|
|
4414
|
+
if (this.currency !== "")
|
|
4415
|
+
parts.push("currency" + "=" + (0, util_1.inspect)(this.currency));
|
|
4416
|
+
if (this.unitTitle !== "")
|
|
4417
|
+
parts.push("unitTitle" + "=" + (0, util_1.inspect)(this.unitTitle));
|
|
4418
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
4419
|
+
}
|
|
4420
|
+
function SpotPriceValueCustomJson() {
|
|
4421
|
+
const obj = {
|
|
4422
|
+
type: this.$type,
|
|
4423
|
+
};
|
|
4424
|
+
if (this.value !== "")
|
|
4425
|
+
obj.value = (0, logging_js_1.inspectJson)(this.value);
|
|
4426
|
+
if (this.currency !== "")
|
|
4427
|
+
obj.currency = (0, logging_js_1.inspectJson)(this.currency);
|
|
4428
|
+
if (this.unitTitle !== "")
|
|
4429
|
+
obj.unitTitle = (0, logging_js_1.inspectJson)(this.unitTitle);
|
|
4430
|
+
return obj;
|
|
4431
|
+
}
|
|
4432
|
+
function applySpotPriceValueCustom(message) {
|
|
4433
|
+
message[logging_js_1.custom] = SpotPriceValueCustomInspect;
|
|
4434
|
+
message[logging_js_1.customJson] = SpotPriceValueCustomJson;
|
|
4435
|
+
return (0, index_js_1.attachMessageDescriptor)(message, exports.SpotPriceValue.$descriptor);
|
|
4436
|
+
}
|
|
4437
|
+
function createBaseSpotPriceValue() {
|
|
4438
|
+
const message = {
|
|
4439
|
+
$type: "nebius.billing.v1alpha1.SpotPriceValue",
|
|
4440
|
+
value: "",
|
|
4441
|
+
currency: "",
|
|
4442
|
+
unitTitle: "",
|
|
4443
|
+
};
|
|
4444
|
+
return applySpotPriceValueCustom(message);
|
|
4445
|
+
}
|
|
4446
|
+
const SpotPriceSeries_MESSAGE_DESCRIPTOR = {
|
|
4447
|
+
type: "nebius.billing.v1alpha1.SpotPriceSeries",
|
|
4448
|
+
create: () => createBaseSpotPriceSeries(),
|
|
4449
|
+
fields: {
|
|
4450
|
+
"skuId": { pbName: "sku_id", jsonName: "skuId", nid: { "resource": ["sku"], "parentResource": [] }, scalarType: 9 },
|
|
4451
|
+
"productTitle": { pbName: "product_title", jsonName: "productTitle", scalarType: 9 },
|
|
4452
|
+
"region": { pbName: "region", jsonName: "region", scalarType: 9 },
|
|
4453
|
+
"computeInstance": { pbName: "compute_instance", jsonName: "computeInstance", presence: true, message: () => exports.SpotPriceComputeInstance.$descriptor },
|
|
4454
|
+
"currency": { pbName: "currency", jsonName: "currency", scalarType: 9 },
|
|
4455
|
+
"unitTitle": { pbName: "unit_title", jsonName: "unitTitle", scalarType: 9 },
|
|
4456
|
+
"points": { pbName: "points", jsonName: "points", repeated: true, message: () => exports.SpotPricePoint.$descriptor },
|
|
4457
|
+
},
|
|
4458
|
+
};
|
|
4459
|
+
/** Encodes, decodes, converts, and creates {@link SpotPriceSeries} messages. */
|
|
4460
|
+
exports.SpotPriceSeries = {
|
|
4461
|
+
$type: "nebius.billing.v1alpha1.SpotPriceSeries",
|
|
4462
|
+
$descriptor: SpotPriceSeries_MESSAGE_DESCRIPTOR,
|
|
4463
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
4464
|
+
if (message.skuId !== "") {
|
|
4465
|
+
writer.uint32(10).string(message.skuId);
|
|
4466
|
+
}
|
|
4467
|
+
if (message.productTitle !== "") {
|
|
4468
|
+
writer.uint32(18).string(message.productTitle);
|
|
4469
|
+
}
|
|
4470
|
+
if (message.region !== "") {
|
|
4471
|
+
writer.uint32(26).string(message.region);
|
|
4472
|
+
}
|
|
4473
|
+
if (message.computeInstance !== undefined) {
|
|
4474
|
+
const w = writer.uint32(34).fork();
|
|
4475
|
+
exports.SpotPriceComputeInstance.encode(message.computeInstance, w);
|
|
4476
|
+
w.join();
|
|
4477
|
+
}
|
|
4478
|
+
if (message.currency !== "") {
|
|
4479
|
+
writer.uint32(42).string(message.currency);
|
|
4480
|
+
}
|
|
4481
|
+
if (message.unitTitle !== "") {
|
|
4482
|
+
writer.uint32(50).string(message.unitTitle);
|
|
4483
|
+
}
|
|
4484
|
+
for (const v of (message.points ?? [])) {
|
|
4485
|
+
const w = writer.uint32(58).fork();
|
|
4486
|
+
exports.SpotPricePoint.encode(v, w);
|
|
4487
|
+
w.join();
|
|
4488
|
+
}
|
|
4489
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
4490
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
4491
|
+
}
|
|
4492
|
+
return writer;
|
|
4493
|
+
},
|
|
4494
|
+
decode(input, length, base) {
|
|
4495
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
4496
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4497
|
+
const message = base ?? createBaseSpotPriceSeries();
|
|
4498
|
+
let writer = undefined;
|
|
4499
|
+
if (message[index_js_1.unknownFieldsSymbol])
|
|
4500
|
+
writer = new index_js_1.BinaryWriter().raw(message[index_js_1.unknownFieldsSymbol]);
|
|
4501
|
+
while (reader.pos < end) {
|
|
4502
|
+
const tag = reader.uint32();
|
|
4503
|
+
switch (tag >>> 3) {
|
|
4504
|
+
case 1: {
|
|
4505
|
+
if (tag !== 10)
|
|
4506
|
+
break;
|
|
4507
|
+
message.skuId = reader.string();
|
|
4508
|
+
continue;
|
|
4509
|
+
}
|
|
4510
|
+
case 2: {
|
|
4511
|
+
if (tag !== 18)
|
|
4512
|
+
break;
|
|
4513
|
+
message.productTitle = reader.string();
|
|
4514
|
+
continue;
|
|
4515
|
+
}
|
|
4516
|
+
case 3: {
|
|
4517
|
+
if (tag !== 26)
|
|
4518
|
+
break;
|
|
4519
|
+
message.region = reader.string();
|
|
4520
|
+
continue;
|
|
4521
|
+
}
|
|
4522
|
+
case 4: {
|
|
4523
|
+
if (tag !== 34)
|
|
4524
|
+
break;
|
|
4525
|
+
message.computeInstance = exports.SpotPriceComputeInstance.decode(reader, reader.uint32(), message.computeInstance);
|
|
4526
|
+
continue;
|
|
4527
|
+
}
|
|
4528
|
+
case 5: {
|
|
4529
|
+
if (tag !== 42)
|
|
4530
|
+
break;
|
|
4531
|
+
message.currency = reader.string();
|
|
4532
|
+
continue;
|
|
4533
|
+
}
|
|
4534
|
+
case 6: {
|
|
4535
|
+
if (tag !== 50)
|
|
4536
|
+
break;
|
|
4537
|
+
message.unitTitle = reader.string();
|
|
4538
|
+
continue;
|
|
4539
|
+
}
|
|
4540
|
+
case 7: {
|
|
4541
|
+
if (tag !== 58)
|
|
4542
|
+
break;
|
|
4543
|
+
message.points.push(exports.SpotPricePoint.decode(reader, reader.uint32()));
|
|
4544
|
+
continue;
|
|
4545
|
+
}
|
|
4546
|
+
default:
|
|
4547
|
+
break;
|
|
4548
|
+
}
|
|
4549
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4550
|
+
break;
|
|
4551
|
+
}
|
|
4552
|
+
{
|
|
4553
|
+
if (!writer)
|
|
4554
|
+
writer = new index_js_1.BinaryWriter();
|
|
4555
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
4556
|
+
writer.uint32(tag).raw(skipped);
|
|
4557
|
+
}
|
|
4558
|
+
}
|
|
4559
|
+
if (writer) {
|
|
4560
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
4561
|
+
}
|
|
4562
|
+
return message;
|
|
4563
|
+
},
|
|
4564
|
+
fromJSON(object) {
|
|
4565
|
+
return applySpotPriceSeriesCustom({
|
|
4566
|
+
$type: "nebius.billing.v1alpha1.SpotPriceSeries",
|
|
4567
|
+
skuId: (0, index_js_1.isSet)(object.skuId ?? object.sku_id)
|
|
4568
|
+
? String(object.skuId ?? object.sku_id)
|
|
4569
|
+
: "",
|
|
4570
|
+
productTitle: (0, index_js_1.isSet)(object.productTitle ?? object.product_title)
|
|
4571
|
+
? String(object.productTitle ?? object.product_title)
|
|
4572
|
+
: "",
|
|
4573
|
+
region: (0, index_js_1.isSet)(object.region ?? object.region)
|
|
4574
|
+
? String(object.region ?? object.region)
|
|
4575
|
+
: "",
|
|
4576
|
+
computeInstance: (0, index_js_1.isSet)(object.computeInstance ?? object.compute_instance)
|
|
4577
|
+
? exports.SpotPriceComputeInstance.fromJSON(object.computeInstance ?? object.compute_instance)
|
|
4578
|
+
: undefined,
|
|
4579
|
+
currency: (0, index_js_1.isSet)(object.currency ?? object.currency)
|
|
4580
|
+
? String(object.currency ?? object.currency)
|
|
4581
|
+
: "",
|
|
4582
|
+
unitTitle: (0, index_js_1.isSet)(object.unitTitle ?? object.unit_title)
|
|
4583
|
+
? String(object.unitTitle ?? object.unit_title)
|
|
4584
|
+
: "",
|
|
4585
|
+
points: globalThis.Array.isArray(object?.points ?? object?.points)
|
|
4586
|
+
? (object.points ?? object.points).map((e) => exports.SpotPricePoint.fromJSON(e))
|
|
4587
|
+
: [],
|
|
4588
|
+
});
|
|
4589
|
+
},
|
|
4590
|
+
toJSON(message, use = "json") {
|
|
4591
|
+
const obj = {};
|
|
4592
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
4593
|
+
if (message.skuId !== "") {
|
|
4594
|
+
obj[pick("skuId", "sku_id")] = message.skuId;
|
|
4595
|
+
}
|
|
4596
|
+
if (message.productTitle !== "") {
|
|
4597
|
+
obj[pick("productTitle", "product_title")] = message.productTitle;
|
|
4598
|
+
}
|
|
4599
|
+
if (message.region !== "") {
|
|
4600
|
+
obj[pick("region", "region")] = message.region;
|
|
4601
|
+
}
|
|
4602
|
+
if (message.computeInstance !== undefined) {
|
|
4603
|
+
obj[pick("computeInstance", "compute_instance")] = message.computeInstance
|
|
4604
|
+
? exports.SpotPriceComputeInstance.toJSON(message.computeInstance, use)
|
|
4605
|
+
: undefined;
|
|
4606
|
+
}
|
|
4607
|
+
if (message.currency !== "") {
|
|
4608
|
+
obj[pick("currency", "currency")] = message.currency;
|
|
4609
|
+
}
|
|
4610
|
+
if (message.unitTitle !== "") {
|
|
4611
|
+
obj[pick("unitTitle", "unit_title")] = message.unitTitle;
|
|
4612
|
+
}
|
|
4613
|
+
if (message.points?.length) {
|
|
4614
|
+
obj[pick("points", "points")] = message.points.map((e) => e ? exports.SpotPricePoint.toJSON(e, use) : undefined);
|
|
4615
|
+
}
|
|
4616
|
+
return obj;
|
|
4617
|
+
},
|
|
4618
|
+
create(base) {
|
|
4619
|
+
return exports.SpotPriceSeries.fromPartial(base ?? {});
|
|
4620
|
+
},
|
|
4621
|
+
fromPartial(object) {
|
|
4622
|
+
const message = createBaseSpotPriceSeries();
|
|
4623
|
+
message.skuId = (object.skuId !== undefined && object.skuId !== null)
|
|
4624
|
+
? object.skuId
|
|
4625
|
+
: "";
|
|
4626
|
+
message.productTitle = (object.productTitle !== undefined && object.productTitle !== null)
|
|
4627
|
+
? object.productTitle
|
|
4628
|
+
: "";
|
|
4629
|
+
message.region = (object.region !== undefined && object.region !== null)
|
|
4630
|
+
? object.region
|
|
4631
|
+
: "";
|
|
4632
|
+
message.computeInstance = (object.computeInstance !== undefined && object.computeInstance !== null)
|
|
4633
|
+
? exports.SpotPriceComputeInstance.fromPartial(object.computeInstance)
|
|
4634
|
+
: undefined;
|
|
4635
|
+
message.currency = (object.currency !== undefined && object.currency !== null)
|
|
4636
|
+
? object.currency
|
|
4637
|
+
: "";
|
|
4638
|
+
message.unitTitle = (object.unitTitle !== undefined && object.unitTitle !== null)
|
|
4639
|
+
? object.unitTitle
|
|
4640
|
+
: "";
|
|
4641
|
+
message.points = object.points?.map((e) => exports.SpotPricePoint.fromPartial(e)) || [];
|
|
4642
|
+
for (const ext of protobuf_js_1.protoRegistry.listExtensions("nebius.billing.v1alpha1.SpotPriceSeries"))
|
|
4643
|
+
ext.fromPartial?.(message, object);
|
|
4644
|
+
return message;
|
|
4645
|
+
},
|
|
4646
|
+
};
|
|
4647
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.SpotPriceSeries);
|
|
4648
|
+
function SpotPriceSeriesCustomInspect() {
|
|
4649
|
+
const parts = [];
|
|
4650
|
+
if (this.skuId !== "")
|
|
4651
|
+
parts.push("skuId" + "=" + (0, util_1.inspect)(this.skuId));
|
|
4652
|
+
if (this.productTitle !== "")
|
|
4653
|
+
parts.push("productTitle" + "=" + (0, util_1.inspect)(this.productTitle));
|
|
4654
|
+
if (this.region !== "")
|
|
4655
|
+
parts.push("region" + "=" + (0, util_1.inspect)(this.region));
|
|
4656
|
+
if (this.computeInstance !== undefined)
|
|
4657
|
+
parts.push("computeInstance" + "=" + (0, util_1.inspect)(this.computeInstance));
|
|
4658
|
+
if (this.currency !== "")
|
|
4659
|
+
parts.push("currency" + "=" + (0, util_1.inspect)(this.currency));
|
|
4660
|
+
if (this.unitTitle !== "")
|
|
4661
|
+
parts.push("unitTitle" + "=" + (0, util_1.inspect)(this.unitTitle));
|
|
4662
|
+
if ((this.points?.length ?? 0) !== 0)
|
|
4663
|
+
parts.push("points" + "=" + (0, util_1.inspect)(this.points));
|
|
4664
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
4665
|
+
}
|
|
4666
|
+
function SpotPriceSeriesCustomJson() {
|
|
4667
|
+
const obj = {
|
|
4668
|
+
type: this.$type,
|
|
4669
|
+
};
|
|
4670
|
+
if (this.skuId !== "")
|
|
4671
|
+
obj.skuId = (0, logging_js_1.inspectJson)(this.skuId);
|
|
4672
|
+
if (this.productTitle !== "")
|
|
4673
|
+
obj.productTitle = (0, logging_js_1.inspectJson)(this.productTitle);
|
|
4674
|
+
if (this.region !== "")
|
|
4675
|
+
obj.region = (0, logging_js_1.inspectJson)(this.region);
|
|
4676
|
+
if (this.computeInstance !== undefined)
|
|
4677
|
+
obj.computeInstance = (0, logging_js_1.inspectJson)(this.computeInstance);
|
|
4678
|
+
if (this.currency !== "")
|
|
4679
|
+
obj.currency = (0, logging_js_1.inspectJson)(this.currency);
|
|
4680
|
+
if (this.unitTitle !== "")
|
|
4681
|
+
obj.unitTitle = (0, logging_js_1.inspectJson)(this.unitTitle);
|
|
4682
|
+
if ((this.points?.length ?? 0) !== 0)
|
|
4683
|
+
obj.points = (0, logging_js_1.inspectJson)(this.points);
|
|
4684
|
+
return obj;
|
|
4685
|
+
}
|
|
4686
|
+
function applySpotPriceSeriesCustom(message) {
|
|
4687
|
+
message[logging_js_1.custom] = SpotPriceSeriesCustomInspect;
|
|
4688
|
+
message[logging_js_1.customJson] = SpotPriceSeriesCustomJson;
|
|
4689
|
+
return (0, index_js_1.attachMessageDescriptor)(message, exports.SpotPriceSeries.$descriptor);
|
|
4690
|
+
}
|
|
4691
|
+
function createBaseSpotPriceSeries() {
|
|
4692
|
+
const message = {
|
|
4693
|
+
$type: "nebius.billing.v1alpha1.SpotPriceSeries",
|
|
4694
|
+
skuId: "",
|
|
4695
|
+
productTitle: "",
|
|
4696
|
+
region: "",
|
|
4697
|
+
computeInstance: undefined,
|
|
4698
|
+
currency: "",
|
|
4699
|
+
unitTitle: "",
|
|
4700
|
+
points: [],
|
|
4701
|
+
};
|
|
4702
|
+
return applySpotPriceSeriesCustom(message);
|
|
4703
|
+
}
|
|
4704
|
+
const SpotPricePoint_MESSAGE_DESCRIPTOR = {
|
|
4705
|
+
type: "nebius.billing.v1alpha1.SpotPricePoint",
|
|
4706
|
+
create: () => createBaseSpotPricePoint(),
|
|
4707
|
+
fields: {
|
|
4708
|
+
"timestamp": { pbName: "timestamp", jsonName: "timestamp", presence: true, message: () => index_js_1.wkt[".google.protobuf.Timestamp"].$descriptor },
|
|
4709
|
+
"value": { pbName: "value", jsonName: "value", scalarType: 9 },
|
|
4710
|
+
},
|
|
4711
|
+
};
|
|
4712
|
+
/** Encodes, decodes, converts, and creates {@link SpotPricePoint} messages. */
|
|
4713
|
+
exports.SpotPricePoint = {
|
|
4714
|
+
$type: "nebius.billing.v1alpha1.SpotPricePoint",
|
|
4715
|
+
$descriptor: SpotPricePoint_MESSAGE_DESCRIPTOR,
|
|
4716
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
4717
|
+
if (message.timestamp !== undefined) {
|
|
4718
|
+
const w = writer.uint32(10).fork();
|
|
4719
|
+
index_js_1.wkt[".google.protobuf.Timestamp"].writeMessage(w, message.timestamp);
|
|
4720
|
+
w.join();
|
|
4721
|
+
}
|
|
4722
|
+
if (message.value !== "") {
|
|
4723
|
+
writer.uint32(18).string(message.value);
|
|
4724
|
+
}
|
|
4725
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
4726
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
4727
|
+
}
|
|
4728
|
+
return writer;
|
|
4729
|
+
},
|
|
4730
|
+
decode(input, length, base) {
|
|
4731
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
4732
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4733
|
+
const message = base ?? createBaseSpotPricePoint();
|
|
4734
|
+
let writer = undefined;
|
|
4735
|
+
if (message[index_js_1.unknownFieldsSymbol])
|
|
4736
|
+
writer = new index_js_1.BinaryWriter().raw(message[index_js_1.unknownFieldsSymbol]);
|
|
4737
|
+
while (reader.pos < end) {
|
|
4738
|
+
const tag = reader.uint32();
|
|
4739
|
+
switch (tag >>> 3) {
|
|
4740
|
+
case 1: {
|
|
4741
|
+
if (tag !== 10)
|
|
4742
|
+
break;
|
|
4743
|
+
const len = reader.uint32();
|
|
4744
|
+
message.timestamp = index_js_1.wkt[".google.protobuf.Timestamp"].readMessage(reader, len, message.timestamp);
|
|
4745
|
+
continue;
|
|
4746
|
+
}
|
|
4747
|
+
case 2: {
|
|
4748
|
+
if (tag !== 18)
|
|
4749
|
+
break;
|
|
4750
|
+
message.value = reader.string();
|
|
4751
|
+
continue;
|
|
4752
|
+
}
|
|
4753
|
+
default:
|
|
4754
|
+
break;
|
|
4755
|
+
}
|
|
4756
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4757
|
+
break;
|
|
4758
|
+
}
|
|
4759
|
+
{
|
|
4760
|
+
if (!writer)
|
|
4761
|
+
writer = new index_js_1.BinaryWriter();
|
|
4762
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
4763
|
+
writer.uint32(tag).raw(skipped);
|
|
4764
|
+
}
|
|
4765
|
+
}
|
|
4766
|
+
if (writer) {
|
|
4767
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
4768
|
+
}
|
|
4769
|
+
return message;
|
|
4770
|
+
},
|
|
4771
|
+
fromJSON(object) {
|
|
4772
|
+
return applySpotPricePointCustom({
|
|
4773
|
+
$type: "nebius.billing.v1alpha1.SpotPricePoint",
|
|
4774
|
+
timestamp: (0, index_js_1.isSet)(object.timestamp ?? object.timestamp)
|
|
4775
|
+
? index_js_1.wkt[".google.protobuf.Timestamp"].fromJSON(object.timestamp ?? object.timestamp)
|
|
4776
|
+
: undefined,
|
|
4777
|
+
value: (0, index_js_1.isSet)(object.value ?? object.value)
|
|
4778
|
+
? String(object.value ?? object.value)
|
|
4779
|
+
: "",
|
|
4780
|
+
});
|
|
4781
|
+
},
|
|
4782
|
+
toJSON(message, use = "json") {
|
|
4783
|
+
const obj = {};
|
|
4784
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
4785
|
+
if (message.timestamp !== undefined) {
|
|
4786
|
+
obj[pick("timestamp", "timestamp")] = index_js_1.wkt[".google.protobuf.Timestamp"].toJSON(message.timestamp, use);
|
|
4787
|
+
}
|
|
4788
|
+
if (message.value !== "") {
|
|
4789
|
+
obj[pick("value", "value")] = message.value;
|
|
4790
|
+
}
|
|
4791
|
+
return obj;
|
|
4792
|
+
},
|
|
4793
|
+
create(base) {
|
|
4794
|
+
return exports.SpotPricePoint.fromPartial(base ?? {});
|
|
4795
|
+
},
|
|
4796
|
+
fromPartial(object) {
|
|
4797
|
+
const message = createBaseSpotPricePoint();
|
|
4798
|
+
message.timestamp = (object.timestamp !== undefined && object.timestamp !== null)
|
|
4799
|
+
? index_js_1.wkt[".google.protobuf.Timestamp"].fromPartial(object.timestamp)
|
|
4800
|
+
: undefined;
|
|
4801
|
+
message.value = (object.value !== undefined && object.value !== null)
|
|
4802
|
+
? object.value
|
|
4803
|
+
: "";
|
|
4804
|
+
for (const ext of protobuf_js_1.protoRegistry.listExtensions("nebius.billing.v1alpha1.SpotPricePoint"))
|
|
4805
|
+
ext.fromPartial?.(message, object);
|
|
4806
|
+
return message;
|
|
4807
|
+
},
|
|
4808
|
+
};
|
|
4809
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.SpotPricePoint);
|
|
4810
|
+
function SpotPricePointCustomInspect() {
|
|
4811
|
+
const parts = [];
|
|
4812
|
+
if (this.timestamp !== undefined)
|
|
4813
|
+
parts.push("timestamp" + "=" + (0, util_1.inspect)(this.timestamp));
|
|
4814
|
+
if (this.value !== "")
|
|
4815
|
+
parts.push("value" + "=" + (0, util_1.inspect)(this.value));
|
|
4816
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
4817
|
+
}
|
|
4818
|
+
function SpotPricePointCustomJson() {
|
|
4819
|
+
const obj = {
|
|
4820
|
+
type: this.$type,
|
|
4821
|
+
};
|
|
4822
|
+
if (this.timestamp !== undefined)
|
|
4823
|
+
obj.timestamp = (0, logging_js_1.inspectJson)(this.timestamp);
|
|
4824
|
+
if (this.value !== "")
|
|
4825
|
+
obj.value = (0, logging_js_1.inspectJson)(this.value);
|
|
4826
|
+
return obj;
|
|
4827
|
+
}
|
|
4828
|
+
function applySpotPricePointCustom(message) {
|
|
4829
|
+
message[logging_js_1.custom] = SpotPricePointCustomInspect;
|
|
4830
|
+
message[logging_js_1.customJson] = SpotPricePointCustomJson;
|
|
4831
|
+
return (0, index_js_1.attachMessageDescriptor)(message, exports.SpotPricePoint.$descriptor);
|
|
4832
|
+
}
|
|
4833
|
+
function createBaseSpotPricePoint() {
|
|
4834
|
+
const message = {
|
|
4835
|
+
$type: "nebius.billing.v1alpha1.SpotPricePoint",
|
|
4836
|
+
timestamp: undefined,
|
|
4837
|
+
value: "",
|
|
4838
|
+
};
|
|
4839
|
+
return applySpotPricePointCustom(message);
|
|
4840
|
+
}
|
|
2852
4841
|
//# sourceMappingURL=index.js.map
|