DeletionRequest


@RequiresApi(value = 26)
public final class DeletionRequest


Deletion Request.

Summary

Nested types

@RequiresApi(value = 26)
public final class DeletionRequest.Builder

Builder for {@link DeletionRequest} objects.

Constants

static final int

Deletion mode to delete all data associated with the selected records.

static final int

Deletion mode to delete all data except the internal data (e.g. rate limits) for the selected records.

static final int

Match behavior option to delete the supplied params (Origin/Domains).

static final int

Match behavior option to preserve the supplied params (Origin/Domains) and delete everything else.

Public constructors

DeletionRequest(
    int deletionMode,
    int matchBehavior,
    @NonNull Instant start,
    @NonNull Instant end,
    @NonNull List<@NonNull Uri> domainUris,
    @NonNull List<@NonNull Uri> originUris
)

Public methods

boolean
equals(Object other)
final int

Set the deletion mode for the supplied params.

final @NonNull List<@NonNull Uri>

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

final @NonNull Instant

Instant Set the end of the deletion range.

final int

Set the match behavior for the supplied params.

final @NonNull List<@NonNull Uri>

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

final @NonNull Instant

Instant Set the start of the deletion range.

int
@NonNull String

Constants

DELETION_MODE_ALL

public static final int DELETION_MODE_ALL = 0

Deletion mode to delete all data associated with the selected records.

DELETION_MODE_EXCLUDE_INTERNAL_DATA

public static final int DELETION_MODE_EXCLUDE_INTERNAL_DATA = 1

Deletion mode to delete all data except the internal data (e.g. rate limits) for the selected records.

MATCH_BEHAVIOR_DELETE

public static final int MATCH_BEHAVIOR_DELETE = 0

Match behavior option to delete the supplied params (Origin/Domains).

MATCH_BEHAVIOR_PRESERVE

public static final int MATCH_BEHAVIOR_PRESERVE = 1

Match behavior option to preserve the supplied params (Origin/Domains) and delete everything else.

Public constructors

DeletionRequest

public DeletionRequest(
    int deletionMode,
    int matchBehavior,
    @NonNull Instant start,
    @NonNull Instant end,
    @NonNull List<@NonNull Uri> domainUris,
    @NonNull List<@NonNull Uri> originUris
)
Parameters
int deletionMode

Set the deletion mode 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.

int matchBehavior

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.

@NonNull Instant start

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

@NonNull Instant end

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

@NonNull List<@NonNull Uri> domainUris

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.

@NonNull List<@NonNull Uri> originUris

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.

Public methods

equals

public boolean equals(Object other)

getDeletionMode

Added in 1.0.0
public final int getDeletionMode()

Set the deletion mode 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.

getDomainUris

Added in 1.0.0
public final @NonNull List<@NonNull UrigetDomainUris()

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.

getEnd

Added in 1.0.0
public final @NonNull Instant getEnd()

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

getMatchBehavior

Added in 1.0.0
public final int getMatchBehavior()

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.

getOriginUris

Added in 1.0.0
public final @NonNull List<@NonNull UrigetOriginUris()

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.

getStart

Added in 1.0.0
public final @NonNull Instant getStart()

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

hashCode

public int hashCode()

toString

public @NonNull String toString()