GetTopicsResponse.Builder

public static final class GetTopicsResponse.Builder
extends Object

java.lang.Object
   ↳ android.adservices.topics.GetTopicsResponse.Builder


Builder for GetTopicsResponse objects. This class is unhidden so that developers can write tests.

Summary

Public constructors

Builder()

Public methods

GetTopicsResponse build()

Builds a GetTopicsResponse instance.

GetTopicsResponse.Builder setModelVersions(List<Long> modelVersions)

Set the Model Version.

GetTopicsResponse.Builder setTaxonomyVersions(List<Long> taxonomyVersions)

Set the Taxonomy Version.

GetTopicsResponse.Builder setTopics(List<String> topics)

Set the list of the returned Topics

Inherited methods

Public constructors

Builder

public Builder ()

Public methods

build

public GetTopicsResponse build ()

Builds a GetTopicsResponse instance.

throws IllegalArgumentException if any of the params are null or there is any mismatch in the size of ModelVersions and TaxonomyVersions.

Returns
GetTopicsResponse

setModelVersions

public GetTopicsResponse.Builder setModelVersions (List<Long> modelVersions)

Set the Model Version.

Parameters
modelVersions List: This value cannot be null.

Returns
GetTopicsResponse.Builder This value cannot be null.

setTaxonomyVersions

public GetTopicsResponse.Builder setTaxonomyVersions (List<Long> taxonomyVersions)

Set the Taxonomy Version.

Parameters
taxonomyVersions List: This value cannot be null.

Returns
GetTopicsResponse.Builder This value cannot be null.

setTopics

public GetTopicsResponse.Builder setTopics (List<String> topics)

Set the list of the returned Topics

Parameters
topics List: This value cannot be null.

Returns
GetTopicsResponse.Builder This value cannot be null.