MessagesCommands

@Generated(value = ["GoogleHomePlatformCodegen"])
interface MessagesCommands

Known direct subclasses
Messages

API for the Messages trait.


Summary

Public functions

suspend Unit

Cancels the messages in the passed fields.

BatchableCommand<Unit>

The batchable version of cancelMessagesRequest command.

suspend Unit
presentMessagesRequest(
    messageId: ByteArray,
    priority: MessagesTrait.MessagePriorityEnum,
    messageControl: MessagesTrait.MessageControlBitmap,
    startTime: UInt?,
    duration: ULong?,
    messageText: String,
    optionalArgs: MessagesTrait.PresentMessagesRequestCommand.OptionalArgs.() -> Unit
)

Appends the message in the passed fields to the messages attribute.

BatchableCommand<Unit>
presentMessagesRequestBatchable(
    messageId: ByteArray,
    priority: MessagesTrait.MessagePriorityEnum,
    messageControl: MessagesTrait.MessageControlBitmap,
    startTime: UInt?,
    duration: ULong?,
    messageText: String,
    optionalArgs: MessagesTrait.PresentMessagesRequestCommand.OptionalArgs.() -> Unit
)

The batchable version of presentMessagesRequest command.

Public functions

cancelMessagesRequest

suspend fun cancelMessagesRequest(messageIds: List<ByteArray>): Unit

Cancels the messages in the passed fields.

cancelMessagesRequestBatchable

fun cancelMessagesRequestBatchable(messageIds: List<ByteArray>): BatchableCommand<Unit>

The batchable version of cancelMessagesRequest command.

Cancels the messages in the passed fields.

Returns
BatchableCommand<Unit>

BatchableCommand

presentMessagesRequest

suspend fun presentMessagesRequest(
    messageId: ByteArray,
    priority: MessagesTrait.MessagePriorityEnum,
    messageControl: MessagesTrait.MessageControlBitmap,
    startTime: UInt?,
    duration: ULong?,
    messageText: String,
    optionalArgs: MessagesTrait.PresentMessagesRequestCommand.OptionalArgs.() -> Unit = {}
): Unit

Appends the message in the passed fields to the 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 messages, and will return a status code of RESOURCE_EXHAUSTED.

Parameters
priority: MessagesTrait.MessagePriorityEnum

The priority level for this message.

messageControl: MessagesTrait.MessageControlBitmap

The control information related to the message.

startTime: UInt?

The time, in UTC, at which the message becomes available to be presented. A null value indicates that the message is available immediately.

duration: ULong?

The amount of time, in milliseconds, after the startTime during which the message is available to be presented. A null value means that the duration time remains the same until it's actively changed.

messageText: String

A string that contains the message to be presented to the user.

optionalArgs: MessagesTrait.PresentMessagesRequestCommand.OptionalArgs.() -> Unit = {}

Receiver for the optional arguments of this command

presentMessagesRequestBatchable

fun presentMessagesRequestBatchable(
    messageId: ByteArray,
    priority: MessagesTrait.MessagePriorityEnum,
    messageControl: MessagesTrait.MessageControlBitmap,
    startTime: UInt?,
    duration: ULong?,
    messageText: String,
    optionalArgs: MessagesTrait.PresentMessagesRequestCommand.OptionalArgs.() -> Unit = {}
): BatchableCommand<Unit>

The batchable version of presentMessagesRequest command.

Appends the message in the passed fields to the 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 messages, and will return a status code of RESOURCE_EXHAUSTED.

Parameters
priority: MessagesTrait.MessagePriorityEnum

The priority level for this message.

messageControl: MessagesTrait.MessageControlBitmap

The control information related to the message.

startTime: UInt?

The time, in UTC, at which the message becomes available to be presented. A null value indicates that the message is available immediately.

duration: ULong?

The amount of time, in milliseconds, after the startTime during which the message is available to be presented. A null value means that the duration time remains the same until it's actively changed.

messageText: String

A string that contains the message to be presented to the user.

optionalArgs: MessagesTrait.PresentMessagesRequestCommand.OptionalArgs.() -> Unit = {}

Receiver for the optional arguments of this command

Returns
BatchableCommand<Unit>

BatchableCommand