# AdSelectionOutcome

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

*** ** * ** ***

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

<br />

```
class AdSelectionOutcome
```

<br />

*** ** * ** ***

This class represents the output of the AdSelectionManager#selectAds 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#selectAds call.

## Summary

|                                                      ### Public companion properties                                                       |
|--------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AdSelectionOutcome](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome) | `@`[ExperimentalFeatures.Ext10OptIn](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/common/ExperimentalFeatures.Ext10OptIn) [NO_OUTCOME](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome#NO_OUTCOME()) Represents an AdSelectionOutcome with empty results. |

|                                                                                                                                                                            ### Public constructors                                                                                                                                                                             |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AdSelectionOutcome](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome#AdSelectionOutcome(kotlin.Long,android.net.Uri))`(adSelectionId: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`, renderUri: `[Uri](https://developer.android.com/reference/android/net/Uri.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/AdSelectionOutcome#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` Checks whether two[AdSelectionOutcome](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome)objects contain the same information. |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                 | `@`[ExperimentalFeatures.Ext10OptIn](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/common/ExperimentalFeatures.Ext10OptIn) [hasOutcome](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome#hasOutcome())`()`                                                                                                                       |
| `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/AdSelectionOutcome#hashCode())`()` Returns the hash of the[AdSelectionOutcome](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome)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/AdSelectionOutcome#toString())`()` Overrides the toString method.                                                                                                                                                                                                                                                               |

|                             ### Public properties                             |
|-------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | [adSelectionId](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome#adSelectionId()) An ID unique only to a device user that identifies a successful ad selection. |
| [Uri](https://developer.android.com/reference/android/net/Uri.html)           | [renderUri](https://developer.android.com/reference/kotlin/androidx/privacysandbox/ads/adservices/adselection/AdSelectionOutcome#renderUri()) A render URL for the winning ad.                                                      |

## Public companion properties

### NO_OUTCOME

```
@ExperimentalFeatures.Ext10OptIn
val NO_OUTCOME: AdSelectionOutcome
```

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)  

```
AdSelectionOutcome(adSelectionId: Long, renderUri: Uri)
```  

|                                           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. |
| `renderUri: `[Uri](https://developer.android.com/reference/android/net/Uri.html)               | A render URL for the winning ad.                                              |

## Public functions

### equals

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

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

### hasOutcome

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

```
@ExperimentalFeatures.Ext10OptIn
fun hasOutcome(): Boolean
```  

### hashCode

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

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

### toString

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

Overrides the toString method.  

## Public properties

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

### renderUri

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

```
val renderUri: Uri
```

A render URL for the winning ad.