/* 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 { V1VGPUOptions, V1VGPUOptionsFromJSON, V1VGPUOptionsToJSON } from './'; /** * * @export * @interface V1GPU */ export interface V1GPU { /** * ClaimName needs to be provided from the list vmi.spec.resourceClaims[].name where this device is allocated * @type {string} * @memberof V1GPU */ claimName?: string; /** * DeviceName is the name of the device provisioned by device-plugins * @type {string} * @memberof V1GPU */ deviceName?: string; /** * Name of the GPU device as exposed by a device plugin * @type {string} * @memberof V1GPU */ name: string; /** * RequestName needs to be provided from resourceClaim.spec.devices.requests[].name where this device is requested * @type {string} * @memberof V1GPU */ requestName?: string; /** * If specified, the virtual network interface address and its tag will be provided to the guest via config drive * @type {string} * @memberof V1GPU */ tag?: string; /** * * @type {V1VGPUOptions} * @memberof V1GPU */ virtualGPUOptions?: V1VGPUOptions; } export function V1GPUFromJSON(json: any): V1GPU { return V1GPUFromJSONTyped(json, false); } export function V1GPUFromJSONTyped(json: any, _ignoreDiscriminator: boolean): V1GPU { if (json === undefined || json === null) { return json; } return { claimName: !exists(json, 'claimName') ? undefined : json['claimName'], deviceName: !exists(json, 'deviceName') ? undefined : json['deviceName'], name: json['name'], requestName: !exists(json, 'requestName') ? undefined : json['requestName'], tag: !exists(json, 'tag') ? undefined : json['tag'], virtualGPUOptions: !exists(json, 'virtualGPUOptions') ? undefined : V1VGPUOptionsFromJSON(json['virtualGPUOptions']), }; } export function V1GPUToJSON(value?: V1GPU | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { claimName: value.claimName, deviceName: value.deviceName, name: value.name, requestName: value.requestName, tag: value.tag, virtualGPUOptions: V1VGPUOptionsToJSON(value.virtualGPUOptions), }; }