/* 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 { V1CPUFeature, V1CPUFeatureFromJSON, V1CPUFeatureToJSON, V1beta1SpreadOptions, V1beta1SpreadOptionsFromJSON, V1beta1SpreadOptionsToJSON, } from './'; /** * CPUPreferences contains various optional CPU preferences. * @export * @interface V1beta1CPUPreferences */ export interface V1beta1CPUPreferences { /** * PreferredCPUFeatures optionally defines a slice of preferred CPU features. * @type {Array} * @memberof V1beta1CPUPreferences */ preferredCPUFeatures?: Array; /** * PreferredCPUTopology optionally defines the preferred guest visible CPU topology, defaults to PreferSockets. * @type {string} * @memberof V1beta1CPUPreferences */ preferredCPUTopology?: string; /** * * @type {V1beta1SpreadOptions} * @memberof V1beta1CPUPreferences */ spreadOptions?: V1beta1SpreadOptions; } export function V1beta1CPUPreferencesFromJSON(json: any): V1beta1CPUPreferences { return V1beta1CPUPreferencesFromJSONTyped(json, false); } export function V1beta1CPUPreferencesFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): V1beta1CPUPreferences { if (json === undefined || json === null) { return json; } return { preferredCPUFeatures: !exists(json, 'preferredCPUFeatures') ? undefined : (json['preferredCPUFeatures'] as Array).map(V1CPUFeatureFromJSON), preferredCPUTopology: !exists(json, 'preferredCPUTopology') ? undefined : json['preferredCPUTopology'], spreadOptions: !exists(json, 'spreadOptions') ? undefined : V1beta1SpreadOptionsFromJSON(json['spreadOptions']), }; } export function V1beta1CPUPreferencesToJSON(value?: V1beta1CPUPreferences | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { preferredCPUFeatures: value.preferredCPUFeatures === undefined ? undefined : (value.preferredCPUFeatures as Array).map(V1CPUFeatureToJSON), preferredCPUTopology: value.preferredCPUTopology, spreadOptions: V1beta1SpreadOptionsToJSON(value.spreadOptions), }; }