Class ConversationSource.Builder
- java.lang.Object
-
- com.intercom.api.types.ConversationSource.Builder
-
- All Implemented Interfaces:
ConversationSource._FinalStage,ConversationSource.AuthorStage,ConversationSource.DeliveredAsStage,ConversationSource.IdStage,ConversationSource.RedactedStage,ConversationSource.SubjectStage,ConversationSource.TypeStage
- Enclosing class:
- ConversationSource
public static final class ConversationSource.Builder extends java.lang.Object implements ConversationSource.TypeStage, ConversationSource.IdStage, ConversationSource.DeliveredAsStage, ConversationSource.SubjectStage, ConversationSource.AuthorStage, ConversationSource.RedactedStage, ConversationSource._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConversationSource._FinalStageattachments(java.util.List<PartAttachment> attachments)A list of attachments for the part.ConversationSource._FinalStageattachments(java.util.Optional<java.util.List<PartAttachment>> attachments)ConversationSource.RedactedStageauthor(ConversationPartAuthor author)ConversationSource._FinalStagebody(java.lang.String body)The message body, which may contain HTML.ConversationSource._FinalStagebody(java.util.Optional<java.lang.String> body)ConversationSourcebuild()ConversationSource.SubjectStagedeliveredAs(java.lang.String deliveredAs)The conversation's initiation type.ConversationSource.Builderfrom(ConversationSource other)ConversationSource.DeliveredAsStageid(java.lang.String id)The id representing the message.ConversationSource._FinalStageredacted(boolean redacted)Whether or not the source message has been redacted.ConversationSource.AuthorStagesubject(java.lang.String subject)Optional.ConversationSource.IdStagetype(ConversationSource.Type type)This includes conversation, email, facebook, instagram, phone_call, phone_switch, push, sms, twitter and whatsapp.ConversationSource._FinalStageurl(java.lang.String url)The URL where the conversation was started.ConversationSource._FinalStageurl(java.util.Optional<java.lang.String> url)
-
-
-
Method Detail
-
from
public ConversationSource.Builder from(ConversationSource other)
- Specified by:
fromin interfaceConversationSource.TypeStage
-
type
public ConversationSource.IdStage type(@NotNull ConversationSource.Type type)
This includes conversation, email, facebook, instagram, phone_call, phone_switch, push, sms, twitter and whatsapp.
- Specified by:
typein interfaceConversationSource.TypeStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
id
public ConversationSource.DeliveredAsStage id(@NotNull java.lang.String id)
The id representing the message.
- Specified by:
idin interfaceConversationSource.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
deliveredAs
public ConversationSource.SubjectStage deliveredAs(@NotNull java.lang.String deliveredAs)
The conversation's initiation type. Possible values are customer_initiated, campaigns_initiated (legacy campaigns), operator_initiated (Custom bot), automated (Series and other outbounds with dynamic audience message) and admin_initiated (fixed audience message, ticket initiated by an admin, group email).
- Specified by:
deliveredAsin interfaceConversationSource.DeliveredAsStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
subject
public ConversationSource.AuthorStage subject(@NotNull java.lang.String subject)
Optional. The message subject. For Twitter, this will show a generic message regarding why the subject is obscured.
- Specified by:
subjectin interfaceConversationSource.SubjectStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
author
public ConversationSource.RedactedStage author(@NotNull ConversationPartAuthor author)
- Specified by:
authorin interfaceConversationSource.AuthorStage
-
redacted
public ConversationSource._FinalStage redacted(boolean redacted)
Whether or not the source message has been redacted. Only applicable for contact initiated messages.
- Specified by:
redactedin interfaceConversationSource.RedactedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
url
public ConversationSource._FinalStage url(java.lang.String url)
The URL where the conversation was started. For Twitter, Email, and Bots, this will be blank.
- Specified by:
urlin interfaceConversationSource._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
url
public ConversationSource._FinalStage url(java.util.Optional<java.lang.String> url)
- Specified by:
urlin interfaceConversationSource._FinalStage
-
attachments
public ConversationSource._FinalStage attachments(java.util.List<PartAttachment> attachments)
A list of attachments for the part.
- Specified by:
attachmentsin interfaceConversationSource._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
attachments
public ConversationSource._FinalStage attachments(java.util.Optional<java.util.List<PartAttachment>> attachments)
- Specified by:
attachmentsin interfaceConversationSource._FinalStage
-
body
public ConversationSource._FinalStage body(java.lang.String body)
The message body, which may contain HTML. For Twitter, this will show a generic message regarding why the body is obscured.
- Specified by:
bodyin interfaceConversationSource._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
body
public ConversationSource._FinalStage body(java.util.Optional<java.lang.String> body)
- Specified by:
bodyin interfaceConversationSource._FinalStage
-
build
public ConversationSource build()
- Specified by:
buildin interfaceConversationSource._FinalStage
-
-