/* 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 { V1beta1SourceSpec, V1beta1SourceSpecFromJSON, V1beta1SourceSpecToJSON, V1beta1VolumeBackup, V1beta1VolumeBackupFromJSON, V1beta1VolumeBackupToJSON, } from './'; /** * VirtualMachineSnapshotContentSpec is the spec for a VirtualMachineSnapshotContent resource * @export * @interface V1beta1VirtualMachineSnapshotContentSpec */ export interface V1beta1VirtualMachineSnapshotContentSpec { /** * * @type {V1beta1SourceSpec} * @memberof V1beta1VirtualMachineSnapshotContentSpec */ source: V1beta1SourceSpec; /** * * @type {string} * @memberof V1beta1VirtualMachineSnapshotContentSpec */ virtualMachineSnapshotName?: string; /** * * @type {Array} * @memberof V1beta1VirtualMachineSnapshotContentSpec */ volumeBackups?: Array; } export function V1beta1VirtualMachineSnapshotContentSpecFromJSON( json: any, ): V1beta1VirtualMachineSnapshotContentSpec { return V1beta1VirtualMachineSnapshotContentSpecFromJSONTyped(json, false); } export function V1beta1VirtualMachineSnapshotContentSpecFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): V1beta1VirtualMachineSnapshotContentSpec { if (json === undefined || json === null) { return json; } return { source: V1beta1SourceSpecFromJSON(json['source']), virtualMachineSnapshotName: !exists(json, 'virtualMachineSnapshotName') ? undefined : json['virtualMachineSnapshotName'], volumeBackups: !exists(json, 'volumeBackups') ? undefined : (json['volumeBackups'] as Array).map(V1beta1VolumeBackupFromJSON), }; } export function V1beta1VirtualMachineSnapshotContentSpecToJSON( value?: V1beta1VirtualMachineSnapshotContentSpec | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { source: V1beta1SourceSpecToJSON(value.source), virtualMachineSnapshotName: value.virtualMachineSnapshotName, volumeBackups: value.volumeBackups === undefined ? undefined : (value.volumeBackups as Array).map(V1beta1VolumeBackupToJSON), }; }