# AccountProfile.Builder

# AccountProfile.Builder

*** ** * ** ***

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

<br />

```
public final class AccountProfile.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

|                                                         ### Public methods                                                          |
|-------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AccountProfile](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AccountProfile)                 | [build](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AccountProfile.Builder#build())`()`                                                                                                                                                                                                                                                                                                                                                                                          |
| [AccountProfile.Builder](https://developer.android.com/reference/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/com/google/android/engage/common/datamodel/AccountProfile.Builder#setAccountId(java.lang.String))`(@`[NonNull](https://developer.android.com/reference/androidx/annotation/NonNull.html)` `[String](https://developer.android.com/reference/java/lang/String.html)` accountId)` Sets the id of the media provider account.             |
| [AccountProfile.Builder](https://developer.android.com/reference/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/com/google/android/engage/common/datamodel/AccountProfile.Builder#setLocale(java.lang.String))`(@`[NonNull](https://developer.android.com/reference/androidx/annotation/NonNull.html)` `[String](https://developer.android.com/reference/java/lang/String.html)` locale)` Sets the locale of the user.                                    |
| [AccountProfile.Builder](https://developer.android.com/reference/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/com/google/android/engage/common/datamodel/AccountProfile.Builder#setProfileId(java.lang.String))`(@`[NonNull](https://developer.android.com/reference/androidx/annotation/NonNull.html)` `[String](https://developer.android.com/reference/java/lang/String.html)` profileId)` Sets the profile ID within the media provider account. |

## Public constructors

### Builder

```
public Builder()
```  

## Public methods

### build

```
public AccountProfile build()
```  

### setAccountId

```
@CanIgnoreReturnValue
public AccountProfile.Builder setAccountId(@NonNull String accountId)
```

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

Required.  

### setLocale

```
@CanIgnoreReturnValue
public AccountProfile.Builder setLocale(@NonNull String locale)
```

Sets the locale of the user.

Optional.  

### setProfileId

```
@CanIgnoreReturnValue
public AccountProfile.Builder setProfileId(@NonNull String profileId)
```

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.