public Message withRole(ConversationRole role) {
        this.role = role.toString();
        return this;
    }
<p>
The role that the message plays in the message.
</p>

@param role
       The role that the message plays in the message.
@return Returns a reference to this object so that method calls can be chained together.
@see ConversationRole
aws-java-sdk-bedrockruntime/src/main/java/com/amazonaws/services/bedrockruntime/model/Message.java