ScheduleCustomAudienceUpdateRequest.Builder


public static final class ScheduleCustomAudienceUpdateRequest.Builder
extends Object

java.lang.Object
   ↳ android.adservices.customaudience.ScheduleCustomAudienceUpdateRequest.Builder


Builder for ScheduleCustomAudienceUpdateRequest objects.

Summary

Public constructors

Builder(Uri updateUri, Duration minDelay, List<PartialCustomAudience> partialCustomAudienceList)

Instantiates a builder for a ScheduleCustomAudienceUpdateRequest object.

Public methods

ScheduleCustomAudienceUpdateRequest build()

Builds an instance of ScheduleCustomAudienceUpdateRequest.

ScheduleCustomAudienceUpdateRequest.Builder setMinDelay(Duration minDelay)

Sets the minimum Duration that the update will be deferred before the service fetches updates for the buyer ad tech's custom audiences.

ScheduleCustomAudienceUpdateRequest.Builder setPartialCustomAudienceList(List<PartialCustomAudience> partialCustomAudienceList)

Sets the list of PartialCustomAudience objects that are sent to the buyer ad tech's server when making a request to download updates for the buyer's custom audiences.

ScheduleCustomAudienceUpdateRequest.Builder setShouldReplacePendingUpdates(boolean shouldReplacePendingUpdates)

Sets whether any pending scheduled updates should be deleted and replaced with this ScheduleCustomAudienceUpdateRequest.

ScheduleCustomAudienceUpdateRequest.Builder setUpdateUri(Uri updateUri)

Sets the Uri from which the update for the buyer's custom audiences will be fetched.

Inherited methods

Public constructors

Builder

public Builder (Uri updateUri, 
                Duration minDelay, 
                List<PartialCustomAudience> partialCustomAudienceList)

Instantiates a builder for a ScheduleCustomAudienceUpdateRequest object.

Parameters
updateUri Uri: Uri of the buyer ad tech's server from which the updates for the buyer's custom audiences will be fetched This value cannot be null.

minDelay Duration: Minimum Duration for which the update should be deferred This value cannot be null.

partialCustomAudienceList List: List of PartialCustomAudience objects which will be sent to the buyer ad tech's server This value cannot be null.

Public methods

build

public ScheduleCustomAudienceUpdateRequest build ()

Builds an instance of ScheduleCustomAudienceUpdateRequest.

Returns
ScheduleCustomAudienceUpdateRequest This value cannot be null.

setMinDelay

public ScheduleCustomAudienceUpdateRequest.Builder setMinDelay (Duration minDelay)

Sets the minimum Duration that the update will be deferred before the service fetches updates for the buyer ad tech's custom audiences.

This delay must not be a negative Duration.

See ScheduleCustomAudienceUpdateRequest.getMinDelay() for more details.

Parameters
minDelay Duration: This value cannot be null.

Returns
ScheduleCustomAudienceUpdateRequest.Builder This value cannot be null.

setPartialCustomAudienceList

public ScheduleCustomAudienceUpdateRequest.Builder setPartialCustomAudienceList (List<PartialCustomAudience> partialCustomAudienceList)

Sets the list of PartialCustomAudience objects that are sent to the buyer ad tech's server when making a request to download updates for the buyer's custom audiences.

See ScheduleCustomAudienceUpdateRequest.getPartialCustomAudienceList() for more details.

Parameters
partialCustomAudienceList List: This value cannot be null.

Returns
ScheduleCustomAudienceUpdateRequest.Builder This value cannot be null.

setShouldReplacePendingUpdates

public ScheduleCustomAudienceUpdateRequest.Builder setShouldReplacePendingUpdates (boolean shouldReplacePendingUpdates)

Sets whether any pending scheduled updates should be deleted and replaced with this ScheduleCustomAudienceUpdateRequest.

By default, this setting is false.

See ScheduleCustomAudienceUpdateRequest.shouldReplacePendingUpdates() for more details.

Parameters
shouldReplacePendingUpdates boolean

Returns
ScheduleCustomAudienceUpdateRequest.Builder This value cannot be null.

setUpdateUri

public ScheduleCustomAudienceUpdateRequest.Builder setUpdateUri (Uri updateUri)

Sets the Uri from which the update for the buyer's custom audiences will be fetched.

The Uri must use the same HTTPS site as the buyer ad tech's enrolled server.

See ScheduleCustomAudienceUpdateRequest.getUpdateUri() for more details.

Parameters
updateUri Uri: This value cannot be null.

Returns
ScheduleCustomAudienceUpdateRequest.Builder This value cannot be null.