# ReportEventRequest.Builder

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[Ad Services Extensions 8](https://developer.android.com/sdkExtensions)

# Builder

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/adservices/adselection/ReportEventRequest.Builder "View this page in Java")  

```
class Builder
```

|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                         ||
| ↳ | [android.adservices.adselection.ReportEventRequest.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#) |

Builder for[ReportEventRequest](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest)objects.

## Summary

|                                                                                                                                                                                                                                                                                              Public constructors                                                                                                                                                                                                                                                                                              ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#Builder(kotlin.Long,%20kotlin.String,%20kotlin.String,%20kotlin.Int))`(`adSelectionId:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, `eventKey:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `eventData:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `reportingDestinations:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> |

|                                                                                                                                                                                                                                                 Public methods                                                                                                                                                                                                                                                 ||
|-----------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ReportEventRequest](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest)                  | [build](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#build())`()` Builds the[ReportEventRequest](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest)object.                                                                                                 |
| [ReportEventRequest.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#) | [setAdSelectionId](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#setAdSelectionId(kotlin.Long))`(`adSelectionId:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` Sets the ad selection ID with which the rendered ad's events are associated.                            |
| [ReportEventRequest.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#) | [setData](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#setData(kotlin.String))`(`eventData:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Sets the ad event data.                                                                                                 |
| [ReportEventRequest.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#) | [setInputEvent](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#setInputEvent(android.view.InputEvent))`(`inputEvent:` `[InputEvent](https://developer.android.com/reference/kotlin/android/view/InputEvent.html#)?`)` Sets the input event associated with the user interaction.                            |
| [ReportEventRequest.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#) | [setKey](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#setKey(kotlin.String))`(`eventKey:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Sets the event key, the type of ad event to be reported.                                                                   |
| [ReportEventRequest.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#) | [setReportingDestinations](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#setReportingDestinations(kotlin.Int))`(`reportingDestinations:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the bitfield of reporting destinations to report to (buyer, seller, or both). |

## Public constructors

### Builder

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[Ad Services Extensions 8](https://developer.android.com/sdkExtensions)  

```
Builder(
    adSelectionId: Long, 
    eventKey: String, 
    eventData: String, 
    reportingDestinations: Int)
```

|                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                   ||
|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `eventKey`              | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html):This value cannot be`null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `eventData`             | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html):This value cannot be`null`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `reportingDestinations` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Value is either`0`or a combination of[android.adservices.adselection.ReportEventRequest#FLAG_REPORTING_DESTINATION_SELLER](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_SELLER:kotlin.Int),[android.adservices.adselection.ReportEventRequest#FLAG_REPORTING_DESTINATION_BUYER](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_BUYER:kotlin.Int), and[android.adservices.adselection.ReportEventRequest#FLAG_REPORTING_DESTINATION_COMPONENT_SELLER](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_COMPONENT_SELLER:kotlin.Int) |

## Public methods

### build

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[Ad Services Extensions 8](https://developer.android.com/sdkExtensions)  

```
fun build(): ReportEventRequest
```

Builds the[ReportEventRequest](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest)object.

|                                                                       Return                                                                        ||
|------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [ReportEventRequest](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest) | This value cannot be`null`. |

### setAdSelectionId

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[Ad Services Extensions 8](https://developer.android.com/sdkExtensions)  

```
fun setAdSelectionId(adSelectionId: Long): ReportEventRequest.Builder
```

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

See[getAdSelectionId()](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest#getAdSelectionId())for more information.

|                                                                                Return                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [ReportEventRequest.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#) | This value cannot be`null`. |

### setData

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[Ad Services Extensions 8](https://developer.android.com/sdkExtensions)  

```
fun setData(eventData: String): ReportEventRequest.Builder
```

Sets the ad event data.

See[getData()](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest#getData())for more information.

|                                                        Parameters                                                         ||
|-------------|--------------------------------------------------------------------------------------------------------------|
| `eventData` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html):This value cannot be`null`. |

|                                                                                Return                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [ReportEventRequest.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#) | This value cannot be`null`. |

### setInputEvent

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[Ad Services Extensions 10](https://developer.android.com/sdkExtensions)  

```
fun setInputEvent(inputEvent: InputEvent?): ReportEventRequest.Builder
```

Sets the input event associated with the user interaction.

See[getInputEvent()](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest#getInputEvent())for more information.

|                                                             Parameters                                                             ||
|--------------|----------------------------------------------------------------------------------------------------------------------|
| `inputEvent` | [InputEvent](https://developer.android.com/reference/kotlin/android/view/InputEvent.html#)?:This value may be`null`. |

|                                                                                Return                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [ReportEventRequest.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#) | This value cannot be`null`. |

### setKey

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[Ad Services Extensions 8](https://developer.android.com/sdkExtensions)  

```
fun setKey(eventKey: String): ReportEventRequest.Builder
```

Sets the event key, the type of ad event to be reported.

See[getKey()](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest#getKey())for more information.

|                                                        Parameters                                                        ||
|------------|--------------------------------------------------------------------------------------------------------------|
| `eventKey` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html):This value cannot be`null`. |

|                                                                                Return                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [ReportEventRequest.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#) | This value cannot be`null`. |

### setReportingDestinations

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in[Ad Services Extensions 8](https://developer.android.com/sdkExtensions)  

```
fun setReportingDestinations(reportingDestinations: Int): ReportEventRequest.Builder
```

Sets the bitfield of reporting destinations to report to (buyer, seller, or both).

See[getReportingDestinations()](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest#getReportingDestinations())for more information.

|                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                   ||
|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `reportingDestinations` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):Value is either`0`or a combination of[android.adservices.adselection.ReportEventRequest#FLAG_REPORTING_DESTINATION_SELLER](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_SELLER:kotlin.Int),[android.adservices.adselection.ReportEventRequest#FLAG_REPORTING_DESTINATION_BUYER](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_BUYER:kotlin.Int), and[android.adservices.adselection.ReportEventRequest#FLAG_REPORTING_DESTINATION_COMPONENT_SELLER](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest#FLAG_REPORTING_DESTINATION_COMPONENT_SELLER:kotlin.Int) |

|                                                                                Return                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [ReportEventRequest.Builder](https://developer.android.com/reference/kotlin/android/adservices/adselection/ReportEventRequest.Builder#) | This value cannot be`null`. |