UserRole.fromJson constructor

UserRole.fromJson(
  1. Map json_
)

Implementation

UserRole.fromJson(core.Map json_)
    : this(
        accountId: json_.containsKey('accountId')
            ? json_['accountId'] as core.String
            : null,
        defaultUserRole: json_.containsKey('defaultUserRole')
            ? json_['defaultUserRole'] as core.bool
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        parentUserRoleId: json_.containsKey('parentUserRoleId')
            ? json_['parentUserRoleId'] as core.String
            : null,
        permissions: json_.containsKey('permissions')
            ? (json_['permissions'] as core.List)
                .map((value) => UserRolePermission.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        subaccountId: json_.containsKey('subaccountId')
            ? json_['subaccountId'] as core.String
            : null,
      );