TrialComponent.fromJson constructor
TrialComponent.fromJson(
- Map<String, dynamic> json
)
Implementation
factory TrialComponent.fromJson(Map<String, dynamic> json) {
return TrialComponent(
createdBy: json['CreatedBy'] != null
? UserContext.fromJson(json['CreatedBy'] as Map<String, dynamic>)
: null,
creationTime: timeStampFromJson(json['CreationTime']),
displayName: json['DisplayName'] as String?,
endTime: timeStampFromJson(json['EndTime']),
inputArtifacts: (json['InputArtifacts'] as Map<String, dynamic>?)?.map(
(k, e) => MapEntry(
k, TrialComponentArtifact.fromJson(e as Map<String, dynamic>))),
lastModifiedBy: json['LastModifiedBy'] != null
? UserContext.fromJson(json['LastModifiedBy'] as Map<String, dynamic>)
: null,
lastModifiedTime: timeStampFromJson(json['LastModifiedTime']),
metadataProperties: json['MetadataProperties'] != null
? MetadataProperties.fromJson(
json['MetadataProperties'] as Map<String, dynamic>)
: null,
metrics: (json['Metrics'] as List?)
?.whereNotNull()
.map((e) =>
TrialComponentMetricSummary.fromJson(e as Map<String, dynamic>))
.toList(),
outputArtifacts: (json['OutputArtifacts'] as Map<String, dynamic>?)?.map(
(k, e) => MapEntry(
k, TrialComponentArtifact.fromJson(e as Map<String, dynamic>))),
parameters: (json['Parameters'] as Map<String, dynamic>?)?.map((k, e) =>
MapEntry(
k,
TrialComponentParameterValue.fromJson(
e as Map<String, dynamic>))),
parents: (json['Parents'] as List?)
?.whereNotNull()
.map((e) => Parent.fromJson(e as Map<String, dynamic>))
.toList(),
source: json['Source'] != null
? TrialComponentSource.fromJson(
json['Source'] as Map<String, dynamic>)
: null,
sourceDetail: json['SourceDetail'] != null
? TrialComponentSourceDetail.fromJson(
json['SourceDetail'] as Map<String, dynamic>)
: null,
startTime: timeStampFromJson(json['StartTime']),
status: json['Status'] != null
? TrialComponentStatus.fromJson(
json['Status'] as Map<String, dynamic>)
: null,
tags: (json['Tags'] as List?)
?.whereNotNull()
.map((e) => Tag.fromJson(e as Map<String, dynamic>))
.toList(),
trialComponentArn: json['TrialComponentArn'] as String?,
trialComponentName: json['TrialComponentName'] as String?,
);
}