# GetAdSelectionDataOutcome

# GetAdSelectionDataOutcome

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/GetAdSelectionDataOutcome.kt+class:androidx.privacysandbox.ads.adservices.adselection.GetAdSelectionDataOutcome)  
Added in [1.1.0-beta12](https://developer.android.com/jetpack/androidx/releases/privacysandbox-ads#1.1.0-beta12)

*** ** * ** ***

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


```
@ExperimentalFeatures.Ext10OptIn
class GetAdSelectionDataOutcome
```

<br />

*** ** * ** ***

This class represents the output of the AdSelectionManager#getAdSelectionData in the [AdSelectionManager](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/AdSelectionManager). The fields are populated in the case of a successful AdSelectionManager#getAdSelectionData call.

## Summary

|                                                                                                                                                                                                          ### Public constructors                                                                                                                                                                                                           |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [GetAdSelectionDataOutcome](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/GetAdSelectionDataOutcome#GetAdSelectionDataOutcome(kotlin.Long,kotlin.ByteArray))`(` ` adSelectionId: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`,` ` adSelectionData: `[ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html)`?` `)` |

|                                        ### 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/GetAdSelectionDataOutcome#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` Checks whether two [GetAdSelectionDataOutcome](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/GetAdSelectionDataOutcome) 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/GetAdSelectionDataOutcome#hashCode())`()` Returns the hash of the [GetAdSelectionDataOutcome](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/GetAdSelectionDataOutcome) 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/GetAdSelectionDataOutcome#toString())`()` Overrides the toString method.                                                                                                                                                                                                                                                                               |

|                                    ### Public properties                                    |
|---------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html)`?` | [adSelectionData](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/GetAdSelectionDataOutcome#adSelectionData()) The adSelectionData that is collected from device.                        |
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)               | [adSelectionId](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/GetAdSelectionDataOutcome#adSelectionId()) An ID unique only to a device user that identifies a successful ad selection. |

## Public constructors

### GetAdSelectionDataOutcome

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

```
GetAdSelectionDataOutcome(
    adSelectionId: Long,
    adSelectionData: ByteArray? = null
)
```  

|                                                      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. |
| `adSelectionData: `[ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html)`? = null` | The adSelectionData that is collected from device.                            |

## Public functions

### equals

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

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

### hashCode

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

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

### toString

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

Overrides the toString method.  

## Public properties

### adSelectionData

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

```
val adSelectionData: ByteArray?
```

The adSelectionData that is collected from device.  

### adSelectionId

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

```
val adSelectionId: Long
```

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