Package org.openapitools.client.model
Class MessageRequest
- java.lang.Object
-
- org.openapitools.client.model.MessageRequest
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2023-02-21T09:43:53.001100-05:00[America/New_York]") public class MessageRequest extends Object
MessageRequest
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MessageRequest.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_APPLICATION_ID
static String
SERIALIZED_NAME_EXPIRATION
static String
SERIALIZED_NAME_FROM
static String
SERIALIZED_NAME_MEDIA
static String
SERIALIZED_NAME_PRIORITY
static String
SERIALIZED_NAME_TAG
static String
SERIALIZED_NAME_TEXT
static String
SERIALIZED_NAME_TO
-
Constructor Summary
Constructors Constructor Description MessageRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageRequest
addMediaItem(URI mediaItem)
MessageRequest
addToItem(String toItem)
MessageRequest
applicationId(String applicationId)
boolean
equals(Object o)
MessageRequest
expiration(String expiration)
MessageRequest
from(String from)
static MessageRequest
fromJson(String jsonString)
Create an instance of MessageRequest given an JSON stringString
getApplicationId()
The ID of the Application your from number is associated with in the Bandwidth Phone Number Dashboard.String
getExpiration()
A string with the date/time value that the message will automatically expire by.String
getFrom()
One of your telephone numbers the message should come from in E164 format.List<URI>
getMedia()
A list of URLs to include as media attachments as part of the message.PriorityEnum
getPriority()
Get priorityString
getTag()
A custom string that will be included in callback events of the message.String
getText()
The contents of the text message.Set<String>
getTo()
The phone number(s) the message should be sent to in E164 format.int
hashCode()
MessageRequest
media(List<URI> media)
MessageRequest
priority(PriorityEnum priority)
void
setApplicationId(String applicationId)
void
setExpiration(String expiration)
void
setFrom(String from)
void
setMedia(List<URI> media)
void
setPriority(PriorityEnum priority)
void
setTag(String tag)
void
setText(String text)
void
setTo(Set<String> to)
MessageRequest
tag(String tag)
MessageRequest
text(String text)
MessageRequest
to(Set<String> to)
String
toJson()
Convert an instance of MessageRequest to an JSON stringString
toString()
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_APPLICATION_ID
public static final String SERIALIZED_NAME_APPLICATION_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TO
public static final String SERIALIZED_NAME_TO
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FROM
public static final String SERIALIZED_NAME_FROM
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TEXT
public static final String SERIALIZED_NAME_TEXT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MEDIA
public static final String SERIALIZED_NAME_MEDIA
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TAG
public static final String SERIALIZED_NAME_TAG
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PRIORITY
public static final String SERIALIZED_NAME_PRIORITY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_EXPIRATION
public static final String SERIALIZED_NAME_EXPIRATION
- See Also:
- Constant Field Values
-
-
Method Detail
-
applicationId
public MessageRequest applicationId(String applicationId)
-
getApplicationId
@Nonnull public String getApplicationId()
The ID of the Application your from number is associated with in the Bandwidth Phone Number Dashboard.- Returns:
- applicationId
-
setApplicationId
public void setApplicationId(String applicationId)
-
to
public MessageRequest to(Set<String> to)
-
addToItem
public MessageRequest addToItem(String toItem)
-
getTo
@Nonnull public Set<String> getTo()
The phone number(s) the message should be sent to in E164 format.- Returns:
- to
-
from
public MessageRequest from(String from)
-
getFrom
@Nonnull public String getFrom()
One of your telephone numbers the message should come from in E164 format.- Returns:
- from
-
setFrom
public void setFrom(String from)
-
text
public MessageRequest text(String text)
-
getText
@Nullable public String getText()
The contents of the text message. Must be 2048 characters or less.- Returns:
- text
-
setText
public void setText(String text)
-
media
public MessageRequest media(List<URI> media)
-
addMediaItem
public MessageRequest addMediaItem(URI mediaItem)
-
getMedia
@Nullable public List<URI> getMedia()
A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters.- Returns:
- media
-
tag
public MessageRequest tag(String tag)
-
getTag
@Nullable public String getTag()
A custom string that will be included in callback events of the message. Max 1024 characters.- Returns:
- tag
-
setTag
public void setTag(String tag)
-
priority
public MessageRequest priority(PriorityEnum priority)
-
getPriority
@Nullable public PriorityEnum getPriority()
Get priority- Returns:
- priority
-
setPriority
public void setPriority(PriorityEnum priority)
-
expiration
public MessageRequest expiration(String expiration)
-
getExpiration
@Nullable public String getExpiration()
A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00.- Returns:
- expiration
-
setExpiration
public void setExpiration(String expiration)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
Validates the JSON Object and throws an exception if issues found- Parameters:
jsonObj
- JSON Object- Throws:
IOException
- if the JSON Object is invalid with respect to MessageRequest
-
fromJson
public static MessageRequest fromJson(String jsonString) throws IOException
Create an instance of MessageRequest given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of MessageRequest
- Throws:
IOException
- if the JSON string is invalid with respect to MessageRequest
-
toJson
public String toJson()
Convert an instance of MessageRequest to an JSON string- Returns:
- JSON string
-
-