@codingame/kubevirt-api
Version:
kubevirt OpenAPI automation for TypeScript
64 lines • 2.43 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 { V1CPUFeatureFromJSON, V1CPUFeatureToJSON, V1NUMAFromJSON, V1NUMAToJSON, V1RealtimeFromJSON, V1RealtimeToJSON, } from './';
export function V1CPUFromJSON(json) {
return V1CPUFromJSONTyped(json, false);
}
export function V1CPUFromJSONTyped(json, _ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
cores: !exists(json, 'cores') ? undefined : json['cores'],
dedicatedCpuPlacement: !exists(json, 'dedicatedCpuPlacement')
? undefined
: json['dedicatedCpuPlacement'],
features: !exists(json, 'features')
? undefined
: json['features'].map(V1CPUFeatureFromJSON),
isolateEmulatorThread: !exists(json, 'isolateEmulatorThread')
? undefined
: json['isolateEmulatorThread'],
maxSockets: !exists(json, 'maxSockets') ? undefined : json['maxSockets'],
model: !exists(json, 'model') ? undefined : json['model'],
numa: !exists(json, 'numa') ? undefined : V1NUMAFromJSON(json['numa']),
realtime: !exists(json, 'realtime') ? undefined : V1RealtimeFromJSON(json['realtime']),
sockets: !exists(json, 'sockets') ? undefined : json['sockets'],
threads: !exists(json, 'threads') ? undefined : json['threads'],
};
}
export function V1CPUToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
cores: value.cores,
dedicatedCpuPlacement: value.dedicatedCpuPlacement,
features: value.features === undefined
? undefined
: value.features.map(V1CPUFeatureToJSON),
isolateEmulatorThread: value.isolateEmulatorThread,
maxSockets: value.maxSockets,
model: value.model,
numa: V1NUMAToJSON(value.numa),
realtime: V1RealtimeToJSON(value.realtime),
sockets: value.sockets,
threads: value.threads,
};
}
//# sourceMappingURL=V1CPU.js.map