# ScheduleCustomAudienceUpdateRequest.Builder

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

# Builder

*** ** * ** ***

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

```
class Builder
```

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

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

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                                          Public constructors                                                                                                                                                                                                                                                                                                                                                                                                                                          ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [Builder](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest.Builder#Builder(android.net.Uri,%20java.time.Duration))`(`updateUri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `minDelay:` `[Duration](https://developer.android.com/reference/kotlin/java/time/Duration.html#)`)` Instantiates a builder for a[ScheduleCustomAudienceUpdateRequest](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest)object.                                                                                                                                                                                                                                                                                                             |
| [Builder](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest.Builder#Builder(android.net.Uri,%20java.time.Duration,%20kotlin.collections.MutableList))`(`updateUri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`, `minDelay:` `[Duration](https://developer.android.com/reference/kotlin/java/time/Duration.html#)`, `partialCustomAudienceList:` `[MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)<[PartialCustomAudience](https://developer.android.com/reference/kotlin/android/adservices/customaudience/PartialCustomAudience)!>`)` Instantiates a builder for a[ScheduleCustomAudienceUpdateRequest](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest)object. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Public methods                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ScheduleCustomAudienceUpdateRequest](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest)                  | [build](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest.Builder#build())`()` Builds an instance of[ScheduleCustomAudienceUpdateRequest](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest).                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [ScheduleCustomAudienceUpdateRequest.Builder](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest.Builder#) | [setMinDelay](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest.Builder#setMinDelay(java.time.Duration))`(`minDelay:` `[Duration](https://developer.android.com/reference/kotlin/java/time/Duration.html#)`)` Sets the minimum[Duration](https://developer.android.com/reference/kotlin/java/time/Duration.html#)that the update will be deferred before the service fetches updates for the buyer ad tech's custom audiences.                                                                                                                                                                                                                                                                                    |
| [ScheduleCustomAudienceUpdateRequest.Builder](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest.Builder#) | [setPartialCustomAudienceList](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest.Builder#setPartialCustomAudienceList(kotlin.collections.MutableList))`(`partialCustomAudienceList:` `[MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)<[PartialCustomAudience](https://developer.android.com/reference/kotlin/android/adservices/customaudience/PartialCustomAudience)!>`)` Sets the list of[PartialCustomAudience](https://developer.android.com/reference/kotlin/android/adservices/customaudience/PartialCustomAudience)objects that are sent to the buyer ad tech's server when making a request to download updates for the buyer's custom audiences. |
| [ScheduleCustomAudienceUpdateRequest.Builder](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest.Builder#) | [setShouldReplacePendingUpdates](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest.Builder#setShouldReplacePendingUpdates(kotlin.Boolean))`(`shouldReplacePendingUpdates:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Sets whether any pending scheduled updates should be deleted and replaced with this[ScheduleCustomAudienceUpdateRequest](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest).                                                                                                                                                                                                 |
| [ScheduleCustomAudienceUpdateRequest.Builder](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest.Builder#) | [setUpdateUri](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest.Builder#setUpdateUri(android.net.Uri))`(`updateUri:` `[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)`)` Sets the[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)from which the update for the buyer's custom audiences will be fetched.                                                                                                                                                                                                                                                                                                                                                  |

## Public constructors

### Builder

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

```
Builder(
    updateUri: Uri, 
    minDelay: Duration)
```

Instantiates a builder for a[ScheduleCustomAudienceUpdateRequest](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest)object.

|                                                                                                                                              Parameters                                                                                                                                               ||
|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `updateUri` | [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#):[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)of the buyer ad tech's server from which the updates for the buyer's custom audiences will be fetched This value cannot be`null`. |
| `minDelay`  | [Duration](https://developer.android.com/reference/kotlin/java/time/Duration.html#):Minimum[Duration](https://developer.android.com/reference/kotlin/java/time/Duration.html#)for which the update should be deferred This value cannot be`null`.                                        |

### Builder

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

```
Builder(
    updateUri: Uri, 
    minDelay: Duration, 
    partialCustomAudienceList: MutableList<PartialCustomAudience!>)
```

**Deprecated:** *use[Builder(android.net.Uri,java.time.Duration)](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest.Builder#Builder(android.net.Uri,%20java.time.Duration))instead as`partialCustomAudienceList`is no longer a required parameter. Users can still use[setPartialCustomAudienceList(java.util.List)](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest.Builder#setPartialCustomAudienceList(kotlin.collections.MutableList))*

Instantiates a builder for a[ScheduleCustomAudienceUpdateRequest](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest)object.

|                                                                                                                                                                                                                                                                                Parameters                                                                                                                                                                                                                                                                                 ||
|-----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `updateUri`                 | [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#):[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)of the buyer ad tech's server from which the updates for the buyer's custom audiences will be fetched This value cannot be`null`.                                                                                                                                                                                                                                                     |
| `minDelay`                  | [Duration](https://developer.android.com/reference/kotlin/java/time/Duration.html#):Minimum[Duration](https://developer.android.com/reference/kotlin/java/time/Duration.html#)for which the update should be deferred This value cannot be`null`.                                                                                                                                                                                                                                                                                            |
| `partialCustomAudienceList` | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\<[PartialCustomAudience](https://developer.android.com/reference/kotlin/android/adservices/customaudience/PartialCustomAudience)!\>:[List](https://developer.android.com/reference/kotlin/java/util/List.html#)of[PartialCustomAudience](https://developer.android.com/reference/kotlin/android/adservices/customaudience/PartialCustomAudience)objects which will be sent to the buyer ad tech's server This value cannot be`null`. |

## Public methods

### build

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

```
fun build(): ScheduleCustomAudienceUpdateRequest
```

Builds an instance of[ScheduleCustomAudienceUpdateRequest](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest).

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

### setMinDelay

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

```
fun setMinDelay(minDelay: Duration): ScheduleCustomAudienceUpdateRequest.Builder
```

Sets the minimum[Duration](https://developer.android.com/reference/kotlin/java/time/Duration.html#)that the update will be deferred before the service fetches updates for the buyer ad tech's custom audiences.

This delay must not be a negative[Duration](https://developer.android.com/reference/kotlin/java/time/Duration.html#).

See[getMinDelay()](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest#getMinDelay())for more details.

|                                                         Parameters                                                          ||
|------------|-----------------------------------------------------------------------------------------------------------------|
| `minDelay` | [Duration](https://developer.android.com/reference/kotlin/java/time/Duration.html#):This value cannot be`null`. |

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

### setPartialCustomAudienceList

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

```
fun setPartialCustomAudienceList(partialCustomAudienceList: MutableList<PartialCustomAudience!>): ScheduleCustomAudienceUpdateRequest.Builder
```

Sets the list of[PartialCustomAudience](https://developer.android.com/reference/kotlin/android/adservices/customaudience/PartialCustomAudience)objects that are sent to the buyer ad tech's server when making a request to download updates for the buyer's custom audiences.

See[getPartialCustomAudienceList()](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest#getPartialCustomAudienceList())for more details.

|                                                                                                                                              Parameters                                                                                                                                              ||
|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `partialCustomAudienceList` | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\<[PartialCustomAudience](https://developer.android.com/reference/kotlin/android/adservices/customaudience/PartialCustomAudience)!\>:This value cannot be`null`. |

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

### setShouldReplacePendingUpdates

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

```
fun setShouldReplacePendingUpdates(shouldReplacePendingUpdates: Boolean): ScheduleCustomAudienceUpdateRequest.Builder
```

Sets whether any pending scheduled updates should be deleted and replaced with this[ScheduleCustomAudienceUpdateRequest](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest).

By default, this setting is`false`.

See[shouldReplacePendingUpdates()](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest#shouldReplacePendingUpdates())for more details.

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

### setUpdateUri

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

```
fun setUpdateUri(updateUri: Uri): ScheduleCustomAudienceUpdateRequest.Builder
```

Sets the[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)from which the update for the buyer's custom audiences will be fetched.

The[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)must use the same HTTPS site as the buyer ad tech's enrolled server.

See[getUpdateUri()](https://developer.android.com/reference/kotlin/android/adservices/customaudience/ScheduleCustomAudienceUpdateRequest#getUpdateUri())for more details.

|                                                      Parameters                                                      ||
|-------------|---------------------------------------------------------------------------------------------------------|
| `updateUri` | [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#):This value cannot be`null`. |

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