Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder#inhmethods)

# ExecuteOutput.Builder

*** ** * ** ***


`
public
static
final

class
ExecuteOutput.Builder
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.adservices.ondevicepersonalization.ExecuteOutput.Builder |

<br />

*** ** * ** ***


**This class was deprecated
in API level 37.**   

The ODP APIs are deprecated and will not be supported in future Android
releases. There is no direct replacement API available. Developers currently integrated with
these APIs must cease further integration efforts. For comprehensive details regarding this
deprecation and the future roadmap of Privacy Sandbox on Android, please consult the
official Privacy Sandbox developer documentation and announcements:
<https://privacysandbox.google.com>

A builder for `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput`

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder#Builder()() ` |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder` | ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder#addEventLogRecord(android.adservices.ondevicepersonalization.EventLogRecord)(https://developer.android.com/reference/android/adservices/ondevicepersonalization/EventLogRecord value) ` |
| ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput` | ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder#build()() ` Builds the instance. |
| ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder` | ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder#setBestValue(int)(int value) ` An integer value that an `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService` may optionally return to a calling app, by setting this field to the value between 0 and `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#getMaxIntValue()`. |
| ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder` | ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder#setEventLogRecords(java.util.List<android.adservices.ondevicepersonalization.EventLogRecord>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/adservices/ondevicepersonalization/EventLogRecord> value) ` A list of `https://developer.android.com/reference/android/adservices/ondevicepersonalization/EventLogRecord` objects to be written to the EVENTS table. |
| ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder` | ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder#setOutputData(byte[])(byte... value) ` A byte array that an `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService` may optionally return to a calling app, by setting this field to a non-null value. |
| ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder` | ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder#setRenderingConfig(android.adservices.ondevicepersonalization.RenderingConfig)(https://developer.android.com/reference/android/adservices/ondevicepersonalization/RenderingConfig value) ` A `https://developer.android.com/reference/android/adservices/ondevicepersonalization/RenderingConfig` object that contains information about the content to be rendered in the client app view. |
| ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder` | ` https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder#setRequestLogRecord(android.adservices.ondevicepersonalization.RequestLogRecord)(https://developer.android.com/reference/android/adservices/ondevicepersonalization/RequestLogRecord value) ` Persistent data to be written to the REQUESTS table after `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedWorker#onExecute(android.adservices.ondevicepersonalization.ExecuteInput,%20android.os.OutcomeReceiver<android.adservices.ondevicepersonalization.ExecuteOutput,android.adservices.ondevicepersonalization.IsolatedServiceException>)` completes. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` 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 https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` 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` | ` 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` | ` 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 constructors

### Builder

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Builder ()
```

<br />

<br />

## Public methods

### addEventLogRecord

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ExecuteOutput.Builder addEventLogRecord (EventLogRecord value)
```

<br />

<br />

| Parameters ||
|---|---|
| `value` | `EventLogRecord`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder` | This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder#setEventLogRecords(java.util.List<android.adservices.ondevicepersonalization.EventLogRecord>)`

### build

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ExecuteOutput build ()
```

Builds the instance. This builder should not be touched after calling this!

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput` | This value cannot be `null`. <br /> |

### setBestValue

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ExecuteOutput.Builder setBestValue (int value)
```

An integer value that an `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService` may optionally return to a calling app,
by setting this field to the value between 0 and `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#getMaxIntValue()`. The noise will be added to
the value of this field before returned to the caller of `https://developer.android.com/reference/android/adservices/ondevicepersonalization/OnDevicePersonalizationManager#executeInIsolatedService(android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceResponse,java.lang.Exception>)`. In order to get this field, the
(calling app package, isolated service package) pair must be present in an allowlist that
permits data to be returned and `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteInIsolatedServiceRequest.OutputSpec#buildBestValueSpec(int)` is set.

<br />

| Parameters ||
|---|---|
| `value` | `int`: Value is 0 or greater <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder` | This value cannot be `null`. <br /> |

### setEventLogRecords

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ExecuteOutput.Builder setEventLogRecords (List<EventLogRecord> value)
```

A list of `https://developer.android.com/reference/android/adservices/ondevicepersonalization/EventLogRecord` objects to be written to the EVENTS table. Each
`https://developer.android.com/reference/android/adservices/ondevicepersonalization/EventLogRecord` must be associated with an existing `https://developer.android.com/reference/android/adservices/ondevicepersonalization/RequestLogRecord` in
the REQUESTS table, specified using
`https://developer.android.com/reference/android/adservices/ondevicepersonalization/EventLogRecord.Builder#setRequestLogRecord(android.adservices.ondevicepersonalization.RequestLogRecord)`.
If the `https://developer.android.com/reference/android/adservices/ondevicepersonalization/RequestLogRecord` is not specified, the `https://developer.android.com/reference/android/adservices/ondevicepersonalization/EventLogRecord` will not be
written.

<br />

| Parameters ||
|---|---|
| `value` | `List`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder` | This value cannot be `null`. <br /> |

### setOutputData

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ExecuteOutput.Builder setOutputData (byte... value)
```

A byte array that an `https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedService` may optionally return to a calling app, by
setting this field to a non-null value. The contents of this array will be returned to
the caller of `https://developer.android.com/reference/android/adservices/ondevicepersonalization/OnDevicePersonalizationManager#execute(android.content.ComponentName,%20android.os.PersistableBundle,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.adservices.ondevicepersonalization.OnDevicePersonalizationManager.ExecuteResult,java.lang.Exception>)` if returning data
from isolated processes is allowed by policy and the (calling app package, isolated
service package) pair is present in an allowlist that permits data to be returned.

<br />

| Parameters ||
|---|---|
| `value` | `byte`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder` | <br /> |

### setRenderingConfig

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ExecuteOutput.Builder setRenderingConfig (RenderingConfig value)
```

A `https://developer.android.com/reference/android/adservices/ondevicepersonalization/RenderingConfig` object that contains information about the content to be
rendered in the client app view. Can be null if no content is to be rendered.

<br />

| Parameters ||
|---|---|
| `value` | `RenderingConfig`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder` | <br /> |

### setRequestLogRecord

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ExecuteOutput.Builder setRequestLogRecord (RequestLogRecord value)
```

Persistent data to be written to the REQUESTS table after
`https://developer.android.com/reference/android/adservices/ondevicepersonalization/IsolatedWorker#onExecute(android.adservices.ondevicepersonalization.ExecuteInput,%20android.os.OutcomeReceiver<android.adservices.ondevicepersonalization.ExecuteOutput,android.adservices.ondevicepersonalization.IsolatedServiceException>)`
completes. If null, no persistent data will be written.

<br />

| Parameters ||
|---|---|
| `value` | `RequestLogRecord`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/adservices/ondevicepersonalization/ExecuteOutput.Builder` | <br /> |