StudySpec_StudyStoppingConfig.fromJson constructor

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

Implementation

factory StudySpec_StudyStoppingConfig.fromJson(Map<String, dynamic> json) {
  return StudySpec_StudyStoppingConfig(
    shouldStopAsap: decodeCustom(
      json['shouldStopAsap'],
      protobuf.BoolValue.fromJson,
    ),
    minimumRuntimeConstraint: decode(
      json['minimumRuntimeConstraint'],
      StudyTimeConstraint.fromJson,
    ),
    maximumRuntimeConstraint: decode(
      json['maximumRuntimeConstraint'],
      StudyTimeConstraint.fromJson,
    ),
    minNumTrials: decodeCustom(
      json['minNumTrials'],
      protobuf.Int32Value.fromJson,
    ),
    maxNumTrials: decodeCustom(
      json['maxNumTrials'],
      protobuf.Int32Value.fromJson,
    ),
    maxNumTrialsNoProgress: decodeCustom(
      json['maxNumTrialsNoProgress'],
      protobuf.Int32Value.fromJson,
    ),
    maxDurationNoProgress: decodeCustom(
      json['maxDurationNoProgress'],
      protobuf.Duration.fromJson,
    ),
  );
}