ArticleEntity.Builder

public final class ArticleEntity.Builder


Builder class for ArticleEntity.

Summary

Public constructors

Public methods

ArticleEntity.Builder

Add a badge (image/text) for the article entity.

ArticleEntity.Builder

Add badges of the article entity.

ArticleEntity.Builder

Add eligible content categories for the article entity.

ArticleEntity.Builder

Add eligible content category for the article entity.

ArticleEntity.Builder

Add a poster image of the entity.

ArticleEntity.Builder

Add poster images of the entity.

ArticleEntity.Builder

Add a subtitle of the article entity.

ArticleEntity.Builder

Add subtitles of the article entity.

ArticleEntity
ArticleEntity.Builder

Sets the action uri of the article entity.

ArticleEntity.Builder

Sets the description (typically a single paragraph of text) of the article entity.

ArticleEntity.Builder

Sets content id of the entity.

ArticleEntity.Builder
@CanIgnoreReturnValue
setLastContentPublishTimestampMillis(
    Long lastContentPublishTimestampMillis
)

Sets the last content publish timestamp for the article entity.

ArticleEntity.Builder
@CanIgnoreReturnValue
setLastEngagementTimestampMillis(long lastEngagementTimestampMillis)

Sets the last engagement timestamp for the article entity.

ArticleEntity.Builder

Sets the progress percentage for the article entity.

ArticleEntity.Builder

Sets the source/author details of the article entity.

ArticleEntity.Builder

Sets the name/title of the article entity.

Public constructors

Builder

public Builder()

Public methods

addBadge

@CanIgnoreReturnValue
public ArticleEntity.Builder addBadge(Badge badge)

Add a badge (image/text) for the article entity.

Optional.

addBadges

@CanIgnoreReturnValue
public ArticleEntity.Builder addBadges(List<Badge> badges)

Add badges of the article entity.

Optional.

addContentCategories

@CanIgnoreReturnValue
public ArticleEntity.Builder addContentCategories(List<Integer> contentCategories)

Add eligible content categories for the article entity.

Optional.

addContentCategory

@CanIgnoreReturnValue
public ArticleEntity.Builder addContentCategory(
    @ArticleEntity.EligibleContentCategory int contentCategory
)

Add eligible content category for the article entity.

Optional.

addPosterImage

@CanIgnoreReturnValue
public ArticleEntity.Builder addPosterImage(Image image)

Add a poster image of the entity.

Required.

addPosterImages

@CanIgnoreReturnValue
public ArticleEntity.Builder addPosterImages(List<Image> images)

Add poster images of the entity.

Required.

addSubtitle

@CanIgnoreReturnValue
public ArticleEntity.Builder addSubtitle(String subtitle)

Add a subtitle of the article entity.

Optional.

addSubtitles

@CanIgnoreReturnValue
public ArticleEntity.Builder addSubtitles(List<String> subtitles)

Add subtitles of the article entity.

Optional.

build

public ArticleEntity build()

setActionUri

@CanIgnoreReturnValue
public ArticleEntity.Builder setActionUri(Uri actionUri)

Sets the action uri of the article entity.

Required.

setDescription

@CanIgnoreReturnValue
public ArticleEntity.Builder setDescription(String description)

Sets the description (typically a single paragraph of text) of the article entity.

Optional.

setEntityId

@CanIgnoreReturnValue
public ArticleEntity.Builder setEntityId(String entityId)

Sets content id of the entity.

Optional.

setLastContentPublishTimestampMillis

@CanIgnoreReturnValue
public ArticleEntity.Builder setLastContentPublishTimestampMillis(
    Long lastContentPublishTimestampMillis
)

Sets the last content publish timestamp for the article entity.

Optional.

setLastEngagementTimestampMillis

@CanIgnoreReturnValue
public ArticleEntity.Builder setLastEngagementTimestampMillis(long lastEngagementTimestampMillis)

Sets the last engagement timestamp for the article entity.

Required.

setProgressPercentage

@CanIgnoreReturnValue
public ArticleEntity.Builder setProgressPercentage(int progressPercentage)

Sets the progress percentage for the article entity.

Required.

setSource

@CanIgnoreReturnValue
public ArticleEntity.Builder setSource(Badge source)

Sets the source/author details of the article entity.

Optional.

setTitle

@CanIgnoreReturnValue
public ArticleEntity.Builder setTitle(String title)

Sets the name/title of the article entity.

Optional.