Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[Ad Services Extensions 4](https://developer.android.com/sdkExtensions)  
Summary:[Nested Classes](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#nestedclasses)\|[Constants](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#constants)\|[Methods](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#pubmethods)\|[Inherited Methods](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#inhmethods)  

# DeletionRequest

`
public


class
DeletionRequest
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.adservices.measurement.DeletionRequest |

<br />

*** ** * ** ***

Deletion Request.

## Summary

|                                                                                                                                                  ### Nested classes                                                                                                                                                  ||
|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class` | [DeletionRequest.Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest.Builder) Builder for[DeletionRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest)objects. |

|                                                                                                                                               ### Constants                                                                                                                                               ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [DELETION_MODE_ALL](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#DELETION_MODE_ALL) Deletion mode to delete all data associated with the selected records.                                                                     |
| `int` | [DELETION_MODE_EXCLUDE_INTERNAL_DATA](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#DELETION_MODE_EXCLUDE_INTERNAL_DATA) Deletion mode to delete all data except the internal data (e.g. rate limits) for the selected records. |
| `int` | [MATCH_BEHAVIOR_DELETE](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#MATCH_BEHAVIOR_DELETE) Match behavior option to delete the supplied params (Origin/Domains).                                                              |
| `int` | [MATCH_BEHAVIOR_PRESERVE](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#MATCH_BEHAVIOR_PRESERVE) Match behavior option to preserve the supplied params (Origin/Domains) and delete everything else.                             |

|                                                                                                                                                       ### Public methods                                                                                                                                                       ||
|---------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` int`                                                                                                                                | ` `[getDeletionMode](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#getDeletionMode())`() ` Get the deletion mode.    |
| ` `[List](https://developer.android.com/reference/java/util/List)`<`[Uri](https://developer.android.com/reference/android/net/Uri)`>` | ` `[getDomainUris](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#getDomainUris())`() ` Get the list of domain URIs.  |
| ` `[Instant](https://developer.android.com/reference/java/time/Instant)                                                               | ` `[getEnd](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#getEnd())`() ` Get the end of the deletion range.          |
| ` int`                                                                                                                                | ` `[getMatchBehavior](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#getMatchBehavior())`() ` Get the match behavior. |
| ` `[List](https://developer.android.com/reference/java/util/List)`<`[Uri](https://developer.android.com/reference/android/net/Uri)`>` | ` `[getOriginUris](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#getOriginUris())`() ` Get the list of origin URIs.  |
| ` `[Instant](https://developer.android.com/reference/java/time/Instant)                                                               | ` `[getStart](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#getStart())`() ` Get the start of the deletion range.    |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Constants

### DELETION_MODE_ALL

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[Ad Services Extensions 4](https://developer.android.com/sdkExtensions)  

```
public static final int DELETION_MODE_ALL
```

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

<br />

Constant Value: 0 (0x00000000)  

### DELETION_MODE_EXCLUDE_INTERNAL_DATA

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[Ad Services Extensions 4](https://developer.android.com/sdkExtensions)  

```
public static final int DELETION_MODE_EXCLUDE_INTERNAL_DATA
```

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

<br />

Constant Value: 1 (0x00000001)  

### MATCH_BEHAVIOR_DELETE

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[Ad Services Extensions 4](https://developer.android.com/sdkExtensions)  

```
public static final int MATCH_BEHAVIOR_DELETE
```

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

<br />

Constant Value: 0 (0x00000000)  

### MATCH_BEHAVIOR_PRESERVE

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[Ad Services Extensions 4](https://developer.android.com/sdkExtensions)  

```
public static final int MATCH_BEHAVIOR_PRESERVE
```

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

<br />

Constant Value: 1 (0x00000001)

## Public methods

### getDeletionMode

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[Ad Services Extensions 4](https://developer.android.com/sdkExtensions)  

```
public int getDeletionMode ()
```

Get the deletion mode.

<br />

|                                                                                                                                                                                   Returns                                                                                                                                                                                    ||
|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | Value is[DELETION_MODE_ALL](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#DELETION_MODE_ALL), or[DELETION_MODE_EXCLUDE_INTERNAL_DATA](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#DELETION_MODE_EXCLUDE_INTERNAL_DATA) <br /> |

### getDomainUris

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[Ad Services Extensions 4](https://developer.android.com/sdkExtensions)  

```
public List<Uri> getDomainUris ()
```

Get the list of domain URIs.

<br />

|                                                                                Returns                                                                                 ||
|------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| [List](https://developer.android.com/reference/java/util/List)`<`[Uri](https://developer.android.com/reference/android/net/Uri)`>` | This value cannot be`null`. <br /> |

### getEnd

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[Ad Services Extensions 4](https://developer.android.com/sdkExtensions)  

```
public Instant getEnd ()
```

Get the end of the deletion range.

<br />

|                                                 Returns                                                  ||
|----------------------------------------------------------------------|------------------------------------|
| [Instant](https://developer.android.com/reference/java/time/Instant) | This value cannot be`null`. <br /> |

### getMatchBehavior

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[Ad Services Extensions 4](https://developer.android.com/sdkExtensions)  

```
public int getMatchBehavior ()
```

Get the match behavior.

<br />

|                                                                                                                                                                           Returns                                                                                                                                                                            ||
|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | Value is[MATCH_BEHAVIOR_DELETE](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#MATCH_BEHAVIOR_DELETE), or[MATCH_BEHAVIOR_PRESERVE](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/measurement/DeletionRequest#MATCH_BEHAVIOR_PRESERVE) <br /> |

### getOriginUris

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[Ad Services Extensions 4](https://developer.android.com/sdkExtensions)  

```
public List<Uri> getOriginUris ()
```

Get the list of origin URIs.

<br />

|                                                                                Returns                                                                                 ||
|------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| [List](https://developer.android.com/reference/java/util/List)`<`[Uri](https://developer.android.com/reference/android/net/Uri)`>` | This value cannot be`null`. <br /> |

### getStart

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[Ad Services Extensions 4](https://developer.android.com/sdkExtensions)  

```
public Instant getStart ()
```

Get the start of the deletion range.

<br />

|                                                 Returns                                                  ||
|----------------------------------------------------------------------|------------------------------------|
| [Instant](https://developer.android.com/reference/java/time/Instant) | This value cannot be`null`. <br /> |