/* 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 { V1NodeAffinity, V1NodeAffinityFromJSON, V1NodeAffinityToJSON, V1PodAffinity, V1PodAffinityFromJSON, V1PodAffinityToJSON, V1PodAntiAffinity, V1PodAntiAffinityFromJSON, V1PodAntiAffinityToJSON, } from './'; /** * Affinity is a group of affinity scheduling rules. * @export * @interface V1Affinity */ export interface V1Affinity { /** * * @type {V1NodeAffinity} * @memberof V1Affinity */ nodeAffinity?: V1NodeAffinity; /** * * @type {V1PodAffinity} * @memberof V1Affinity */ podAffinity?: V1PodAffinity; /** * * @type {V1PodAntiAffinity} * @memberof V1Affinity */ podAntiAffinity?: V1PodAntiAffinity; } export function V1AffinityFromJSON(json: any): V1Affinity { return V1AffinityFromJSONTyped(json, false); } export function V1AffinityFromJSONTyped(json: any, _ignoreDiscriminator: boolean): V1Affinity { if (json === undefined || json === null) { return json; } return { nodeAffinity: !exists(json, 'nodeAffinity') ? undefined : V1NodeAffinityFromJSON(json['nodeAffinity']), podAffinity: !exists(json, 'podAffinity') ? undefined : V1PodAffinityFromJSON(json['podAffinity']), podAntiAffinity: !exists(json, 'podAntiAffinity') ? undefined : V1PodAntiAffinityFromJSON(json['podAntiAffinity']), }; } export function V1AffinityToJSON(value?: V1Affinity | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { nodeAffinity: V1NodeAffinityToJSON(value.nodeAffinity), podAffinity: V1PodAffinityToJSON(value.podAffinity), podAntiAffinity: V1PodAntiAffinityToJSON(value.podAntiAffinity), }; }