ShareRule.fromJson constructor

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

Implementation

factory ShareRule.fromJson(Map<String, dynamic> json) {
  return ShareRule(
    targetAccounts: (json['TargetAccounts'] as List)
        .whereNotNull()
        .map((e) => e as String)
        .toList(),
    unshareInterval: json['UnshareInterval'] as int?,
    unshareIntervalUnit: (json['UnshareIntervalUnit'] as String?)
        ?.toRetentionIntervalUnitValues(),
  );
}