@codingame/kubevirt-api
Version:
kubevirt OpenAPI automation for TypeScript
60 lines • 2.72 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* KubeVirt API
* This is KubeVirt API an add-on for Kubernetes.
*
* The version of the OpenAPI document: 1.0.0
* Contact: kubevirt-dev@googlegroups.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { exists } from '../runtime';
import { V1GPUFromJSON, V1GPUToJSON, V1HostDeviceFromJSON, V1HostDeviceToJSON, V1LaunchSecurityFromJSON, V1LaunchSecurityToJSON, V1beta1CPUInstancetypeFromJSON, V1beta1CPUInstancetypeToJSON, V1beta1MemoryInstancetypeFromJSON, V1beta1MemoryInstancetypeToJSON, } from './';
export function V1beta1VirtualMachineInstancetypeSpecFromJSON(json) {
return V1beta1VirtualMachineInstancetypeSpecFromJSONTyped(json, false);
}
export function V1beta1VirtualMachineInstancetypeSpecFromJSONTyped(json, _ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
annotations: !exists(json, 'annotations') ? undefined : json['annotations'],
cpu: V1beta1CPUInstancetypeFromJSON(json['cpu']),
gpus: !exists(json, 'gpus') ? undefined : json['gpus'].map(V1GPUFromJSON),
hostDevices: !exists(json, 'hostDevices')
? undefined
: json['hostDevices'].map(V1HostDeviceFromJSON),
ioThreadsPolicy: !exists(json, 'ioThreadsPolicy') ? undefined : json['ioThreadsPolicy'],
launchSecurity: !exists(json, 'launchSecurity')
? undefined
: V1LaunchSecurityFromJSON(json['launchSecurity']),
memory: V1beta1MemoryInstancetypeFromJSON(json['memory']),
nodeSelector: !exists(json, 'nodeSelector') ? undefined : json['nodeSelector'],
schedulerName: !exists(json, 'schedulerName') ? undefined : json['schedulerName'],
};
}
export function V1beta1VirtualMachineInstancetypeSpecToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
annotations: value.annotations,
cpu: V1beta1CPUInstancetypeToJSON(value.cpu),
gpus: value.gpus === undefined ? undefined : value.gpus.map(V1GPUToJSON),
hostDevices: value.hostDevices === undefined
? undefined
: value.hostDevices.map(V1HostDeviceToJSON),
ioThreadsPolicy: value.ioThreadsPolicy,
launchSecurity: V1LaunchSecurityToJSON(value.launchSecurity),
memory: V1beta1MemoryInstancetypeToJSON(value.memory),
nodeSelector: value.nodeSelector,
schedulerName: value.schedulerName,
};
}
//# sourceMappingURL=V1beta1VirtualMachineInstancetypeSpec.js.map