@gpuai/sdk 0.3.13 → 0.3.15
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/.openapi-generator/FILES +28 -0
- package/README.md +34 -9
- package/dist/apis/AutolaunchApi.d.ts +109 -0
- package/dist/apis/AutolaunchApi.js +286 -0
- package/dist/apis/BillingApi.d.ts +15 -0
- package/dist/apis/BillingApi.js +45 -0
- package/dist/apis/MarketApi.d.ts +56 -0
- package/dist/apis/MarketApi.js +112 -0
- package/dist/apis/WatchApi.d.ts +109 -0
- package/dist/apis/WatchApi.js +286 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/AutolaunchApi.d.ts +109 -0
- package/dist/esm/apis/AutolaunchApi.js +282 -0
- package/dist/esm/apis/BillingApi.d.ts +15 -0
- package/dist/esm/apis/BillingApi.js +45 -0
- package/dist/esm/apis/MarketApi.d.ts +56 -0
- package/dist/esm/apis/MarketApi.js +108 -0
- package/dist/esm/apis/WatchApi.d.ts +109 -0
- package/dist/esm/apis/WatchApi.js +282 -0
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/AutolaunchRule.d.ts +181 -0
- package/dist/esm/models/AutolaunchRule.js +142 -0
- package/dist/esm/models/AutolaunchRuleCreate.d.ts +105 -0
- package/dist/esm/models/AutolaunchRuleCreate.js +84 -0
- package/dist/esm/models/AutolaunchRuleDisarm.d.ts +34 -0
- package/dist/esm/models/AutolaunchRuleDisarm.js +43 -0
- package/dist/esm/models/AutolaunchRulePage.d.ts +39 -0
- package/dist/esm/models/AutolaunchRulePage.js +48 -0
- package/dist/esm/models/Balance.d.ts +65 -0
- package/dist/esm/models/Balance.js +63 -0
- package/dist/esm/models/MarketHistoryPoint.d.ts +59 -0
- package/dist/esm/models/MarketHistoryPoint.js +55 -0
- package/dist/esm/models/MarketHistoryResponse.d.ts +60 -0
- package/dist/esm/models/MarketHistoryResponse.js +60 -0
- package/dist/esm/models/Problem.d.ts +1 -0
- package/dist/esm/models/Problem.js +1 -0
- package/dist/esm/models/WatchRule.d.ts +141 -0
- package/dist/esm/models/WatchRule.js +117 -0
- package/dist/esm/models/WatchRuleCreate.d.ts +87 -0
- package/dist/esm/models/WatchRuleCreate.js +72 -0
- package/dist/esm/models/WatchRulePage.d.ts +39 -0
- package/dist/esm/models/WatchRulePage.js +48 -0
- package/dist/esm/models/WatchRuleUpdate.d.ts +86 -0
- package/dist/esm/models/WatchRuleUpdate.js +68 -0
- package/dist/esm/models/index.d.ts +11 -0
- package/dist/esm/models/index.js +11 -0
- package/dist/models/AutolaunchRule.d.ts +181 -0
- package/dist/models/AutolaunchRule.js +150 -0
- package/dist/models/AutolaunchRuleCreate.d.ts +105 -0
- package/dist/models/AutolaunchRuleCreate.js +92 -0
- package/dist/models/AutolaunchRuleDisarm.d.ts +34 -0
- package/dist/models/AutolaunchRuleDisarm.js +50 -0
- package/dist/models/AutolaunchRulePage.d.ts +39 -0
- package/dist/models/AutolaunchRulePage.js +55 -0
- package/dist/models/Balance.d.ts +65 -0
- package/dist/models/Balance.js +70 -0
- package/dist/models/MarketHistoryPoint.d.ts +59 -0
- package/dist/models/MarketHistoryPoint.js +62 -0
- package/dist/models/MarketHistoryResponse.d.ts +60 -0
- package/dist/models/MarketHistoryResponse.js +67 -0
- package/dist/models/Problem.d.ts +1 -0
- package/dist/models/Problem.js +1 -0
- package/dist/models/WatchRule.d.ts +141 -0
- package/dist/models/WatchRule.js +125 -0
- package/dist/models/WatchRuleCreate.d.ts +87 -0
- package/dist/models/WatchRuleCreate.js +80 -0
- package/dist/models/WatchRulePage.d.ts +39 -0
- package/dist/models/WatchRulePage.js +55 -0
- package/dist/models/WatchRuleUpdate.d.ts +86 -0
- package/dist/models/WatchRuleUpdate.js +76 -0
- package/dist/models/index.d.ts +11 -0
- package/dist/models/index.js +11 -0
- package/docs/AutolaunchApi.md +390 -0
- package/docs/AutolaunchRule.md +69 -0
- package/docs/AutolaunchRuleCreate.md +50 -0
- package/docs/AutolaunchRuleDisarm.md +35 -0
- package/docs/AutolaunchRulePage.md +36 -0
- package/docs/Balance.md +45 -0
- package/docs/BillingApi.md +66 -0
- package/docs/MarketApi.md +98 -0
- package/docs/MarketHistoryPoint.md +43 -0
- package/docs/MarketHistoryResponse.md +43 -0
- package/docs/WatchApi.md +389 -0
- package/docs/WatchRule.md +61 -0
- package/docs/WatchRuleCreate.md +46 -0
- package/docs/WatchRulePage.md +36 -0
- package/docs/WatchRuleUpdate.md +47 -0
- package/package.json +1 -1
- package/src/apis/AutolaunchApi.ts +360 -0
- package/src/apis/BillingApi.ts +52 -0
- package/src/apis/MarketApi.ts +136 -0
- package/src/apis/WatchApi.ts +360 -0
- package/src/apis/index.ts +3 -0
- package/src/models/AutolaunchRule.ts +270 -0
- package/src/models/AutolaunchRuleCreate.ts +162 -0
- package/src/models/AutolaunchRuleDisarm.ts +68 -0
- package/src/models/AutolaunchRulePage.ts +83 -0
- package/src/models/Balance.ts +114 -0
- package/src/models/MarketHistoryPoint.ts +103 -0
- package/src/models/MarketHistoryResponse.ts +113 -0
- package/src/models/Problem.ts +1 -0
- package/src/models/WatchRule.ts +219 -0
- package/src/models/WatchRuleCreate.ts +138 -0
- package/src/models/WatchRulePage.ts +83 -0
- package/src/models/WatchRuleUpdate.ts +135 -0
- package/src/models/index.ts +11 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.AutolaunchRuleCreatedBySurfaceEnum = exports.AutolaunchRuleStateEnum = exports.AutolaunchRuleConditionKindEnum = exports.AutolaunchRuleCapacityClassEnum = void 0;
|
|
17
|
+
exports.instanceOfAutolaunchRule = instanceOfAutolaunchRule;
|
|
18
|
+
exports.AutolaunchRuleFromJSON = AutolaunchRuleFromJSON;
|
|
19
|
+
exports.AutolaunchRuleFromJSONTyped = AutolaunchRuleFromJSONTyped;
|
|
20
|
+
exports.AutolaunchRuleToJSON = AutolaunchRuleToJSON;
|
|
21
|
+
exports.AutolaunchRuleToJSONTyped = AutolaunchRuleToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.AutolaunchRuleCapacityClassEnum = {
|
|
26
|
+
Secure: 'secure',
|
|
27
|
+
Community: 'community'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* @export
|
|
31
|
+
*/
|
|
32
|
+
exports.AutolaunchRuleConditionKindEnum = {
|
|
33
|
+
PriceUnder: 'price_under',
|
|
34
|
+
InStock: 'in_stock',
|
|
35
|
+
CountAtLeast: 'count_at_least'
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
exports.AutolaunchRuleStateEnum = {
|
|
41
|
+
Armed: 'armed',
|
|
42
|
+
Launching: 'launching',
|
|
43
|
+
Fired: 'fired',
|
|
44
|
+
Expired: 'expired'
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* @export
|
|
48
|
+
*/
|
|
49
|
+
exports.AutolaunchRuleCreatedBySurfaceEnum = {
|
|
50
|
+
ApiKey: 'api_key',
|
|
51
|
+
Dashboard: 'dashboard'
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Check if a given object implements the AutolaunchRule interface.
|
|
55
|
+
*/
|
|
56
|
+
function instanceOfAutolaunchRule(value) {
|
|
57
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
58
|
+
return false;
|
|
59
|
+
if ((!('gpuModel' in value) && !('gpu_model' in value)) || (value['gpuModel'] === undefined && value['gpu_model'] === undefined))
|
|
60
|
+
return false;
|
|
61
|
+
if (!('region' in value) || value['region'] === undefined)
|
|
62
|
+
return false;
|
|
63
|
+
if ((!('capacityClass' in value) && !('capacity_class' in value)) || (value['capacityClass'] === undefined && value['capacity_class'] === undefined))
|
|
64
|
+
return false;
|
|
65
|
+
if ((!('conditionKind' in value) && !('condition_kind' in value)) || (value['conditionKind'] === undefined && value['condition_kind'] === undefined))
|
|
66
|
+
return false;
|
|
67
|
+
if (!('threshold' in value) || value['threshold'] === undefined)
|
|
68
|
+
return false;
|
|
69
|
+
if ((!('maxPricePerHour' in value) && !('max_price_per_hour' in value)) || (value['maxPricePerHour'] === undefined && value['max_price_per_hour'] === undefined))
|
|
70
|
+
return false;
|
|
71
|
+
if ((!('maxRuntimeHours' in value) && !('max_runtime_hours' in value)) || (value['maxRuntimeHours'] === undefined && value['max_runtime_hours'] === undefined))
|
|
72
|
+
return false;
|
|
73
|
+
if ((!('maxTotalUsd' in value) && !('max_total_usd' in value)) || (value['maxTotalUsd'] === undefined && value['max_total_usd'] === undefined))
|
|
74
|
+
return false;
|
|
75
|
+
if (!('spec' in value) || value['spec'] === undefined)
|
|
76
|
+
return false;
|
|
77
|
+
if (!('state' in value) || value['state'] === undefined)
|
|
78
|
+
return false;
|
|
79
|
+
if ((!('attemptsThisEdge' in value) && !('attempts_this_edge' in value)) || (value['attemptsThisEdge'] === undefined && value['attempts_this_edge'] === undefined))
|
|
80
|
+
return false;
|
|
81
|
+
if ((!('lastFailureReason' in value) && !('last_failure_reason' in value)) || (value['lastFailureReason'] === undefined && value['last_failure_reason'] === undefined))
|
|
82
|
+
return false;
|
|
83
|
+
if ((!('launchedInstanceId' in value) && !('launched_instance_id' in value)) || (value['launchedInstanceId'] === undefined && value['launched_instance_id'] === undefined))
|
|
84
|
+
return false;
|
|
85
|
+
if ((!('createdBySurface' in value) && !('created_by_surface' in value)) || (value['createdBySurface'] === undefined && value['created_by_surface'] === undefined))
|
|
86
|
+
return false;
|
|
87
|
+
if (!('enabled' in value) || value['enabled'] === undefined)
|
|
88
|
+
return false;
|
|
89
|
+
if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
|
|
90
|
+
return false;
|
|
91
|
+
if ((!('updatedAt' in value) && !('updated_at' in value)) || (value['updatedAt'] === undefined && value['updated_at'] === undefined))
|
|
92
|
+
return false;
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
function AutolaunchRuleFromJSON(json) {
|
|
96
|
+
return AutolaunchRuleFromJSONTyped(json, false);
|
|
97
|
+
}
|
|
98
|
+
function AutolaunchRuleFromJSONTyped(json, ignoreDiscriminator) {
|
|
99
|
+
if (json == null) {
|
|
100
|
+
return json;
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
'id': json['id'],
|
|
104
|
+
'gpuModel': json['gpu_model'],
|
|
105
|
+
'region': json['region'],
|
|
106
|
+
'capacityClass': json['capacity_class'],
|
|
107
|
+
'conditionKind': json['condition_kind'],
|
|
108
|
+
'threshold': json['threshold'],
|
|
109
|
+
'maxPricePerHour': json['max_price_per_hour'],
|
|
110
|
+
'maxRuntimeHours': json['max_runtime_hours'],
|
|
111
|
+
'maxTotalUsd': json['max_total_usd'],
|
|
112
|
+
'spec': json['spec'],
|
|
113
|
+
'state': json['state'],
|
|
114
|
+
'attemptsThisEdge': json['attempts_this_edge'],
|
|
115
|
+
'lastFailureReason': json['last_failure_reason'],
|
|
116
|
+
'launchedInstanceId': json['launched_instance_id'],
|
|
117
|
+
'createdBySurface': json['created_by_surface'],
|
|
118
|
+
'enabled': json['enabled'],
|
|
119
|
+
'createdAt': (new Date(json['created_at'])),
|
|
120
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function AutolaunchRuleToJSON(json) {
|
|
124
|
+
return AutolaunchRuleToJSONTyped(json, false);
|
|
125
|
+
}
|
|
126
|
+
function AutolaunchRuleToJSONTyped(value, ignoreDiscriminator = false) {
|
|
127
|
+
if (value == null) {
|
|
128
|
+
return value;
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
'id': value['id'],
|
|
132
|
+
'gpu_model': value['gpuModel'],
|
|
133
|
+
'region': value['region'],
|
|
134
|
+
'capacity_class': value['capacityClass'],
|
|
135
|
+
'condition_kind': value['conditionKind'],
|
|
136
|
+
'threshold': value['threshold'],
|
|
137
|
+
'max_price_per_hour': value['maxPricePerHour'],
|
|
138
|
+
'max_runtime_hours': value['maxRuntimeHours'],
|
|
139
|
+
'max_total_usd': value['maxTotalUsd'],
|
|
140
|
+
'spec': value['spec'],
|
|
141
|
+
'state': value['state'],
|
|
142
|
+
'attempts_this_edge': value['attemptsThisEdge'],
|
|
143
|
+
'last_failure_reason': value['lastFailureReason'],
|
|
144
|
+
'launched_instance_id': value['launchedInstanceId'],
|
|
145
|
+
'created_by_surface': value['createdBySurface'],
|
|
146
|
+
'enabled': value['enabled'],
|
|
147
|
+
'created_at': value['createdAt'].toISOString(),
|
|
148
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AutolaunchRuleCreate
|
|
16
|
+
*/
|
|
17
|
+
export interface AutolaunchRuleCreate {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AutolaunchRuleCreate
|
|
22
|
+
*/
|
|
23
|
+
gpuModel: string;
|
|
24
|
+
/**
|
|
25
|
+
* Omit or send null to consider every region.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof AutolaunchRuleCreate
|
|
28
|
+
*/
|
|
29
|
+
region?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Omit or send null to consider both capacity classes.
|
|
32
|
+
* @type {AutolaunchRuleCreateCapacityClassEnum}
|
|
33
|
+
* @memberof AutolaunchRuleCreate
|
|
34
|
+
*/
|
|
35
|
+
capacityClass?: AutolaunchRuleCreateCapacityClassEnum | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {AutolaunchRuleCreateConditionKindEnum}
|
|
39
|
+
* @memberof AutolaunchRuleCreate
|
|
40
|
+
*/
|
|
41
|
+
conditionKind: AutolaunchRuleCreateConditionKindEnum;
|
|
42
|
+
/**
|
|
43
|
+
* The TRIGGER, in dollars PER GPU-HOUR for price_under or a unit count for count_at_least. Required and greater than zero for both. Ignored for in_stock. Not the spend cap. Values above the maximum are refused with a 422 naming the bound — it is the largest value the column stores.
|
|
44
|
+
*
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof AutolaunchRuleCreate
|
|
47
|
+
*/
|
|
48
|
+
threshold?: number | null;
|
|
49
|
+
/**
|
|
50
|
+
* The CEILING, in dollars per hour for the WHOLE INSTANCE. Required even for in_stock rules: "buy it when it comes back" with no ceiling is an unbounded authorization, and this resource has no such shape. Values above the maximum are refused with a 422 naming the bound.
|
|
51
|
+
*
|
|
52
|
+
* @type {number}
|
|
53
|
+
* @memberof AutolaunchRuleCreate
|
|
54
|
+
*/
|
|
55
|
+
maxPricePerHour: number;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {number}
|
|
59
|
+
* @memberof AutolaunchRuleCreate
|
|
60
|
+
*/
|
|
61
|
+
maxRuntimeHours: number;
|
|
62
|
+
/**
|
|
63
|
+
* The full create-instance body this rule freezes and replays — the same shape POST /v1/instances accepts. It is modelled as an open object rather than a $ref because the instance-create body is an inline requestBody schema rather than a named component; promoting it would rewrite the instances operation and every generated client's signature for it, in a change that only needs to STORE one.
|
|
64
|
+
*
|
|
65
|
+
* Two fields behave differently here than on a live create: `offering_id` is REJECTED (a pinned offering produces a rule that can never fire, because offering identity churns between catalog polls), and `auto_terminate_hours` is OVERWRITTEN from the rule's `max_runtime_hours` so a nested field cannot widen the runtime bound the customer approved.
|
|
66
|
+
*
|
|
67
|
+
* @type {{ [key: string]: any; }}
|
|
68
|
+
* @memberof AutolaunchRuleCreate
|
|
69
|
+
*/
|
|
70
|
+
spec: {
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* REQUIRED. Echo of the worst-case total, max_price_per_hour × max_runtime_hours, accepted within one cent. This is the consent gate: a caller that never computed this number cannot have shown it to the person approving the rule, and a caller that displayed a different number disagrees with what is about to be stored. Either way the request is refused so the caller can re-render the real figure.
|
|
75
|
+
*
|
|
76
|
+
* @type {number}
|
|
77
|
+
* @memberof AutolaunchRuleCreate
|
|
78
|
+
*/
|
|
79
|
+
acknowledgedMaxTotalUsd: number;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* @export
|
|
83
|
+
*/
|
|
84
|
+
export declare const AutolaunchRuleCreateCapacityClassEnum: {
|
|
85
|
+
readonly Secure: "secure";
|
|
86
|
+
readonly Community: "community";
|
|
87
|
+
};
|
|
88
|
+
export type AutolaunchRuleCreateCapacityClassEnum = typeof AutolaunchRuleCreateCapacityClassEnum[keyof typeof AutolaunchRuleCreateCapacityClassEnum];
|
|
89
|
+
/**
|
|
90
|
+
* @export
|
|
91
|
+
*/
|
|
92
|
+
export declare const AutolaunchRuleCreateConditionKindEnum: {
|
|
93
|
+
readonly PriceUnder: "price_under";
|
|
94
|
+
readonly InStock: "in_stock";
|
|
95
|
+
readonly CountAtLeast: "count_at_least";
|
|
96
|
+
};
|
|
97
|
+
export type AutolaunchRuleCreateConditionKindEnum = typeof AutolaunchRuleCreateConditionKindEnum[keyof typeof AutolaunchRuleCreateConditionKindEnum];
|
|
98
|
+
/**
|
|
99
|
+
* Check if a given object implements the AutolaunchRuleCreate interface.
|
|
100
|
+
*/
|
|
101
|
+
export declare function instanceOfAutolaunchRuleCreate(value: object): value is AutolaunchRuleCreate;
|
|
102
|
+
export declare function AutolaunchRuleCreateFromJSON(json: any): AutolaunchRuleCreate;
|
|
103
|
+
export declare function AutolaunchRuleCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutolaunchRuleCreate;
|
|
104
|
+
export declare function AutolaunchRuleCreateToJSON(json: any): AutolaunchRuleCreate;
|
|
105
|
+
export declare function AutolaunchRuleCreateToJSONTyped(value?: AutolaunchRuleCreate | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.AutolaunchRuleCreateConditionKindEnum = exports.AutolaunchRuleCreateCapacityClassEnum = void 0;
|
|
17
|
+
exports.instanceOfAutolaunchRuleCreate = instanceOfAutolaunchRuleCreate;
|
|
18
|
+
exports.AutolaunchRuleCreateFromJSON = AutolaunchRuleCreateFromJSON;
|
|
19
|
+
exports.AutolaunchRuleCreateFromJSONTyped = AutolaunchRuleCreateFromJSONTyped;
|
|
20
|
+
exports.AutolaunchRuleCreateToJSON = AutolaunchRuleCreateToJSON;
|
|
21
|
+
exports.AutolaunchRuleCreateToJSONTyped = AutolaunchRuleCreateToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.AutolaunchRuleCreateCapacityClassEnum = {
|
|
26
|
+
Secure: 'secure',
|
|
27
|
+
Community: 'community'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* @export
|
|
31
|
+
*/
|
|
32
|
+
exports.AutolaunchRuleCreateConditionKindEnum = {
|
|
33
|
+
PriceUnder: 'price_under',
|
|
34
|
+
InStock: 'in_stock',
|
|
35
|
+
CountAtLeast: 'count_at_least'
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the AutolaunchRuleCreate interface.
|
|
39
|
+
*/
|
|
40
|
+
function instanceOfAutolaunchRuleCreate(value) {
|
|
41
|
+
if ((!('gpuModel' in value) && !('gpu_model' in value)) || (value['gpuModel'] === undefined && value['gpu_model'] === undefined))
|
|
42
|
+
return false;
|
|
43
|
+
if ((!('conditionKind' in value) && !('condition_kind' in value)) || (value['conditionKind'] === undefined && value['condition_kind'] === undefined))
|
|
44
|
+
return false;
|
|
45
|
+
if ((!('maxPricePerHour' in value) && !('max_price_per_hour' in value)) || (value['maxPricePerHour'] === undefined && value['max_price_per_hour'] === undefined))
|
|
46
|
+
return false;
|
|
47
|
+
if ((!('maxRuntimeHours' in value) && !('max_runtime_hours' in value)) || (value['maxRuntimeHours'] === undefined && value['max_runtime_hours'] === undefined))
|
|
48
|
+
return false;
|
|
49
|
+
if (!('spec' in value) || value['spec'] === undefined)
|
|
50
|
+
return false;
|
|
51
|
+
if ((!('acknowledgedMaxTotalUsd' in value) && !('acknowledged_max_total_usd' in value)) || (value['acknowledgedMaxTotalUsd'] === undefined && value['acknowledged_max_total_usd'] === undefined))
|
|
52
|
+
return false;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
function AutolaunchRuleCreateFromJSON(json) {
|
|
56
|
+
return AutolaunchRuleCreateFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function AutolaunchRuleCreateFromJSONTyped(json, ignoreDiscriminator) {
|
|
59
|
+
if (json == null) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'gpuModel': json['gpu_model'],
|
|
64
|
+
'region': json['region'] === undefined ? undefined : json['region'] === null ? null : json['region'],
|
|
65
|
+
'capacityClass': json['capacity_class'] === undefined ? undefined : json['capacity_class'] === null ? null : json['capacity_class'],
|
|
66
|
+
'conditionKind': json['condition_kind'],
|
|
67
|
+
'threshold': json['threshold'] === undefined ? undefined : json['threshold'] === null ? null : json['threshold'],
|
|
68
|
+
'maxPricePerHour': json['max_price_per_hour'],
|
|
69
|
+
'maxRuntimeHours': json['max_runtime_hours'],
|
|
70
|
+
'spec': json['spec'],
|
|
71
|
+
'acknowledgedMaxTotalUsd': json['acknowledged_max_total_usd'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function AutolaunchRuleCreateToJSON(json) {
|
|
75
|
+
return AutolaunchRuleCreateToJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
function AutolaunchRuleCreateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
'gpu_model': value['gpuModel'],
|
|
83
|
+
'region': value['region'],
|
|
84
|
+
'capacity_class': value['capacityClass'],
|
|
85
|
+
'condition_kind': value['conditionKind'],
|
|
86
|
+
'threshold': value['threshold'],
|
|
87
|
+
'max_price_per_hour': value['maxPricePerHour'],
|
|
88
|
+
'max_runtime_hours': value['maxRuntimeHours'],
|
|
89
|
+
'spec': value['spec'],
|
|
90
|
+
'acknowledged_max_total_usd': value['acknowledgedMaxTotalUsd'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The entire PATCH surface. `enabled` must be present and must be false. Any other key is refused rather than accepted-and-ignored, because a PATCH carrying a new ceiling that returned 200 would leave the caller believing the cap had moved.
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AutolaunchRuleDisarm
|
|
17
|
+
*/
|
|
18
|
+
export interface AutolaunchRuleDisarm {
|
|
19
|
+
/**
|
|
20
|
+
* Must be false. Sending true is refused: a fired rule consumed its one shot, so "resume" would silently be an authorization nobody gave, and arming again is a create.
|
|
21
|
+
*
|
|
22
|
+
* @type {boolean}
|
|
23
|
+
* @memberof AutolaunchRuleDisarm
|
|
24
|
+
*/
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Check if a given object implements the AutolaunchRuleDisarm interface.
|
|
29
|
+
*/
|
|
30
|
+
export declare function instanceOfAutolaunchRuleDisarm(value: object): value is AutolaunchRuleDisarm;
|
|
31
|
+
export declare function AutolaunchRuleDisarmFromJSON(json: any): AutolaunchRuleDisarm;
|
|
32
|
+
export declare function AutolaunchRuleDisarmFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutolaunchRuleDisarm;
|
|
33
|
+
export declare function AutolaunchRuleDisarmToJSON(json: any): AutolaunchRuleDisarm;
|
|
34
|
+
export declare function AutolaunchRuleDisarmToJSONTyped(value?: AutolaunchRuleDisarm | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfAutolaunchRuleDisarm = instanceOfAutolaunchRuleDisarm;
|
|
17
|
+
exports.AutolaunchRuleDisarmFromJSON = AutolaunchRuleDisarmFromJSON;
|
|
18
|
+
exports.AutolaunchRuleDisarmFromJSONTyped = AutolaunchRuleDisarmFromJSONTyped;
|
|
19
|
+
exports.AutolaunchRuleDisarmToJSON = AutolaunchRuleDisarmToJSON;
|
|
20
|
+
exports.AutolaunchRuleDisarmToJSONTyped = AutolaunchRuleDisarmToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the AutolaunchRuleDisarm interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfAutolaunchRuleDisarm(value) {
|
|
25
|
+
if (!('enabled' in value) || value['enabled'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function AutolaunchRuleDisarmFromJSON(json) {
|
|
30
|
+
return AutolaunchRuleDisarmFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function AutolaunchRuleDisarmFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'enabled': json['enabled'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function AutolaunchRuleDisarmToJSON(json) {
|
|
41
|
+
return AutolaunchRuleDisarmToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function AutolaunchRuleDisarmToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'enabled': value['enabled'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { AutolaunchRule } from './AutolaunchRule';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AutolaunchRulePage
|
|
17
|
+
*/
|
|
18
|
+
export interface AutolaunchRulePage {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<AutolaunchRule>}
|
|
22
|
+
* @memberof AutolaunchRulePage
|
|
23
|
+
*/
|
|
24
|
+
data: Array<AutolaunchRule>;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof AutolaunchRulePage
|
|
29
|
+
*/
|
|
30
|
+
nextCursor: string | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the AutolaunchRulePage interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfAutolaunchRulePage(value: object): value is AutolaunchRulePage;
|
|
36
|
+
export declare function AutolaunchRulePageFromJSON(json: any): AutolaunchRulePage;
|
|
37
|
+
export declare function AutolaunchRulePageFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutolaunchRulePage;
|
|
38
|
+
export declare function AutolaunchRulePageToJSON(json: any): AutolaunchRulePage;
|
|
39
|
+
export declare function AutolaunchRulePageToJSONTyped(value?: AutolaunchRulePage | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfAutolaunchRulePage = instanceOfAutolaunchRulePage;
|
|
17
|
+
exports.AutolaunchRulePageFromJSON = AutolaunchRulePageFromJSON;
|
|
18
|
+
exports.AutolaunchRulePageFromJSONTyped = AutolaunchRulePageFromJSONTyped;
|
|
19
|
+
exports.AutolaunchRulePageToJSON = AutolaunchRulePageToJSON;
|
|
20
|
+
exports.AutolaunchRulePageToJSONTyped = AutolaunchRulePageToJSONTyped;
|
|
21
|
+
const AutolaunchRule_1 = require("./AutolaunchRule");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the AutolaunchRulePage interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfAutolaunchRulePage(value) {
|
|
26
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if ((!('nextCursor' in value) && !('next_cursor' in value)) || (value['nextCursor'] === undefined && value['next_cursor'] === undefined))
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
function AutolaunchRulePageFromJSON(json) {
|
|
33
|
+
return AutolaunchRulePageFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
function AutolaunchRulePageFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'data': (json['data'].map(AutolaunchRule_1.AutolaunchRuleFromJSON)),
|
|
41
|
+
'nextCursor': json['next_cursor'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function AutolaunchRulePageToJSON(json) {
|
|
45
|
+
return AutolaunchRulePageToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function AutolaunchRulePageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'data': (value['data'].map(AutolaunchRule_1.AutolaunchRuleToJSON)),
|
|
53
|
+
'next_cursor': value['nextCursor'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The organization's credit balance with its auto-pay configuration and live burn rate. Mirrors the dashboard's balance contract field for field. No payment-instrument detail appears here — saved cards live behind separate admin-only routes.
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface Balance
|
|
17
|
+
*/
|
|
18
|
+
export interface Balance {
|
|
19
|
+
/**
|
|
20
|
+
* Remaining credit in USD cents. May be negative when usage has outrun the balance.
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof Balance
|
|
23
|
+
*/
|
|
24
|
+
balanceCents: number;
|
|
25
|
+
/**
|
|
26
|
+
* The same figure in dollars, for display.
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof Balance
|
|
29
|
+
*/
|
|
30
|
+
balanceDollars: number;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {boolean}
|
|
34
|
+
* @memberof Balance
|
|
35
|
+
*/
|
|
36
|
+
autoPayEnabled: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Auto-pay triggers when the balance falls below this. Meaningful only when auto_pay_enabled.
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof Balance
|
|
41
|
+
*/
|
|
42
|
+
autoPayThresholdCents: number;
|
|
43
|
+
/**
|
|
44
|
+
* Amount auto-pay charges when it triggers. Meaningful only when auto_pay_enabled.
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof Balance
|
|
47
|
+
*/
|
|
48
|
+
autoPayAmountCents: number;
|
|
49
|
+
/**
|
|
50
|
+
* Live burn rate in USD cents per hour: the committed hourly price of every instance that is live, counted from launch — so instances still creating, provisioning or booting are included, not only those that have reached running. 0 when nothing is live.
|
|
51
|
+
*
|
|
52
|
+
* `null` means the burn rate could not be determined. Treat that as unknown, never as 0: reading an unavailable burn rate as "nothing running" reports unbounded runway to an organization that may be minutes from empty.
|
|
53
|
+
* @type {number}
|
|
54
|
+
* @memberof Balance
|
|
55
|
+
*/
|
|
56
|
+
burnCentsPerHour: number | null;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the Balance interface.
|
|
60
|
+
*/
|
|
61
|
+
export declare function instanceOfBalance(value: object): value is Balance;
|
|
62
|
+
export declare function BalanceFromJSON(json: any): Balance;
|
|
63
|
+
export declare function BalanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Balance;
|
|
64
|
+
export declare function BalanceToJSON(json: any): Balance;
|
|
65
|
+
export declare function BalanceToJSONTyped(value?: Balance | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfBalance = instanceOfBalance;
|
|
17
|
+
exports.BalanceFromJSON = BalanceFromJSON;
|
|
18
|
+
exports.BalanceFromJSONTyped = BalanceFromJSONTyped;
|
|
19
|
+
exports.BalanceToJSON = BalanceToJSON;
|
|
20
|
+
exports.BalanceToJSONTyped = BalanceToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the Balance interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfBalance(value) {
|
|
25
|
+
if ((!('balanceCents' in value) && !('balance_cents' in value)) || (value['balanceCents'] === undefined && value['balance_cents'] === undefined))
|
|
26
|
+
return false;
|
|
27
|
+
if ((!('balanceDollars' in value) && !('balance_dollars' in value)) || (value['balanceDollars'] === undefined && value['balance_dollars'] === undefined))
|
|
28
|
+
return false;
|
|
29
|
+
if ((!('autoPayEnabled' in value) && !('auto_pay_enabled' in value)) || (value['autoPayEnabled'] === undefined && value['auto_pay_enabled'] === undefined))
|
|
30
|
+
return false;
|
|
31
|
+
if ((!('autoPayThresholdCents' in value) && !('auto_pay_threshold_cents' in value)) || (value['autoPayThresholdCents'] === undefined && value['auto_pay_threshold_cents'] === undefined))
|
|
32
|
+
return false;
|
|
33
|
+
if ((!('autoPayAmountCents' in value) && !('auto_pay_amount_cents' in value)) || (value['autoPayAmountCents'] === undefined && value['auto_pay_amount_cents'] === undefined))
|
|
34
|
+
return false;
|
|
35
|
+
if ((!('burnCentsPerHour' in value) && !('burn_cents_per_hour' in value)) || (value['burnCentsPerHour'] === undefined && value['burn_cents_per_hour'] === undefined))
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
function BalanceFromJSON(json) {
|
|
40
|
+
return BalanceFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function BalanceFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'balanceCents': json['balance_cents'],
|
|
48
|
+
'balanceDollars': json['balance_dollars'],
|
|
49
|
+
'autoPayEnabled': json['auto_pay_enabled'],
|
|
50
|
+
'autoPayThresholdCents': json['auto_pay_threshold_cents'],
|
|
51
|
+
'autoPayAmountCents': json['auto_pay_amount_cents'],
|
|
52
|
+
'burnCentsPerHour': json['burn_cents_per_hour'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function BalanceToJSON(json) {
|
|
56
|
+
return BalanceToJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function BalanceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'balance_cents': value['balanceCents'],
|
|
64
|
+
'balance_dollars': value['balanceDollars'],
|
|
65
|
+
'auto_pay_enabled': value['autoPayEnabled'],
|
|
66
|
+
'auto_pay_threshold_cents': value['autoPayThresholdCents'],
|
|
67
|
+
'auto_pay_amount_cents': value['autoPayAmountCents'],
|
|
68
|
+
'burn_cents_per_hour': value['burnCentsPerHour'],
|
|
69
|
+
};
|
|
70
|
+
}
|