/* 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 { IoK8sApiCoreV1Toleration, IoK8sApiCoreV1TolerationFromJSON, IoK8sApiCoreV1TolerationToJSON, } from './'; /** * Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass. * @export * @interface IoK8sApiNodeV1Scheduling */ export interface IoK8sApiNodeV1Scheduling { /** * nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission. * @type {{ [key: string]: string; }} * @memberof IoK8sApiNodeV1Scheduling */ nodeSelector?: { [key: string]: string }; /** * tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass. * @type {Array} * @memberof IoK8sApiNodeV1Scheduling */ tolerations?: Array; } export function IoK8sApiNodeV1SchedulingFromJSON(json: any): IoK8sApiNodeV1Scheduling { return IoK8sApiNodeV1SchedulingFromJSONTyped(json, false); } export function IoK8sApiNodeV1SchedulingFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiNodeV1Scheduling { if (json === undefined || json === null) { return json; } return { nodeSelector: !exists(json, 'nodeSelector') ? undefined : json['nodeSelector'], tolerations: !exists(json, 'tolerations') ? undefined : (json['tolerations'] as Array).map(IoK8sApiCoreV1TolerationFromJSON), }; } export function IoK8sApiNodeV1SchedulingToJSON(value?: IoK8sApiNodeV1Scheduling | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { nodeSelector: value.nodeSelector, tolerations: value.tolerations === undefined ? undefined : (value.tolerations as Array).map(IoK8sApiCoreV1TolerationToJSON), }; }