# AdSelectionOutcome

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

*** ** * ** ***


```
public final class AdSelectionOutcome
```

<br />

*** ** * ** ***

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

## Summary

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome` | `@https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/ExperimentalFeatures.Ext10OptIn https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome#NO_OUTCOME()` Represents an AdSelectionOutcome with empty results. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome#AdSelectionOutcome(kotlin.Long,android.net.Uri)(long adSelectionId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html renderUri)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome#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/AdSelectionOutcome` objects contain the same information. |
| `final long` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome#getAdSelectionId()()` An ID unique only to a device user that identifies a successful ad selection. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome#getRenderUri()()` A render URL for the winning ad. |
| `final boolean` | `@https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/ExperimentalFeatures.Ext10OptIn https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome#hasOutcome()()` |
| `int` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome#hashCode()()` Returns the hash of the `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome` 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/AdSelectionOutcome#toString()()` Overrides the toString method. |

## Public fields

### NO_OUTCOME

```
@ExperimentalFeatures.Ext10OptIn
public static final @NonNull AdSelectionOutcome NO_OUTCOME
```

Represents an AdSelectionOutcome with empty results.

## Public constructors

### AdSelectionOutcome

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

```
public AdSelectionOutcome(long adSelectionId, @NonNull Uri renderUri)
```

| Parameters |
|---|---|
| `long adSelectionId` | An ID unique only to a device user that identifies a successful ad selection. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html renderUri` | A render URL for the winning ad. |

## Public methods

### equals

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

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

### getAdSelectionId

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

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

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

### getRenderUri

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

```
public final @NonNull Uri getRenderUri()
```

A render URL for the winning ad.

### hasOutcome

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

```
@ExperimentalFeatures.Ext10OptIn
public final boolean hasOutcome()
```

### hashCode

```
public int hashCode()
```

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

### toString

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

Overrides the toString method.