@codingame/kubevirt-api
Version:
kubevirt OpenAPI automation for TypeScript
50 lines • 1.93 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: unversioned
*
*
* 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 { IoK8sApiAutoscalingV2HPAScalingPolicyFromJSON, IoK8sApiAutoscalingV2HPAScalingPolicyToJSON, } from './';
export function IoK8sApiAutoscalingV2HPAScalingRulesFromJSON(json) {
return IoK8sApiAutoscalingV2HPAScalingRulesFromJSONTyped(json, false);
}
export function IoK8sApiAutoscalingV2HPAScalingRulesFromJSONTyped(json, _ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
policies: !exists(json, 'policies')
? undefined
: json['policies'].map(IoK8sApiAutoscalingV2HPAScalingPolicyFromJSON),
selectPolicy: !exists(json, 'selectPolicy') ? undefined : json['selectPolicy'],
stabilizationWindowSeconds: !exists(json, 'stabilizationWindowSeconds')
? undefined
: json['stabilizationWindowSeconds'],
tolerance: !exists(json, 'tolerance') ? undefined : json['tolerance'],
};
}
export function IoK8sApiAutoscalingV2HPAScalingRulesToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
policies: value.policies === undefined
? undefined
: value.policies.map(IoK8sApiAutoscalingV2HPAScalingPolicyToJSON),
selectPolicy: value.selectPolicy,
stabilizationWindowSeconds: value.stabilizationWindowSeconds,
tolerance: value.tolerance,
};
}
//# sourceMappingURL=IoK8sApiAutoscalingV2HPAScalingRules.js.map