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:[Ctors](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/ReportImpressionRequest#pubctors)\|[Methods](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/ReportImpressionRequest#pubmethods)\|[Inherited Methods](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/ReportImpressionRequest#inhmethods)  

# ReportImpressionRequest

`
public


class
ReportImpressionRequest
`  
`

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


``


`

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

<br />

*** ** * ** ***

Represent input parameters to the reportImpression API.

## Summary

|                                                                                                                                                                                                                              ### Public constructors                                                                                                                                                                                                                               ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[ReportImpressionRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/ReportImpressionRequest#ReportImpressionRequest(long,%20android.adservices.adselection.AdSelectionConfig))`(long adSelectionId, `[AdSelectionConfig](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionConfig)` adSelectionConfig) ` Ctor for on-device ad selection reporting request. |
| ` `[ReportImpressionRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/ReportImpressionRequest#ReportImpressionRequest(long))`(long adSelectionId) ` Ctor for auction server ad selection reporting request.                                                                                                                                                                                                             |

|                                                                                                                                                                                                                                                         ### Public methods                                                                                                                                                                                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[AdSelectionConfig](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionConfig) | ` `[getAdSelectionConfig](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/ReportImpressionRequest#getAdSelectionConfig())`() ` Returns the adSelectionConfig, one of the inputs to[ReportImpressionRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/ReportImpressionRequest) |
| ` long`                                                                                                                                    | ` `[getAdSelectionId](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/ReportImpressionRequest#getAdSelectionId())`() ` Returns the adSelectionId, one of the inputs to[ReportImpressionRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/ReportImpressionRequest)             |

| ### 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*.                                                                                             | ||

## Public constructors

### ReportImpressionRequest

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 ReportImpressionRequest (long adSelectionId, 
                AdSelectionConfig adSelectionConfig)
```

Ctor for on-device ad selection reporting request.

If your`adSelectionId`is for a on-device auction run using[AdSelectionManager.selectAds(android.adservices.adselection.AdSelectionConfig, java.util.concurrent.Executor, android.os.OutcomeReceiver)](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionManager#selectAds(android.adservices.adselection.AdSelectionConfig,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.adservices.adselection.AdSelectionOutcome,java.lang.Exception>))then your impression reporting request must include your[AdSelectionConfig](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionConfig).

<br />

|                                                                                                                                                                                                                                                                                                                                                Parameters                                                                                                                                                                                                                                                                                                                                                ||
|---------------------| |
| `adSelectionId`     | `long`: received from[AdSelectionManager#selectAds(AdSelectionConfig, Executor, OutcomeReceiver)](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionManager#selectAds(android.adservices.adselection.AdSelectionConfig,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.adservices.adselection.AdSelectionOutcome,java.lang.Exception>)) <br />                                                                                                                                                                                                                                                     |
| `adSelectionConfig` | `AdSelectionConfig`: same[AdSelectionConfig](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionConfig)used to trigger[AdSelectionManager.selectAds(android.adservices.adselection.AdSelectionConfig, java.util.concurrent.Executor, android.os.OutcomeReceiver)](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionManager#selectAds(android.adservices.adselection.AdSelectionConfig,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.adservices.adselection.AdSelectionOutcome,java.lang.Exception>))This value cannot be`null`. <br /> |

### ReportImpressionRequest

[**Added in Android UpsideDownCakePrivacySandbox**](https://developer.android.com/preview)  
Also in[Ad Services Extensions 4](https://developer.android.com/sdkExtensions)  

```
public ReportImpressionRequest (long adSelectionId)
```

Ctor for auction server ad selection reporting request.

If your`adSelectionId`is for a server auction run where device info collected by[AdSelectionManager#getAdSelectionData](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionManager#getAdSelectionData(android.adservices.adselection.GetAdSelectionDataRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.adservices.adselection.GetAdSelectionDataOutcome,java.lang.Exception>))then your impression reporting request should only include the ad selection id.

[AdSelectionManager#persistAdSelectionResult](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionManager#persistAdSelectionResult(android.adservices.adselection.PersistAdSelectionResultRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.adservices.adselection.AdSelectionOutcome,java.lang.Exception>))must be called with the encrypted result blob from servers before making impression reporting request.

<br />

|                                                                                                                                                                                                             Parameters                                                                                                                                                                                                              ||
|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `adSelectionId` | `long`: received from[AdSelectionManager#getAdSelectionData](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionManager#getAdSelectionData(android.adservices.adselection.GetAdSelectionDataRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.adservices.adselection.GetAdSelectionDataOutcome,java.lang.Exception>)) <br /> |

## Public methods

### getAdSelectionConfig

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 AdSelectionConfig getAdSelectionConfig ()
```

Returns the adSelectionConfig, one of the inputs to[ReportImpressionRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/ReportImpressionRequest)

<br />

|                                                                                   Returns                                                                                   ||
|-----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| [AdSelectionConfig](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionConfig) | This value cannot be`null`. <br /> |

### getAdSelectionId

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 long getAdSelectionId ()
```

Returns the adSelectionId, one of the inputs to[ReportImpressionRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/ReportImpressionRequest)

<br />

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