public RequestSenderIdRequest withMessageTypes(MessageType... messageTypes) {
        java.util.ArrayList<String> messageTypesCopy = new java.util.ArrayList<String>(messageTypes.length);
        for (MessageType value : messageTypes) {
            messageTypesCopy.add(value.toString());
        }
        if (getMessageTypes() == null) {
            setMessageTypes(messageTypesCopy);
        } else {
            getMessageTypes().addAll(messageTypesCopy);
        }
        return this;
    }
<p>
The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and
PROMOTIONAL for messages that aren't critical or time-sensitive.
</p>

@param messageTypes
       The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and
       PROMOTIONAL for messages that aren't critical or time-sensitive.
@return Returns a reference to this object so that method calls can be chained together.
@see MessageType
aws-java-sdk-pinpointsmsvoicev2/src/main/java/com/amazonaws/services/pinpointsmsvoicev2/model/RequestSenderIdRequest.java