@codingame/kubevirt-api
Version:
kubevirt OpenAPI automation for TypeScript
56 lines • 2.15 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* KubeVirt Containerized Data Importer API
* Containerized Data Importer for KubeVirt.
*
* 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 { V1AffinityFromJSON, V1AffinityToJSON, V1TolerationFromJSON, V1TolerationToJSON, } from './';
export function V1beta1ComponentConfigFromJSON(json) {
return V1beta1ComponentConfigFromJSONTyped(json, false);
}
export function V1beta1ComponentConfigFromJSONTyped(json, _ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
affinity: !exists(json, 'affinity') ? undefined : V1AffinityFromJSON(json['affinity']),
apiServerReplicas: !exists(json, 'apiServerReplicas') ? undefined : json['apiServerReplicas'],
deploymentReplicas: !exists(json, 'deploymentReplicas')
? undefined
: json['deploymentReplicas'],
nodeSelector: !exists(json, 'nodeSelector') ? undefined : json['nodeSelector'],
tolerations: !exists(json, 'tolerations')
? undefined
: json['tolerations'].map(V1TolerationFromJSON),
uploadProxyReplicas: !exists(json, 'uploadProxyReplicas')
? undefined
: json['uploadProxyReplicas'],
};
}
export function V1beta1ComponentConfigToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
affinity: V1AffinityToJSON(value.affinity),
apiServerReplicas: value.apiServerReplicas,
deploymentReplicas: value.deploymentReplicas,
nodeSelector: value.nodeSelector,
tolerations: value.tolerations === undefined
? undefined
: value.tolerations.map(V1TolerationToJSON),
uploadProxyReplicas: value.uploadProxyReplicas,
};
}
//# sourceMappingURL=V1beta1ComponentConfig.js.map