DescribeTaskResponse.fromJson constructor

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

Implementation

factory DescribeTaskResponse.fromJson(Map<String, dynamic> json) {
  return DescribeTaskResponse(
    cloudWatchLogGroupArn: json['CloudWatchLogGroupArn'] as String?,
    creationTime: timeStampFromJson(json['CreationTime']),
    currentTaskExecutionArn: json['CurrentTaskExecutionArn'] as String?,
    destinationLocationArn: json['DestinationLocationArn'] as String?,
    destinationNetworkInterfaceArns:
        (json['DestinationNetworkInterfaceArns'] as List?)
            ?.whereNotNull()
            .map((e) => e as String)
            .toList(),
    errorCode: json['ErrorCode'] as String?,
    errorDetail: json['ErrorDetail'] as String?,
    excludes: (json['Excludes'] as List?)
        ?.whereNotNull()
        .map((e) => FilterRule.fromJson(e as Map<String, dynamic>))
        .toList(),
    name: json['Name'] as String?,
    options: json['Options'] != null
        ? Options.fromJson(json['Options'] as Map<String, dynamic>)
        : null,
    schedule: json['Schedule'] != null
        ? TaskSchedule.fromJson(json['Schedule'] as Map<String, dynamic>)
        : null,
    sourceLocationArn: json['SourceLocationArn'] as String?,
    sourceNetworkInterfaceArns: (json['SourceNetworkInterfaceArns'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    status: (json['Status'] as String?)?.toTaskStatus(),
    taskArn: json['TaskArn'] as String?,
  );
}