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

# Builder

*** ** * ** ***

```
class Builder
```

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

*** ** * ** ***

> [!CAUTION]
> **This class was deprecated in API level 37.2.**
>
> Use `java.security.KeyStore` with the Android hardware-backed keystore instead.

A builder for `https://developer.android.com/reference/kotlin/android/security/identity/PersonalizationData`.

## Summary

| Public constructors ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/security/identity/PersonalizationData.Builder#Builder()()` Creates a new builder for a given namespace. |

| Public methods ||
|---|---|
| [PersonalizationData.Builder](https://developer.android.com/reference/kotlin/android/security/identity/PersonalizationData.Builder#) | `https://developer.android.com/reference/kotlin/android/security/identity/PersonalizationData.Builder#addAccessControlProfile(android.security.identity.AccessControlProfile)(profile: https://developer.android.com/reference/kotlin/android/security/identity/AccessControlProfile)` Adds a new access control profile to the builder. |
| [PersonalizationData](https://developer.android.com/reference/kotlin/android/security/identity/PersonalizationData) | `https://developer.android.com/reference/kotlin/android/security/identity/PersonalizationData.Builder#build()()` Creates a new `https://developer.android.com/reference/kotlin/android/security/identity/PersonalizationData` with all the entries added to the builder. |
| [PersonalizationData.Builder](https://developer.android.com/reference/kotlin/android/security/identity/PersonalizationData.Builder#) | `https://developer.android.com/reference/kotlin/android/security/identity/PersonalizationData.Builder#putEntry(kotlin.String,%20kotlin.String,%20kotlin.collections.MutableCollection,%20kotlin.ByteArray)(namespace: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, accessControlProfileIds: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html<https://developer.android.com/reference/kotlin/android/security/identity/AccessControlProfileId!>, value: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)` Adds a new entry to the builder. |

## Public constructors

### Builder

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

```
Builder()
```

**Deprecated:** *Use `java.security.KeyStore` with the Android hardware-backed keystore instead.*

Creates a new builder for a given namespace.

## Public methods

### addAccessControlProfile

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

```
fun addAccessControlProfile(profile: AccessControlProfile): PersonalizationData.Builder
```

**Deprecated:** *Use `java.security.KeyStore` with the Android hardware-backed keystore instead.*

Adds a new access control profile to the builder.

| Parameters ||
|---|---|
| `profile` | [AccessControlProfile](https://developer.android.com/reference/kotlin/android/security/identity/AccessControlProfile): The access control profile. This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/security/identity/PersonalizationData.Builder#` | The builder. This value cannot be `null`. |

### build

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

```
fun build(): PersonalizationData
```

**Deprecated:** *Use `java.security.KeyStore` with the Android hardware-backed keystore instead.*

Creates a new `https://developer.android.com/reference/kotlin/android/security/identity/PersonalizationData` with all the entries added to the builder.

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/security/identity/PersonalizationData` | A new `https://developer.android.com/reference/kotlin/android/security/identity/PersonalizationData` instance. This value cannot be `null`. |

### putEntry

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

```
fun putEntry(
    namespace: String, 
    name: String, 
    accessControlProfileIds: MutableCollection<AccessControlProfileId!>, 
    value: ByteArray
): PersonalizationData.Builder
```

**Deprecated:** *Use `java.security.KeyStore` with the Android hardware-backed keystore instead.*

Adds a new entry to the builder.

| Parameters ||
|---|---|
| `namespace` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The namespace to use, e.g. `org.iso.18013-5.2019`. This value cannot be `null`. |
| `name` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The name of the entry, e.g. `height`. This value cannot be `null`. |
| `accessControlProfileIds` | [MutableCollection](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-collection/index.html)\<[AccessControlProfileId](https://developer.android.com/reference/kotlin/android/security/identity/AccessControlProfileId)!\>: A set of access control profiles to use. This value cannot be `null`. |
| `value` | [ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html): The value to add, in CBOR encoding. This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/security/identity/PersonalizationData.Builder#` | The builder. This value cannot be `null`. |