[**Added in Android UpsideDownCakePrivacySandbox**](https://developer.android.com/preview)  
Summary: [Nested Classes](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest#nestedclasses) \| [Methods](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest#pubmethods) \| [Inherited Methods](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest#inhmethods)  

# UpdateAdCounterHistogramRequest


`
public


class
UpdateAdCounterHistogramRequest
`


`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


`

`


`

|---|----------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.adservices.adselection.UpdateAdCounterHistogramRequest |

<br />

*** ** * ** ***

Request object wrapping the required arguments needed to update an ad counter histogram.

The ad counter histograms, which are historical logs of events which are associated with an ad
counter key and an ad event type, are used to inform frequency cap filtering when using the
Protected Audience APIs.

## Summary

|                                                                                                                                                                                   ### Nested classes                                                                                                                                                                                   ||
|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class` | [UpdateAdCounterHistogramRequest.Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest.Builder) Builder for [UpdateAdCounterHistogramRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest) objects. |

|                                                                                                                                                                                                                                                                                                 ### Public methods                                                                                                                                                                                                                                                                                                  ||
|-------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` boolean`                                                                                                                          | ` `[equals](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` o) ` Checks whether the [UpdateAdCounterHistogramRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest) objects contain the same information. |
| ` int`                                                                                                                              | ` `[getAdEventType](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest#getAdEventType())`() ` Gets the ad event type which, along with an ad's counter keys, identifies which histogram should be updated.                                                                                                                                                                                       |
| ` long`                                                                                                                             | ` `[getAdSelectionId](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest#getAdSelectionId())`() ` Gets the ad selection ID with which the rendered ad's events are associated.                                                                                                                                                                                                                   |
| ` `[AdTechIdentifier](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/common/AdTechIdentifier) | ` `[getCallerAdTech](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest#getCallerAdTech())`() ` Gets the caller adtech entity's [AdTechIdentifier](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/common/AdTechIdentifier).                                                                                                                                |
| ` int`                                                                                                                              | ` `[hashCode](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest#hashCode())`() ` Returns the hash of the [UpdateAdCounterHistogramRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest) object's data.                                                                                                     |
| ` `[String](https://developer.android.com/reference/java/lang/String)                                                               | ` `[toString](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest#toString())`() ` Returns a string representation of the object.                                                                                                                                                                                                                                                                 |

| ### Inherited methods |
|-----------------------|---|
| From class ` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                        | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                             | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                            | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`.                                                                                                                                                 | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                   | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                              | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                           | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                              | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.                                                                                             | ||

## Public methods

### equals

[**Added in Android UpsideDownCakePrivacySandbox**](https://developer.android.com/preview)  

```
public boolean equals (Object o)
```

Checks whether the [UpdateAdCounterHistogramRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest) objects contain the same
information.

<br />

|                            Parameters                             ||
|-----|--------------------------------------------------------------|
| `o` | `Object`: the reference object with which to compare. <br /> |

|                                           Returns                                           ||
|-----------|----------------------------------------------------------------------------------|
| `boolean` | `true` if this object is the same as the obj argument; `false` otherwise. <br /> |

### getAdEventType

[**Added in Android UpsideDownCakePrivacySandbox**](https://developer.android.com/preview)  

```
public int getAdEventType ()
```

Gets the ad event type which, along with an ad's counter keys, identifies which histogram
should be updated.

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                               Returns                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | Value is android.adservices.common.FrequencyCapFilters.AD_EVENT_TYPE_INVALID, [FrequencyCapFilters.AD_EVENT_TYPE_WIN](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/common/FrequencyCapFilters#AD_EVENT_TYPE_WIN), [FrequencyCapFilters.AD_EVENT_TYPE_IMPRESSION](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/common/FrequencyCapFilters#AD_EVENT_TYPE_IMPRESSION), [FrequencyCapFilters.AD_EVENT_TYPE_VIEW](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/common/FrequencyCapFilters#AD_EVENT_TYPE_VIEW), [FrequencyCapFilters.AD_EVENT_TYPE_CLICK](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/common/FrequencyCapFilters#AD_EVENT_TYPE_CLICK), android.adservices.common.FrequencyCapFilters.AD_EVENT_TYPE_MIN, or android.adservices.common.FrequencyCapFilters.AD_EVENT_TYPE_MAX <br /> |

### getAdSelectionId

[**Added in Android UpsideDownCakePrivacySandbox**](https://developer.android.com/preview)  

```
public long getAdSelectionId ()
```

Gets the ad selection ID with which the rendered ad's events are associated.

For more information about the ad selection ID, see [AdSelectionOutcome](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionOutcome).

The ad must have been selected from Protected Audience ad selection in the last 24 hours,
and the ad selection call must have been initiated from the same app as the current calling
app. Event histograms for all ad counter keys associated with the ad specified by the ad
selection ID will be updated for the ad event type from [getAdEventType()](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest#getAdEventType()), to be used
in Protected Audience frequency cap filtering.

<br />

|    Returns     ||
|--------|--------|
| `long` | <br /> |

### getCallerAdTech

[**Added in Android UpsideDownCakePrivacySandbox**](https://developer.android.com/preview)  

```
public AdTechIdentifier getCallerAdTech ()
```

Gets the caller adtech entity's [AdTechIdentifier](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/common/AdTechIdentifier).

The adtech using this [UpdateAdCounterHistogramRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest) object must have enrolled
with the Privacy Sandbox and be allowed to act on behalf of the calling app. The specified
adtech is not required to be the same adtech as either the buyer which owns the rendered ad
or the seller which initiated the ad selection associated with the ID returned by [getAdSelectionId()](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest#getAdSelectionId()).

For more information about API requirements and exceptions, see [AdSelectionManager.updateAdCounterHistogram(android.adservices.adselection.UpdateAdCounterHistogramRequest, java.util.concurrent.Executor, android.os.OutcomeReceiver)](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/AdSelectionManager#updateAdCounterHistogram(android.adservices.adselection.UpdateAdCounterHistogramRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Object,java.lang.Exception>)).

<br />

|                                                                                Returns                                                                                ||
|----------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|
| [AdTechIdentifier](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/common/AdTechIdentifier) | This value cannot be `null`. <br /> |

### hashCode

[**Added in Android UpsideDownCakePrivacySandbox**](https://developer.android.com/preview)  

```
public int hashCode ()
```

Returns the hash of the [UpdateAdCounterHistogramRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/adselection/UpdateAdCounterHistogramRequest) object's data.

<br />

|                     Returns                      ||
|-------|-------------------------------------------|
| `int` | a hash code value for this object. <br /> |

### toString

[**Added in Android UpsideDownCakePrivacySandbox**](https://developer.android.com/preview)  

```
public String toString ()
```

Returns a string representation of the object. In general, the
`toString` method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.


The `toString` method for class `Object`
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character \``@`', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
>
> ```
>  getClass().getName() + '@' + Integer.toHexString(hashCode())
>  
> ```

<br />

<br />

|                                                      Returns                                                      ||
|--------------------------------------------------------------------|-----------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | a string representation of the object. <br /> |