ResourcePolicyDailyCycle.fromJson constructor

ResourcePolicyDailyCycle.fromJson(
  1. Object? j
)

Implementation

factory ResourcePolicyDailyCycle.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return ResourcePolicyDailyCycle(
    daysInCycle: switch (json['daysInCycle']) {
      null => null,
      Object $1 => decodeInt($1),
    },
    duration: switch (json['duration']) {
      null => null,
      Object $1 => decodeString($1),
    },
    startTime: switch (json['startTime']) {
      null => null,
      Object $1 => decodeString($1),
    },
  );
}