# AdSelectionConfig

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

*** ** * ** ***


```
public final class AdSelectionConfig
```

<br />

*** ** * ** ***

Contains the configuration of the ad selection process.

Instances of this class are created by SDKs to be provided as arguments to the AdSelectionManager#selectAds and AdSelectionManager#reportImpression methods in `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionManager`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionConfig#AdSelectionConfig(androidx.privacysandbox.ads.adservices.common.AdTechIdentifier,android.net.Uri,kotlin.collections.List,androidx.privacysandbox.ads.adservices.common.AdSelectionSignals,androidx.privacysandbox.ads.adservices.common.AdSelectionSignals,kotlin.collections.Map,android.net.Uri)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdTechIdentifier seller, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html decisionLogicUri, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdTechIdentifier> customAudienceBuyers, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdSelectionSignals adSelectionSignals, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdSelectionSignals sellerSignals, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdTechIdentifier, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdSelectionSignals> perBuyerSignals, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html trustedScoringSignalsUri )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionConfig#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/AdSelectionConfig` objects contain the same information. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdSelectionSignals` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionConfig#getAdSelectionSignals()()` signals given to the participating buyers in the ad selection and reporting processes. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdTechIdentifier>` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionConfig#getCustomAudienceBuyers()()` a list of custom audience buyers allowed by the SSP to participate in the ad selection process. |
| `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/AdSelectionConfig#getDecisionLogicUri()()` the URI used to retrieve the JS code containing the seller/SSP scoreAd function used during the ad selection and reporting processes. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdTechIdentifier, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdSelectionSignals>` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionConfig#getPerBuyerSignals()()` any information that each buyer would provide during ad selection to participants (such as bid floor, ad selection type, etc.) |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdTechIdentifier` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionConfig#getSeller()()` AdTechIdentifier of the seller, for example "www.example-ssp.com". |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdSelectionSignals` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionConfig#getSellerSignals()()` represents any information that the SSP used in the ad scoring process to tweak the results of the ad selection process (e.g. brand safety checks, excluded contextual ads). |
| `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/AdSelectionConfig#getTrustedScoringSignalsUri()()` URI endpoint of sell-side trusted signal from which creative specific realtime information can be fetched from. |
| `int` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionConfig#hashCode()()` Returns the hash of the `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionConfig` 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/AdSelectionConfig#toString()()` Overrides the toString method. |

## Public constructors

### AdSelectionConfig

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

```
public AdSelectionConfig(
    @NonNull AdTechIdentifier seller,
    @NonNull Uri decisionLogicUri,
    @NonNull List<@NonNull AdTechIdentifier> customAudienceBuyers,
    @NonNull AdSelectionSignals adSelectionSignals,
    @NonNull AdSelectionSignals sellerSignals,
    @NonNull Map<@NonNull AdTechIdentifier, @NonNull AdSelectionSignals> perBuyerSignals,
    @NonNull Uri trustedScoringSignalsUri
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdTechIdentifier seller` | AdTechIdentifier of the seller, for example "www.example-ssp.com". |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html decisionLogicUri` | the URI used to retrieve the JS code containing the seller/SSP scoreAd function used during the ad selection and reporting processes. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdTechIdentifier> customAudienceBuyers` | a list of custom audience buyers allowed by the SSP to participate in the ad selection process. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdSelectionSignals adSelectionSignals` | signals given to the participating buyers in the ad selection and reporting processes. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdSelectionSignals sellerSignals` | represents any information that the SSP used in the ad scoring process to tweak the results of the ad selection process (e.g. brand safety checks, excluded contextual ads). |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdTechIdentifier, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdSelectionSignals> perBuyerSignals` | any information that each buyer would provide during ad selection to participants (such as bid floor, ad selection type, etc.) |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html trustedScoringSignalsUri` | URI endpoint of sell-side trusted signal from which creative specific realtime information can be fetched from. |

## Public methods

### equals

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

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

### getAdSelectionSignals

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

```
public final @NonNull AdSelectionSignals getAdSelectionSignals()
```

signals given to the participating buyers in the ad selection and reporting processes.

### getCustomAudienceBuyers

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

```
public final @NonNull List<@NonNull AdTechIdentifier> getCustomAudienceBuyers()
```

a list of custom audience buyers allowed by the SSP to participate in the ad selection process.

### getDecisionLogicUri

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

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

the URI used to retrieve the JS code containing the seller/SSP scoreAd function used during the ad selection and reporting processes.

### getPerBuyerSignals

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

```
public final @NonNull Map<@NonNull AdTechIdentifier, @NonNull AdSelectionSignals> getPerBuyerSignals()
```

any information that each buyer would provide during ad selection to participants (such as bid floor, ad selection type, etc.)

### getSeller

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

```
public final @NonNull AdTechIdentifier getSeller()
```

AdTechIdentifier of the seller, for example "www.example-ssp.com".

### getSellerSignals

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

```
public final @NonNull AdSelectionSignals getSellerSignals()
```

represents any information that the SSP used in the ad scoring process to tweak the results of the ad selection process (e.g. brand safety checks, excluded contextual ads).

### getTrustedScoringSignalsUri

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

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

URI endpoint of sell-side trusted signal from which creative specific realtime information can be fetched from.

### hashCode

```
public int hashCode()
```

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

### toString

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

Overrides the toString method.