Class Article.Builder
- java.lang.Object
-
- com.intercom.api.resources.articles.types.Article.Builder
-
- All Implemented Interfaces:
Article._FinalStage,Article.AuthorIdStage,Article.CreatedAtStage,Article.IdStage,Article.StateStage,Article.TitleStage,Article.UpdatedAtStage,Article.WorkspaceIdStage
- Enclosing class:
- Article
public static final class Article.Builder extends java.lang.Object implements Article.IdStage, Article.WorkspaceIdStage, Article.TitleStage, Article.AuthorIdStage, Article.StateStage, Article.CreatedAtStage, Article.UpdatedAtStage, Article._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Article.StateStageauthorId(int authorId)The id of the author of the article.Article._FinalStagebody(java.lang.String body)The body of the article in HTML.Article._FinalStagebody(java.util.Optional<java.lang.String> body)The body of the article in HTML.Articlebuild()Article.UpdatedAtStagecreatedAt(int createdAt)The time when the article was created.Article._FinalStagedefaultLocale(java.lang.String defaultLocale)The default locale of the help center.Article._FinalStagedefaultLocale(java.util.Optional<java.lang.String> defaultLocale)The default locale of the help center.Article._FinalStagedescription(java.lang.String description)The description of the article.Article._FinalStagedescription(java.util.Optional<java.lang.String> description)The description of the article.Article.Builderfrom(Article other)Article.WorkspaceIdStageid(java.lang.String id)The unique identifier for the article which is given by Intercom.Article._FinalStageparentId(java.lang.Integer parentId)The id of the article's parent collection or section.Article._FinalStageparentId(java.util.Optional<java.lang.Integer> parentId)The id of the article's parent collection or section.Article._FinalStageparentIds(java.util.List<java.lang.Integer> parentIds)The ids of the article's parent collections or sections.Article._FinalStageparentIds(java.util.Optional<java.util.List<java.lang.Integer>> parentIds)The ids of the article's parent collections or sections.Article._FinalStageparentType(java.lang.String parentType)The type of parent, which can either be acollectionorsection.Article._FinalStageparentType(java.util.Optional<java.lang.String> parentType)The type of parent, which can either be acollectionorsection.Article.CreatedAtStagestate(Article.State state)Whether the article ispublishedor is adraft.Article._FinalStagestatistics(ArticleStatistics statistics)Article._FinalStagestatistics(java.util.Optional<ArticleStatistics> statistics)Article.AuthorIdStagetitle(java.lang.String title)The title of the article.Article._FinalStagetranslatedContent(ArticleTranslatedContent translatedContent)Article._FinalStagetranslatedContent(java.util.Optional<ArticleTranslatedContent> translatedContent)Article._FinalStagetype(java.lang.String type)The type of object -article.Article._FinalStagetype(java.util.Optional<java.lang.String> type)The type of object -article.Article._FinalStageupdatedAt(int updatedAt)The time when the article was last updated.Article._FinalStageurl(java.lang.String url)The URL of the article.Article._FinalStageurl(java.util.Optional<java.lang.String> url)The URL of the article.Article.TitleStageworkspaceId(java.lang.String workspaceId)The id of the workspace which the article belongs to.
-
-
-
Method Detail
-
from
public Article.Builder from(Article other)
- Specified by:
fromin interfaceArticle.IdStage
-
id
public Article.WorkspaceIdStage id(@NotNull java.lang.String id)
The unique identifier for the article which is given by Intercom.
The unique identifier for the article which is given by Intercom.
- Specified by:
idin interfaceArticle.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
workspaceId
public Article.TitleStage workspaceId(@NotNull java.lang.String workspaceId)
The id of the workspace which the article belongs to.
The id of the workspace which the article belongs to.
- Specified by:
workspaceIdin interfaceArticle.WorkspaceIdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
title
public Article.AuthorIdStage title(@NotNull java.lang.String title)
The title of the article. For multilingual articles, this will be the title of the default language's content.
The title of the article. For multilingual articles, this will be the title of the default language's content.
- Specified by:
titlein interfaceArticle.TitleStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
authorId
public Article.StateStage authorId(int authorId)
The id of the author of the article. For multilingual articles, this will be the id of the author of the default language's content. Must be a teammate on the help center's workspace.
The id of the author of the article. For multilingual articles, this will be the id of the author of the default language's content. Must be a teammate on the help center's workspace.
- Specified by:
authorIdin interfaceArticle.AuthorIdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
state
public Article.CreatedAtStage state(@NotNull Article.State state)
Whether the article is
publishedor is adraft. For multilingual articles, this will be the state of the default language's content.Whether the article is
publishedor is adraft. For multilingual articles, this will be the state of the default language's content.- Specified by:
statein interfaceArticle.StateStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
createdAt
public Article.UpdatedAtStage createdAt(int createdAt)
The time when the article was created. For multilingual articles, this will be the timestamp of creation of the default language's content in seconds.
The time when the article was created. For multilingual articles, this will be the timestamp of creation of the default language's content in seconds.
- Specified by:
createdAtin interfaceArticle.CreatedAtStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
updatedAt
public Article._FinalStage updatedAt(int updatedAt)
The time when the article was last updated. For multilingual articles, this will be the timestamp of last update of the default language's content in seconds.
The time when the article was last updated. For multilingual articles, this will be the timestamp of last update of the default language's content in seconds.
- Specified by:
updatedAtin interfaceArticle.UpdatedAtStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
statistics
public Article._FinalStage statistics(ArticleStatistics statistics)
- Specified by:
statisticsin interfaceArticle._FinalStage
-
statistics
public Article._FinalStage statistics(java.util.Optional<ArticleStatistics> statistics)
- Specified by:
statisticsin interfaceArticle._FinalStage
-
translatedContent
public Article._FinalStage translatedContent(ArticleTranslatedContent translatedContent)
- Specified by:
translatedContentin interfaceArticle._FinalStage
-
translatedContent
public Article._FinalStage translatedContent(java.util.Optional<ArticleTranslatedContent> translatedContent)
- Specified by:
translatedContentin interfaceArticle._FinalStage
-
defaultLocale
public Article._FinalStage defaultLocale(java.lang.String defaultLocale)
The default locale of the help center. This field is only returned for multilingual help centers.
- Specified by:
defaultLocalein interfaceArticle._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
defaultLocale
public Article._FinalStage defaultLocale(java.util.Optional<java.lang.String> defaultLocale)
The default locale of the help center. This field is only returned for multilingual help centers.
- Specified by:
defaultLocalein interfaceArticle._FinalStage
-
parentType
public Article._FinalStage parentType(java.lang.String parentType)
The type of parent, which can either be a
collectionorsection.- Specified by:
parentTypein interfaceArticle._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
parentType
public Article._FinalStage parentType(java.util.Optional<java.lang.String> parentType)
The type of parent, which can either be a
collectionorsection.- Specified by:
parentTypein interfaceArticle._FinalStage
-
parentIds
public Article._FinalStage parentIds(java.util.List<java.lang.Integer> parentIds)
The ids of the article's parent collections or sections. An article without this field stands alone.
- Specified by:
parentIdsin interfaceArticle._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
parentIds
public Article._FinalStage parentIds(java.util.Optional<java.util.List<java.lang.Integer>> parentIds)
The ids of the article's parent collections or sections. An article without this field stands alone.
- Specified by:
parentIdsin interfaceArticle._FinalStage
-
parentId
public Article._FinalStage parentId(java.lang.Integer parentId)
The id of the article's parent collection or section. An article without this field stands alone.
- Specified by:
parentIdin interfaceArticle._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
parentId
public Article._FinalStage parentId(java.util.Optional<java.lang.Integer> parentId)
The id of the article's parent collection or section. An article without this field stands alone.
- Specified by:
parentIdin interfaceArticle._FinalStage
-
url
public Article._FinalStage url(java.lang.String url)
The URL of the article. For multilingual articles, this will be the URL of the default language's content.
- Specified by:
urlin interfaceArticle._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
url
public Article._FinalStage url(java.util.Optional<java.lang.String> url)
The URL of the article. For multilingual articles, this will be the URL of the default language's content.
- Specified by:
urlin interfaceArticle._FinalStage
-
body
public Article._FinalStage body(java.lang.String body)
The body of the article in HTML. For multilingual articles, this will be the body of the default language's content.
- Specified by:
bodyin interfaceArticle._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
body
public Article._FinalStage body(java.util.Optional<java.lang.String> body)
The body of the article in HTML. For multilingual articles, this will be the body of the default language's content.
- Specified by:
bodyin interfaceArticle._FinalStage
-
description
public Article._FinalStage description(java.lang.String description)
The description of the article. For multilingual articles, this will be the description of the default language's content.
- Specified by:
descriptionin interfaceArticle._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
description
public Article._FinalStage description(java.util.Optional<java.lang.String> description)
The description of the article. For multilingual articles, this will be the description of the default language's content.
- Specified by:
descriptionin interfaceArticle._FinalStage
-
type
public Article._FinalStage type(java.lang.String type)
The type of object -
article.- Specified by:
typein interfaceArticle._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
type
public Article._FinalStage type(java.util.Optional<java.lang.String> type)
The type of object -
article.- Specified by:
typein interfaceArticle._FinalStage
-
build
public Article build()
- Specified by:
buildin interfaceArticle._FinalStage
-
-