AdminRightRow.fromJson constructor

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

Read this payload from a decoded JSON object.

Implementation

factory AdminRightRow.fromJson(Map<String, dynamic> json) => AdminRightRow(
      subject: json['subject'] as String,
      right: Right(json['right'] as String),
      resource: json['resource'] as String,
      origin: RightOrigin(json['origin'] as String),
      grantedBy: json['grantedBy'] as String?,
      grantedAt: json['grantedAt'] as String?,
      expiresAt: json['expiresAt'] as String?,
      reason: json['reason'] as String?,
      subjectMember: json['subjectMember'] as bool,
      granterDeparted: json['granterDeparted'] as bool,
      breakGlass: json['breakGlass'] == null
          ? null
          : BreakGlass.fromJson(json['breakGlass'] as Map<String, dynamic>),
    );