HyperparameterTuningJob.fromJson constructor
HyperparameterTuningJob.fromJson(
- Map<String, dynamic> json
)
Implementation
factory HyperparameterTuningJob.fromJson(Map<String, dynamic> json) {
return HyperparameterTuningJob(
name: json['name'] ?? '',
displayName: json['displayName'] ?? '',
studySpec: decode(json['studySpec'], StudySpec.fromJson),
maxTrialCount: json['maxTrialCount'] ?? 0,
parallelTrialCount: json['parallelTrialCount'] ?? 0,
maxFailedTrialCount: json['maxFailedTrialCount'] ?? 0,
trialJobSpec: decode(json['trialJobSpec'], CustomJobSpec.fromJson),
trials: decodeListMessage(json['trials'], Trial.fromJson) ?? [],
state: decodeEnum(json['state'], JobState.fromJson) ?? JobState.$default,
createTime: decodeCustom(json['createTime'], protobuf.Timestamp.fromJson),
startTime: decodeCustom(json['startTime'], protobuf.Timestamp.fromJson),
endTime: decodeCustom(json['endTime'], protobuf.Timestamp.fromJson),
updateTime: decodeCustom(json['updateTime'], protobuf.Timestamp.fromJson),
error: decode(json['error'], Status.fromJson),
labels: decodeMap(json['labels']) ?? {},
encryptionSpec: decode(json['encryptionSpec'], EncryptionSpec.fromJson),
satisfiesPzs: json['satisfiesPzs'] ?? false,
satisfiesPzi: json['satisfiesPzi'] ?? false,
);
}