asRole

open suspend fun asRole(): Role(source)

Requests to get the this behavior as a Role if it's not an instance of a Role.

Throws

if anything went wrong during the request.

if the user wasn't present.