Package com.bandwidth.sdk.model
Class Message
java.lang.Object
com.bandwidth.sdk.model.Message
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.6.0")
public class Message
extends Object
Message
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMediaItem
(String mediaItem) applicationId
(String applicationId) direction
(MessageDirectionEnum direction) boolean
expiration
(OffsetDateTime expiration) static Message
Create an instance of Message given an JSON stringReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.The application ID associated with the message.Get directionThe expiration date-time set by the user.getFrom()
The phone number the message was sent from.getId()
The id of the message.getMedia()
The list of media URLs sent in the message.getOwner()
The Bandwidth phone number associated with the message.Get priorityThe number of segments the original message from the user is broken into before sending over to carrier networks.getTag()
The custom string set by the user.getText()
The contents of the message.getTime()
The datetime stamp of the message in ISO 8601getTo()
The phone number recipients of the message.int
hashCode()
priority
(PriorityEnum priority) putAdditionalProperty
(String key, Object value) Set the additional (undeclared) property with the specified name and value.segmentCount
(Integer segmentCount) void
setApplicationId
(String applicationId) void
setDirection
(MessageDirectionEnum direction) void
setExpiration
(OffsetDateTime expiration) void
void
void
void
void
setPriority
(PriorityEnum priority) void
setSegmentCount
(Integer segmentCount) void
void
void
setTime
(OffsetDateTime time) void
time
(OffsetDateTime time) toJson()
Convert an instance of Message 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_ID
- See Also:
-
SERIALIZED_NAME_OWNER
- See Also:
-
SERIALIZED_NAME_APPLICATION_ID
- See Also:
-
SERIALIZED_NAME_TIME
- See Also:
-
SERIALIZED_NAME_SEGMENT_COUNT
- See Also:
-
SERIALIZED_NAME_DIRECTION
- See Also:
-
SERIALIZED_NAME_TO
- See Also:
-
SERIALIZED_NAME_FROM
- See Also:
-
SERIALIZED_NAME_MEDIA
- See Also:
-
SERIALIZED_NAME_TEXT
- See Also:
-
SERIALIZED_NAME_TAG
- See Also:
-
SERIALIZED_NAME_PRIORITY
- See Also:
-
SERIALIZED_NAME_EXPIRATION
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
Message
public Message()
-
-
Method Details
-
id
-
getId
The id of the message.- Returns:
- id
-
setId
-
owner
-
getOwner
The Bandwidth phone number associated with the message.- Returns:
- owner
-
setOwner
-
applicationId
-
getApplicationId
The application ID associated with the message.- Returns:
- applicationId
-
setApplicationId
-
time
-
getTime
The datetime stamp of the message in ISO 8601- Returns:
- time
-
setTime
-
segmentCount
-
getSegmentCount
The number of segments the original message from the user is broken into before sending over to carrier networks.- Returns:
- segmentCount
-
setSegmentCount
-
direction
-
getDirection
Get direction- Returns:
- direction
-
setDirection
-
to
-
addToItem
-
getTo
The phone number recipients of the message.- Returns:
- to
-
setTo
-
from
-
getFrom
The phone number the message was sent from.- Returns:
- from
-
setFrom
-
media
-
addMediaItem
-
getMedia
The list of media URLs sent in the message. Including a `filename` field in the `Content-Disposition` header of the media linked with a URL will set the displayed file name. This is a best practice to ensure that your media has a readable file name.- Returns:
- media
-
setMedia
-
text
-
getText
The contents of the message.- Returns:
- text
-
setText
-
tag
-
getTag
The custom string set by the user.- Returns:
- tag
-
setTag
-
priority
-
getPriority
Get priority- Returns:
- priority
-
setPriority
-
expiration
-
getExpiration
The expiration date-time set by the user.- 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 Message 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 Message
-
fromJson
Create an instance of Message given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of Message
- Throws:
IOException
- if the JSON string is invalid with respect to Message
-
toJson
Convert an instance of Message to an JSON string- Returns:
- JSON string
-