ScalingPolicy.fromJson constructor

ScalingPolicy.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ScalingPolicy.fromJson(Map<String, dynamic> json) {
  return ScalingPolicy(
    policyName: json['PolicyName'] as String,
    policyType: (json['PolicyType'] as String).toPolicyType(),
    targetTrackingConfiguration: json['TargetTrackingConfiguration'] != null
        ? TargetTrackingConfiguration.fromJson(
            json['TargetTrackingConfiguration'] as Map<String, dynamic>)
        : null,
  );
}