@codingame/kubevirt-api
Version:
kubevirt OpenAPI automation for TypeScript
96 lines • 4.97 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 { K8sIoApiCoreV1LocalObjectReferenceFromJSON, K8sIoApiCoreV1LocalObjectReferenceToJSON, V1ComponentConfigFromJSON, V1ComponentConfigToJSON, V1CustomizeComponentsFromJSON, V1CustomizeComponentsToJSON, V1KubeVirtCertificateRotateStrategyFromJSON, V1KubeVirtCertificateRotateStrategyToJSON, V1KubeVirtConfigurationFromJSON, V1KubeVirtConfigurationToJSON, V1KubeVirtWorkloadUpdateStrategyFromJSON, V1KubeVirtWorkloadUpdateStrategyToJSON, } from './';
/**
* @export
* @enum {string}
*/
export var V1KubeVirtSpecImagePullPolicyEnum;
(function (V1KubeVirtSpecImagePullPolicyEnum) {
V1KubeVirtSpecImagePullPolicyEnum["Always"] = "Always";
V1KubeVirtSpecImagePullPolicyEnum["IfNotPresent"] = "IfNotPresent";
V1KubeVirtSpecImagePullPolicyEnum["Never"] = "Never";
})(V1KubeVirtSpecImagePullPolicyEnum || (V1KubeVirtSpecImagePullPolicyEnum = {}));
export function V1KubeVirtSpecFromJSON(json) {
return V1KubeVirtSpecFromJSONTyped(json, false);
}
export function V1KubeVirtSpecFromJSONTyped(json, _ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
certificateRotateStrategy: !exists(json, 'certificateRotateStrategy')
? undefined
: V1KubeVirtCertificateRotateStrategyFromJSON(json['certificateRotateStrategy']),
_configuration: !exists(json, 'configuration')
? undefined
: V1KubeVirtConfigurationFromJSON(json['configuration']),
customizeComponents: !exists(json, 'customizeComponents')
? undefined
: V1CustomizeComponentsFromJSON(json['customizeComponents']),
imagePullPolicy: !exists(json, 'imagePullPolicy') ? undefined : json['imagePullPolicy'],
imagePullSecrets: !exists(json, 'imagePullSecrets')
? undefined
: json['imagePullSecrets'].map(K8sIoApiCoreV1LocalObjectReferenceFromJSON),
imageRegistry: !exists(json, 'imageRegistry') ? undefined : json['imageRegistry'],
imageTag: !exists(json, 'imageTag') ? undefined : json['imageTag'],
infra: !exists(json, 'infra') ? undefined : V1ComponentConfigFromJSON(json['infra']),
monitorAccount: !exists(json, 'monitorAccount') ? undefined : json['monitorAccount'],
monitorNamespace: !exists(json, 'monitorNamespace') ? undefined : json['monitorNamespace'],
productComponent: !exists(json, 'productComponent') ? undefined : json['productComponent'],
productName: !exists(json, 'productName') ? undefined : json['productName'],
productVersion: !exists(json, 'productVersion') ? undefined : json['productVersion'],
serviceMonitorNamespace: !exists(json, 'serviceMonitorNamespace')
? undefined
: json['serviceMonitorNamespace'],
uninstallStrategy: !exists(json, 'uninstallStrategy') ? undefined : json['uninstallStrategy'],
workloadUpdateStrategy: !exists(json, 'workloadUpdateStrategy')
? undefined
: V1KubeVirtWorkloadUpdateStrategyFromJSON(json['workloadUpdateStrategy']),
workloads: !exists(json, 'workloads')
? undefined
: V1ComponentConfigFromJSON(json['workloads']),
};
}
export function V1KubeVirtSpecToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
certificateRotateStrategy: V1KubeVirtCertificateRotateStrategyToJSON(value.certificateRotateStrategy),
configuration: V1KubeVirtConfigurationToJSON(value._configuration),
customizeComponents: V1CustomizeComponentsToJSON(value.customizeComponents),
imagePullPolicy: value.imagePullPolicy,
imagePullSecrets: value.imagePullSecrets === undefined
? undefined
: value.imagePullSecrets.map(K8sIoApiCoreV1LocalObjectReferenceToJSON),
imageRegistry: value.imageRegistry,
imageTag: value.imageTag,
infra: V1ComponentConfigToJSON(value.infra),
monitorAccount: value.monitorAccount,
monitorNamespace: value.monitorNamespace,
productComponent: value.productComponent,
productName: value.productName,
productVersion: value.productVersion,
serviceMonitorNamespace: value.serviceMonitorNamespace,
uninstallStrategy: value.uninstallStrategy,
workloadUpdateStrategy: V1KubeVirtWorkloadUpdateStrategyToJSON(value.workloadUpdateStrategy),
workloads: V1ComponentConfigToJSON(value.workloads),
};
}
//# sourceMappingURL=V1KubeVirtSpec.js.map