public ChannelMembership withType(ChannelMembershipType type) {
        this.type = type.toString();
        return this;
    }
<p>
The membership type set for the channel member.
</p>

@param type
       The membership type set for the channel member.
@return Returns a reference to this object so that method calls can be chained together.
@see ChannelMembershipType
aws-java-sdk-chimesdkmessaging/src/main/java/com/amazonaws/services/chimesdkmessaging/model/ChannelMembership.java