Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [Ad Services Extensions 10](https://developer.android.com/sdkExtensions)   
Deprecated in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/adservices/adselection/PersistAdSelectionResultRequest#nestedclasses) \| [Methods](https://developer.android.com/reference/android/adservices/adselection/PersistAdSelectionResultRequest#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/adservices/adselection/PersistAdSelectionResultRequest#inhmethods)

# PersistAdSelectionResultRequest

*** ** * ** ***

` public final class PersistAdSelectionResultRequest `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

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

<br />

*** ** * ** ***

<br />

**This class was deprecated in API level 37.**   

The Rubidium (Rb) Relevance APIs, including those in android.adservices.adselection, are being deprecated. Relevance APIs have no direct replacement. Developers should stop using them, as calls will be rejected in future Android releases. Please refer to official Privacy Sandbox documentation for deprecation and roadmap details: https://privacysandbox.com/news/update-on-plans-for-privacy-sandbox-technologies/

Represents a request containing the seller, the ad selection data id and data.

Instances of this class are created by SDKs to be provided as arguments to the `https://developer.android.com/reference/android/adservices/adselection/AdSelectionManager#persistAdSelectionResult(android.adservices.adselection.PersistAdSelectionResultRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.adservices.adselection.AdSelectionOutcome,java.lang.Exception>)` methods in `https://developer.android.com/reference/android/adservices/adselection/AdSelectionManager`.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/adservices/adselection/PersistAdSelectionResultRequest.Builder` *This class was deprecated in API level 37. The Rubidium (Rb) Relevance APIs, including those in android.adservices.adselection, are being deprecated. Relevance APIs have no direct replacement. Developers should stop using them, as calls will be rejected in future Android releases. Please refer to official Privacy Sandbox documentation for deprecation and roadmap details: https://privacysandbox.com/news/update-on-plans-for-privacy-sandbox-technologies/* |

| ### Public methods ||
|---|---|
| ` long` | ` https://developer.android.com/reference/android/adservices/adselection/PersistAdSelectionResultRequest#getAdSelectionDataId()() ` Returns the id that identifies the `https://developer.android.com/reference/android/adservices/adselection/AdSelectionManager#getAdSelectionData(android.adservices.adselection.GetAdSelectionDataRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.adservices.adselection.GetAdSelectionDataOutcome,java.lang.Exception>)` payload that generated this result. |
| ` long` | ` https://developer.android.com/reference/android/adservices/adselection/PersistAdSelectionResultRequest#getAdSelectionId()() ` *This method was deprecated in API level 35. Use the `https://developer.android.com/reference/android/adservices/adselection/PersistAdSelectionResultRequest#getAdSelectionDataId()` instead, the underlying value is enforced to be the same.* |
| ` byte[]` | ` https://developer.android.com/reference/android/adservices/adselection/PersistAdSelectionResultRequest#getAdSelectionResult()() ` |
| ` https://developer.android.com/reference/android/adservices/common/AdTechIdentifier` | ` https://developer.android.com/reference/android/adservices/adselection/PersistAdSelectionResultRequest#getSeller()() ` |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` 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 https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` 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` ` 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` ` 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*.

## Public methods

### getAdSelectionDataId

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

```
public long getAdSelectionDataId ()
```

Returns the id that identifies the `https://developer.android.com/reference/android/adservices/adselection/AdSelectionManager#getAdSelectionData(android.adservices.adselection.GetAdSelectionDataRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.adservices.adselection.GetAdSelectionDataOutcome,java.lang.Exception>)` payload that generated this result.

<br />

| Returns ||
|---|---|
| `long` | <br /> |

### getAdSelectionId

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

```
public long getAdSelectionId ()
```

<br />

**This method was deprecated in API level 35.**   

Use the `https://developer.android.com/reference/android/adservices/adselection/PersistAdSelectionResultRequest#getAdSelectionDataId()` instead, the underlying value is enforced to be the same.

<br />

<br />

| Returns ||
|---|---|
| `long` | an ad selection id. <br /> |

### getAdSelectionResult

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

```
public byte[] getAdSelectionResult ()
```

<br />

<br />

| Returns ||
|---|---|
| `byte[]` | an ad selection result. This value may be `null`. <br /> |

### getSeller

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

```
public AdTechIdentifier getSeller ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/adservices/common/AdTechIdentifier` | a seller. This value may be `null`. <br /> |