@codingame/kubevirt-api
Version:
kubevirt OpenAPI automation for TypeScript
64 lines • 2.88 kB
JavaScript
/* 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 { IoK8sApiResourceV1beta1DeviceSelectorFromJSON, IoK8sApiResourceV1beta1DeviceSelectorToJSON, IoK8sApiResourceV1beta1DeviceSubRequestFromJSON, IoK8sApiResourceV1beta1DeviceSubRequestToJSON, IoK8sApiResourceV1beta1DeviceTolerationFromJSON, IoK8sApiResourceV1beta1DeviceTolerationToJSON, } from './';
export function IoK8sApiResourceV1beta1DeviceRequestFromJSON(json) {
return IoK8sApiResourceV1beta1DeviceRequestFromJSONTyped(json, false);
}
export function IoK8sApiResourceV1beta1DeviceRequestFromJSONTyped(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(IoK8sApiResourceV1beta1DeviceSubRequestFromJSON),
name: json['name'],
selectors: !exists(json, 'selectors')
? undefined
: json['selectors'].map(IoK8sApiResourceV1beta1DeviceSelectorFromJSON),
tolerations: !exists(json, 'tolerations')
? undefined
: json['tolerations'].map(IoK8sApiResourceV1beta1DeviceTolerationFromJSON),
};
}
export function IoK8sApiResourceV1beta1DeviceRequestToJSON(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(IoK8sApiResourceV1beta1DeviceSubRequestToJSON),
name: value.name,
selectors: value.selectors === undefined
? undefined
: value.selectors.map(IoK8sApiResourceV1beta1DeviceSelectorToJSON),
tolerations: value.tolerations === undefined
? undefined
: value.tolerations.map(IoK8sApiResourceV1beta1DeviceTolerationToJSON),
};
}
//# sourceMappingURL=IoK8sApiResourceV1beta1DeviceRequest.js.map