# AssignmentNodeDsl

# AssignmentNodeDsl


```
interface AssignmentNodeDsl : AutomationFlowContributor
```

<br />

Known direct subclasses [SequentialFlowBuilder](https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlowBuilder)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlowBuilder` | Type-safe builder that builds a `https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlow` Node. |

*** ** * ** ***

Interface for constructing `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Assignment` nodes and contributing them to an automation flow.

## Summary

| ### Nested types |
|---|
| `class https://developers.home.google.com/reference/kotlin/com/google/home/automation/AssignmentNodeDsl.Variable<T : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?> : https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedExpression` |

| ### Public functions |
|---|---|
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `<T : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?> https://developers.home.google.com/reference/kotlin/com/google/home/automation/AssignmentNodeDsl.Variable<T>.https://developers.home.google.com/reference/kotlin/com/google/home/automation/AssignmentNodeDsl#(com.google.home.automation.AssignmentNodeDsl.Variable).assign(com.google.home.automation.TypedExpression)( expression: https://developers.home.google.com/reference/kotlin/com/google/home/automation/TypedExpression<T> )` A variable can generally only be assigned once per automation. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `<T : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?> https://developers.home.google.com/reference/kotlin/com/google/home/automation/AssignmentNodeDsl.Variable<T>.https://developers.home.google.com/reference/kotlin/com/google/home/automation/AssignmentNodeDsl#(com.google.home.automation.AssignmentNodeDsl.Variable).assign(kotlin.Any)(value: T)` |
| `open https://developers.home.google.com/reference/kotlin/com/google/home/automation/AssignmentNodeDsl.Variable<T>` | `<T : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?> https://developers.home.google.com/reference/kotlin/com/google/home/automation/AssignmentNodeDsl#variable()()` |

| ### Inherited functions |
|---|
| From [com.google.home.automation.AutomationFlowContributor](https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationFlowContributor) |---|---| | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationFlowBuilder` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationFlowContributor#flowBuilder()()` | |

## Public functions

### assign

```
open fun <T : Any?> AssignmentNodeDsl.Variable<T>.assign(
    expression: TypedExpression<T>
): Unit
```

A variable can generally only be assigned once per automation. The one exception is that it can be assigned in each branch of a select flow.

### assign

```
open fun <T : Any?> AssignmentNodeDsl.Variable<T>.assign(value: T): Unit
```

### variable

```
open fun <T : Any?> variable(): AssignmentNodeDsl.Variable<T>
```