StudySpec_ConvexStopConfig.fromJson constructor

StudySpec_ConvexStopConfig.fromJson(
  1. Object? j
)

Implementation

factory StudySpec_ConvexStopConfig.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return StudySpec_ConvexStopConfig(
    maxNumSteps: switch (json['maxNumSteps']) {
      null => 0,
      Object $1 => decodeInt64($1),
    },
    minNumSteps: switch (json['minNumSteps']) {
      null => 0,
      Object $1 => decodeInt64($1),
    },
    autoregressiveOrder: switch (json['autoregressiveOrder']) {
      null => 0,
      Object $1 => decodeInt64($1),
    },
    learningRateParameterName: switch (json['learningRateParameterName']) {
      null => '',
      Object $1 => decodeString($1),
    },
    useSeconds: switch (json['useSeconds']) {
      null => false,
      Object $1 => decodeBool($1),
    },
  );
}