@codingame/kubevirt-api
Version:
kubevirt OpenAPI automation for TypeScript
172 lines • 10.8 kB
JavaScript
/* 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 { K8sIoApimachineryPkgApisMetaV1LabelSelectorFromJSON, K8sIoApimachineryPkgApisMetaV1LabelSelectorToJSON, V1ArchConfigurationFromJSON, V1ArchConfigurationToJSON, V1CommonInstancetypesDeploymentFromJSON, V1CommonInstancetypesDeploymentToJSON, V1DeveloperConfigurationFromJSON, V1DeveloperConfigurationToJSON, V1InstancetypeConfigurationFromJSON, V1InstancetypeConfigurationToJSON, V1KSMConfigurationFromJSON, V1KSMConfigurationToJSON, V1LiveUpdateConfigurationFromJSON, V1LiveUpdateConfigurationToJSON, V1MediatedDevicesConfigurationFromJSON, V1MediatedDevicesConfigurationToJSON, V1MigrationConfigurationFromJSON, V1MigrationConfigurationToJSON, V1NetworkConfigurationFromJSON, V1NetworkConfigurationToJSON, V1PermittedHostDevicesFromJSON, V1PermittedHostDevicesToJSON, V1ReloadableComponentConfigurationFromJSON, V1ReloadableComponentConfigurationToJSON, V1SMBiosConfigurationFromJSON, V1SMBiosConfigurationToJSON, V1SeccompConfigurationFromJSON, V1SeccompConfigurationToJSON, V1SupportContainerResourcesFromJSON, V1SupportContainerResourcesToJSON, V1TLSConfigurationFromJSON, V1TLSConfigurationToJSON, V1VirtualMachineOptionsFromJSON, V1VirtualMachineOptionsToJSON, } from './';
/**
* @export
* @enum {string}
*/
export var V1KubeVirtConfigurationImagePullPolicyEnum;
(function (V1KubeVirtConfigurationImagePullPolicyEnum) {
V1KubeVirtConfigurationImagePullPolicyEnum["Always"] = "Always";
V1KubeVirtConfigurationImagePullPolicyEnum["IfNotPresent"] = "IfNotPresent";
V1KubeVirtConfigurationImagePullPolicyEnum["Never"] = "Never";
})(V1KubeVirtConfigurationImagePullPolicyEnum || (V1KubeVirtConfigurationImagePullPolicyEnum = {}));
export function V1KubeVirtConfigurationFromJSON(json) {
return V1KubeVirtConfigurationFromJSONTyped(json, false);
}
export function V1KubeVirtConfigurationFromJSONTyped(json, _ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
additionalGuestMemoryOverheadRatio: !exists(json, 'additionalGuestMemoryOverheadRatio')
? undefined
: json['additionalGuestMemoryOverheadRatio'],
apiConfiguration: !exists(json, 'apiConfiguration')
? undefined
: V1ReloadableComponentConfigurationFromJSON(json['apiConfiguration']),
architectureConfiguration: !exists(json, 'architectureConfiguration')
? undefined
: V1ArchConfigurationFromJSON(json['architectureConfiguration']),
autoCPULimitNamespaceLabelSelector: !exists(json, 'autoCPULimitNamespaceLabelSelector')
? undefined
: K8sIoApimachineryPkgApisMetaV1LabelSelectorFromJSON(json['autoCPULimitNamespaceLabelSelector']),
commonInstancetypesDeployment: !exists(json, 'commonInstancetypesDeployment')
? undefined
: V1CommonInstancetypesDeploymentFromJSON(json['commonInstancetypesDeployment']),
controllerConfiguration: !exists(json, 'controllerConfiguration')
? undefined
: V1ReloadableComponentConfigurationFromJSON(json['controllerConfiguration']),
cpuModel: !exists(json, 'cpuModel') ? undefined : json['cpuModel'],
cpuRequest: !exists(json, 'cpuRequest') ? undefined : json['cpuRequest'],
defaultRuntimeClass: !exists(json, 'defaultRuntimeClass')
? undefined
: json['defaultRuntimeClass'],
developerConfiguration: !exists(json, 'developerConfiguration')
? undefined
: V1DeveloperConfigurationFromJSON(json['developerConfiguration']),
emulatedMachines: !exists(json, 'emulatedMachines') ? undefined : json['emulatedMachines'],
evictionStrategy: !exists(json, 'evictionStrategy') ? undefined : json['evictionStrategy'],
handlerConfiguration: !exists(json, 'handlerConfiguration')
? undefined
: V1ReloadableComponentConfigurationFromJSON(json['handlerConfiguration']),
imagePullPolicy: !exists(json, 'imagePullPolicy') ? undefined : json['imagePullPolicy'],
instancetype: !exists(json, 'instancetype')
? undefined
: V1InstancetypeConfigurationFromJSON(json['instancetype']),
ksmConfiguration: !exists(json, 'ksmConfiguration')
? undefined
: V1KSMConfigurationFromJSON(json['ksmConfiguration']),
liveUpdateConfiguration: !exists(json, 'liveUpdateConfiguration')
? undefined
: V1LiveUpdateConfigurationFromJSON(json['liveUpdateConfiguration']),
machineType: !exists(json, 'machineType') ? undefined : json['machineType'],
mediatedDevicesConfiguration: !exists(json, 'mediatedDevicesConfiguration')
? undefined
: V1MediatedDevicesConfigurationFromJSON(json['mediatedDevicesConfiguration']),
memBalloonStatsPeriod: !exists(json, 'memBalloonStatsPeriod')
? undefined
: json['memBalloonStatsPeriod'],
migrations: !exists(json, 'migrations')
? undefined
: V1MigrationConfigurationFromJSON(json['migrations']),
minCPUModel: !exists(json, 'minCPUModel') ? undefined : json['minCPUModel'],
network: !exists(json, 'network') ? undefined : V1NetworkConfigurationFromJSON(json['network']),
obsoleteCPUModels: !exists(json, 'obsoleteCPUModels') ? undefined : json['obsoleteCPUModels'],
ovmfPath: !exists(json, 'ovmfPath') ? undefined : json['ovmfPath'],
permittedHostDevices: !exists(json, 'permittedHostDevices')
? undefined
: V1PermittedHostDevicesFromJSON(json['permittedHostDevices']),
seccompConfiguration: !exists(json, 'seccompConfiguration')
? undefined
: V1SeccompConfigurationFromJSON(json['seccompConfiguration']),
selinuxLauncherType: !exists(json, 'selinuxLauncherType')
? undefined
: json['selinuxLauncherType'],
smbios: !exists(json, 'smbios') ? undefined : V1SMBiosConfigurationFromJSON(json['smbios']),
supportContainerResources: !exists(json, 'supportContainerResources')
? undefined
: json['supportContainerResources'].map(V1SupportContainerResourcesFromJSON),
supportedGuestAgentVersions: !exists(json, 'supportedGuestAgentVersions')
? undefined
: json['supportedGuestAgentVersions'],
tlsConfiguration: !exists(json, 'tlsConfiguration')
? undefined
: V1TLSConfigurationFromJSON(json['tlsConfiguration']),
virtualMachineInstancesPerNode: !exists(json, 'virtualMachineInstancesPerNode')
? undefined
: json['virtualMachineInstancesPerNode'],
virtualMachineOptions: !exists(json, 'virtualMachineOptions')
? undefined
: V1VirtualMachineOptionsFromJSON(json['virtualMachineOptions']),
vmRolloutStrategy: !exists(json, 'vmRolloutStrategy') ? undefined : json['vmRolloutStrategy'],
vmStateStorageClass: !exists(json, 'vmStateStorageClass')
? undefined
: json['vmStateStorageClass'],
webhookConfiguration: !exists(json, 'webhookConfiguration')
? undefined
: V1ReloadableComponentConfigurationFromJSON(json['webhookConfiguration']),
};
}
export function V1KubeVirtConfigurationToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
additionalGuestMemoryOverheadRatio: value.additionalGuestMemoryOverheadRatio,
apiConfiguration: V1ReloadableComponentConfigurationToJSON(value.apiConfiguration),
architectureConfiguration: V1ArchConfigurationToJSON(value.architectureConfiguration),
autoCPULimitNamespaceLabelSelector: K8sIoApimachineryPkgApisMetaV1LabelSelectorToJSON(value.autoCPULimitNamespaceLabelSelector),
commonInstancetypesDeployment: V1CommonInstancetypesDeploymentToJSON(value.commonInstancetypesDeployment),
controllerConfiguration: V1ReloadableComponentConfigurationToJSON(value.controllerConfiguration),
cpuModel: value.cpuModel,
cpuRequest: value.cpuRequest,
defaultRuntimeClass: value.defaultRuntimeClass,
developerConfiguration: V1DeveloperConfigurationToJSON(value.developerConfiguration),
emulatedMachines: value.emulatedMachines,
evictionStrategy: value.evictionStrategy,
handlerConfiguration: V1ReloadableComponentConfigurationToJSON(value.handlerConfiguration),
imagePullPolicy: value.imagePullPolicy,
instancetype: V1InstancetypeConfigurationToJSON(value.instancetype),
ksmConfiguration: V1KSMConfigurationToJSON(value.ksmConfiguration),
liveUpdateConfiguration: V1LiveUpdateConfigurationToJSON(value.liveUpdateConfiguration),
machineType: value.machineType,
mediatedDevicesConfiguration: V1MediatedDevicesConfigurationToJSON(value.mediatedDevicesConfiguration),
memBalloonStatsPeriod: value.memBalloonStatsPeriod,
migrations: V1MigrationConfigurationToJSON(value.migrations),
minCPUModel: value.minCPUModel,
network: V1NetworkConfigurationToJSON(value.network),
obsoleteCPUModels: value.obsoleteCPUModels,
ovmfPath: value.ovmfPath,
permittedHostDevices: V1PermittedHostDevicesToJSON(value.permittedHostDevices),
seccompConfiguration: V1SeccompConfigurationToJSON(value.seccompConfiguration),
selinuxLauncherType: value.selinuxLauncherType,
smbios: V1SMBiosConfigurationToJSON(value.smbios),
supportContainerResources: value.supportContainerResources === undefined
? undefined
: value.supportContainerResources.map(V1SupportContainerResourcesToJSON),
supportedGuestAgentVersions: value.supportedGuestAgentVersions,
tlsConfiguration: V1TLSConfigurationToJSON(value.tlsConfiguration),
virtualMachineInstancesPerNode: value.virtualMachineInstancesPerNode,
virtualMachineOptions: V1VirtualMachineOptionsToJSON(value.virtualMachineOptions),
vmRolloutStrategy: value.vmRolloutStrategy,
vmStateStorageClass: value.vmStateStorageClass,
webhookConfiguration: V1ReloadableComponentConfigurationToJSON(value.webhookConfiguration),
};
}
//# sourceMappingURL=V1KubeVirtConfiguration.js.map