# AccountProfile.Builder

# AccountProfile.Builder

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AccountProfile.Builder "View this page in Java")  

<br />

```
class AccountProfile.Builder
```

<br />

*** ** * ** ***

Builder class for[AccountProfile](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AccountProfile).

## Summary

|                                                          ### Public constructors                                                          |
|-------------------------------------------------------------------------------------------------------------------------------------------|
| [Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AccountProfile.Builder#Builder())`()` |

|                                                             ### Public functions                                                              |
|-----------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AccountProfile](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AccountProfile)`!`                 | [build](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AccountProfile.Builder#build())`()`                                                                                                                                                                                                                                                                                                             |
| [AccountProfile.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AccountProfile.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setAccountId](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AccountProfile.Builder#setAccountId(java.lang.String))`(accountId: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Sets the id of the media provider account.             |
| [AccountProfile.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AccountProfile.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setLocale](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AccountProfile.Builder#setLocale(java.lang.String))`(locale: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Sets the locale of the user.                                    |
| [AccountProfile.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AccountProfile.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setProfileId](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AccountProfile.Builder#setProfileId(java.lang.String))`(profileId: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Sets the profile ID within the media provider account. |

## Public constructors

### Builder

```
Builder()
```  

## Public functions

### build

```
fun build(): AccountProfile!
```  

### setAccountId

```
@CanIgnoreReturnValue
fun setAccountId(accountId: String): AccountProfile.Builder!
```

Sets the id of the media provider account. The account ID can be real, opaque or hashed.

Required.  

### setLocale

```
@CanIgnoreReturnValue
fun setLocale(locale: String): AccountProfile.Builder!
```

Sets the locale of the user.

Optional.  

### setProfileId

```
@CanIgnoreReturnValue
fun setProfileId(profileId: String): AccountProfile.Builder!
```

Sets the profile ID within the media provider account. An account can have multiple profiles associated with it. The profile ID can be real, opaque or hashed. Example profile IDs: "12345678", "john_doe_profile", "family_profile".

Optional.