@codingame/kubevirt-api
Version:
kubevirt OpenAPI automation for TypeScript
62 lines • 2.53 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 { V1BlockSizeFromJSON, V1BlockSizeToJSON, V1CDRomTargetFromJSON, V1CDRomTargetToJSON, V1DiskTargetFromJSON, V1DiskTargetToJSON, V1LunTargetFromJSON, V1LunTargetToJSON, } from './';
export function V1DiskFromJSON(json) {
return V1DiskFromJSONTyped(json, false);
}
export function V1DiskFromJSONTyped(json, _ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
blockSize: !exists(json, 'blockSize') ? undefined : V1BlockSizeFromJSON(json['blockSize']),
bootOrder: !exists(json, 'bootOrder') ? undefined : json['bootOrder'],
cache: !exists(json, 'cache') ? undefined : json['cache'],
cdrom: !exists(json, 'cdrom') ? undefined : V1CDRomTargetFromJSON(json['cdrom']),
dedicatedIOThread: !exists(json, 'dedicatedIOThread') ? undefined : json['dedicatedIOThread'],
disk: !exists(json, 'disk') ? undefined : V1DiskTargetFromJSON(json['disk']),
errorPolicy: !exists(json, 'errorPolicy') ? undefined : json['errorPolicy'],
io: !exists(json, 'io') ? undefined : json['io'],
lun: !exists(json, 'lun') ? undefined : V1LunTargetFromJSON(json['lun']),
name: json['name'],
serial: !exists(json, 'serial') ? undefined : json['serial'],
shareable: !exists(json, 'shareable') ? undefined : json['shareable'],
tag: !exists(json, 'tag') ? undefined : json['tag'],
};
}
export function V1DiskToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
blockSize: V1BlockSizeToJSON(value.blockSize),
bootOrder: value.bootOrder,
cache: value.cache,
cdrom: V1CDRomTargetToJSON(value.cdrom),
dedicatedIOThread: value.dedicatedIOThread,
disk: V1DiskTargetToJSON(value.disk),
errorPolicy: value.errorPolicy,
io: value.io,
lun: V1LunTargetToJSON(value.lun),
name: value.name,
serial: value.serial,
shareable: value.shareable,
tag: value.tag,
};
}
//# sourceMappingURL=V1Disk.js.map