Package com.bandwidth.messaging.models
Class MessageRequest
- java.lang.Object
-
- com.bandwidth.messaging.models.MessageRequest
-
public class MessageRequest extends 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(String applicationId, List<String> to, String from, String text, List<String> media, String tag, PriorityEnum priority)
Initialization constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getApplicationId()
Getter for ApplicationId.String
getFrom()
Getter for From.List<String>
getMedia()
Getter for Media.PriorityEnum
getPriority()
Getter for Priority.String
getTag()
Getter for Tag.String
getText()
Getter for Text.List<String>
getTo()
Getter for To.void
setApplicationId(String applicationId)
Setter for ApplicationId.void
setFrom(String from)
Setter for From.void
setMedia(List<String> media)
Setter for Media.void
setPriority(PriorityEnum priority)
Setter for Priority.void
setTag(String tag)
Setter for Tag.void
setText(String text)
Setter for Text.void
setTo(List<String> to)
Setter for To.MessageRequest.Builder
toBuilder()
Builds a newMessageRequest.Builder
object.String
toString()
Converts this MessageRequest into string format.
-
-
-
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.
-
toBuilder
public MessageRequest.Builder toBuilder()
Builds a newMessageRequest.Builder
object. Creates the instance with the state of the current model.- Returns:
- a new
MessageRequest.Builder
object
-
-