AutoscalingPolicy.fromJson constructor
AutoscalingPolicy.fromJson(
- Map json_
Implementation
AutoscalingPolicy.fromJson(core.Map json_)
: this(
coolDownPeriodSec: json_.containsKey('coolDownPeriodSec')
? json_['coolDownPeriodSec'] as core.int
: null,
cpuUtilization: json_.containsKey('cpuUtilization')
? AutoscalingPolicyCpuUtilization.fromJson(json_['cpuUtilization']
as core.Map<core.String, core.dynamic>)
: null,
customMetricUtilizations:
json_.containsKey('customMetricUtilizations')
? (json_['customMetricUtilizations'] as core.List)
.map((value) =>
AutoscalingPolicyCustomMetricUtilization.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
loadBalancingUtilization:
json_.containsKey('loadBalancingUtilization')
? AutoscalingPolicyLoadBalancingUtilization.fromJson(
json_['loadBalancingUtilization']
as core.Map<core.String, core.dynamic>)
: null,
maxNumReplicas: json_.containsKey('maxNumReplicas')
? json_['maxNumReplicas'] as core.int
: null,
minNumReplicas: json_.containsKey('minNumReplicas')
? json_['minNumReplicas'] as core.int
: null,
mode: json_.containsKey('mode') ? json_['mode'] as core.String : null,
scaleInControl: json_.containsKey('scaleInControl')
? AutoscalingPolicyScaleInControl.fromJson(json_['scaleInControl']
as core.Map<core.String, core.dynamic>)
: null,
scalingSchedules: json_.containsKey('scalingSchedules')
? (json_['scalingSchedules']
as core.Map<core.String, core.dynamic>)
.map(
(key, value) => core.MapEntry(
key,
AutoscalingPolicyScalingSchedule.fromJson(
value as core.Map<core.String, core.dynamic>),
),
)
: null,
);