# DoorLockTrait.CredentialStruct

# DoorLockTrait.CredentialStruct


```
class DoorLockTrait.CredentialStruct : ClusterStruct
```

<br />

*** ** * ** ***

A set of credentials used when operating the door lock.

## Summary

| ### Nested types |
|---|
| `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.CredentialStruct.StructFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this struct's fields. |

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.CredentialStruct#CredentialStruct(com.google.home.matter.standard.DoorLockTrait.CredentialTypeEnum,kotlin.UShort)( credentialType: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.CredentialTypeEnum, credentialIndex: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html )` Creates the CredentialStruct class. |

| ### Public functions |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/StructDescriptor` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.CredentialStruct#getDescriptor()()` Returns the descriptor for the struct. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.CredentialStruct#getFieldValueById(kotlin.UInt)(tagId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html)` Returns the value of the field for the given tag ID. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.CredentialStruct#credentialIndex()` The unique identifier for the credentials. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.CredentialTypeEnum` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.CredentialStruct#credentialType()` The type of credentials, as enumerated by `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.CredentialTypeEnum`. |

## Public constructors

### CredentialStruct

```
CredentialStruct(
    credentialType: DoorLockTrait.CredentialTypeEnum = CredentialTypeEnum.ProgrammingPin,
    credentialIndex: UShort
)
```

Creates the CredentialStruct class.

## Public functions

### getDescriptor

```
@HomeExperimentalGenericApi
open fun getDescriptor(): StructDescriptor
```

Returns the descriptor for the struct.

### getFieldValueById

```
@HomeExperimentalGenericApi
open fun getFieldValueById(tagId: UInt): Any?
```

Returns the value of the field for the given tag ID.

## Public properties

### credentialIndex

```
val credentialIndex: UShort
```

The unique identifier for the credentials.

### credentialType

```
val credentialType: DoorLockTrait.CredentialTypeEnum
```

The type of credentials, as enumerated by `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/DoorLockTrait.CredentialTypeEnum`.