Class MessageRequest


  • public class MessageRequest
    extends Object
    This is a model class for MessageRequest type.
    • Constructor Detail

      • MessageRequest

        public MessageRequest()
        Default constructor.
      • MessageRequest

        public MessageRequest​(String applicationId,
                              List<String> to,
                              String from,
                              String text,
                              List<String> media,
                              String tag,
                              PriorityEnum priority)
        Initialization constructor.
        Parameters:
        applicationId - String value for applicationId.
        to - List of String value for to.
        from - String value for from.
        text - String value for text.
        media - List of String value for media.
        tag - String value for tag.
        priority - PriorityEnum value for priority.
    • Method Detail

      • getApplicationId

        public String getApplicationId()
        Getter for ApplicationId. The ID of the Application your from number is associated with in the Bandwidth Phone Number Dashboard.
        Returns:
        Returns the String
      • setApplicationId

        public void setApplicationId​(String applicationId)
        Setter for ApplicationId. The ID of the Application your from number is associated with in the Bandwidth Phone Number Dashboard.
        Parameters:
        applicationId - Value for String
      • getTo

        public List<String> getTo()
        Getter for To. The phone number(s) the message should be sent to in E164 format
        Returns:
        Returns the List of String
      • setTo

        public void setTo​(List<String> to)
        Setter for To. The phone number(s) the message should be sent to in E164 format
        Parameters:
        to - Value for List of String
      • getFrom

        public String getFrom()
        Getter for From. One of your telephone numbers the message should come from in E164 format
        Returns:
        Returns the String
      • setFrom

        public void setFrom​(String from)
        Setter for From. One of your telephone numbers the message should come from in E164 format
        Parameters:
        from - Value for String
      • getText

        public String getText()
        Getter for Text. The contents of the text message. Must be 2048 characters or less.
        Returns:
        Returns the String
      • setText

        public void setText​(String text)
        Setter for Text. The contents of the text message. Must be 2048 characters or less.
        Parameters:
        text - Value for String
      • getMedia

        public List<String> getMedia()
        Getter for Media. A list of URLs to include as media attachments as part of the message.
        Returns:
        Returns the List of String
      • setMedia

        public void setMedia​(List<String> media)
        Setter for Media. A list of URLs to include as media attachments as part of the message.
        Parameters:
        media - Value for List of String
      • getTag

        public String getTag()
        Getter for Tag. A custom string that will be included in callback events of the message. Max 1024 characters
        Returns:
        Returns the String
      • setTag

        public void setTag​(String tag)
        Setter for Tag. A custom string that will be included in callback events of the message. Max 1024 characters
        Parameters:
        tag - Value for String
      • getPriority

        public PriorityEnum getPriority()
        Getter for Priority. The message's priority, currently for toll-free or short code SMS only. Messages with a priority value of `"high"` are given preference over your other traffic.
        Returns:
        Returns the PriorityEnum
      • setPriority

        public void setPriority​(PriorityEnum priority)
        Setter for Priority. The message's priority, currently for toll-free or short code SMS only. Messages with a priority value of `"high"` are given preference over your other traffic.
        Parameters:
        priority - Value for PriorityEnum
      • toString

        public String toString()
        Converts this MessageRequest into string format.
        Overrides:
        toString in class Object
        Returns:
        String representation of this class