UNPKG

@codingame/kubevirt-api

Version:

kubevirt OpenAPI automation for TypeScript

64 lines 2.9 kB
/* tslint:disable */ /* eslint-disable */ /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: unversioned * * * 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 { IoK8sApiResourceV1alpha3DeviceSelectorFromJSON, IoK8sApiResourceV1alpha3DeviceSelectorToJSON, IoK8sApiResourceV1alpha3DeviceSubRequestFromJSON, IoK8sApiResourceV1alpha3DeviceSubRequestToJSON, IoK8sApiResourceV1alpha3DeviceTolerationFromJSON, IoK8sApiResourceV1alpha3DeviceTolerationToJSON, } from './'; export function IoK8sApiResourceV1alpha3DeviceRequestFromJSON(json) { return IoK8sApiResourceV1alpha3DeviceRequestFromJSONTyped(json, false); } export function IoK8sApiResourceV1alpha3DeviceRequestFromJSONTyped(json, _ignoreDiscriminator) { if (json === undefined || json === null) { return json; } return { adminAccess: !exists(json, 'adminAccess') ? undefined : json['adminAccess'], allocationMode: !exists(json, 'allocationMode') ? undefined : json['allocationMode'], count: !exists(json, 'count') ? undefined : json['count'], deviceClassName: !exists(json, 'deviceClassName') ? undefined : json['deviceClassName'], firstAvailable: !exists(json, 'firstAvailable') ? undefined : json['firstAvailable'].map(IoK8sApiResourceV1alpha3DeviceSubRequestFromJSON), name: json['name'], selectors: !exists(json, 'selectors') ? undefined : json['selectors'].map(IoK8sApiResourceV1alpha3DeviceSelectorFromJSON), tolerations: !exists(json, 'tolerations') ? undefined : json['tolerations'].map(IoK8sApiResourceV1alpha3DeviceTolerationFromJSON), }; } export function IoK8sApiResourceV1alpha3DeviceRequestToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { adminAccess: value.adminAccess, allocationMode: value.allocationMode, count: value.count, deviceClassName: value.deviceClassName, firstAvailable: value.firstAvailable === undefined ? undefined : value.firstAvailable.map(IoK8sApiResourceV1alpha3DeviceSubRequestToJSON), name: value.name, selectors: value.selectors === undefined ? undefined : value.selectors.map(IoK8sApiResourceV1alpha3DeviceSelectorToJSON), tolerations: value.tolerations === undefined ? undefined : value.tolerations.map(IoK8sApiResourceV1alpha3DeviceTolerationToJSON), }; } //# sourceMappingURL=IoK8sApiResourceV1alpha3DeviceRequest.js.map