DoorLockTrait.SetCredentialCommand.Request

class DoorLockTrait.SetCredentialCommand.Request : ClusterStruct


The request payload for the SetCredential command.

Summary

Nested types

Descriptor enum for this command's request fields.

Public constructors

Request(
    operationType: DoorLockTrait.DataOperationTypeEnum,
    credential: DoorLockTrait.CredentialStruct,
    credentialData: ByteArray,
    userIndex: UShort?,
    userStatus: DoorLockTrait.UserStatusEnum?,
    userType: DoorLockTrait.UserTypeEnum?
)

Creates a request payload for the SetCredential command.

Public functions

open StructDescriptor

Returns the descriptor for the struct.

open Any?

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

Public properties

DoorLockTrait.CredentialStruct

The credential to be set.

ByteArray

The credential data to set for the credential being added or modified.

DoorLockTrait.DataOperationTypeEnum

The operation to be performed.

UShort?

The unique identifier for the user record that corresponds to the credential being added or modified.

DoorLockTrait.UserStatusEnum?

The user status to use in the new user record if a new user is being created.

DoorLockTrait.UserTypeEnum?

The user type to use in the new user record if a new user is being created.

Public constructors

Request

Request(
    operationType: DoorLockTrait.DataOperationTypeEnum = DataOperationTypeEnum.Add,
    credential: DoorLockTrait.CredentialStruct = CredentialStruct(),
    credentialData: ByteArray = ByteArray(0),
    userIndex: UShort? = null,
    userStatus: DoorLockTrait.UserStatusEnum? = null,
    userType: DoorLockTrait.UserTypeEnum? = null
)

Creates a request payload for the SetCredential command.

Public functions

getDescriptor

@HomeExperimentalApi
open fun getDescriptor(): StructDescriptor

Returns the descriptor for the struct.

getFieldValueById

@HomeExperimentalApi
open fun getFieldValueById(tagId: UInt): Any?

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

Public properties

credential

val credentialDoorLockTrait.CredentialStruct

The credential to be set.

credentialData

val credentialDataByteArray

The credential data to set for the credential being added or modified.

operationType

val operationTypeDoorLockTrait.DataOperationTypeEnum

The operation to be performed.

userIndex

val userIndexUShort?

The unique identifier for the user record that corresponds to the credential being added or modified.

userStatus

val userStatusDoorLockTrait.UserStatusEnum?

The user status to use in the new user record if a new user is being created. Valid values are defined by UserStatusEnum.

userType

val userTypeDoorLockTrait.UserTypeEnum?

The user type to use in the new user record if a new user is being created. Valid values are defined by UserTypeEnum.