UNPKG

@codingame/kubevirt-api

Version:

kubevirt OpenAPI automation for TypeScript

60 lines 2.58 kB
/* 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 { V1DataVolumeTemplateSpecFromJSON, V1DataVolumeTemplateSpecToJSON, V1InstancetypeMatcherFromJSON, V1InstancetypeMatcherToJSON, V1PreferenceMatcherFromJSON, V1PreferenceMatcherToJSON, V1VirtualMachineInstanceTemplateSpecFromJSON, V1VirtualMachineInstanceTemplateSpecToJSON, } from './'; export function V1VirtualMachineSpecFromJSON(json) { return V1VirtualMachineSpecFromJSONTyped(json, false); } export function V1VirtualMachineSpecFromJSONTyped(json, _ignoreDiscriminator) { if (json === undefined || json === null) { return json; } return { dataVolumeTemplates: !exists(json, 'dataVolumeTemplates') ? undefined : json['dataVolumeTemplates'].map(V1DataVolumeTemplateSpecFromJSON), instancetype: !exists(json, 'instancetype') ? undefined : V1InstancetypeMatcherFromJSON(json['instancetype']), preference: !exists(json, 'preference') ? undefined : V1PreferenceMatcherFromJSON(json['preference']), runStrategy: !exists(json, 'runStrategy') ? undefined : json['runStrategy'], running: !exists(json, 'running') ? undefined : json['running'], template: V1VirtualMachineInstanceTemplateSpecFromJSON(json['template']), updateVolumesStrategy: !exists(json, 'updateVolumesStrategy') ? undefined : json['updateVolumesStrategy'], }; } export function V1VirtualMachineSpecToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { dataVolumeTemplates: value.dataVolumeTemplates === undefined ? undefined : value.dataVolumeTemplates.map(V1DataVolumeTemplateSpecToJSON), instancetype: V1InstancetypeMatcherToJSON(value.instancetype), preference: V1PreferenceMatcherToJSON(value.preference), runStrategy: value.runStrategy, running: value.running, template: V1VirtualMachineInstanceTemplateSpecToJSON(value.template), updateVolumesStrategy: value.updateVolumesStrategy, }; } //# sourceMappingURL=V1VirtualMachineSpec.js.map