@gpuai/sdk 0.5.3 → 0.5.5
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 +56 -0
- package/README.md +50 -2
- package/dist/apis/BillingApi.d.ts +2 -2
- package/dist/apis/BillingApi.js +2 -2
- package/dist/apis/EndpointsApi.d.ts +150 -0
- package/dist/apis/EndpointsApi.js +379 -0
- package/dist/apis/InstancesApi.d.ts +15 -0
- package/dist/apis/InstancesApi.js +45 -0
- package/dist/apis/JobsApi.d.ts +172 -0
- package/dist/apis/JobsApi.js +444 -0
- package/dist/apis/OperationsApi.d.ts +17 -0
- package/dist/apis/OperationsApi.js +48 -0
- package/dist/apis/SecretsApi.d.ts +123 -0
- package/dist/apis/SecretsApi.js +328 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/BillingApi.d.ts +2 -2
- package/dist/esm/apis/BillingApi.js +2 -2
- package/dist/esm/apis/EndpointsApi.d.ts +150 -0
- package/dist/esm/apis/EndpointsApi.js +375 -0
- package/dist/esm/apis/InstancesApi.d.ts +15 -0
- package/dist/esm/apis/InstancesApi.js +45 -0
- package/dist/esm/apis/JobsApi.d.ts +172 -0
- package/dist/esm/apis/JobsApi.js +440 -0
- package/dist/esm/apis/OperationsApi.d.ts +17 -0
- package/dist/esm/apis/OperationsApi.js +48 -0
- package/dist/esm/apis/SecretsApi.d.ts +123 -0
- package/dist/esm/apis/SecretsApi.js +324 -0
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/Balance.d.ts +6 -0
- package/dist/esm/models/Balance.js +2 -0
- package/dist/esm/models/CreateWebhookEndpointRequest.d.ts +3 -0
- package/dist/esm/models/CreateWebhookEndpointRequest.js +4 -1
- package/dist/esm/models/DedicatedIPOffer.d.ts +98 -0
- package/dist/esm/models/DedicatedIPOffer.js +87 -0
- package/dist/esm/models/Endpoint.d.ts +147 -0
- package/dist/esm/models/Endpoint.js +121 -0
- package/dist/esm/models/EndpointCreate.d.ts +80 -0
- package/dist/esm/models/EndpointCreate.js +63 -0
- package/dist/esm/models/EndpointList.d.ts +33 -0
- package/dist/esm/models/EndpointList.js +44 -0
- package/dist/esm/models/EndpointMachine.d.ts +90 -0
- package/dist/esm/models/EndpointMachine.js +84 -0
- package/dist/esm/models/EndpointReplicaCounts.d.ts +38 -0
- package/dist/esm/models/EndpointReplicaCounts.js +47 -0
- package/dist/esm/models/Job.d.ts +352 -0
- package/dist/esm/models/Job.js +254 -0
- package/dist/esm/models/JobAttempt.d.ts +176 -0
- package/dist/esm/models/JobAttempt.js +147 -0
- package/dist/esm/models/JobCreate.d.ts +153 -0
- package/dist/esm/models/JobCreate.js +84 -0
- package/dist/esm/models/JobGpuTypes.d.ts +39 -0
- package/dist/esm/models/JobGpuTypes.js +48 -0
- package/dist/esm/models/JobGpuTypesDataInner.d.ts +58 -0
- package/dist/esm/models/JobGpuTypesDataInner.js +59 -0
- package/dist/esm/models/JobLogChunk.d.ts +50 -0
- package/dist/esm/models/JobLogChunk.js +55 -0
- package/dist/esm/models/JobLogs.d.ts +39 -0
- package/dist/esm/models/JobLogs.js +48 -0
- package/dist/esm/models/JobPage.d.ts +39 -0
- package/dist/esm/models/JobPage.js +48 -0
- package/dist/esm/models/JobSharingHint.d.ts +46 -0
- package/dist/esm/models/JobSharingHint.js +51 -0
- package/dist/esm/models/JobTelemetry.d.ts +51 -0
- package/dist/esm/models/JobTelemetry.js +56 -0
- package/dist/esm/models/JobTelemetryPoint.d.ts +56 -0
- package/dist/esm/models/JobTelemetryPoint.js +59 -0
- package/dist/esm/models/JobTrial.d.ts +79 -0
- package/dist/esm/models/JobTrial.js +73 -0
- package/dist/esm/models/Secret.d.ts +62 -0
- package/dist/esm/models/Secret.js +63 -0
- package/dist/esm/models/SecretCreate.d.ts +44 -0
- package/dist/esm/models/SecretCreate.js +49 -0
- package/dist/esm/models/SecretImportItem.d.ts +38 -0
- package/dist/esm/models/SecretImportItem.js +47 -0
- package/dist/esm/models/SecretImportRequest.d.ts +39 -0
- package/dist/esm/models/SecretImportRequest.js +46 -0
- package/dist/esm/models/SecretImportResult.d.ts +44 -0
- package/dist/esm/models/SecretImportResult.js +51 -0
- package/dist/esm/models/SecretList.d.ts +33 -0
- package/dist/esm/models/SecretList.js +44 -0
- package/dist/esm/models/SecretPut.d.ts +38 -0
- package/dist/esm/models/SecretPut.js +45 -0
- package/dist/esm/models/WebhookEndpoint.d.ts +3 -0
- package/dist/esm/models/WebhookEndpoint.js +4 -1
- package/dist/esm/models/index.d.ts +25 -0
- package/dist/esm/models/index.js +25 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/Balance.d.ts +6 -0
- package/dist/models/Balance.js +2 -0
- package/dist/models/CreateWebhookEndpointRequest.d.ts +3 -0
- package/dist/models/CreateWebhookEndpointRequest.js +4 -1
- package/dist/models/DedicatedIPOffer.d.ts +98 -0
- package/dist/models/DedicatedIPOffer.js +94 -0
- package/dist/models/Endpoint.d.ts +147 -0
- package/dist/models/Endpoint.js +129 -0
- package/dist/models/EndpointCreate.d.ts +80 -0
- package/dist/models/EndpointCreate.js +70 -0
- package/dist/models/EndpointList.d.ts +33 -0
- package/dist/models/EndpointList.js +51 -0
- package/dist/models/EndpointMachine.d.ts +90 -0
- package/dist/models/EndpointMachine.js +92 -0
- package/dist/models/EndpointReplicaCounts.d.ts +38 -0
- package/dist/models/EndpointReplicaCounts.js +54 -0
- package/dist/models/Job.d.ts +352 -0
- package/dist/models/Job.js +262 -0
- package/dist/models/JobAttempt.d.ts +176 -0
- package/dist/models/JobAttempt.js +155 -0
- package/dist/models/JobCreate.d.ts +153 -0
- package/dist/models/JobCreate.js +92 -0
- package/dist/models/JobGpuTypes.d.ts +39 -0
- package/dist/models/JobGpuTypes.js +55 -0
- package/dist/models/JobGpuTypesDataInner.d.ts +58 -0
- package/dist/models/JobGpuTypesDataInner.js +66 -0
- package/dist/models/JobLogChunk.d.ts +50 -0
- package/dist/models/JobLogChunk.js +62 -0
- package/dist/models/JobLogs.d.ts +39 -0
- package/dist/models/JobLogs.js +55 -0
- package/dist/models/JobPage.d.ts +39 -0
- package/dist/models/JobPage.js +55 -0
- package/dist/models/JobSharingHint.d.ts +46 -0
- package/dist/models/JobSharingHint.js +58 -0
- package/dist/models/JobTelemetry.d.ts +51 -0
- package/dist/models/JobTelemetry.js +63 -0
- package/dist/models/JobTelemetryPoint.d.ts +56 -0
- package/dist/models/JobTelemetryPoint.js +66 -0
- package/dist/models/JobTrial.d.ts +79 -0
- package/dist/models/JobTrial.js +81 -0
- package/dist/models/Secret.d.ts +62 -0
- package/dist/models/Secret.js +70 -0
- package/dist/models/SecretCreate.d.ts +44 -0
- package/dist/models/SecretCreate.js +56 -0
- package/dist/models/SecretImportItem.d.ts +38 -0
- package/dist/models/SecretImportItem.js +54 -0
- package/dist/models/SecretImportRequest.d.ts +39 -0
- package/dist/models/SecretImportRequest.js +53 -0
- package/dist/models/SecretImportResult.d.ts +44 -0
- package/dist/models/SecretImportResult.js +58 -0
- package/dist/models/SecretList.d.ts +33 -0
- package/dist/models/SecretList.js +51 -0
- package/dist/models/SecretPut.d.ts +38 -0
- package/dist/models/SecretPut.js +52 -0
- package/dist/models/WebhookEndpoint.d.ts +3 -0
- package/dist/models/WebhookEndpoint.js +4 -1
- package/dist/models/index.d.ts +25 -0
- package/dist/models/index.js +25 -0
- package/dist/runtime.js +1 -1
- package/docs/Balance.md +2 -0
- package/docs/BillingApi.md +2 -2
- package/docs/DedicatedIPOffer.md +56 -0
- package/docs/Endpoint.md +68 -0
- package/docs/EndpointCreate.md +50 -0
- package/docs/EndpointList.md +34 -0
- package/docs/EndpointMachine.md +50 -0
- package/docs/EndpointReplicaCounts.md +36 -0
- package/docs/EndpointsApi.md +544 -0
- package/docs/InstancesApi.md +68 -1
- package/docs/Job.md +125 -0
- package/docs/JobAttempt.md +69 -0
- package/docs/JobCreate.md +66 -0
- package/docs/JobGpuTypes.md +36 -0
- package/docs/JobGpuTypesDataInner.md +42 -0
- package/docs/JobLogChunk.md +40 -0
- package/docs/JobLogs.md +36 -0
- package/docs/JobPage.md +36 -0
- package/docs/JobSharingHint.md +39 -0
- package/docs/JobTelemetry.md +40 -0
- package/docs/JobTelemetryPoint.md +42 -0
- package/docs/JobTrial.md +46 -0
- package/docs/JobsApi.md +609 -0
- package/docs/OperationsApi.md +76 -0
- package/docs/Secret.md +45 -0
- package/docs/SecretCreate.md +38 -0
- package/docs/SecretImportItem.md +36 -0
- package/docs/SecretImportRequest.md +36 -0
- package/docs/SecretImportResult.md +38 -0
- package/docs/SecretList.md +34 -0
- package/docs/SecretPut.md +36 -0
- package/docs/SecretsApi.md +450 -0
- package/package.json +1 -1
- package/src/apis/BillingApi.ts +2 -2
- package/src/apis/EndpointsApi.ts +481 -0
- package/src/apis/InstancesApi.ts +52 -0
- package/src/apis/JobsApi.ts +551 -0
- package/src/apis/OperationsApi.ts +59 -0
- package/src/apis/SecretsApi.ts +413 -0
- package/src/apis/index.ts +3 -0
- package/src/models/Balance.ts +8 -0
- package/src/models/CreateWebhookEndpointRequest.ts +4 -1
- package/src/models/DedicatedIPOffer.ts +165 -0
- package/src/models/Endpoint.ts +247 -0
- package/src/models/EndpointCreate.ts +132 -0
- package/src/models/EndpointList.ts +74 -0
- package/src/models/EndpointMachine.ts +151 -0
- package/src/models/EndpointReplicaCounts.ts +75 -0
- package/src/models/Job.ts +538 -0
- package/src/models/JobAttempt.ts +267 -0
- package/src/models/JobCreate.ts +221 -0
- package/src/models/JobGpuTypes.ts +83 -0
- package/src/models/JobGpuTypesDataInner.ts +104 -0
- package/src/models/JobLogChunk.ts +93 -0
- package/src/models/JobLogs.ts +83 -0
- package/src/models/JobPage.ts +83 -0
- package/src/models/JobSharingHint.ts +86 -0
- package/src/models/JobTelemetry.ts +101 -0
- package/src/models/JobTelemetryPoint.ts +102 -0
- package/src/models/JobTrial.ts +132 -0
- package/src/models/Secret.ts +111 -0
- package/src/models/SecretCreate.ts +83 -0
- package/src/models/SecretImportItem.ts +75 -0
- package/src/models/SecretImportRequest.ts +82 -0
- package/src/models/SecretImportResult.ts +84 -0
- package/src/models/SecretList.ts +74 -0
- package/src/models/SecretPut.ts +74 -0
- package/src/models/WebhookEndpoint.ts +4 -1
- package/src/models/index.ts +25 -0
- package/src/runtime.ts +1 -1
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { EndpointMachine } from './EndpointMachine';
|
|
17
|
+
import {
|
|
18
|
+
EndpointMachineFromJSON,
|
|
19
|
+
EndpointMachineFromJSONTyped,
|
|
20
|
+
EndpointMachineToJSON,
|
|
21
|
+
EndpointMachineToJSONTyped,
|
|
22
|
+
} from './EndpointMachine';
|
|
23
|
+
import type { EndpointReplicaCounts } from './EndpointReplicaCounts';
|
|
24
|
+
import {
|
|
25
|
+
EndpointReplicaCountsFromJSON,
|
|
26
|
+
EndpointReplicaCountsFromJSONTyped,
|
|
27
|
+
EndpointReplicaCountsToJSON,
|
|
28
|
+
EndpointReplicaCountsToJSONTyped,
|
|
29
|
+
} from './EndpointReplicaCounts';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface Endpoint
|
|
35
|
+
*/
|
|
36
|
+
export interface Endpoint {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof Endpoint
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof Endpoint
|
|
47
|
+
*/
|
|
48
|
+
name: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof Endpoint
|
|
53
|
+
*/
|
|
54
|
+
model: string;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof Endpoint
|
|
59
|
+
*/
|
|
60
|
+
gpuType: string;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {EndpointStatusEnum}
|
|
64
|
+
* @memberof Endpoint
|
|
65
|
+
*/
|
|
66
|
+
status: EndpointStatusEnum;
|
|
67
|
+
/**
|
|
68
|
+
* OpenAI-compatible base URL. Set an OpenAI client's base_url to it and use a GPU.ai API key.
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof Endpoint
|
|
71
|
+
*/
|
|
72
|
+
url: string;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {number}
|
|
76
|
+
* @memberof Endpoint
|
|
77
|
+
*/
|
|
78
|
+
minReplicas: number;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {number}
|
|
82
|
+
* @memberof Endpoint
|
|
83
|
+
*/
|
|
84
|
+
maxReplicas: number;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {number}
|
|
88
|
+
* @memberof Endpoint
|
|
89
|
+
*/
|
|
90
|
+
idleTimeout: number;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {number}
|
|
94
|
+
* @memberof Endpoint
|
|
95
|
+
*/
|
|
96
|
+
targetConcurrency: number;
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @type {number}
|
|
100
|
+
* @memberof Endpoint
|
|
101
|
+
*/
|
|
102
|
+
maxPricePerHour: number | null;
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* @type {string}
|
|
106
|
+
* @memberof Endpoint
|
|
107
|
+
*/
|
|
108
|
+
hfTokenSecret: string | null;
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @type {EndpointReplicaCounts}
|
|
112
|
+
* @memberof Endpoint
|
|
113
|
+
*/
|
|
114
|
+
replicas: EndpointReplicaCounts;
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* @type {number}
|
|
118
|
+
* @memberof Endpoint
|
|
119
|
+
*/
|
|
120
|
+
requestCount: number;
|
|
121
|
+
/**
|
|
122
|
+
*
|
|
123
|
+
* @type {Date}
|
|
124
|
+
* @memberof Endpoint
|
|
125
|
+
*/
|
|
126
|
+
lastRequestAt: Date | null;
|
|
127
|
+
/**
|
|
128
|
+
* Why the latest machine failed to start, until one becomes ready.
|
|
129
|
+
* @type {string}
|
|
130
|
+
* @memberof Endpoint
|
|
131
|
+
*/
|
|
132
|
+
lastError: string | null;
|
|
133
|
+
/**
|
|
134
|
+
*
|
|
135
|
+
* @type {Date}
|
|
136
|
+
* @memberof Endpoint
|
|
137
|
+
*/
|
|
138
|
+
createdAt: Date;
|
|
139
|
+
/**
|
|
140
|
+
* Recent machines, newest first. Returned by GET /v1/endpoints/{id} only.
|
|
141
|
+
* @type {Array<EndpointMachine>}
|
|
142
|
+
* @memberof Endpoint
|
|
143
|
+
*/
|
|
144
|
+
machines?: Array<EndpointMachine>;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @export
|
|
150
|
+
*/
|
|
151
|
+
export const EndpointStatusEnum = {
|
|
152
|
+
ScaledToZero: 'scaled_to_zero',
|
|
153
|
+
Starting: 'starting',
|
|
154
|
+
Ready: 'ready',
|
|
155
|
+
Failed: 'failed',
|
|
156
|
+
Deleting: 'deleting'
|
|
157
|
+
} as const;
|
|
158
|
+
export type EndpointStatusEnum = typeof EndpointStatusEnum[keyof typeof EndpointStatusEnum];
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Check if a given object implements the Endpoint interface.
|
|
163
|
+
*/
|
|
164
|
+
export function instanceOfEndpoint(value: object): value is Endpoint {
|
|
165
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
166
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
167
|
+
if (!('model' in value) || value['model'] === undefined) return false;
|
|
168
|
+
if ((!('gpuType' in (value as Record<string, any>)) && !('gpu_type' in (value as Record<string, any>))) || ((value as Record<string, any>)['gpuType'] === undefined && (value as Record<string, any>)['gpu_type'] === undefined)) return false;
|
|
169
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
170
|
+
if (!('url' in value) || value['url'] === undefined) return false;
|
|
171
|
+
if ((!('minReplicas' in (value as Record<string, any>)) && !('min_replicas' in (value as Record<string, any>))) || ((value as Record<string, any>)['minReplicas'] === undefined && (value as Record<string, any>)['min_replicas'] === undefined)) return false;
|
|
172
|
+
if ((!('maxReplicas' in (value as Record<string, any>)) && !('max_replicas' in (value as Record<string, any>))) || ((value as Record<string, any>)['maxReplicas'] === undefined && (value as Record<string, any>)['max_replicas'] === undefined)) return false;
|
|
173
|
+
if ((!('idleTimeout' in (value as Record<string, any>)) && !('idle_timeout' in (value as Record<string, any>))) || ((value as Record<string, any>)['idleTimeout'] === undefined && (value as Record<string, any>)['idle_timeout'] === undefined)) return false;
|
|
174
|
+
if ((!('targetConcurrency' in (value as Record<string, any>)) && !('target_concurrency' in (value as Record<string, any>))) || ((value as Record<string, any>)['targetConcurrency'] === undefined && (value as Record<string, any>)['target_concurrency'] === undefined)) return false;
|
|
175
|
+
if ((!('maxPricePerHour' in (value as Record<string, any>)) && !('max_price_per_hour' in (value as Record<string, any>))) || ((value as Record<string, any>)['maxPricePerHour'] === undefined && (value as Record<string, any>)['max_price_per_hour'] === undefined)) return false;
|
|
176
|
+
if ((!('hfTokenSecret' in (value as Record<string, any>)) && !('hf_token_secret' in (value as Record<string, any>))) || ((value as Record<string, any>)['hfTokenSecret'] === undefined && (value as Record<string, any>)['hf_token_secret'] === undefined)) return false;
|
|
177
|
+
if (!('replicas' in value) || value['replicas'] === undefined) return false;
|
|
178
|
+
if ((!('requestCount' in (value as Record<string, any>)) && !('request_count' in (value as Record<string, any>))) || ((value as Record<string, any>)['requestCount'] === undefined && (value as Record<string, any>)['request_count'] === undefined)) return false;
|
|
179
|
+
if ((!('lastRequestAt' in (value as Record<string, any>)) && !('last_request_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['lastRequestAt'] === undefined && (value as Record<string, any>)['last_request_at'] === undefined)) return false;
|
|
180
|
+
if ((!('lastError' in (value as Record<string, any>)) && !('last_error' in (value as Record<string, any>))) || ((value as Record<string, any>)['lastError'] === undefined && (value as Record<string, any>)['last_error'] === undefined)) return false;
|
|
181
|
+
if ((!('createdAt' in (value as Record<string, any>)) && !('created_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['createdAt'] === undefined && (value as Record<string, any>)['created_at'] === undefined)) return false;
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export function EndpointFromJSON(json: any): Endpoint {
|
|
186
|
+
return EndpointFromJSONTyped(json, false);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export function EndpointFromJSONTyped(json: any, ignoreDiscriminator: boolean): Endpoint {
|
|
190
|
+
if (json == null) {
|
|
191
|
+
return json;
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
|
|
195
|
+
'id': json['id'],
|
|
196
|
+
'name': json['name'],
|
|
197
|
+
'model': json['model'],
|
|
198
|
+
'gpuType': json['gpu_type'],
|
|
199
|
+
'status': json['status'],
|
|
200
|
+
'url': json['url'],
|
|
201
|
+
'minReplicas': json['min_replicas'],
|
|
202
|
+
'maxReplicas': json['max_replicas'],
|
|
203
|
+
'idleTimeout': json['idle_timeout'],
|
|
204
|
+
'targetConcurrency': json['target_concurrency'],
|
|
205
|
+
'maxPricePerHour': json['max_price_per_hour'],
|
|
206
|
+
'hfTokenSecret': json['hf_token_secret'],
|
|
207
|
+
'replicas': EndpointReplicaCountsFromJSON(json['replicas']),
|
|
208
|
+
'requestCount': json['request_count'],
|
|
209
|
+
'lastRequestAt': (json['last_request_at'] == null ? null : new Date(json['last_request_at'])),
|
|
210
|
+
'lastError': json['last_error'],
|
|
211
|
+
'createdAt': (new Date(json['created_at'])),
|
|
212
|
+
'machines': json['machines'] == null ? undefined : ((json['machines'] as Array<any>).map(EndpointMachineFromJSON)),
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export function EndpointToJSON(json: any): Endpoint {
|
|
217
|
+
return EndpointToJSONTyped(json, false);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export function EndpointToJSONTyped(value?: Endpoint | null, ignoreDiscriminator: boolean = false): any {
|
|
221
|
+
if (value == null) {
|
|
222
|
+
return value;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
return {
|
|
226
|
+
|
|
227
|
+
'id': value['id'],
|
|
228
|
+
'name': value['name'],
|
|
229
|
+
'model': value['model'],
|
|
230
|
+
'gpu_type': value['gpuType'],
|
|
231
|
+
'status': value['status'],
|
|
232
|
+
'url': value['url'],
|
|
233
|
+
'min_replicas': value['minReplicas'],
|
|
234
|
+
'max_replicas': value['maxReplicas'],
|
|
235
|
+
'idle_timeout': value['idleTimeout'],
|
|
236
|
+
'target_concurrency': value['targetConcurrency'],
|
|
237
|
+
'max_price_per_hour': value['maxPricePerHour'],
|
|
238
|
+
'hf_token_secret': value['hfTokenSecret'],
|
|
239
|
+
'replicas': EndpointReplicaCountsToJSON(value['replicas']),
|
|
240
|
+
'request_count': value['requestCount'],
|
|
241
|
+
'last_request_at': value['lastRequestAt'] == null ? value['lastRequestAt'] : value['lastRequestAt'].toISOString(),
|
|
242
|
+
'last_error': value['lastError'],
|
|
243
|
+
'created_at': value['createdAt'].toISOString(),
|
|
244
|
+
'machines': value['machines'] == null ? undefined : ((value['machines'] as Array<any>).map(EndpointMachineToJSON)),
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface EndpointCreate
|
|
20
|
+
*/
|
|
21
|
+
export interface EndpointCreate {
|
|
22
|
+
/**
|
|
23
|
+
* Lowercase letters, digits and hyphens, starting with a letter; 48 characters at most. Unique among the organization's endpoints.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof EndpointCreate
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* A Hugging Face model id.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof EndpointCreate
|
|
32
|
+
*/
|
|
33
|
+
model: string;
|
|
34
|
+
/**
|
|
35
|
+
* The GPU each machine runs on (see GET /v1/gpu-types). At least 24 GB of memory.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof EndpointCreate
|
|
38
|
+
*/
|
|
39
|
+
gpuType: string;
|
|
40
|
+
/**
|
|
41
|
+
* Machines kept running even with no requests. Default 0 (scale to zero).
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof EndpointCreate
|
|
44
|
+
*/
|
|
45
|
+
minReplicas?: number;
|
|
46
|
+
/**
|
|
47
|
+
* Most machines the endpoint scales out to. Default 1.
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof EndpointCreate
|
|
50
|
+
*/
|
|
51
|
+
maxReplicas?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Seconds without a request before a machine is released. Default 300.
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof EndpointCreate
|
|
56
|
+
*/
|
|
57
|
+
idleTimeout?: number;
|
|
58
|
+
/**
|
|
59
|
+
* In-flight requests per machine before another starts. Default 16.
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof EndpointCreate
|
|
62
|
+
*/
|
|
63
|
+
targetConcurrency?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Highest hourly price for a machine.
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof EndpointCreate
|
|
68
|
+
*/
|
|
69
|
+
maxPricePerHour?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Name of an organization secret holding a Hugging Face token, delivered as HF_TOKEN (for gated models).
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof EndpointCreate
|
|
74
|
+
*/
|
|
75
|
+
hfTokenSecret?: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Check if a given object implements the EndpointCreate interface.
|
|
80
|
+
*/
|
|
81
|
+
export function instanceOfEndpointCreate(value: object): value is EndpointCreate {
|
|
82
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
83
|
+
if (!('model' in value) || value['model'] === undefined) return false;
|
|
84
|
+
if ((!('gpuType' in (value as Record<string, any>)) && !('gpu_type' in (value as Record<string, any>))) || ((value as Record<string, any>)['gpuType'] === undefined && (value as Record<string, any>)['gpu_type'] === undefined)) return false;
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function EndpointCreateFromJSON(json: any): EndpointCreate {
|
|
89
|
+
return EndpointCreateFromJSONTyped(json, false);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function EndpointCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointCreate {
|
|
93
|
+
if (json == null) {
|
|
94
|
+
return json;
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
|
|
98
|
+
'name': json['name'],
|
|
99
|
+
'model': json['model'],
|
|
100
|
+
'gpuType': json['gpu_type'],
|
|
101
|
+
'minReplicas': json['min_replicas'] == null ? undefined : json['min_replicas'],
|
|
102
|
+
'maxReplicas': json['max_replicas'] == null ? undefined : json['max_replicas'],
|
|
103
|
+
'idleTimeout': json['idle_timeout'] == null ? undefined : json['idle_timeout'],
|
|
104
|
+
'targetConcurrency': json['target_concurrency'] == null ? undefined : json['target_concurrency'],
|
|
105
|
+
'maxPricePerHour': json['max_price_per_hour'] == null ? undefined : json['max_price_per_hour'],
|
|
106
|
+
'hfTokenSecret': json['hf_token_secret'] == null ? undefined : json['hf_token_secret'],
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function EndpointCreateToJSON(json: any): EndpointCreate {
|
|
111
|
+
return EndpointCreateToJSONTyped(json, false);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function EndpointCreateToJSONTyped(value?: EndpointCreate | null, ignoreDiscriminator: boolean = false): any {
|
|
115
|
+
if (value == null) {
|
|
116
|
+
return value;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return {
|
|
120
|
+
|
|
121
|
+
'name': value['name'],
|
|
122
|
+
'model': value['model'],
|
|
123
|
+
'gpu_type': value['gpuType'],
|
|
124
|
+
'min_replicas': value['minReplicas'],
|
|
125
|
+
'max_replicas': value['maxReplicas'],
|
|
126
|
+
'idle_timeout': value['idleTimeout'],
|
|
127
|
+
'target_concurrency': value['targetConcurrency'],
|
|
128
|
+
'max_price_per_hour': value['maxPricePerHour'],
|
|
129
|
+
'hf_token_secret': value['hfTokenSecret'],
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { Endpoint } from './Endpoint';
|
|
17
|
+
import {
|
|
18
|
+
EndpointFromJSON,
|
|
19
|
+
EndpointFromJSONTyped,
|
|
20
|
+
EndpointToJSON,
|
|
21
|
+
EndpointToJSONTyped,
|
|
22
|
+
} from './Endpoint';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface EndpointList
|
|
28
|
+
*/
|
|
29
|
+
export interface EndpointList {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<Endpoint>}
|
|
33
|
+
* @memberof EndpointList
|
|
34
|
+
*/
|
|
35
|
+
data: Array<Endpoint>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the EndpointList interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfEndpointList(value: object): value is EndpointList {
|
|
42
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function EndpointListFromJSON(json: any): EndpointList {
|
|
47
|
+
return EndpointListFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function EndpointListFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointList {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'data': ((json['data'] as Array<any>).map(EndpointFromJSON)),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function EndpointListToJSON(json: any): EndpointList {
|
|
61
|
+
return EndpointListToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function EndpointListToJSONTyped(value?: EndpointList | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'data': ((value['data'] as Array<any>).map(EndpointToJSON)),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface EndpointMachine
|
|
20
|
+
*/
|
|
21
|
+
export interface EndpointMachine {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof EndpointMachine
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {EndpointMachineStatusEnum}
|
|
31
|
+
* @memberof EndpointMachine
|
|
32
|
+
*/
|
|
33
|
+
status: EndpointMachineStatusEnum;
|
|
34
|
+
/**
|
|
35
|
+
* The instance the machine runs as (it appears in the instance list as ep-<name>-<id>).
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof EndpointMachine
|
|
38
|
+
*/
|
|
39
|
+
instanceId: string | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof EndpointMachine
|
|
44
|
+
*/
|
|
45
|
+
gpuType: string | null;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof EndpointMachine
|
|
50
|
+
*/
|
|
51
|
+
pricePerHour: number | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {Date}
|
|
55
|
+
* @memberof EndpointMachine
|
|
56
|
+
*/
|
|
57
|
+
readyAt: Date | null;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Date}
|
|
61
|
+
* @memberof EndpointMachine
|
|
62
|
+
*/
|
|
63
|
+
terminatedAt: Date | null;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof EndpointMachine
|
|
68
|
+
*/
|
|
69
|
+
terminateReason: string | null;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {Date}
|
|
73
|
+
* @memberof EndpointMachine
|
|
74
|
+
*/
|
|
75
|
+
createdAt: Date;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @export
|
|
81
|
+
*/
|
|
82
|
+
export const EndpointMachineStatusEnum = {
|
|
83
|
+
Launching: 'launching',
|
|
84
|
+
Ready: 'ready',
|
|
85
|
+
Terminating: 'terminating',
|
|
86
|
+
Terminated: 'terminated'
|
|
87
|
+
} as const;
|
|
88
|
+
export type EndpointMachineStatusEnum = typeof EndpointMachineStatusEnum[keyof typeof EndpointMachineStatusEnum];
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Check if a given object implements the EndpointMachine interface.
|
|
93
|
+
*/
|
|
94
|
+
export function instanceOfEndpointMachine(value: object): value is EndpointMachine {
|
|
95
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
96
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
97
|
+
if ((!('instanceId' in (value as Record<string, any>)) && !('instance_id' in (value as Record<string, any>))) || ((value as Record<string, any>)['instanceId'] === undefined && (value as Record<string, any>)['instance_id'] === undefined)) return false;
|
|
98
|
+
if ((!('gpuType' in (value as Record<string, any>)) && !('gpu_type' in (value as Record<string, any>))) || ((value as Record<string, any>)['gpuType'] === undefined && (value as Record<string, any>)['gpu_type'] === undefined)) return false;
|
|
99
|
+
if ((!('pricePerHour' in (value as Record<string, any>)) && !('price_per_hour' in (value as Record<string, any>))) || ((value as Record<string, any>)['pricePerHour'] === undefined && (value as Record<string, any>)['price_per_hour'] === undefined)) return false;
|
|
100
|
+
if ((!('readyAt' in (value as Record<string, any>)) && !('ready_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['readyAt'] === undefined && (value as Record<string, any>)['ready_at'] === undefined)) return false;
|
|
101
|
+
if ((!('terminatedAt' in (value as Record<string, any>)) && !('terminated_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['terminatedAt'] === undefined && (value as Record<string, any>)['terminated_at'] === undefined)) return false;
|
|
102
|
+
if ((!('terminateReason' in (value as Record<string, any>)) && !('terminate_reason' in (value as Record<string, any>))) || ((value as Record<string, any>)['terminateReason'] === undefined && (value as Record<string, any>)['terminate_reason'] === undefined)) return false;
|
|
103
|
+
if ((!('createdAt' in (value as Record<string, any>)) && !('created_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['createdAt'] === undefined && (value as Record<string, any>)['created_at'] === undefined)) return false;
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function EndpointMachineFromJSON(json: any): EndpointMachine {
|
|
108
|
+
return EndpointMachineFromJSONTyped(json, false);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function EndpointMachineFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointMachine {
|
|
112
|
+
if (json == null) {
|
|
113
|
+
return json;
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
|
|
117
|
+
'id': json['id'],
|
|
118
|
+
'status': json['status'],
|
|
119
|
+
'instanceId': json['instance_id'],
|
|
120
|
+
'gpuType': json['gpu_type'],
|
|
121
|
+
'pricePerHour': json['price_per_hour'],
|
|
122
|
+
'readyAt': (json['ready_at'] == null ? null : new Date(json['ready_at'])),
|
|
123
|
+
'terminatedAt': (json['terminated_at'] == null ? null : new Date(json['terminated_at'])),
|
|
124
|
+
'terminateReason': json['terminate_reason'],
|
|
125
|
+
'createdAt': (new Date(json['created_at'])),
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function EndpointMachineToJSON(json: any): EndpointMachine {
|
|
130
|
+
return EndpointMachineToJSONTyped(json, false);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function EndpointMachineToJSONTyped(value?: EndpointMachine | null, ignoreDiscriminator: boolean = false): any {
|
|
134
|
+
if (value == null) {
|
|
135
|
+
return value;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return {
|
|
139
|
+
|
|
140
|
+
'id': value['id'],
|
|
141
|
+
'status': value['status'],
|
|
142
|
+
'instance_id': value['instanceId'],
|
|
143
|
+
'gpu_type': value['gpuType'],
|
|
144
|
+
'price_per_hour': value['pricePerHour'],
|
|
145
|
+
'ready_at': value['readyAt'] == null ? value['readyAt'] : value['readyAt'].toISOString(),
|
|
146
|
+
'terminated_at': value['terminatedAt'] == null ? value['terminatedAt'] : value['terminatedAt'].toISOString(),
|
|
147
|
+
'terminate_reason': value['terminateReason'],
|
|
148
|
+
'created_at': value['createdAt'].toISOString(),
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface EndpointReplicaCounts
|
|
20
|
+
*/
|
|
21
|
+
export interface EndpointReplicaCounts {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof EndpointReplicaCounts
|
|
26
|
+
*/
|
|
27
|
+
starting: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof EndpointReplicaCounts
|
|
32
|
+
*/
|
|
33
|
+
ready: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the EndpointReplicaCounts interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfEndpointReplicaCounts(value: object): value is EndpointReplicaCounts {
|
|
40
|
+
if (!('starting' in value) || value['starting'] === undefined) return false;
|
|
41
|
+
if (!('ready' in value) || value['ready'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function EndpointReplicaCountsFromJSON(json: any): EndpointReplicaCounts {
|
|
46
|
+
return EndpointReplicaCountsFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function EndpointReplicaCountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointReplicaCounts {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'starting': json['starting'],
|
|
56
|
+
'ready': json['ready'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function EndpointReplicaCountsToJSON(json: any): EndpointReplicaCounts {
|
|
61
|
+
return EndpointReplicaCountsToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function EndpointReplicaCountsToJSONTyped(value?: EndpointReplicaCounts | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'starting': value['starting'],
|
|
72
|
+
'ready': value['ready'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|