/* 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 { K8sIoApiCoreV1DownwardAPIVolumeFile, K8sIoApiCoreV1DownwardAPIVolumeFileFromJSON, K8sIoApiCoreV1DownwardAPIVolumeFileToJSON, } from './'; /** * DownwardAPIVolumeSource represents a volume containing downward API info. * @export * @interface V1DownwardAPIVolumeSource */ export interface V1DownwardAPIVolumeSource { /** * Fields is a list of downward API volume file * @type {Array} * @memberof V1DownwardAPIVolumeSource */ fields?: Array; /** * The volume label of the resulting disk inside the VMI. Different bootstrapping mechanisms require different values. Typical values are "cidata" (cloud-init), "config-2" (cloud-init) or "OEMDRV" (kickstart). * @type {string} * @memberof V1DownwardAPIVolumeSource */ volumeLabel?: string; } export function V1DownwardAPIVolumeSourceFromJSON(json: any): V1DownwardAPIVolumeSource { return V1DownwardAPIVolumeSourceFromJSONTyped(json, false); } export function V1DownwardAPIVolumeSourceFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): V1DownwardAPIVolumeSource { if (json === undefined || json === null) { return json; } return { fields: !exists(json, 'fields') ? undefined : (json['fields'] as Array).map(K8sIoApiCoreV1DownwardAPIVolumeFileFromJSON), volumeLabel: !exists(json, 'volumeLabel') ? undefined : json['volumeLabel'], }; } export function V1DownwardAPIVolumeSourceToJSON(value?: V1DownwardAPIVolumeSource | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { fields: value.fields === undefined ? undefined : (value.fields as Array).map(K8sIoApiCoreV1DownwardAPIVolumeFileToJSON), volumeLabel: value.volumeLabel, }; }