# BeginGetCredentialRequest.Builder

Added in[API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest.Builder#pubctors)\|[Methods](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest.Builder#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest.Builder#inhmethods)  

# BeginGetCredentialRequest.Builder

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/service/credentials/BeginGetCredentialRequest.Builder "View this page in Kotlin")\|Java

`
public
static
final

class
BeginGetCredentialRequest.Builder
`  
`

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


``


`

|---|---------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.service.credentials.BeginGetCredentialRequest.Builder |

<br />

*** ** * ** ***

Builder for[BeginGetCredentialRequest](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest).

## Summary

|                                                        ### Public constructors                                                        ||
|------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[Builder](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest.Builder#Builder())`() ` |

|                                                                                                                                                                                                                                                                                                                                               ### Public methods                                                                                                                                                                                                                                                                                                                                                ||
|-----------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[BeginGetCredentialRequest.Builder](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest.Builder) | ` `[addBeginGetCredentialOption](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest.Builder#addBeginGetCredentialOption(android.service.credentials.BeginGetCredentialOption))`(`[BeginGetCredentialOption](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialOption)` beginGetCredentialOption) ` Adds a single[BeginGetCredentialOption](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialOption)object to the list of credential options. |
| ` `[BeginGetCredentialRequest](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest)                 | ` `[build](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest.Builder#build())`() ` Builds a new[BeginGetCredentialRequest](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest)instance.                                                                                                                                                                                                                                                                                   |
| ` `[BeginGetCredentialRequest.Builder](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest.Builder) | ` `[setBeginGetCredentialOptions](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest.Builder#setBeginGetCredentialOptions(java.util.List<android.service.credentials.BeginGetCredentialOption>))`(`[List](https://developer.android.com/reference/java/util/List)`<`[BeginGetCredentialOption](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialOption)`> getBeginCredentialOptions) ` Sets the list of credential options.                                                      |
| ` `[BeginGetCredentialRequest.Builder](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest.Builder) | ` `[setCallingAppInfo](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest.Builder#setCallingAppInfo(android.service.credentials.CallingAppInfo))`(`[CallingAppInfo](https://developer.android.com/reference/android/service/credentials/CallingAppInfo)` callingAppInfo) ` Sets information pertaining to the calling app.                                                                                                                                                                                            |

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

```
public Builder ()
```

<br />

<br />

## Public methods

### addBeginGetCredentialOption

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

```
public BeginGetCredentialRequest.Builder addBeginGetCredentialOption (BeginGetCredentialOption beginGetCredentialOption)
```

Adds a single[BeginGetCredentialOption](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialOption)object to the list of credential options.

<br />

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

|                                                                                    Returns                                                                                     ||
|--------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| [BeginGetCredentialRequest.Builder](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest.Builder) | This value cannot be`null`. <br /> |

|                                                                Throws                                                                ||
|------------------------------------------------------------------------------------------------|--------------------------------------|
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | If`beginGetCredentialOption`is null. |

### build

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

```
public BeginGetCredentialRequest build ()
```

Builds a new[BeginGetCredentialRequest](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest)instance.

<br />

|                                                                            Returns                                                                             ||
|----------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| [BeginGetCredentialRequest](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest) | This value cannot be`null`. <br /> |

|                                                                                        Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException)         | If`beginGetCredentialOptions`is null.                                         |
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) | If`beginGetCredentialOptions`is empty, or if`callingAppInfo`is null or empty. |

### setBeginGetCredentialOptions

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

```
public BeginGetCredentialRequest.Builder setBeginGetCredentialOptions (List<BeginGetCredentialOption> getBeginCredentialOptions)
```

Sets the list of credential options.

<br />

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

|                                                                                    Returns                                                                                     ||
|--------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| [BeginGetCredentialRequest.Builder](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest.Builder) | This value cannot be`null`. <br /> |

|                                                                                   Throws                                                                                    ||
|--------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------|
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException)         | If`getBeginCredentialOptions`itself or any of its elements is null. |
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) | If`getBeginCredentialOptions`is empty.                              |

### setCallingAppInfo

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

```
public BeginGetCredentialRequest.Builder setCallingAppInfo (CallingAppInfo callingAppInfo)
```

Sets information pertaining to the calling app.

<br />

|                                                             Parameters                                                              ||
|------------------|-------------------------------------------------------------------------------------------------------------------|
| `callingAppInfo` | `CallingAppInfo`: the info object containing the package name, and app signatures This value may be`null`. <br /> |

|                                                                                    Returns                                                                                     ||
|--------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| [BeginGetCredentialRequest.Builder](https://developer.android.com/reference/android/service/credentials/BeginGetCredentialRequest.Builder) | This value cannot be`null`. <br /> |