SimulationJobRequest.fromJson constructor
SimulationJobRequest.fromJson(
- Map<String, dynamic> json
)
Implementation
factory SimulationJobRequest.fromJson(Map<String, dynamic> json) {
return SimulationJobRequest(
maxJobDurationInSeconds: json['maxJobDurationInSeconds'] as int,
compute: json['compute'] != null
? Compute.fromJson(json['compute'] as Map<String, dynamic>)
: null,
dataSources: (json['dataSources'] as List?)
?.whereNotNull()
.map((e) => DataSourceConfig.fromJson(e as Map<String, dynamic>))
.toList(),
failureBehavior:
(json['failureBehavior'] as String?)?.toFailureBehavior(),
iamRole: json['iamRole'] as String?,
loggingConfig: json['loggingConfig'] != null
? LoggingConfig.fromJson(
json['loggingConfig'] 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(),
tags: (json['tags'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
useDefaultApplications: json['useDefaultApplications'] as bool?,
vpcConfig: json['vpcConfig'] != null
? VPCConfig.fromJson(json['vpcConfig'] as Map<String, dynamic>)
: null,
);
}