Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[Ad Services Extensions 4](https://developer.android.com/sdkExtensions)  
Summary:[Ctors](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest.Builder#pubctors)\|[Methods](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest.Builder#pubmethods)\|[Inherited Methods](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest.Builder#inhmethods)  

# GetTopicsRequest.Builder

`
public
static
final

class
GetTopicsRequest.Builder
`  
`

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


``


`

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

<br />

*** ** * ** ***

Builder for[GetTopicsRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest)objects.

## Summary

|                                                                                                                                                                                                         ### Public constructors                                                                                                                                                                                                          ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest.Builder#Builder())`() ` Creates a[Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest.Builder)for[GetTopicsRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest)objects. |

|                                                                                                                                                                                                                  ### Public methods                                                                                                                                                                                                                  ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[GetTopicsRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest)                 | ` `[build](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest.Builder#build())`() ` Builds a[GetTopicsRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest)instance. |
| ` `[GetTopicsRequest.Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest.Builder) | ` `[setAdsSdkName](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest.Builder#setAdsSdkName(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` adsSdkName) ` Set Ads Sdk Name.                  |
| ` `[GetTopicsRequest.Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest.Builder) | ` `[setShouldRecordObservation](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest.Builder#setShouldRecordObservation(boolean))`(boolean recordObservation) ` Set the Record Observation.                                             |

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

### Builder

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

```
public Builder ()
```

Creates a[Builder](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest.Builder)for[GetTopicsRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest)objects.

<br />

## Public methods

### build

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

```
public GetTopicsRequest build ()
```

Builds a[GetTopicsRequest](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/topics/GetTopicsRequest)instance.

<br />

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

### setAdsSdkName

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

```
public GetTopicsRequest.Builder setAdsSdkName (String adsSdkName)
```

Set Ads Sdk Name.

This must be called by SDKs running outside of the Sandbox. Other clients must not call it.

<br />

|                                  Parameters                                  ||
|--------------|----------------------------------------------------------------|
| `adsSdkName` | `String`: the Ads Sdk Name. This value cannot be`null`. <br /> |

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

### setShouldRecordObservation

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

```
public GetTopicsRequest.Builder setShouldRecordObservation (boolean recordObservation)
```

Set the Record Observation.

<br />

|                                                                                                   Parameters                                                                                                   ||
|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `recordObservation` | `boolean`: whether to record that the caller has observed the topics of the host app or not. This will be used to determine if the caller can receive the topic in the next epoch. <br /> |

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