# MessagesTrait.PresentMessagesRequestCommand

# MessagesTrait.PresentMessagesRequestCommand


```
object MessagesTrait.PresentMessagesRequestCommand : CommandDescriptor
```

<br />

*** ** * ** ***

Appends the message in the passed fields to the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MessagesTrait.Attributes#messages()` attribute. If appending the message would cause the number of messages to be greater than the capacity of the list, the device will not append any message to `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MessagesTrait.Attributes#messages()`, and will return a status code of `RESOURCE_EXHAUSTED`.

| See also |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MessagesCommands#presentMessagesRequest(kotlin.ByteArray,com.google.home.matter.standard.MessagesTrait.MessagePriorityEnum,com.google.home.matter.standard.MessagesTrait.MessageControlBitmap,kotlin.UInt,kotlin.ULong,kotlin.String,kotlin.Function1)` | Use this command from the `trait(Messages)` method. |

## Summary

| ### Nested types |
|---|
| `interface https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MessagesTrait.PresentMessagesRequestCommand.OptionalArgs` Optional arguments for the command PresentMessagesRequestCommand Request |
| `class https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MessagesTrait.PresentMessagesRequestCommand.Request : https://developers.home.google.com/reference/kotlin/com/google/home/ClusterStruct` The request payload for the PresentMessagesRequest command. |
| `@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/MessagesTrait.PresentMessagesRequestCommand.Request.CommandFields : 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 command's request fields. |

| ### Public functions |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/Field?` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MessagesTrait.PresentMessagesRequestCommand#getCommandRequestFieldByName(kotlin.String)(name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` |

| ### Public properties |
|---|---|
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MessagesTrait.PresentMessagesRequestCommand#commandId()` Unique id corresponding to the command. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MessagesTrait.PresentMessagesRequestCommand#commandName()` Human-friendly name of the command. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-nothing/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/MessagesTrait.PresentMessagesRequestCommand#responseId()` Optional (for Matter only) ScopedCommandId corresponding to the command response (if any). |

## Public functions

### getCommandRequestFieldByName

```
@HomeExperimentalGenericApi
open fun getCommandRequestFieldByName(name: String): Field?
```

## Public properties

### commandId

```
open val commandId: String
```

Unique id corresponding to the command.

### commandName

```
open val commandName: String
```

Human-friendly name of the command.

### responseId

```
open val responseId: Nothing?
```

Optional (for Matter only) ScopedCommandId corresponding to the command response (if any).