Class Message.Builder
- java.lang.Object
-
- com.intercom.api.resources.unstable.messages.types.Message.Builder
-
- All Implemented Interfaces:
Message._FinalStage,Message.BodyStage,Message.CreatedAtStage,Message.IdStage,Message.MessageTypeStage,Message.TypeStage
- Enclosing class:
- Message
public static final class Message.Builder extends java.lang.Object implements Message.TypeStage, Message.IdStage, Message.CreatedAtStage, Message.BodyStage, Message.MessageTypeStage, Message._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Message.MessageTypeStagebody(java.lang.String body)The message body, which may contain HTML.Messagebuild()Message._FinalStageconversationId(java.lang.String conversationId)The associated conversation_idMessage._FinalStageconversationId(java.util.Optional<java.lang.String> conversationId)The associated conversation_idMessage.BodyStagecreatedAt(int createdAt)The time the conversation was created.Message.Builderfrom(Message other)Message.CreatedAtStageid(java.lang.String id)The id representing the message.Message._FinalStagemessageType(Message.MessageType messageType)The type of message that was sent.Message._FinalStagesubject(java.lang.String subject)The subject of the message.Message._FinalStagesubject(java.util.Optional<java.lang.String> subject)The subject of the message.Message.IdStagetype(java.lang.String type)The type of the message
-
-
-
Method Detail
-
from
public Message.Builder from(Message other)
- Specified by:
fromin interfaceMessage.TypeStage
-
type
public Message.IdStage type(@NotNull java.lang.String type)
The type of the message
The type of the message
- Specified by:
typein interfaceMessage.TypeStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
id
public Message.CreatedAtStage id(@NotNull java.lang.String id)
The id representing the message.
The id representing the message.
- Specified by:
idin interfaceMessage.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
createdAt
public Message.BodyStage createdAt(int createdAt)
The time the conversation was created.
The time the conversation was created.
- Specified by:
createdAtin interfaceMessage.CreatedAtStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
body
public Message.MessageTypeStage body(@NotNull java.lang.String body)
The message body, which may contain HTML.
The message body, which may contain HTML.
- Specified by:
bodyin interfaceMessage.BodyStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
messageType
public Message._FinalStage messageType(@NotNull Message.MessageType messageType)
The type of message that was sent. Can be email, inapp, facebook, twitter, sms or whatsapp.
The type of message that was sent. Can be email, inapp, facebook, twitter, sms or whatsapp.
- Specified by:
messageTypein interfaceMessage.MessageTypeStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
conversationId
public Message._FinalStage conversationId(java.lang.String conversationId)
The associated conversation_id
- Specified by:
conversationIdin interfaceMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
conversationId
public Message._FinalStage conversationId(java.util.Optional<java.lang.String> conversationId)
The associated conversation_id
- Specified by:
conversationIdin interfaceMessage._FinalStage
-
subject
public Message._FinalStage subject(java.lang.String subject)
The subject of the message. Only present if message_type: email.
- Specified by:
subjectin interfaceMessage._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
subject
public Message._FinalStage subject(java.util.Optional<java.lang.String> subject)
The subject of the message. Only present if message_type: email.
- Specified by:
subjectin interfaceMessage._FinalStage
-
build
public Message build()
- Specified by:
buildin interfaceMessage._FinalStage
-
-