/* tslint:disable */ /* eslint-disable */ /** * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * * * 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 type { V1NMStateSpecAffinity } from './V1NMStateSpecAffinity'; import { V1NMStateSpecAffinityFromJSON, V1NMStateSpecAffinityToJSON, } from './V1NMStateSpecAffinity'; import type { V1NMStateSpecInfraAffinity } from './V1NMStateSpecInfraAffinity'; import { V1NMStateSpecInfraAffinityFromJSON, V1NMStateSpecInfraAffinityToJSON, } from './V1NMStateSpecInfraAffinity'; import type { V1NMStateSpecProbeConfiguration } from './V1NMStateSpecProbeConfiguration'; import { V1NMStateSpecProbeConfigurationFromJSON, V1NMStateSpecProbeConfigurationToJSON, } from './V1NMStateSpecProbeConfiguration'; import type { V1NMStateSpecSelfSignConfiguration } from './V1NMStateSpecSelfSignConfiguration'; import { V1NMStateSpecSelfSignConfigurationFromJSON, V1NMStateSpecSelfSignConfigurationToJSON, } from './V1NMStateSpecSelfSignConfiguration'; /** * NMStateSpec defines the desired state of NMState * @export * @interface V1NMStateSpec */ export interface V1NMStateSpec { /** * * @type {V1NMStateSpecAffinity} * @memberof V1NMStateSpec */ affinity?: V1NMStateSpecAffinity; /** * * @type {V1NMStateSpecInfraAffinity} * @memberof V1NMStateSpec */ infraAffinity?: V1NMStateSpecInfraAffinity; /** * InfraNodeSelector is an optional selector that will be added to webhook, metrics & console-plugin Deployment manifests * If InfraNodeSelector is specified, the webhook, metrics and the console plugin will run only on nodes that have each * of the indicated key-value pairs as labels applied to the node. * @type {{ [key: string]: any; }} * @memberof V1NMStateSpec */ infraNodeSelector?: { [key: string]: any } | null; /** * InfraTolerations is an optional list of tolerations to be added to webhook, metrics & console-plugin Deployment manifests * If InfraTolerations is specified, the webhook, metrics and the console plugin will be able to be scheduled on nodes with * corresponding taints * @type {any} * @memberof V1NMStateSpec */ infraTolerations?: any | null; /** * NodeSelector is an optional selector that will be added to handler DaemonSet manifest * for both workers and control-plane (https://github.com/nmstate/kubernetes-nmstate/blob/main/deploy/handler/operator.yaml). * If NodeSelector is specified, the handler will run only on nodes that have each of the indicated key-value pairs * as labels applied to the node. * @type {{ [key: string]: any; }} * @memberof V1NMStateSpec */ nodeSelector?: { [key: string]: any } | null; /** * * @type {V1NMStateSpecProbeConfiguration} * @memberof V1NMStateSpec */ probeConfiguration?: V1NMStateSpecProbeConfiguration; /** * * @type {V1NMStateSpecSelfSignConfiguration} * @memberof V1NMStateSpec */ selfSignConfiguration?: V1NMStateSpecSelfSignConfiguration; /** * Tolerations is an optional list of tolerations to be added to handler DaemonSet manifest * If Tolerations is specified, the handler daemonset will be also scheduled on nodes with corresponding taints * @type {any} * @memberof V1NMStateSpec */ tolerations?: any | null; } /** * Check if a given object implements the V1NMStateSpec interface. */ export function instanceOfV1NMStateSpec(_value: object): boolean { const isInstance = true; return isInstance; } export function V1NMStateSpecFromJSON(json: any): V1NMStateSpec { return V1NMStateSpecFromJSONTyped(json, false); } export function V1NMStateSpecFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): V1NMStateSpec { if (json === undefined || json === null) { return json; } return { affinity: !exists(json, 'affinity') ? undefined : V1NMStateSpecAffinityFromJSON(json['affinity']), infraAffinity: !exists(json, 'infraAffinity') ? undefined : V1NMStateSpecInfraAffinityFromJSON(json['infraAffinity']), infraNodeSelector: !exists(json, 'infraNodeSelector') ? undefined : json['infraNodeSelector'], infraTolerations: !exists(json, 'infraTolerations') ? undefined : json['infraTolerations'], nodeSelector: !exists(json, 'nodeSelector') ? undefined : json['nodeSelector'], probeConfiguration: !exists(json, 'probeConfiguration') ? undefined : V1NMStateSpecProbeConfigurationFromJSON(json['probeConfiguration']), selfSignConfiguration: !exists(json, 'selfSignConfiguration') ? undefined : V1NMStateSpecSelfSignConfigurationFromJSON(json['selfSignConfiguration']), tolerations: !exists(json, 'tolerations') ? undefined : json['tolerations'], }; } export function V1NMStateSpecToJSON(value?: V1NMStateSpec | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { affinity: V1NMStateSpecAffinityToJSON(value.affinity), infraAffinity: V1NMStateSpecInfraAffinityToJSON(value.infraAffinity), infraNodeSelector: value.infraNodeSelector, infraTolerations: value.infraTolerations, nodeSelector: value.nodeSelector, probeConfiguration: V1NMStateSpecProbeConfigurationToJSON(value.probeConfiguration), selfSignConfiguration: V1NMStateSpecSelfSignConfigurationToJSON(value.selfSignConfiguration), tolerations: value.tolerations, }; }