# OnOffTrait.OnWithTimedOffCommand.Request

# OnOffTrait.OnWithTimedOffCommand.Request


```
class OnOffTrait.OnWithTimedOffCommand.Request : ClusterStruct
```

<br />

*** ** * ** ***

The request payload for the OnWithTimedOff command.

## 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/OnOffTrait.OnWithTimedOffCommand.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 constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffTrait.OnWithTimedOffCommand.Request#Request(com.google.home.matter.standard.OnOffTrait.OnOffControlBitmap,kotlin.UShort,kotlin.UShort)( onOffControl: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffTrait.OnOffControlBitmap, onTime: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html, offWaitTime: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html )` Creates a request payload for the OnWithTimedOff command. |

| ### 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/OnOffTrait.OnWithTimedOffCommand.Request#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/OnOffTrait.OnWithTimedOffCommand.Request#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/OnOffTrait.OnWithTimedOffCommand.Request#offWaitTime()` The guarded off duration to set for the device. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffTrait.OnOffControlBitmap` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffTrait.OnWithTimedOffCommand.Request#onOffControl()` When set to `1`, the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffCommands#onWithTimedOff(com.google.home.matter.standard.OnOffTrait.OnOffControlBitmap,kotlin.UShort,kotlin.UShort)` command will only be processed if the `onOff` attribute is `true`. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffTrait.OnWithTimedOffCommand.Request#onTime()` The duration for which device is turned on. |

## Public constructors

### Request

```
Request(
    onOffControl: OnOffTrait.OnOffControlBitmap = OnOffControlBitmap(),
    onTime: UShort,
    offWaitTime: UShort
)
```

Creates a request payload for the OnWithTimedOff command.

## 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

### offWaitTime

```
val offWaitTime: UShort
```

The guarded off duration to set for the device. Sets the value of the `offWaitTime` attribute.

### onOffControl

```
val onOffControl: OnOffTrait.OnOffControlBitmap
```

When set to `1`, the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffCommands#onWithTimedOff(com.google.home.matter.standard.OnOffTrait.OnOffControlBitmap,kotlin.UShort,kotlin.UShort)` command will only be processed if the `onOff` attribute is `true`. When set to `0`, the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffCommands#onWithTimedOff(com.google.home.matter.standard.OnOffTrait.OnOffControlBitmap,kotlin.UShort,kotlin.UShort)` command is always processed.

### onTime

```
val onTime: UShort
```

The duration for which device is turned on. Sets the value of the `onTime` attribute.