@codingame/kubevirt-api
Version:
kubevirt OpenAPI automation for TypeScript
48 lines • 2.07 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 { V1PodAffinityTermFromJSON, V1PodAffinityTermToJSON, V1WeightedPodAffinityTermFromJSON, V1WeightedPodAffinityTermToJSON, } from './';
export function V1PodAffinityFromJSON(json) {
return V1PodAffinityFromJSONTyped(json, false);
}
export function V1PodAffinityFromJSONTyped(json, _ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
preferredDuringSchedulingIgnoredDuringExecution: !exists(json, 'preferredDuringSchedulingIgnoredDuringExecution')
? undefined
: json['preferredDuringSchedulingIgnoredDuringExecution'].map(V1WeightedPodAffinityTermFromJSON),
requiredDuringSchedulingIgnoredDuringExecution: !exists(json, 'requiredDuringSchedulingIgnoredDuringExecution')
? undefined
: json['requiredDuringSchedulingIgnoredDuringExecution'].map(V1PodAffinityTermFromJSON),
};
}
export function V1PodAffinityToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
preferredDuringSchedulingIgnoredDuringExecution: value.preferredDuringSchedulingIgnoredDuringExecution === undefined
? undefined
: value.preferredDuringSchedulingIgnoredDuringExecution.map(V1WeightedPodAffinityTermToJSON),
requiredDuringSchedulingIgnoredDuringExecution: value.requiredDuringSchedulingIgnoredDuringExecution === undefined
? undefined
: value.requiredDuringSchedulingIgnoredDuringExecution.map(V1PodAffinityTermToJSON),
};
}
//# sourceMappingURL=V1PodAffinity.js.map