Class MessageCreator
- java.lang.Object
-
- com.twilio.base.Creator<Message>
-
- com.twilio.rest.messaging.v1.session.MessageCreator
-
public class MessageCreator extends Creator<Message>
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
-
-
Constructor Summary
Constructors Constructor Description MessageCreator(String pathSessionSid)
Construct a new MessageCreator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Message
create(TwilioRestClient client)
Make the request to the Twilio API to perform the create.MessageCreator
setAttributes(String attributes)
A string metadata field you can use to store any data you wish.MessageCreator
setAuthor(String author)
The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the message's author.MessageCreator
setBody(String body)
The contents of the message..MessageCreator
setDateCreated(org.joda.time.DateTime dateCreated)
The date that this resource was created..MessageCreator
setDateUpdated(org.joda.time.DateTime dateUpdated)
The date that this resource was last updated.-
Methods inherited from class com.twilio.base.Creator
create, createAsync, createAsync
-
-
-
-
Constructor Detail
-
MessageCreator
public MessageCreator(String pathSessionSid)
Construct a new MessageCreator.- Parameters:
pathSessionSid
- The unique id of the Session for this message.
-
-
Method Detail
-
setAuthor
public MessageCreator setAuthor(String author)
The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the message's author. Defaults to `system`..- Parameters:
author
- The identity of the message's author.- Returns:
- this
-
setAttributes
public MessageCreator setAttributes(String attributes)
A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified..- Parameters:
attributes
- A string metadata field you can use to store any data you wish.- Returns:
- this
-
setDateCreated
public MessageCreator setDateCreated(org.joda.time.DateTime dateCreated)
The date that this resource was created..- Parameters:
dateCreated
- The date that this resource was created.- Returns:
- this
-
setDateUpdated
public MessageCreator setDateUpdated(org.joda.time.DateTime dateUpdated)
The date that this resource was last updated. `null` if the message has not been edited..- Parameters:
dateUpdated
- The date that this resource was last updated.- Returns:
- this
-
setBody
public MessageCreator setBody(String body)
The contents of the message..- Parameters:
body
- The contents of the message.- Returns:
- this
-
create
public Message create(TwilioRestClient client)
Make the request to the Twilio API to perform the create.
-
-