/* 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 { V1MediatedHostDevice, V1MediatedHostDeviceFromJSON, V1MediatedHostDeviceToJSON, V1PciHostDevice, V1PciHostDeviceFromJSON, V1PciHostDeviceToJSON, V1USBHostDevice, V1USBHostDeviceFromJSON, V1USBHostDeviceToJSON, } from './'; /** * PermittedHostDevices holds information about devices allowed for passthrough * @export * @interface V1PermittedHostDevices */ export interface V1PermittedHostDevices { /** * * @type {Array} * @memberof V1PermittedHostDevices */ mediatedDevices?: Array; /** * * @type {Array} * @memberof V1PermittedHostDevices */ pciHostDevices?: Array; /** * * @type {Array} * @memberof V1PermittedHostDevices */ usb?: Array; } export function V1PermittedHostDevicesFromJSON(json: any): V1PermittedHostDevices { return V1PermittedHostDevicesFromJSONTyped(json, false); } export function V1PermittedHostDevicesFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): V1PermittedHostDevices { if (json === undefined || json === null) { return json; } return { mediatedDevices: !exists(json, 'mediatedDevices') ? undefined : (json['mediatedDevices'] as Array).map(V1MediatedHostDeviceFromJSON), pciHostDevices: !exists(json, 'pciHostDevices') ? undefined : (json['pciHostDevices'] as Array).map(V1PciHostDeviceFromJSON), usb: !exists(json, 'usb') ? undefined : (json['usb'] as Array).map(V1USBHostDeviceFromJSON), }; } export function V1PermittedHostDevicesToJSON(value?: V1PermittedHostDevices | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { mediatedDevices: value.mediatedDevices === undefined ? undefined : (value.mediatedDevices as Array).map(V1MediatedHostDeviceToJSON), pciHostDevices: value.pciHostDevices === undefined ? undefined : (value.pciHostDevices as Array).map(V1PciHostDeviceToJSON), usb: value.usb === undefined ? undefined : (value.usb as Array).map(V1USBHostDeviceToJSON), }; }