ImageObject.BuilderBase


@ExperimentalAppSearchApi
public class ImageObject.BuilderBase<T extends ImageObject.BuilderBase<T>> extends Thing.BuilderBase

Known direct subclasses

Summary

Public constructors

Constructor for ImageObject.BuilderBase with all the existing values.

Constructor for ImageObject.BuilderBase.

Public methods

@NonNull T

Appends the Keyword.

@NonNull T

Appends the Keyword as a Text i.e. String.

@NonNull T

Appends all the values.

@NonNull ImageObject

Builds a Thing object.

@NonNull T
setBytes(@Nullable byte[] bytes)

Sets the byte representation of this image or video.

@NonNull T

Sets the sha256.

@NonNull T

Sets the sha256 of the thumbnail of this image of video.

Inherited methods

From androidx.appsearch.builtintypes.Thing.BuilderBase
@NonNull T

Adds an alias for the item.

@NonNull T

Add a new action to the list of potential actions for this document.

@NonNull T

Clears the aliases, if any, for the item.

@NonNull T

Clear all the potential actions for this document.

void

If built, make a copy of previous data for every field so that the builder can be reused.

@NonNull T

Sets a list of aliases for the item.

@NonNull T
setCreationTimestampMillis(long creationTimestampMillis)

Sets the creation timestamp for the current AppSearch entity, in milliseconds using the currentTimeMillis time base.

@NonNull T

Sets the description for the item.

@NonNull T
setDocumentScore(int documentScore)

Sets the user-provided opaque document score of the current AppSearch document, which can be used for ranking using RANKING_STRATEGY_DOCUMENT_SCORE.

@NonNull T
setDocumentTtlMillis(long documentTtlMillis)

Sets the time-to-live (TTL) for the current AppSearch document as a duration in milliseconds.

@NonNull T

Sets the URL for an image of the item.

@NonNull T

Sets the name of the item.

@NonNull T

Sets a list of potential actions for this document.

@NonNull T

Sets the deeplink URL of the item.

Public constructors

BuilderBase

Added in 1.2.0-alpha02
public BuilderBase(@NonNull ImageObject copyFrom)

Constructor for ImageObject.BuilderBase with all the existing values.

Parameters
@NonNull ImageObject copyFrom

The existing ImageObject to copy values from.

BuilderBase

public BuilderBase(@NonNull String namespace, @NonNull String id)

Constructor for ImageObject.BuilderBase.

Parameters
@NonNull String namespace

Namespace for the Document. See Document.Namespace.

@NonNull String id

Unique identifier for the Document. See Document.Id.

Public methods

addKeyword

Added in 1.2.0-alpha02
public @NonNulladdKeyword(@NonNull Keyword keyword)

Appends the Keyword.

addKeyword

Added in 1.2.0-alpha02
public @NonNulladdKeyword(@NonNull String text)

Appends the Keyword as a Text i.e. String.

addKeywords

Added in 1.2.0-alpha02
public @NonNulladdKeywords(@NonNull Iterable<Keyword> values)

Appends all the values.

build

public @NonNull ImageObject build()

Builds a Thing object.

setBytes

Added in 1.2.0-alpha02
public @NonNullsetBytes(@Nullable byte[] bytes)

Sets the byte representation of this image or video.

setSha256

Added in 1.2.0-alpha02
public @NonNullsetSha256(@Nullable String text)

Sets the sha256.

setThumbnailSha256

Added in 1.2.0-alpha02
public @NonNullsetThumbnailSha256(@Nullable String text)

Sets the sha256 of the thumbnail of this image of video.