ContentRestriction.fromJson constructor

ContentRestriction.fromJson(
  1. Map json_
)

Implementation

ContentRestriction.fromJson(core.Map json_)
    : this(
        ownerRestricted: json_.containsKey('ownerRestricted')
            ? json_['ownerRestricted'] as core.bool
            : null,
        readOnly: json_.containsKey('readOnly')
            ? json_['readOnly'] as core.bool
            : null,
        reason: json_.containsKey('reason')
            ? json_['reason'] as core.String
            : null,
        restrictingUser: json_.containsKey('restrictingUser')
            ? User.fromJson(json_['restrictingUser']
                as core.Map<core.String, core.dynamic>)
            : null,
        restrictionTime: json_.containsKey('restrictionTime')
            ? core.DateTime.parse(json_['restrictionTime'] as core.String)
            : null,
        systemRestricted: json_.containsKey('systemRestricted')
            ? json_['systemRestricted'] as core.bool
            : null,
        type: json_.containsKey('type') ? json_['type'] as core.String : null,
      );