@codingame/kubevirt-api
Version:
kubevirt OpenAPI automation for TypeScript
58 lines • 2.79 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 { IoK8sApiAutoscalingV2ContainerResourceMetricSourceFromJSON, IoK8sApiAutoscalingV2ContainerResourceMetricSourceToJSON, IoK8sApiAutoscalingV2ExternalMetricSourceFromJSON, IoK8sApiAutoscalingV2ExternalMetricSourceToJSON, IoK8sApiAutoscalingV2ObjectMetricSourceFromJSON, IoK8sApiAutoscalingV2ObjectMetricSourceToJSON, IoK8sApiAutoscalingV2PodsMetricSourceFromJSON, IoK8sApiAutoscalingV2PodsMetricSourceToJSON, IoK8sApiAutoscalingV2ResourceMetricSourceFromJSON, IoK8sApiAutoscalingV2ResourceMetricSourceToJSON, } from './';
export function IoK8sApiAutoscalingV2MetricSpecFromJSON(json) {
return IoK8sApiAutoscalingV2MetricSpecFromJSONTyped(json, false);
}
export function IoK8sApiAutoscalingV2MetricSpecFromJSONTyped(json, _ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
containerResource: !exists(json, 'containerResource')
? undefined
: IoK8sApiAutoscalingV2ContainerResourceMetricSourceFromJSON(json['containerResource']),
external: !exists(json, 'external')
? undefined
: IoK8sApiAutoscalingV2ExternalMetricSourceFromJSON(json['external']),
object: !exists(json, 'object')
? undefined
: IoK8sApiAutoscalingV2ObjectMetricSourceFromJSON(json['object']),
pods: !exists(json, 'pods')
? undefined
: IoK8sApiAutoscalingV2PodsMetricSourceFromJSON(json['pods']),
resource: !exists(json, 'resource')
? undefined
: IoK8sApiAutoscalingV2ResourceMetricSourceFromJSON(json['resource']),
type: json['type'],
};
}
export function IoK8sApiAutoscalingV2MetricSpecToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
containerResource: IoK8sApiAutoscalingV2ContainerResourceMetricSourceToJSON(value.containerResource),
external: IoK8sApiAutoscalingV2ExternalMetricSourceToJSON(value.external),
object: IoK8sApiAutoscalingV2ObjectMetricSourceToJSON(value.object),
pods: IoK8sApiAutoscalingV2PodsMetricSourceToJSON(value.pods),
resource: IoK8sApiAutoscalingV2ResourceMetricSourceToJSON(value.resource),
type: value.type,
};
}
//# sourceMappingURL=IoK8sApiAutoscalingV2MetricSpec.js.map