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,
        restrictionDate: json_.containsKey('restrictionDate')
            ? core.DateTime.parse(json_['restrictionDate'] as core.String)
            : null,
        systemRestricted: json_.containsKey('systemRestricted')
            ? json_['systemRestricted'] as core.bool
            : null,
        type: json_.containsKey('type') ? json_['type'] as core.String : null,
      );