# OnOffTrait.OffWithEffectCommand.Request

# OnOffTrait.OffWithEffectCommand.Request


```
class OnOffTrait.OffWithEffectCommand.Request : ClusterStruct
```

<br />

*** ** * ** ***

The request payload for the OffWithEffect 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.OffWithEffectCommand.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.OffWithEffectCommand.Request#Request(com.google.home.matter.standard.OnOffTrait.EffectIdentifierEnum,kotlin.UByte)( effectIdentifier: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffTrait.EffectIdentifierEnum, effectVariant: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html )` Creates a request payload for the OffWithEffect 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.OffWithEffectCommand.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.OffWithEffectCommand.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://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffTrait.EffectIdentifierEnum` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffTrait.OffWithEffectCommand.Request#effectIdentifier()` The fading effect to use when turning the device off. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffTrait.OffWithEffectCommand.Request#effectVariant()` Variant of the effect, indicated by the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffTrait.OffWithEffectCommand.Request#effectIdentifier()` parameter, that is triggered. |

## Public constructors

### Request

```
Request(
    effectIdentifier: OnOffTrait.EffectIdentifierEnum = EffectIdentifierEnum.DelayedAllOff,
    effectVariant: UByte
)
```

Creates a request payload for the OffWithEffect 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

### effectIdentifier

```
val effectIdentifier: OnOffTrait.EffectIdentifierEnum
```

The fading effect to use when turning the device off. Must be a value from `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffTrait.EffectIdentifierEnum`.

### effectVariant

```
val effectVariant: UByte
```

Variant of the effect, indicated by the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffTrait.OffWithEffectCommand.Request#effectIdentifier()` parameter, that is triggered. This must be one of the values in `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffTrait.DelayedAllOffEffectVariantEnum` or `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffTrait.DyingLightEffectVariantEnum` that correspond to the effect specified for `effectIdentifier`.