HighlightSearchResultsParams.Builder


class HighlightSearchResultsParams.Builder


A builder for constructing HighlightSearchResultsParams instances.

Summary

Public constructors

Public functions

HighlightSearchResultsParams

Builds the HighlightSearchResultsParams object specified by this builder.

HighlightSearchResultsParams.Builder
setHighlightSearchTextQuery(highlightSearchTextQuery: String)

Sets the text query string used for highlighting media search results.

HighlightSearchResultsParams.Builder
setHighlightType(highlightType: Int)

Sets the requested highlight type specifying how the highlighted search results will be displayed.

Public constructors

Builder

Added in 1.0.0-alpha03
Builder()

Public functions

build

Added in 1.0.0-alpha03
fun build(): HighlightSearchResultsParams

Builds the HighlightSearchResultsParams object specified by this builder.

Returns
HighlightSearchResultsParams

The newly constructed HighlightSearchResultsParams instance.

Throws
IllegalArgumentException

if highlightType is not set, or if highlightSearchTextQuery is not set or blank.

setHighlightSearchTextQuery

Added in 1.0.0-alpha03
fun setHighlightSearchTextQuery(highlightSearchTextQuery: String): HighlightSearchResultsParams.Builder

Sets the text query string used for highlighting media search results. It should not be empty or null.

Parameters
highlightSearchTextQuery: String

Input string query for highlighting media results.

Returns
HighlightSearchResultsParams.Builder

This Builder.

setHighlightType

Added in 1.0.0-alpha03
fun setHighlightType(highlightType: Int): HighlightSearchResultsParams.Builder

Sets the requested highlight type specifying how the highlighted search results will be displayed.

Parameters
highlightType: Int

A supported highlight type from HighlightType.

Returns
HighlightSearchResultsParams.Builder

This Builder.