Skip to content

Commit a312e34

Browse files
authored
Update Schemas (#304)
1 parent bab53aa commit a312e34

33 files changed

+725
-18
lines changed

src/lib/openapi/compute/.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apis/DefaultApi.ts
22
apis/index.ts
33
index.ts
44
models/AllowedAddressPair.ts
5+
models/Architecture.ts
56
models/ClusterV2Create.ts
67
models/ClusterV2CreateSpec.ts
78
models/ClusterV2Read.ts
@@ -30,6 +31,8 @@ models/ImageGpu.ts
3031
models/ImageOS.ts
3132
models/ImageSelector.ts
3233
models/ImageSpec.ts
34+
models/ImageState.ts
35+
models/ImageStatus.ts
3336
models/ImageVirtualization.ts
3437
models/InstanceCreate.ts
3538
models/InstanceCreateSpec.ts
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* Compute Service API
5+
* The Compute Service API provides services that allows provisioning and life cycle management of Compute clusters.
6+
*
7+
* The version of the OpenAPI document: 1.12.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+
* CPU architecture.
18+
* @export
19+
*/
20+
export const Architecture = {
21+
X8664: 'x86_64',
22+
Aarch64: 'aarch64'
23+
} as const;
24+
export type Architecture = typeof Architecture[keyof typeof Architecture];
25+
26+
27+
export function ArchitectureFromJSON(json: any): Architecture {
28+
return ArchitectureFromJSONTyped(json, false);
29+
}
30+
31+
export function ArchitectureFromJSONTyped(json: any, ignoreDiscriminator: boolean): Architecture {
32+
return json as Architecture;
33+
}
34+
35+
export function ArchitectureToJSON(value?: Architecture | null): any {
36+
return value as any;
37+
}
38+

src/lib/openapi/compute/models/FlavorSpec.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
*/
1414

1515
import { exists, mapValues } from '../runtime';
16+
import type { Architecture } from './Architecture';
17+
import {
18+
ArchitectureFromJSON,
19+
ArchitectureFromJSONTyped,
20+
ArchitectureToJSON,
21+
} from './Architecture';
1622
import type { GpuSpec } from './GpuSpec';
1723
import {
1824
GpuSpecFromJSON,
@@ -56,6 +62,12 @@ export interface FlavorSpec {
5662
* @memberof FlavorSpec
5763
*/
5864
disk: number;
65+
/**
66+
*
67+
* @type {Architecture}
68+
* @memberof FlavorSpec
69+
*/
70+
architecture: Architecture;
5971
/**
6072
*
6173
* @type {GpuSpec}
@@ -72,6 +84,7 @@ export function instanceOfFlavorSpec(value: object): boolean {
7284
isInstance = isInstance && "cpus" in value;
7385
isInstance = isInstance && "memory" in value;
7486
isInstance = isInstance && "disk" in value;
87+
isInstance = isInstance && "architecture" in value;
7588

7689
return isInstance;
7790
}
@@ -91,6 +104,7 @@ export function FlavorSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean)
91104
'cpuFamily': !exists(json, 'cpuFamily') ? undefined : json['cpuFamily'],
92105
'memory': json['memory'],
93106
'disk': json['disk'],
107+
'architecture': ArchitectureFromJSON(json['architecture']),
94108
'gpu': !exists(json, 'gpu') ? undefined : GpuSpecFromJSON(json['gpu']),
95109
};
96110
}
@@ -109,6 +123,7 @@ export function FlavorSpecToJSON(value?: FlavorSpec | null): any {
109123
'cpuFamily': value.cpuFamily,
110124
'memory': value.memory,
111125
'disk': value.disk,
126+
'architecture': ArchitectureToJSON(value.architecture),
112127
'gpu': GpuSpecToJSON(value.gpu),
113128
};
114129
}

src/lib/openapi/compute/models/Image.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ import {
1919
ImageSpecFromJSONTyped,
2020
ImageSpecToJSON,
2121
} from './ImageSpec';
22+
import type { ImageStatus } from './ImageStatus';
23+
import {
24+
ImageStatusFromJSON,
25+
ImageStatusFromJSONTyped,
26+
ImageStatusToJSON,
27+
} from './ImageStatus';
2228
import type { StaticResourceMetadata } from './StaticResourceMetadata';
2329
import {
2430
StaticResourceMetadataFromJSON,
@@ -44,6 +50,12 @@ export interface Image {
4450
* @memberof Image
4551
*/
4652
spec: ImageSpec;
53+
/**
54+
*
55+
* @type {ImageStatus}
56+
* @memberof Image
57+
*/
58+
status: ImageStatus;
4759
}
4860

4961
/**
@@ -53,6 +65,7 @@ export function instanceOfImage(value: object): boolean {
5365
let isInstance = true;
5466
isInstance = isInstance && "metadata" in value;
5567
isInstance = isInstance && "spec" in value;
68+
isInstance = isInstance && "status" in value;
5669

5770
return isInstance;
5871
}
@@ -69,6 +82,7 @@ export function ImageFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ima
6982

7083
'metadata': StaticResourceMetadataFromJSON(json['metadata']),
7184
'spec': ImageSpecFromJSON(json['spec']),
85+
'status': ImageStatusFromJSON(json['status']),
7286
};
7387
}
7488

@@ -83,6 +97,7 @@ export function ImageToJSON(value?: Image | null): any {
8397

8498
'metadata': StaticResourceMetadataToJSON(value.metadata),
8599
'spec': ImageSpecToJSON(value.spec),
100+
'status': ImageStatusToJSON(value.status),
86101
};
87102
}
88103

src/lib/openapi/compute/models/ImageSpec.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
*/
1414

1515
import { exists, mapValues } from '../runtime';
16+
import type { Architecture } from './Architecture';
17+
import {
18+
ArchitectureFromJSON,
19+
ArchitectureFromJSONTyped,
20+
ArchitectureToJSON,
21+
} from './Architecture';
1622
import type { ImageGpu } from './ImageGpu';
1723
import {
1824
ImageGpuFromJSON,
@@ -38,6 +44,12 @@ import {
3844
* @interface ImageSpec
3945
*/
4046
export interface ImageSpec {
47+
/**
48+
*
49+
* @type {Architecture}
50+
* @memberof ImageSpec
51+
*/
52+
architecture: Architecture;
4153
/**
4254
* Minimum disk size required to use the image in GiB.
4355
* @type {number}
@@ -75,6 +87,7 @@ export interface ImageSpec {
7587
*/
7688
export function instanceOfImageSpec(value: object): boolean {
7789
let isInstance = true;
90+
isInstance = isInstance && "architecture" in value;
7891
isInstance = isInstance && "sizeGiB" in value;
7992
isInstance = isInstance && "virtualization" in value;
8093
isInstance = isInstance && "os" in value;
@@ -92,6 +105,7 @@ export function ImageSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean):
92105
}
93106
return {
94107

108+
'architecture': ArchitectureFromJSON(json['architecture']),
95109
'sizeGiB': json['sizeGiB'],
96110
'virtualization': ImageVirtualizationFromJSON(json['virtualization']),
97111
'os': ImageOSFromJSON(json['os']),
@@ -109,6 +123,7 @@ export function ImageSpecToJSON(value?: ImageSpec | null): any {
109123
}
110124
return {
111125

126+
'architecture': ArchitectureToJSON(value.architecture),
112127
'sizeGiB': value.sizeGiB,
113128
'virtualization': ImageVirtualizationToJSON(value.virtualization),
114129
'os': ImageOSToJSON(value.os),
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* Compute Service API
5+
* The Compute Service API provides services that allows provisioning and life cycle management of Compute clusters.
6+
*
7+
* The version of the OpenAPI document: 1.12.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+
* The images's lifecycle state.
18+
* @export
19+
*/
20+
export const ImageState = {
21+
Pending: 'pending',
22+
Creating: 'creating',
23+
Ready: 'ready',
24+
Failed: 'failed'
25+
} as const;
26+
export type ImageState = typeof ImageState[keyof typeof ImageState];
27+
28+
29+
export function ImageStateFromJSON(json: any): ImageState {
30+
return ImageStateFromJSONTyped(json, false);
31+
}
32+
33+
export function ImageStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageState {
34+
return json as ImageState;
35+
}
36+
37+
export function ImageStateToJSON(value?: ImageState | null): any {
38+
return value as any;
39+
}
40+
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* Compute Service API
5+
* The Compute Service API provides services that allows provisioning and life cycle management of Compute clusters.
6+
*
7+
* The version of the OpenAPI document: 1.12.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 type { ImageState } from './ImageState';
17+
import {
18+
ImageStateFromJSON,
19+
ImageStateFromJSONTyped,
20+
ImageStateToJSON,
21+
} from './ImageState';
22+
23+
/**
24+
* The image's status.
25+
* @export
26+
* @interface ImageStatus
27+
*/
28+
export interface ImageStatus {
29+
/**
30+
*
31+
* @type {ImageState}
32+
* @memberof ImageStatus
33+
*/
34+
state: ImageState;
35+
}
36+
37+
/**
38+
* Check if a given object implements the ImageStatus interface.
39+
*/
40+
export function instanceOfImageStatus(value: object): boolean {
41+
let isInstance = true;
42+
isInstance = isInstance && "state" in value;
43+
44+
return isInstance;
45+
}
46+
47+
export function ImageStatusFromJSON(json: any): ImageStatus {
48+
return ImageStatusFromJSONTyped(json, false);
49+
}
50+
51+
export function ImageStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImageStatus {
52+
if ((json === undefined) || (json === null)) {
53+
return json;
54+
}
55+
return {
56+
57+
'state': ImageStateFromJSON(json['state']),
58+
};
59+
}
60+
61+
export function ImageStatusToJSON(value?: ImageStatus | null): any {
62+
if (value === undefined) {
63+
return undefined;
64+
}
65+
if (value === null) {
66+
return null;
67+
}
68+
return {
69+
70+
'state': ImageStateToJSON(value.state),
71+
};
72+
}
73+

src/lib/openapi/compute/models/ModelError.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export const ModelErrorErrorEnum = {
4646
MethodNotAllowed: 'method_not_allowed',
4747
UnsupportedMediaType: 'unsupported_media_type',
4848
RequestEntityTooLarge: 'request_entity_too_large',
49+
UnprocessableContent: 'unprocessable_content',
4950
Forbidden: 'forbidden'
5051
} as const;
5152
export type ModelErrorErrorEnum = typeof ModelErrorErrorEnum[keyof typeof ModelErrorErrorEnum];

src/lib/openapi/compute/models/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* tslint:disable */
22
/* eslint-disable */
33
export * from './AllowedAddressPair';
4+
export * from './Architecture';
45
export * from './ClusterV2Create';
56
export * from './ClusterV2CreateSpec';
67
export * from './ClusterV2Read';
@@ -29,6 +30,8 @@ export * from './ImageGpu';
2930
export * from './ImageOS';
3031
export * from './ImageSelector';
3132
export * from './ImageSpec';
33+
export * from './ImageState';
34+
export * from './ImageStatus';
3235
export * from './ImageVirtualization';
3336
export * from './InstanceCreate';
3437
export * from './InstanceCreateSpec';

src/lib/openapi/identity/models/ModelError.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export const ModelErrorErrorEnum = {
4646
MethodNotAllowed: 'method_not_allowed',
4747
UnsupportedMediaType: 'unsupported_media_type',
4848
RequestEntityTooLarge: 'request_entity_too_large',
49+
UnprocessableContent: 'unprocessable_content',
4950
Forbidden: 'forbidden'
5051
} as const;
5152
export type ModelErrorErrorEnum = typeof ModelErrorErrorEnum[keyof typeof ModelErrorErrorEnum];

0 commit comments

Comments
 (0)