Permission.fromJson constructor

Permission.fromJson(
  1. Object? j
)

Implementation

factory Permission.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return Permission(
    name: switch (json['name']) {
      null => '',
      Object $1 => decodeString($1),
    },
    granteeType: switch (json['granteeType']) {
      null => null,
      Object $1 => Permission_GranteeType.fromJson($1),
    },
    emailAddress: switch (json['emailAddress']) {
      null => null,
      Object $1 => decodeString($1),
    },
    role: switch (json['role']) {
      null => null,
      Object $1 => Permission_Role.fromJson($1),
    },
  );
}