Builder


class Builder
kotlin.Any
   ↳ android.adservices.measurement.DeletionRequest.Builder

Builder for DeletionRequest objects.

Summary

Public constructors

Public methods
DeletionRequest

Builds a DeletionRequest instance.

DeletionRequest.Builder
setDeletionMode(deletionMode: Int)

Set the match behavior for the supplied params.

DeletionRequest.Builder
setDomainUris(domainUris: MutableList<Uri!>?)

Set the list of domain URI which will be used for matching.

DeletionRequest.Builder

Set the end of the deletion range.

DeletionRequest.Builder
setMatchBehavior(matchBehavior: Int)

Set the match behavior for the supplied params.

DeletionRequest.Builder
setOriginUris(originUris: MutableList<Uri!>?)

Set the list of origin URI which will be used for matching.

DeletionRequest.Builder
setStart(start: Instant)

Set the start of the deletion range.

Public constructors

Builder

Builder()

Public methods

build

fun build(): DeletionRequest

Builds a DeletionRequest instance.

Return
DeletionRequest This value cannot be null.

setDeletionMode

fun setDeletionMode(deletionMode: Int): DeletionRequest.Builder

Set the match behavior for the supplied params. DELETION_MODE_ALL: All data associated with the selected records will be deleted. DELETION_MODE_EXCLUDE_INTERNAL_DATA: All data except the internal system data (e.g. rate limits) associated with the selected records will be deleted.

Parameters
deletionMode Int: Value is android.adservices.measurement.DeletionRequest#DELETION_MODE_ALL, or android.adservices.measurement.DeletionRequest#DELETION_MODE_EXCLUDE_INTERNAL_DATA
Return
DeletionRequest.Builder This value cannot be null.

setDomainUris

fun setDomainUris(domainUris: MutableList<Uri!>?): DeletionRequest.Builder

Set the list of domain URI which will be used for matching. These will be matched with records using the same domain or any subdomains. E.g. If domainUri is https://example.com, then https://a.example.com, https://example.com and https://b.example.com will match; https://abcexample.com will NOT match.

Parameters
domainUris MutableList<Uri!>?: This value may be null.
Return
DeletionRequest.Builder This value cannot be null.

setEnd

fun setEnd(end: Instant): DeletionRequest.Builder

Set the end of the deletion range. Passing in java.time.Instant#MAX will cause everything from the specified start until the newest record to be deleted. No set end will default to java.time.Instant#MAX.

Parameters
end Instant: This value cannot be null.
Return
DeletionRequest.Builder This value cannot be null.

setMatchBehavior

fun setMatchBehavior(matchBehavior: Int): DeletionRequest.Builder

Set the match behavior for the supplied params. MATCH_BEHAVIOR_DELETE: This option will use the supplied params (Origin URIs & Domain URIs) for selecting records for deletion. MATCH_BEHAVIOR_PRESERVE: This option will preserve the data associated with the supplied params (Origin URIs & Domain URIs) and select remaining records for deletion.

Parameters
matchBehavior Int: Value is android.adservices.measurement.DeletionRequest#MATCH_BEHAVIOR_DELETE, or android.adservices.measurement.DeletionRequest#MATCH_BEHAVIOR_PRESERVE
Return
DeletionRequest.Builder This value cannot be null.

setOriginUris

fun setOriginUris(originUris: MutableList<Uri!>?): DeletionRequest.Builder

Set the list of origin URI which will be used for matching. These will be matched with records using the same origin only, i.e. subdomains won't match. E.g. If originUri is https://a.example.com, then https://a.example.com will match; https://example.com, https://b.example.com and https://abcexample.com will NOT match.

Parameters
originUris MutableList<Uri!>?: This value may be null.
Return
DeletionRequest.Builder This value cannot be null.

setStart

fun setStart(start: Instant): DeletionRequest.Builder

Set the start of the deletion range. Passing in java.time.Instant#MIN will cause everything from the oldest record to the specified end be deleted. No set start will default to java.time.Instant#MIN.

Parameters
start Instant: This value cannot be null.
Return
DeletionRequest.Builder This value cannot be null.