@codingame/kubevirt-api
Version:
kubevirt OpenAPI automation for TypeScript
46 lines • 1.59 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* KubeVirt Containerized Data Importer API
* Containerized Data Importer for KubeVirt.
*
* 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 { V1AffinityFromJSON, V1AffinityToJSON, V1TolerationFromJSON, V1TolerationToJSON, } from './';
export function ApiNodePlacementFromJSON(json) {
return ApiNodePlacementFromJSONTyped(json, false);
}
export function ApiNodePlacementFromJSONTyped(json, _ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
affinity: !exists(json, 'affinity') ? undefined : V1AffinityFromJSON(json['affinity']),
nodeSelector: !exists(json, 'nodeSelector') ? undefined : json['nodeSelector'],
tolerations: !exists(json, 'tolerations')
? undefined
: json['tolerations'].map(V1TolerationFromJSON),
};
}
export function ApiNodePlacementToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
affinity: V1AffinityToJSON(value.affinity),
nodeSelector: value.nodeSelector,
tolerations: value.tolerations === undefined
? undefined
: value.tolerations.map(V1TolerationToJSON),
};
}
//# sourceMappingURL=ApiNodePlacement.js.map