AutoMLCandidate.fromJson constructor

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

Implementation

factory AutoMLCandidate.fromJson(Map<String, dynamic> json) {
  return AutoMLCandidate(
    candidateName: json['CandidateName'] as String,
    candidateStatus: (json['CandidateStatus'] as String).toCandidateStatus(),
    candidateSteps: (json['CandidateSteps'] as List)
        .whereNotNull()
        .map((e) => AutoMLCandidateStep.fromJson(e as Map<String, dynamic>))
        .toList(),
    creationTime:
        nonNullableTimeStampFromJson(json['CreationTime'] as Object),
    lastModifiedTime:
        nonNullableTimeStampFromJson(json['LastModifiedTime'] as Object),
    objectiveStatus: (json['ObjectiveStatus'] as String).toObjectiveStatus(),
    endTime: timeStampFromJson(json['EndTime']),
    failureReason: json['FailureReason'] as String?,
    finalAutoMLJobObjectiveMetric:
        json['FinalAutoMLJobObjectiveMetric'] != null
            ? FinalAutoMLJobObjectiveMetric.fromJson(
                json['FinalAutoMLJobObjectiveMetric'] as Map<String, dynamic>)
            : null,
    inferenceContainers: (json['InferenceContainers'] as List?)
        ?.whereNotNull()
        .map((e) =>
            AutoMLContainerDefinition.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}