Class NewsItem.Builder
- java.lang.Object
-
- com.intercom.api.resources.news.types.NewsItem.Builder
-
- All Implemented Interfaces:
NewsItem._FinalStage,NewsItem.BodyStage,NewsItem.CreatedAtStage,NewsItem.IdStage,NewsItem.SenderIdStage,NewsItem.StateStage,NewsItem.TitleStage,NewsItem.WorkspaceIdStage
- Enclosing class:
- NewsItem
public static final class NewsItem.Builder extends java.lang.Object implements NewsItem.IdStage, NewsItem.WorkspaceIdStage, NewsItem.TitleStage, NewsItem.BodyStage, NewsItem.SenderIdStage, NewsItem.StateStage, NewsItem.CreatedAtStage, NewsItem._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NewsItem.SenderIdStagebody(java.lang.String body)The news item body, which may contain HTML.NewsItembuild()NewsItem._FinalStagecoverImageUrl(java.lang.String coverImageUrl)URL of the image used as cover.NewsItem._FinalStagecoverImageUrl(java.util.Optional<java.lang.String> coverImageUrl)URL of the image used as cover.NewsItem._FinalStagecreatedAt(int createdAt)Timestamp for when the news item was created.NewsItem._FinalStagedeliverSilently(java.lang.Boolean deliverSilently)When set to true, the news item will appear in the messenger newsfeed without showing a notification badge.NewsItem._FinalStagedeliverSilently(java.util.Optional<java.lang.Boolean> deliverSilently)When set to true, the news item will appear in the messenger newsfeed without showing a notification badge.NewsItem.Builderfrom(NewsItem other)NewsItem.WorkspaceIdStageid(java.lang.String id)The unique identifier for the news item which is given by Intercom.NewsItem._FinalStagelabels(java.util.List<java.util.Optional<java.lang.String>> labels)Label names displayed to users to categorize the news item.NewsItem._FinalStagelabels(java.util.Optional<java.util.List<java.util.Optional<java.lang.String>>> labels)Label names displayed to users to categorize the news item.NewsItem._FinalStagenewsfeedAssignments(java.util.List<NewsfeedAssignment> newsfeedAssignments)A list of newsfeed_assignments to assign to the specified newsfeed.NewsItem._FinalStagenewsfeedAssignments(java.util.Optional<java.util.List<NewsfeedAssignment>> newsfeedAssignments)A list of newsfeed_assignments to assign to the specified newsfeed.NewsItem._FinalStagereactions(java.util.List<java.util.Optional<java.lang.String>> reactions)Ordered list of emoji reactions to the news item.NewsItem._FinalStagereactions(java.util.Optional<java.util.List<java.util.Optional<java.lang.String>>> reactions)Ordered list of emoji reactions to the news item.NewsItem.StateStagesenderId(int senderId)The id of the sender of the news item.NewsItem.CreatedAtStagestate(NewsItem.State state)News items will not be visible to your users in the assigned newsfeeds until they are set live.NewsItem.BodyStagetitle(java.lang.String title)The title of the news item.NewsItem._FinalStageupdatedAt(java.lang.Integer updatedAt)Timestamp for when the news item was last updated.NewsItem._FinalStageupdatedAt(java.util.Optional<java.lang.Integer> updatedAt)Timestamp for when the news item was last updated.NewsItem.TitleStageworkspaceId(java.lang.String workspaceId)The id of the workspace which the news item belongs to.
-
-
-
Method Detail
-
from
public NewsItem.Builder from(NewsItem other)
- Specified by:
fromin interfaceNewsItem.IdStage
-
id
public NewsItem.WorkspaceIdStage id(@NotNull java.lang.String id)
The unique identifier for the news item which is given by Intercom.The unique identifier for the news item which is given by Intercom.
- Specified by:
idin interfaceNewsItem.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
workspaceId
public NewsItem.TitleStage workspaceId(@NotNull java.lang.String workspaceId)
The id of the workspace which the news item belongs to.The id of the workspace which the news item belongs to.
- Specified by:
workspaceIdin interfaceNewsItem.WorkspaceIdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
title
public NewsItem.BodyStage title(@NotNull java.lang.String title)
The title of the news item.The title of the news item.
- Specified by:
titlein interfaceNewsItem.TitleStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
body
public NewsItem.SenderIdStage body(@NotNull java.lang.String body)
The news item body, which may contain HTML.The news item body, which may contain HTML.
- Specified by:
bodyin interfaceNewsItem.BodyStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
senderId
public NewsItem.StateStage senderId(int senderId)
The id of the sender of the news item. Must be a teammate on the workspace.The id of the sender of the news item. Must be a teammate on the workspace.
- Specified by:
senderIdin interfaceNewsItem.SenderIdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
state
public NewsItem.CreatedAtStage state(@NotNull NewsItem.State state)
News items will not be visible to your users in the assigned newsfeeds until they are set live.News items will not be visible to your users in the assigned newsfeeds until they are set live.
- Specified by:
statein interfaceNewsItem.StateStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
createdAt
public NewsItem._FinalStage createdAt(int createdAt)
Timestamp for when the news item was created.Timestamp for when the news item was created.
- Specified by:
createdAtin interfaceNewsItem.CreatedAtStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
updatedAt
public NewsItem._FinalStage updatedAt(java.lang.Integer updatedAt)
Timestamp for when the news item was last updated.
- Specified by:
updatedAtin interfaceNewsItem._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
updatedAt
public NewsItem._FinalStage updatedAt(java.util.Optional<java.lang.Integer> updatedAt)
Timestamp for when the news item was last updated.
- Specified by:
updatedAtin interfaceNewsItem._FinalStage
-
deliverSilently
public NewsItem._FinalStage deliverSilently(java.lang.Boolean deliverSilently)
When set to true, the news item will appear in the messenger newsfeed without showing a notification badge.
- Specified by:
deliverSilentlyin interfaceNewsItem._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
deliverSilently
public NewsItem._FinalStage deliverSilently(java.util.Optional<java.lang.Boolean> deliverSilently)
When set to true, the news item will appear in the messenger newsfeed without showing a notification badge.
- Specified by:
deliverSilentlyin interfaceNewsItem._FinalStage
-
reactions
public NewsItem._FinalStage reactions(java.util.List<java.util.Optional<java.lang.String>> reactions)
Ordered list of emoji reactions to the news item. When empty, reactions are disabled.
- Specified by:
reactionsin interfaceNewsItem._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
reactions
public NewsItem._FinalStage reactions(java.util.Optional<java.util.List<java.util.Optional<java.lang.String>>> reactions)
Ordered list of emoji reactions to the news item. When empty, reactions are disabled.
- Specified by:
reactionsin interfaceNewsItem._FinalStage
-
coverImageUrl
public NewsItem._FinalStage coverImageUrl(java.lang.String coverImageUrl)
URL of the image used as cover. Must have .jpg or .png extension.
- Specified by:
coverImageUrlin interfaceNewsItem._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
coverImageUrl
public NewsItem._FinalStage coverImageUrl(java.util.Optional<java.lang.String> coverImageUrl)
URL of the image used as cover. Must have .jpg or .png extension.
- Specified by:
coverImageUrlin interfaceNewsItem._FinalStage
-
labels
public NewsItem._FinalStage labels(java.util.List<java.util.Optional<java.lang.String>> labels)
Label names displayed to users to categorize the news item.
- Specified by:
labelsin interfaceNewsItem._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
labels
public NewsItem._FinalStage labels(java.util.Optional<java.util.List<java.util.Optional<java.lang.String>>> labels)
Label names displayed to users to categorize the news item.
- Specified by:
labelsin interfaceNewsItem._FinalStage
-
newsfeedAssignments
public NewsItem._FinalStage newsfeedAssignments(java.util.List<NewsfeedAssignment> newsfeedAssignments)
A list of newsfeed_assignments to assign to the specified newsfeed.
- Specified by:
newsfeedAssignmentsin interfaceNewsItem._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
newsfeedAssignments
public NewsItem._FinalStage newsfeedAssignments(java.util.Optional<java.util.List<NewsfeedAssignment>> newsfeedAssignments)
A list of newsfeed_assignments to assign to the specified newsfeed.
- Specified by:
newsfeedAssignmentsin interfaceNewsItem._FinalStage
-
build
public NewsItem build()
- Specified by:
buildin interfaceNewsItem._FinalStage
-
-