DeletionRequest.Builder


@RequiresApi(value = 26)
class DeletionRequest.Builder


Builder for {@link DeletionRequest} objects.

Summary

Public constructors

Builder(deletionMode: Int, matchBehavior: Int)

Public functions

DeletionRequest

Builds a {@link DeletionRequest} instance.

DeletionRequest.Builder
setDomainUris(domainUris: List<Uri>)

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

DeletionRequest.Builder

Sets the end of the deletion range.

DeletionRequest.Builder
setOriginUris(originUris: List<Uri>)

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

DeletionRequest.Builder
setStart(start: Instant)

Sets the start of the deletion range.

Public constructors

Builder

Added in 1.0.0
Builder(deletionMode: Int, matchBehavior: Int)
Parameters
deletionMode: Int

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

matchBehavior: Int

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

Public functions

build

Added in 1.0.0
fun build(): DeletionRequest

Builds a {@link DeletionRequest} instance.

setDomainUris

fun setDomainUris(domainUris: List<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 {@code https://example.com}, then {@code https://a.example.com}, {@code https://example.com} and {@code https://b.example.com} will match; {@code https://abcexample.com} will NOT match. A null or empty list will match everything.

setEnd

Added in 1.0.0
fun setEnd(end: Instant): DeletionRequest.Builder

Sets the end of the deletion range. Not setting this or passing in {@link java.time.Instant#MAX} will cause everything from the specified start until the newest record to be deleted.

setOriginUris

fun setOriginUris(originUris: List<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 {@code https://a.example.com}, then {@code https://a.example.com} will match; {@code https://example.com}, {@code https://b.example.com} and {@code https://abcexample.com} will NOT match. A null or empty list will match everything.

setStart

Added in 1.0.0
fun setStart(start: Instant): DeletionRequest.Builder

Sets the start of the deletion range. Not setting this or passing in {@link java.time.Instant#MIN} will cause everything from the oldest record to the specified end be deleted.