@codingame/kubevirt-api
Version:
kubevirt OpenAPI automation for TypeScript
52 lines • 2.34 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 { IoK8sApiResourceV1alpha3AllocatedDeviceStatusFromJSON, IoK8sApiResourceV1alpha3AllocatedDeviceStatusToJSON, IoK8sApiResourceV1alpha3AllocationResultFromJSON, IoK8sApiResourceV1alpha3AllocationResultToJSON, IoK8sApiResourceV1alpha3ResourceClaimConsumerReferenceFromJSON, IoK8sApiResourceV1alpha3ResourceClaimConsumerReferenceToJSON, } from './';
export function IoK8sApiResourceV1alpha3ResourceClaimStatusFromJSON(json) {
return IoK8sApiResourceV1alpha3ResourceClaimStatusFromJSONTyped(json, false);
}
export function IoK8sApiResourceV1alpha3ResourceClaimStatusFromJSONTyped(json, _ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
allocation: !exists(json, 'allocation')
? undefined
: IoK8sApiResourceV1alpha3AllocationResultFromJSON(json['allocation']),
devices: !exists(json, 'devices')
? undefined
: json['devices'].map(IoK8sApiResourceV1alpha3AllocatedDeviceStatusFromJSON),
reservedFor: !exists(json, 'reservedFor')
? undefined
: json['reservedFor'].map(IoK8sApiResourceV1alpha3ResourceClaimConsumerReferenceFromJSON),
};
}
export function IoK8sApiResourceV1alpha3ResourceClaimStatusToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
allocation: IoK8sApiResourceV1alpha3AllocationResultToJSON(value.allocation),
devices: value.devices === undefined
? undefined
: value.devices.map(IoK8sApiResourceV1alpha3AllocatedDeviceStatusToJSON),
reservedFor: value.reservedFor === undefined
? undefined
: value.reservedFor.map(IoK8sApiResourceV1alpha3ResourceClaimConsumerReferenceToJSON),
};
}
//# sourceMappingURL=IoK8sApiResourceV1alpha3ResourceClaimStatus.js.map