/* tslint:disable */ /* eslint-disable */ /** * KubeVirt API * This is KubeVirt API an add-on for Kubernetes. * * 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'; /** * A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. * @export * @interface K8sIoApiCoreV1NodeSelectorRequirement */ export interface K8sIoApiCoreV1NodeSelectorRequirement { /** * The label key that the selector applies to. * @type {string} * @memberof K8sIoApiCoreV1NodeSelectorRequirement */ key: string; /** * Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. * * Possible enum values: * - `"DoesNotExist"` * - `"Exists"` * - `"Gt"` * - `"In"` * - `"Lt"` * - `"NotIn"` * @type {string} * @memberof K8sIoApiCoreV1NodeSelectorRequirement */ operator: K8sIoApiCoreV1NodeSelectorRequirementOperatorEnum; /** * An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. * @type {Array} * @memberof K8sIoApiCoreV1NodeSelectorRequirement */ values?: Array; } /** * @export * @enum {string} */ export enum K8sIoApiCoreV1NodeSelectorRequirementOperatorEnum { DoesNotExist = 'DoesNotExist', Exists = 'Exists', Gt = 'Gt', In = 'In', Lt = 'Lt', NotIn = 'NotIn', } export function K8sIoApiCoreV1NodeSelectorRequirementFromJSON( json: any, ): K8sIoApiCoreV1NodeSelectorRequirement { return K8sIoApiCoreV1NodeSelectorRequirementFromJSONTyped(json, false); } export function K8sIoApiCoreV1NodeSelectorRequirementFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): K8sIoApiCoreV1NodeSelectorRequirement { if (json === undefined || json === null) { return json; } return { key: json['key'], operator: json['operator'], values: !exists(json, 'values') ? undefined : json['values'], }; } export function K8sIoApiCoreV1NodeSelectorRequirementToJSON( value?: K8sIoApiCoreV1NodeSelectorRequirement | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { key: value.key, operator: value.operator, values: value.values, }; }