/* 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'; import { V1NodePlacement, V1NodePlacementFromJSON, V1NodePlacementToJSON } from './'; /** * * @export * @interface V1ComponentConfig */ export interface V1ComponentConfig { /** * * @type {V1NodePlacement} * @memberof V1ComponentConfig */ nodePlacement?: V1NodePlacement; /** * replicas indicates how many replicas should be created for each KubeVirt infrastructure component (like virt-api or virt-controller). Defaults to 2. WARNING: this is an advanced feature that prevents auto-scaling for core kubevirt components. Please use with caution! * @type {number} * @memberof V1ComponentConfig */ replicas?: number; } export function V1ComponentConfigFromJSON(json: any): V1ComponentConfig { return V1ComponentConfigFromJSONTyped(json, false); } export function V1ComponentConfigFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): V1ComponentConfig { if (json === undefined || json === null) { return json; } return { nodePlacement: !exists(json, 'nodePlacement') ? undefined : V1NodePlacementFromJSON(json['nodePlacement']), replicas: !exists(json, 'replicas') ? undefined : json['replicas'], }; } export function V1ComponentConfigToJSON(value?: V1ComponentConfig | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { nodePlacement: V1NodePlacementToJSON(value.nodePlacement), replicas: value.replicas, }; }