RetentionPeriod.fromJson constructor

RetentionPeriod.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory RetentionPeriod.fromJson(Map<String, Object?> json) {
  return RetentionPeriod(
    number: (json[r'number'] as num?)?.toInt() ?? 0,
    units: RetentionPeriodUnits.fromValue(json[r'units'] as String? ?? ''),
  );
}