JobFlowInstancesDetail.fromJson constructor
JobFlowInstancesDetail.fromJson(
- Map<String, dynamic> json
)
Implementation
factory JobFlowInstancesDetail.fromJson(Map<String, dynamic> json) {
return JobFlowInstancesDetail(
instanceCount: json['InstanceCount'] as int,
masterInstanceType: json['MasterInstanceType'] as String,
slaveInstanceType: json['SlaveInstanceType'] as String,
ec2KeyName: json['Ec2KeyName'] as String?,
ec2SubnetId: json['Ec2SubnetId'] as String?,
hadoopVersion: json['HadoopVersion'] as String?,
instanceGroups: (json['InstanceGroups'] as List?)
?.whereNotNull()
.map((e) => InstanceGroupDetail.fromJson(e as Map<String, dynamic>))
.toList(),
keepJobFlowAliveWhenNoSteps: json['KeepJobFlowAliveWhenNoSteps'] as bool?,
masterInstanceId: json['MasterInstanceId'] as String?,
masterPublicDnsName: json['MasterPublicDnsName'] as String?,
normalizedInstanceHours: json['NormalizedInstanceHours'] as int?,
placement: json['Placement'] != null
? PlacementType.fromJson(json['Placement'] as Map<String, dynamic>)
: null,
terminationProtected: json['TerminationProtected'] as bool?,
);
}