PrincipalPermissions.fromJson constructor

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

Implementation

factory PrincipalPermissions.fromJson(Map<String, dynamic> json) {
  return PrincipalPermissions(
    permissions: (json['Permissions'] as List?)
        ?.whereNotNull()
        .map((e) => (e as String).toPermission())
        .toList(),
    principal: json['Principal'] != null
        ? DataLakePrincipal.fromJson(
            json['Principal'] as Map<String, dynamic>)
        : null,
  );
}