SimulationJob.fromJson constructor

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

Implementation

factory SimulationJob.fromJson(Map<String, dynamic> json) {
  return SimulationJob(
    arn: json['arn'] as String?,
    clientRequestToken: json['clientRequestToken'] as String?,
    compute: json['compute'] != null
        ? ComputeResponse.fromJson(json['compute'] as Map<String, dynamic>)
        : null,
    dataSources: (json['dataSources'] as List?)
        ?.whereNotNull()
        .map((e) => DataSource.fromJson(e as Map<String, dynamic>))
        .toList(),
    failureBehavior:
        (json['failureBehavior'] as String?)?.toFailureBehavior(),
    failureCode: (json['failureCode'] as String?)?.toSimulationJobErrorCode(),
    failureReason: json['failureReason'] as String?,
    iamRole: json['iamRole'] as String?,
    lastStartedAt: timeStampFromJson(json['lastStartedAt']),
    lastUpdatedAt: timeStampFromJson(json['lastUpdatedAt']),
    loggingConfig: json['loggingConfig'] != null
        ? LoggingConfig.fromJson(
            json['loggingConfig'] as Map<String, dynamic>)
        : null,
    maxJobDurationInSeconds: json['maxJobDurationInSeconds'] as int?,
    name: json['name'] as String?,
    networkInterface: json['networkInterface'] != null
        ? NetworkInterface.fromJson(
            json['networkInterface'] as Map<String, dynamic>)
        : null,
    outputLocation: json['outputLocation'] != null
        ? OutputLocation.fromJson(
            json['outputLocation'] as Map<String, dynamic>)
        : null,
    robotApplications: (json['robotApplications'] as List?)
        ?.whereNotNull()
        .map(
            (e) => RobotApplicationConfig.fromJson(e as Map<String, dynamic>))
        .toList(),
    simulationApplications: (json['simulationApplications'] as List?)
        ?.whereNotNull()
        .map((e) =>
            SimulationApplicationConfig.fromJson(e as Map<String, dynamic>))
        .toList(),
    simulationTimeMillis: json['simulationTimeMillis'] as int?,
    status: (json['status'] as String?)?.toSimulationJobStatus(),
    tags: (json['tags'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
    vpcConfig: json['vpcConfig'] != null
        ? VPCConfigResponse.fromJson(
            json['vpcConfig'] as Map<String, dynamic>)
        : null,
  );
}