# ReportImpressionRequest

# ReportImpressionRequest

Artifact:[androidx.privacysandbox.ads:ads-adservices](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ads)  
[View Source](https://cs.android.com/search?q=file:androidx/privacysandbox/ads/adservices/adselection/ReportImpressionRequest.kt+class:androidx.privacysandbox.ads.adservices.adselection.ReportImpressionRequest)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ads#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/ReportImpressionRequest "View this page in Java")

<br />

```
class ReportImpressionRequest
```

<br />

*** ** * ** ***

Represent input parameters to the reportImpression API.

## Summary

|                                                                                                                                                                                                                                                         ### Public constructors                                                                                                                                                                                                                                                         |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `@`[ExperimentalFeatures.Ext8OptIn](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/common/ExperimentalFeatures.Ext8OptIn) [ReportImpressionRequest](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/ReportImpressionRequest#ReportImpressionRequest(kotlin.Long))`(adSelectionId: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)`                                                                            |
| [ReportImpressionRequest](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/ReportImpressionRequest#ReportImpressionRequest(kotlin.Long,androidx.privacysandbox.ads.adservices.adselection.AdSelectionConfig))`(` ` adSelectionId: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`,` ` adSelectionConfig: `[AdSelectionConfig](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/AdSelectionConfig) `)` |

|                                        ### Public functions                                         |
|-----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `open operator `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/ReportImpressionRequest#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` Checks whether two[ReportImpressionRequest](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/ReportImpressionRequest)objects contain the same information. |
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                  | [hashCode](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/ReportImpressionRequest#hashCode())`()` Returns the hash of the[ReportImpressionRequest](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/ReportImpressionRequest)object's data.                                                                                                              |
| `open `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)            | [toString](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/ReportImpressionRequest#toString())`()` Overrides the toString method.                                                                                                                                                                                                                                                                         |

|                                                          ### Public properties                                                           |
|------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AdSelectionConfig](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/AdSelectionConfig) | [adSelectionConfig](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/ReportImpressionRequest#adSelectionConfig()) optional config used in the selectAds() call identified by the provided ad selection ID. |
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                                                            | [adSelectionId](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/ReportImpressionRequest#adSelectionId()) An ID unique only to a device user that identifies a successful ad selection.                    |

## Public constructors

### ReportImpressionRequest

Added in[1.1.0-beta12](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ads#1.1.0-beta12)  

```
@ExperimentalFeatures.Ext8OptIn
ReportImpressionRequest(adSelectionId: Long)
```  

### ReportImpressionRequest

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ads#1.0.0)  

```
ReportImpressionRequest(
    adSelectionId: Long,
    adSelectionConfig: AdSelectionConfig
)
```  

|                                                                          Parameters                                                                           |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `adSelectionId: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                                                                | An ID unique only to a device user that identifies a successful ad selection.                                                                                                                                                                                                                                                                                                                                                              |
| `adSelectionConfig: `[AdSelectionConfig](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/AdSelectionConfig) | optional config used in the selectAds() call identified by the provided ad selection ID. If the {@code adSelectionId} is for a on-device auction run using AdSelectionManager#selectAds, then the config must be included. If the {@code adSelectionId} is for a server auction run where device info collected by \[AdSelectionManager#getAdSelectionData} then the impression reporting request should only include the ad selection id. |

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

Checks whether two[ReportImpressionRequest](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/ReportImpressionRequest)objects contain the same information.  

### hashCode

```
open fun hashCode(): Int
```

Returns the hash of the[ReportImpressionRequest](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/ReportImpressionRequest)object's data.  

### toString

```
open fun toString(): String
```

Overrides the toString method.  

## Public properties

### adSelectionConfig

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ads#1.0.0)  

```
val adSelectionConfig: AdSelectionConfig
```

optional config used in the selectAds() call identified by the provided ad selection ID. If the {@code adSelectionId} is for a on-device auction run using AdSelectionManager#selectAds, then the config must be included. If the {@code adSelectionId} is for a server auction run where device info collected by \[AdSelectionManager#getAdSelectionData} then the impression reporting request should only include the ad selection id.  

### adSelectionId

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ads#1.0.0)  

```
val adSelectionId: Long
```

An ID unique only to a device user that identifies a successful ad selection.