@mlhub/deployments-ts-sdk 0.1.0
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 +38 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +45 -0
- package/dist/apis/DeploymentsApi.d.ts +64 -0
- package/dist/apis/DeploymentsApi.js +264 -0
- package/dist/apis/StrategiesApi.d.ts +26 -0
- package/dist/apis/StrategiesApi.js +121 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +20 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/BadRequestResponse.d.ts +51 -0
- package/dist/models/BadRequestResponse.js +48 -0
- package/dist/models/ClientStrategySet.d.ts +52 -0
- package/dist/models/ClientStrategySet.js +50 -0
- package/dist/models/DeployModelWithStrategyBody.d.ts +39 -0
- package/dist/models/DeployModelWithStrategyBody.js +44 -0
- package/dist/models/DesiredState.d.ts +24 -0
- package/dist/models/DesiredState.js +39 -0
- package/dist/models/GpuResource.d.ts +39 -0
- package/dist/models/GpuResource.js +45 -0
- package/dist/models/ListDeploymentStrategiesResponse.d.ts +52 -0
- package/dist/models/ListDeploymentStrategiesResponse.js +49 -0
- package/dist/models/ModelDeployment.d.ts +126 -0
- package/dist/models/ModelDeployment.js +74 -0
- package/dist/models/ModelDeploymentInterface.d.ts +21 -0
- package/dist/models/ModelDeploymentInterface.js +48 -0
- package/dist/models/ModelDeploymentInterfaceOneOf.d.ts +28 -0
- package/dist/models/ModelDeploymentInterfaceOneOf.js +41 -0
- package/dist/models/ModelDeploymentResponse.d.ts +52 -0
- package/dist/models/ModelDeploymentResponse.js +49 -0
- package/dist/models/ModelReference.d.ts +33 -0
- package/dist/models/ModelReference.js +42 -0
- package/dist/models/NotFoundResponse.d.ts +51 -0
- package/dist/models/NotFoundResponse.js +48 -0
- package/dist/models/Operator.d.ts +33 -0
- package/dist/models/Operator.js +48 -0
- package/dist/models/ParallelismStrategy.d.ts +25 -0
- package/dist/models/ParallelismStrategy.js +40 -0
- package/dist/models/Parameter.d.ts +27 -0
- package/dist/models/Parameter.js +40 -0
- package/dist/models/ParameterSet.d.ts +34 -0
- package/dist/models/ParameterSet.js +43 -0
- package/dist/models/Platform.d.ts +31 -0
- package/dist/models/Platform.js +46 -0
- package/dist/models/ReplicaGroup.d.ts +40 -0
- package/dist/models/ReplicaGroup.js +45 -0
- package/dist/models/ResourceRequirements.d.ts +46 -0
- package/dist/models/ResourceRequirements.js +48 -0
- package/dist/models/RestApi.d.ts +27 -0
- package/dist/models/RestApi.js +40 -0
- package/dist/models/Rule.d.ts +40 -0
- package/dist/models/Rule.js +45 -0
- package/dist/models/RuleSet.d.ts +34 -0
- package/dist/models/RuleSet.js +43 -0
- package/dist/models/ServerErrorResponse.d.ts +51 -0
- package/dist/models/ServerErrorResponse.js +48 -0
- package/dist/models/State.d.ts +27 -0
- package/dist/models/State.js +42 -0
- package/dist/models/Strategy.d.ts +46 -0
- package/dist/models/Strategy.js +48 -0
- package/dist/models/Visibility.d.ts +23 -0
- package/dist/models/Visibility.js +38 -0
- package/dist/models/index.d.ts +26 -0
- package/dist/models/index.js +44 -0
- package/dist/runtime.d.ts +140 -0
- package/dist/runtime.js +430 -0
- package/package.json +15 -0
- package/src/apis/DeploymentsApi.ts +192 -0
- package/src/apis/StrategiesApi.ts +63 -0
- package/src/apis/index.ts +4 -0
- package/src/index.ts +5 -0
- package/src/models/BadRequestResponse.ts +88 -0
- package/src/models/ClientStrategySet.ts +107 -0
- package/src/models/DeployModelWithStrategyBody.ts +72 -0
- package/src/models/DesiredState.ts +37 -0
- package/src/models/GpuResource.ts +72 -0
- package/src/models/ListDeploymentStrategiesResponse.ts +95 -0
- package/src/models/ModelDeployment.ts +215 -0
- package/src/models/ModelDeploymentInterface.ts +48 -0
- package/src/models/ModelDeploymentInterfaceOneOf.ts +63 -0
- package/src/models/ModelDeploymentResponse.ts +95 -0
- package/src/models/ModelReference.ts +64 -0
- package/src/models/NotFoundResponse.ts +88 -0
- package/src/models/Operator.ts +46 -0
- package/src/models/ParallelismStrategy.ts +38 -0
- package/src/models/Parameter.ts +56 -0
- package/src/models/ParameterSet.ts +71 -0
- package/src/models/Platform.ts +44 -0
- package/src/models/ReplicaGroup.ts +83 -0
- package/src/models/ResourceRequirements.ts +87 -0
- package/src/models/RestApi.ts +56 -0
- package/src/models/Rule.ts +79 -0
- package/src/models/RuleSet.ts +71 -0
- package/src/models/ServerErrorResponse.ts +88 -0
- package/src/models/State.ts +40 -0
- package/src/models/Strategy.ts +91 -0
- package/src/models/Visibility.ts +36 -0
- package/src/models/index.ts +28 -0
- package/src/runtime.ts +320 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Deployments API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import {
|
|
18
|
+
BadRequestResponse,
|
|
19
|
+
BadRequestResponseFromJSON,
|
|
20
|
+
BadRequestResponseToJSON,
|
|
21
|
+
ListDeploymentStrategiesResponse,
|
|
22
|
+
ListDeploymentStrategiesResponseFromJSON,
|
|
23
|
+
ListDeploymentStrategiesResponseToJSON,
|
|
24
|
+
NotFoundResponse,
|
|
25
|
+
NotFoundResponseFromJSON,
|
|
26
|
+
NotFoundResponseToJSON,
|
|
27
|
+
ServerErrorResponse,
|
|
28
|
+
ServerErrorResponseFromJSON,
|
|
29
|
+
ServerErrorResponseToJSON,
|
|
30
|
+
} from '../models';
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
export class StrategiesApi extends runtime.BaseAPI {
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Lists all available deployment strategies for all platforms
|
|
39
|
+
*/
|
|
40
|
+
async listStrategiesRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<ListDeploymentStrategiesResponse>> {
|
|
41
|
+
const queryParameters: any = {};
|
|
42
|
+
|
|
43
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
44
|
+
|
|
45
|
+
const response = await this.request({
|
|
46
|
+
path: `/deployments-api/strategies`,
|
|
47
|
+
method: 'GET',
|
|
48
|
+
headers: headerParameters,
|
|
49
|
+
query: queryParameters,
|
|
50
|
+
}, initOverrides);
|
|
51
|
+
|
|
52
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListDeploymentStrategiesResponseFromJSON(jsonValue));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Lists all available deployment strategies for all platforms
|
|
57
|
+
*/
|
|
58
|
+
async listStrategies(initOverrides?: RequestInit): Promise<ListDeploymentStrategiesResponse> {
|
|
59
|
+
const response = await this.listStrategiesRaw(initOverrides);
|
|
60
|
+
return await response.value();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Deployments API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
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 { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface BadRequestResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface BadRequestResponse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof BadRequestResponse
|
|
26
|
+
*/
|
|
27
|
+
message: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {object}
|
|
31
|
+
* @memberof BadRequestResponse
|
|
32
|
+
*/
|
|
33
|
+
metadata: object;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {any}
|
|
37
|
+
* @memberof BadRequestResponse
|
|
38
|
+
*/
|
|
39
|
+
result: any | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof BadRequestResponse
|
|
44
|
+
*/
|
|
45
|
+
status: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof BadRequestResponse
|
|
50
|
+
*/
|
|
51
|
+
version: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function BadRequestResponseFromJSON(json: any): BadRequestResponse {
|
|
55
|
+
return BadRequestResponseFromJSONTyped(json, false);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function BadRequestResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BadRequestResponse {
|
|
59
|
+
if ((json === undefined) || (json === null)) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
|
|
64
|
+
'message': json['message'],
|
|
65
|
+
'metadata': json['metadata'],
|
|
66
|
+
'result': json['result'],
|
|
67
|
+
'status': json['status'],
|
|
68
|
+
'version': json['version'],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function BadRequestResponseToJSON(value?: BadRequestResponse | null): any {
|
|
73
|
+
if (value === undefined) {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
if (value === null) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'message': value.message,
|
|
82
|
+
'metadata': value.metadata,
|
|
83
|
+
'result': value.result,
|
|
84
|
+
'status': value.status,
|
|
85
|
+
'version': value.version,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Deployments API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
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 { exists, mapValues } from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
ParameterSet,
|
|
18
|
+
ParameterSetFromJSON,
|
|
19
|
+
ParameterSetFromJSONTyped,
|
|
20
|
+
ParameterSetToJSON,
|
|
21
|
+
Platform,
|
|
22
|
+
PlatformFromJSON,
|
|
23
|
+
PlatformFromJSONTyped,
|
|
24
|
+
PlatformToJSON,
|
|
25
|
+
RuleSet,
|
|
26
|
+
RuleSetFromJSON,
|
|
27
|
+
RuleSetFromJSONTyped,
|
|
28
|
+
RuleSetToJSON,
|
|
29
|
+
Strategy,
|
|
30
|
+
StrategyFromJSON,
|
|
31
|
+
StrategyFromJSONTyped,
|
|
32
|
+
StrategyToJSON,
|
|
33
|
+
} from './';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @export
|
|
38
|
+
* @interface ClientStrategySet
|
|
39
|
+
*/
|
|
40
|
+
export interface ClientStrategySet {
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof ClientStrategySet
|
|
45
|
+
*/
|
|
46
|
+
description?: string | null;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {Array<ParameterSet>}
|
|
50
|
+
* @memberof ClientStrategySet
|
|
51
|
+
*/
|
|
52
|
+
parameter_sets?: Array<ParameterSet> | null;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {Platform}
|
|
56
|
+
* @memberof ClientStrategySet
|
|
57
|
+
*/
|
|
58
|
+
platform: Platform;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {Array<RuleSet>}
|
|
62
|
+
* @memberof ClientStrategySet
|
|
63
|
+
*/
|
|
64
|
+
rule_sets?: Array<RuleSet> | null;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {Array<Strategy>}
|
|
68
|
+
* @memberof ClientStrategySet
|
|
69
|
+
*/
|
|
70
|
+
strategies: Array<Strategy>;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function ClientStrategySetFromJSON(json: any): ClientStrategySet {
|
|
74
|
+
return ClientStrategySetFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function ClientStrategySetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClientStrategySet {
|
|
78
|
+
if ((json === undefined) || (json === null)) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
84
|
+
'parameter_sets': !exists(json, 'parameter_sets') ? undefined : (json['parameter_sets'] === null ? null : (json['parameter_sets'] as Array<any>).map(ParameterSetFromJSON)),
|
|
85
|
+
'platform': PlatformFromJSON(json['platform']),
|
|
86
|
+
'rule_sets': !exists(json, 'rule_sets') ? undefined : (json['rule_sets'] === null ? null : (json['rule_sets'] as Array<any>).map(RuleSetFromJSON)),
|
|
87
|
+
'strategies': ((json['strategies'] as Array<any>).map(StrategyFromJSON)),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function ClientStrategySetToJSON(value?: ClientStrategySet | null): any {
|
|
92
|
+
if (value === undefined) {
|
|
93
|
+
return undefined;
|
|
94
|
+
}
|
|
95
|
+
if (value === null) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
|
|
100
|
+
'description': value.description,
|
|
101
|
+
'parameter_sets': value.parameter_sets === undefined ? undefined : (value.parameter_sets === null ? null : (value.parameter_sets as Array<any>).map(ParameterSetToJSON)),
|
|
102
|
+
'platform': PlatformToJSON(value.platform),
|
|
103
|
+
'rule_sets': value.rule_sets === undefined ? undefined : (value.rule_sets === null ? null : (value.rule_sets as Array<any>).map(RuleSetToJSON)),
|
|
104
|
+
'strategies': ((value.strategies as Array<any>).map(StrategyToJSON)),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Deployments API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
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 { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface DeployModelWithStrategyBody
|
|
20
|
+
*/
|
|
21
|
+
export interface DeployModelWithStrategyBody {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof DeployModelWithStrategyBody
|
|
26
|
+
*/
|
|
27
|
+
model_author: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof DeployModelWithStrategyBody
|
|
32
|
+
*/
|
|
33
|
+
model_name: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {any}
|
|
37
|
+
* @memberof DeployModelWithStrategyBody
|
|
38
|
+
*/
|
|
39
|
+
params: any | null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function DeployModelWithStrategyBodyFromJSON(json: any): DeployModelWithStrategyBody {
|
|
43
|
+
return DeployModelWithStrategyBodyFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function DeployModelWithStrategyBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeployModelWithStrategyBody {
|
|
47
|
+
if ((json === undefined) || (json === null)) {
|
|
48
|
+
return json;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
|
|
52
|
+
'model_author': json['model_author'],
|
|
53
|
+
'model_name': json['model_name'],
|
|
54
|
+
'params': json['params'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function DeployModelWithStrategyBodyToJSON(value?: DeployModelWithStrategyBody | null): any {
|
|
59
|
+
if (value === undefined) {
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
if (value === null) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
|
|
67
|
+
'model_author': value.model_author,
|
|
68
|
+
'model_name': value.model_name,
|
|
69
|
+
'params': value.params,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Deployments API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
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
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @enum {string}
|
|
19
|
+
*/
|
|
20
|
+
export enum DesiredState {
|
|
21
|
+
Running = 'Running',
|
|
22
|
+
Stopped = 'Stopped',
|
|
23
|
+
NotDeployed = 'NotDeployed'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function DesiredStateFromJSON(json: any): DesiredState {
|
|
27
|
+
return DesiredStateFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function DesiredStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): DesiredState {
|
|
31
|
+
return json as DesiredState;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function DesiredStateToJSON(value?: DesiredState | null): any {
|
|
35
|
+
return value as any;
|
|
36
|
+
}
|
|
37
|
+
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Deployments API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
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 { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface GpuResource
|
|
20
|
+
*/
|
|
21
|
+
export interface GpuResource {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GpuResource
|
|
26
|
+
*/
|
|
27
|
+
gpu_type?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof GpuResource
|
|
32
|
+
*/
|
|
33
|
+
memory?: number | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof GpuResource
|
|
38
|
+
*/
|
|
39
|
+
vendor?: string | null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function GpuResourceFromJSON(json: any): GpuResource {
|
|
43
|
+
return GpuResourceFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function GpuResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GpuResource {
|
|
47
|
+
if ((json === undefined) || (json === null)) {
|
|
48
|
+
return json;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
|
|
52
|
+
'gpu_type': !exists(json, 'gpu_type') ? undefined : json['gpu_type'],
|
|
53
|
+
'memory': !exists(json, 'memory') ? undefined : json['memory'],
|
|
54
|
+
'vendor': !exists(json, 'vendor') ? undefined : json['vendor'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function GpuResourceToJSON(value?: GpuResource | null): any {
|
|
59
|
+
if (value === undefined) {
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
if (value === null) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
|
|
67
|
+
'gpu_type': value.gpu_type,
|
|
68
|
+
'memory': value.memory,
|
|
69
|
+
'vendor': value.vendor,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MLHub Deployments API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
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 { exists, mapValues } from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
ClientStrategySet,
|
|
18
|
+
ClientStrategySetFromJSON,
|
|
19
|
+
ClientStrategySetFromJSONTyped,
|
|
20
|
+
ClientStrategySetToJSON,
|
|
21
|
+
} from './';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface ListDeploymentStrategiesResponse
|
|
27
|
+
*/
|
|
28
|
+
export interface ListDeploymentStrategiesResponse {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof ListDeploymentStrategiesResponse
|
|
33
|
+
*/
|
|
34
|
+
message: string;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {object}
|
|
38
|
+
* @memberof ListDeploymentStrategiesResponse
|
|
39
|
+
*/
|
|
40
|
+
metadata: object;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {Array<ClientStrategySet>}
|
|
44
|
+
* @memberof ListDeploymentStrategiesResponse
|
|
45
|
+
*/
|
|
46
|
+
result: Array<ClientStrategySet>;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof ListDeploymentStrategiesResponse
|
|
51
|
+
*/
|
|
52
|
+
status: number;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof ListDeploymentStrategiesResponse
|
|
57
|
+
*/
|
|
58
|
+
version: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function ListDeploymentStrategiesResponseFromJSON(json: any): ListDeploymentStrategiesResponse {
|
|
62
|
+
return ListDeploymentStrategiesResponseFromJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function ListDeploymentStrategiesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListDeploymentStrategiesResponse {
|
|
66
|
+
if ((json === undefined) || (json === null)) {
|
|
67
|
+
return json;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'message': json['message'],
|
|
72
|
+
'metadata': json['metadata'],
|
|
73
|
+
'result': ((json['result'] as Array<any>).map(ClientStrategySetFromJSON)),
|
|
74
|
+
'status': json['status'],
|
|
75
|
+
'version': json['version'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function ListDeploymentStrategiesResponseToJSON(value?: ListDeploymentStrategiesResponse | null): any {
|
|
80
|
+
if (value === undefined) {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
if (value === null) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
|
|
88
|
+
'message': value.message,
|
|
89
|
+
'metadata': value.metadata,
|
|
90
|
+
'result': ((value.result as Array<any>).map(ClientStrategySetToJSON)),
|
|
91
|
+
'status': value.status,
|
|
92
|
+
'version': value.version,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|