# 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)

*** ** * ** ***


```
@ExperimentalFeatures.Ext10OptIn
public final class GetAdSelectionDataOutcome
```

<br />

*** ** * ** ***

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

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/GetAdSelectionDataOutcome#GetAdSelectionDataOutcome(kotlin.Long,kotlin.ByteArray)(long adSelectionId, byte[] adSelectionData)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/GetAdSelectionDataOutcome#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` Checks whether two `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/GetAdSelectionDataOutcome` objects contain the same information. |
| `final byte[]` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/GetAdSelectionDataOutcome#getAdSelectionData()()` The adSelectionData that is collected from device. |
| `final long` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/GetAdSelectionDataOutcome#getAdSelectionId()()` An ID unique only to a device user that identifies a successful ad selection. |
| `int` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/GetAdSelectionDataOutcome#hashCode()()` Returns the hash of the `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/GetAdSelectionDataOutcome` object's data. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/GetAdSelectionDataOutcome#toString()()` Overrides the toString method. |

## Public constructors

### GetAdSelectionDataOutcome

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

```
public GetAdSelectionDataOutcome(long adSelectionId, byte[] adSelectionData)
```

| Parameters |
|---|---|
| `long adSelectionId` | An ID unique only to a device user that identifies a successful ad selection. |
| `byte[] adSelectionData` | The adSelectionData that is collected from device. |

## Public methods

### equals

```
public boolean equals(Object other)
```

Checks whether two `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/GetAdSelectionDataOutcome` objects contain the same information.

### getAdSelectionData

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

```
public final byte[] getAdSelectionData()
```

The adSelectionData that is collected from device.

### getAdSelectionId

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

```
public final long getAdSelectionId()
```

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

### hashCode

```
public int hashCode()
```

Returns the hash of the `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/GetAdSelectionDataOutcome` object's data.

### toString

```
public @NonNull String toString()
```

Overrides the toString method.