# ActionsTrait.ActionStruct

# ActionsTrait.ActionStruct


```
class ActionsTrait.ActionStruct : ClusterStruct
```

<br />

*** ** * ** ***

The details of a single action.

## 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/ActionsTrait.ActionStruct.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/ActionsTrait.ActionStruct#ActionStruct(kotlin.UShort,kotlin.String,com.google.home.matter.standard.ActionsTrait.ActionTypeEnum,kotlin.UShort,com.google.home.matter.standard.ActionsTrait.CommandBits,com.google.home.matter.standard.ActionsTrait.ActionStateEnum)( actionId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html, name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, type: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ActionsTrait.ActionTypeEnum, endpointListId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html, supportedCommands: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ActionsTrait.CommandBits, state: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ActionsTrait.ActionStateEnum )` Creates the ActionStruct 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/ActionsTrait.ActionStruct#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/ActionsTrait.ActionStruct#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/ActionsTrait.ActionStruct#actionId()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ActionsTrait.ActionStruct#endpointListId()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ActionsTrait.ActionStruct#name()` The name as assigned by the user or automatically by the server associated with this action. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ActionsTrait.ActionStateEnum` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ActionsTrait.ActionStruct#state()` The current state of this action. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ActionsTrait.CommandBits` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ActionsTrait.ActionStruct#supportedCommands()` A bitmap indicating which of the cluster's commands are supported for this particular action. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ActionsTrait.ActionTypeEnum` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ActionsTrait.ActionStruct#type()` The type of endpoint list. |

## Public constructors

### ActionStruct

```
ActionStruct(
    actionId: UShort,
    name: String = "",
    type: ActionsTrait.ActionTypeEnum = ActionTypeEnum.Other,
    endpointListId: UShort,
    supportedCommands: ActionsTrait.CommandBits = CommandBits(),
    state: ActionsTrait.ActionStateEnum = ActionStateEnum.Inactive
)
```

Creates the ActionStruct 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

### actionId

```
val actionId: UShort
```

### endpointListId

```
val endpointListId: UShort
```

### name

```
val name: String
```

The name as assigned by the user or automatically by the server associated with this action.

### state

```
val state: ActionsTrait.ActionStateEnum
```

The current state of this action.

### supportedCommands

```
val supportedCommands: ActionsTrait.CommandBits
```

A bitmap indicating which of the cluster's commands are supported for this particular action.

### type

```
val type: ActionsTrait.ActionTypeEnum
```

The type of endpoint list.