Package com.bandwidth.messaging.models
Class MessageRequest
java.lang.Object
com.bandwidth.messaging.models.MessageRequest
public class MessageRequest
extends java.lang.Object
This is a model class for MessageRequest type.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MessageRequest.Builder
Class to build instances ofMessageRequest
. -
Constructor Summary
Constructors Constructor Description MessageRequest()
Default constructor.MessageRequest(java.lang.String applicationId, java.util.List<java.lang.String> to, java.lang.String from, java.lang.String text, java.util.List<java.lang.String> media, java.lang.String tag, PriorityEnum priority)
Initialization constructor. -
Method Summary
Modifier and Type Method Description java.lang.String
getApplicationId()
Getter for ApplicationId.java.lang.String
getFrom()
Getter for From.java.util.List<java.lang.String>
getMedia()
Getter for Media.PriorityEnum
getPriority()
Getter for Priority.java.lang.String
getTag()
Getter for Tag.java.lang.String
getText()
Getter for Text.java.util.List<java.lang.String>
getTo()
Getter for To.void
setApplicationId(java.lang.String applicationId)
Setter for ApplicationId.void
setFrom(java.lang.String from)
Setter for From.void
setMedia(java.util.List<java.lang.String> media)
Setter for Media.void
setPriority(PriorityEnum priority)
Setter for Priority.void
setTag(java.lang.String tag)
Setter for Tag.void
setText(java.lang.String text)
Setter for Text.void
setTo(java.util.List<java.lang.String> to)
Setter for To.MessageRequest.Builder
toBuilder()
Builds a newMessageRequest.Builder
object.java.lang.String
toString()
Converts this MessageRequest into string format.
-
Constructor Details
-
MessageRequest
public MessageRequest()Default constructor. -
MessageRequest
public MessageRequest(java.lang.String applicationId, java.util.List<java.lang.String> to, java.lang.String from, java.lang.String text, java.util.List<java.lang.String> media, java.lang.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 Details
-
getApplicationId
public java.lang.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(java.lang.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 java.util.List<java.lang.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(java.util.List<java.lang.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 java.lang.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(java.lang.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 java.lang.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(java.lang.String text)Setter for Text. The contents of the text message. Must be 2048 characters or less.- Parameters:
text
- Value for String
-
getMedia
public java.util.List<java.lang.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(java.util.List<java.lang.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 java.lang.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(java.lang.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
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
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 java.lang.String toString()Converts this MessageRequest into string format.- Overrides:
toString
in classjava.lang.Object
- Returns:
- String representation of this class
-
toBuilder
Builds a newMessageRequest.Builder
object. Creates the instance with the state of the current model.- Returns:
- a new
MessageRequest.Builder
object
-