# UpdateAdCounterHistogramRequest

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

*** ** * ** ***


```
@ExperimentalFeatures.Ext8OptIn
public final class UpdateAdCounterHistogramRequest
```

<br />

*** ** * ** ***

This class represents input to the AdSelectionManager#updateAdCounterHistogram in the `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/AdSelectionManager`.

Note that the `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/FrequencyCapFilters#AD_EVENT_TYPE_WIN()` event type cannot be updated manually using the AdSelectionManager#updateAdCounterHistogram API.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/UpdateAdCounterHistogramRequest#UpdateAdCounterHistogramRequest(kotlin.Long,kotlin.Int,androidx.privacysandbox.ads.adservices.common.AdTechIdentifier)( long adSelectionId, int adEventType, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdTechIdentifier callerAdTech )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/UpdateAdCounterHistogramRequest#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/UpdateAdCounterHistogramRequest` objects contain the same information. |
| `final int` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/UpdateAdCounterHistogramRequest#getAdEventType()()` A render URL for the winning ad. |
| `final long` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/UpdateAdCounterHistogramRequest#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/androidx/privacysandbox/ads/adservices/common/AdTechIdentifier` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/UpdateAdCounterHistogramRequest#getCallerAdTech()()` The caller adtech entity's `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdTechIdentifier`. |
| `int` | `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/UpdateAdCounterHistogramRequest#hashCode()()` Returns the hash of the `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/adselection/UpdateAdCounterHistogramRequest` 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/UpdateAdCounterHistogramRequest#toString()()` Overrides the toString method. |

## Public constructors

### UpdateAdCounterHistogramRequest

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

```
public UpdateAdCounterHistogramRequest(
    long adSelectionId,
    int adEventType,
    @NonNull AdTechIdentifier callerAdTech
)
```

| Parameters |
|---|---|
| `long adSelectionId` | An ID unique only to a device user that identifies a successful ad selection. |
| `int adEventType` | A render URL for the winning ad. Value is one of the following: - `0` - `2` - `3` - `1` <br /> |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdTechIdentifier callerAdTech` | The caller adtech entity's `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdTechIdentifier`. |

## Public methods

### equals

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

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

### getAdEventType

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

```
public final int getAdEventType()
```

A render URL for the winning ad.

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

### getCallerAdTech

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

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

The caller adtech entity's `https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/common/AdTechIdentifier`.

### hashCode

```
public int hashCode()
```

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

### toString

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

Overrides the toString method.