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