# AutomationBuilder


```
@AutomationDsl
class AutomationBuilder
```

<br />

*** ** * ** ***

Type-safe builder that builds an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Automation` node.

## Summary

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#AutomationBuilder()()` |

| ### Public functions |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/BaseAutomation` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#build()()` Build an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Automation`. |
| `() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#description(kotlin.String)(description: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Set the `description`. |
| `() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#isActive(kotlin.Boolean)(isActive: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` Set `isActive`. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#managingAppDisplayNames(kotlin.collections.List)(managingAppDisplayNames: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/automation/LocalizedText>)` Set `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#managingAppDisplayNames(kotlin.collections.List)`. |
| `() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#maxExecutionCount(kotlin.Int)(maxExecutionCount: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html?)` Set `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#maxExecutionCount(kotlin.Int)`. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#name(kotlin.String)(name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Set the `name`. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#sequential(kotlin.Function1)(block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlowBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Build and add a `sequentialFlow`. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#sequential(com.google.home.automation.SequentialFlow)(sequentialFlow: https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlow)` Set the `sequentialFlow`. |

| ### Public properties |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/platform/traits/AutomationSourceMetadata?` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#automationSourceMetadata()` Metadata about the source of the automation. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#clientFeatureGroup()` Unique identifier of the client feature group that the automation belongs to. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#description()` The description of the automation. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#isActive()` Whether or not the automation is active. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#isRunning()` Whether or not the automation is running. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/automation/LocalizedText>` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#managingAppDisplayNames()` Localized human readable names of the managing applications. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#name()` The name of the automation, must be specified and not empty. |

## Public constructors

### AutomationBuilder

```
AutomationBuilder()
```

## Public functions

### build

```
fun build(): BaseAutomation
```

Build an `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Automation`.

| Returns |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/automation/BaseAutomation` | An `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Automation` instance. |

### description

```
fun description(description: String): () -> Unit
```

Set the `description`.

| Parameters |
|---|---|
| `description: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | The description of the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlow`. |

### isActive

```
fun isActive(isActive: Boolean): () -> Unit
```

Set `isActive`.

| Parameters |
|---|---|
| `isActive: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | Set the `isActive` flag. |

### managingAppDisplayNames

```
fun managingAppDisplayNames(managingAppDisplayNames: List<LocalizedText>): Unit
```

Set `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#managingAppDisplayNames(kotlin.collections.List)`.

| Parameters |
|---|---|
| `managingAppDisplayNames: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/automation/LocalizedText>` | Set the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#managingAppDisplayNames(kotlin.collections.List)` value. |

### maxExecutionCount

```
fun maxExecutionCount(maxExecutionCount: Int?): () -> Unit
```

Set `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#maxExecutionCount(kotlin.Int)`.

| Parameters |
|---|---|
| `maxExecutionCount: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html?` | Set the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/AutomationBuilder#maxExecutionCount(kotlin.Int)` value. |

### name

```
fun name(name: String): Unit
```

Set the `name`.

| Parameters |
|---|---|
| `name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | The name of the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlow`. |

### sequential

```
fun sequential(block: SequentialFlowBuilder.() -> Unit): Unit
```

Build and add a `sequentialFlow`.

| Parameters |
|---|---|
| `block: https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlowBuilder.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | The `https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlowBuilder` used to build the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlow`. |

### sequential

```
fun sequential(sequentialFlow: SequentialFlow): Unit
```

Set the `sequentialFlow`.

| Parameters |
|---|---|
| `sequentialFlow: https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlow` | The primary `https://developers.home.google.com/reference/kotlin/com/google/home/automation/SequentialFlow` in the `https://developers.home.google.com/reference/kotlin/com/google/home/automation/Automation`. |

## Public properties

### automationSourceMetadata

```
var automationSourceMetadata: AutomationSourceMetadata?
```

Metadata about the source of the automation. For blueprint suggestions, this will contain the ID of the blueprint the suggestion was generated from.

### clientFeatureGroup

```
var clientFeatureGroup: String?
```

Unique identifier of the client feature group that the automation belongs to. This is used to group automations for specific client features (e.g. 3P settings-based automations).

### description

```
var description: String
```

The description of the automation.

### isActive

```
var isActive: Boolean
```

Whether or not the automation is active. `true` by default.

### isRunning

```
var isRunning: Boolean
```

Whether or not the automation is running. `false` by default.

### managingAppDisplayNames

```
var managingAppDisplayNames: List<LocalizedText>
```

Localized human readable names of the managing applications.

### name

```
var name: String
```

The name of the automation, must be specified and not empty.