StudySpec_StudyStoppingConfig.fromJson constructor

StudySpec_StudyStoppingConfig.fromJson(
  1. Object? j
)

Implementation

factory StudySpec_StudyStoppingConfig.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return StudySpec_StudyStoppingConfig(
    shouldStopAsap: switch (json['shouldStopAsap']) {
      null => null,
      Object $1 => protobuf.BoolValue.fromJson($1),
    },
    minimumRuntimeConstraint: switch (json['minimumRuntimeConstraint']) {
      null => null,
      Object $1 => StudyTimeConstraint.fromJson($1),
    },
    maximumRuntimeConstraint: switch (json['maximumRuntimeConstraint']) {
      null => null,
      Object $1 => StudyTimeConstraint.fromJson($1),
    },
    minNumTrials: switch (json['minNumTrials']) {
      null => null,
      Object $1 => protobuf.Int32Value.fromJson($1),
    },
    maxNumTrials: switch (json['maxNumTrials']) {
      null => null,
      Object $1 => protobuf.Int32Value.fromJson($1),
    },
    maxNumTrialsNoProgress: switch (json['maxNumTrialsNoProgress']) {
      null => null,
      Object $1 => protobuf.Int32Value.fromJson($1),
    },
    maxDurationNoProgress: switch (json['maxDurationNoProgress']) {
      null => null,
      Object $1 => protobuf.Duration.fromJson($1),
    },
  );
}