Package com.bandwidth.sdk.model
Class MessageRequest
java.lang.Object
com.bandwidth.sdk.model.MessageRequest
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.6.0")
public class MessageRequest
extends Object
MessageRequest
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMediaItem
(URI mediaItem) applicationId
(String applicationId) boolean
expiration
(OffsetDateTime expiration) static MessageRequest
Create an instance of MessageRequest given an JSON stringReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.The ID of the Application your from number is associated with in the Bandwidth Phone Number Dashboard.A string with the date/time value that the message will automatically expire by.getFrom()
Either an alphanumeric sender ID or the sender's Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and linked to the account that is generating the message.getMedia()
A list of URLs to include as media attachments as part of the message.Get prioritygetTag()
A custom string that will be included in callback events of the message.getText()
The contents of the text message.getTo()
The phone number(s) the message should be sent to in E164 format.int
hashCode()
priority
(PriorityEnum priority) putAdditionalProperty
(String key, Object value) Set the additional (undeclared) property with the specified name and value.void
setApplicationId
(String applicationId) void
setExpiration
(OffsetDateTime expiration) void
void
void
setPriority
(PriorityEnum priority) void
void
void
toJson()
Convert an instance of MessageRequest to an JSON stringtoString()
static void
validateJsonElement
(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_APPLICATION_ID
- See Also:
-
SERIALIZED_NAME_TO
- See Also:
-
SERIALIZED_NAME_FROM
- See Also:
-
SERIALIZED_NAME_TEXT
- See Also:
-
SERIALIZED_NAME_MEDIA
- See Also:
-
SERIALIZED_NAME_TAG
- See Also:
-
SERIALIZED_NAME_PRIORITY
- See Also:
-
SERIALIZED_NAME_EXPIRATION
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
MessageRequest
public MessageRequest()
-
-
Method Details
-
applicationId
-
getApplicationId
The ID of the Application your from number is associated with in the Bandwidth Phone Number Dashboard.- Returns:
- applicationId
-
setApplicationId
-
to
-
addToItem
-
getTo
The phone number(s) the message should be sent to in E164 format.- Returns:
- to
-
setTo
-
from
-
getFrom
Either an alphanumeric sender ID or the sender's Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter.- Returns:
- from
-
setFrom
-
text
-
getText
The contents of the text message. Must be 2048 characters or less.- Returns:
- text
-
setText
-
media
-
addMediaItem
-
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
-
setMedia
-
tag
-
getTag
A custom string that will be included in callback events of the message. Max 1024 characters.- Returns:
- tag
-
setTag
-
priority
-
getPriority
Get priority- Returns:
- priority
-
setPriority
-
expiration
-
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. Must be a date-time in the future. Not supported on MMS.- Returns:
- expiration
-
setExpiration
-
putAdditionalProperty
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.- Parameters:
key
- name of the propertyvalue
- value of the property- Returns:
- the MessageRequest instance itself
-
getAdditionalProperties
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
Return the additional (undeclared) property with the specified name.- Parameters:
key
- name of the property- Returns:
- an object
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement
- JSON Element- Throws:
IOException
- if the JSON Element is invalid with respect to MessageRequest
-
fromJson
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
Convert an instance of MessageRequest to an JSON string- Returns:
- JSON string
-