public ListChannelMembershipsRequest withType(ChannelMembershipType type) {
        this.type = type.toString();
        return this;
    }
<p>
The membership type of a user, <code>DEFAULT</code> or <code>HIDDEN</code>. Default members are returned as part
of <code>ListChannelMemberships</code> if no type is specified. Hidden members are only returned if the type
filter in <code>ListChannelMemberships</code> equals <code>HIDDEN</code>.
</p>

@param type
       The membership type of a user, <code>DEFAULT</code> or <code>HIDDEN</code>. Default members are returned
       as part of <code>ListChannelMemberships</code> if no type is specified. Hidden members are only returned
       if the type filter in <code>ListChannelMemberships</code> equals <code>HIDDEN</code>.
@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/ListChannelMembershipsRequest.java