AutomationBuilder

@AutomationDsl
class AutomationBuilder


Type-safe builder that builds an Automation node.

Summary

Public constructors

Public functions

BaseAutomation

Build an Automation.

() -> Unit
description(description: String)

Set the description.

() -> Unit
isActive(isActive: Boolean)

Set isActive.

Unit
name(name: String)

Set the name.

Unit

Build and add a sequentialFlow.

Unit
sequential(sequentialFlow: SequentialFlow)

Set the sequentialFlow.

Public properties

String

The description of the automation.

Boolean

Whether or not the automation is active.

Boolean

Whether or not the automation is running.

String

The name of the automation.

Public constructors

AutomationBuilder

AutomationBuilder()

Public functions

build

fun build(): BaseAutomation

Build an Automation.

Returns
BaseAutomation

An Automation instance.

description

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

Set the description.

Parameters
description: String

The description of the SequentialFlow.

isActive

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

Set isActive.

Parameters
isActive: Boolean

Set the isActive flag.

name

fun name(name: String): Unit

Set the name.

Parameters
name: String

The name of the SequentialFlow.

sequential

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

Build and add a sequentialFlow.

Parameters
block: SequentialFlowBuilder.() -> Unit

The SequentialFlowBuilder used to build the SequentialFlow.

sequential

fun sequential(sequentialFlow: SequentialFlow): Unit

Set the sequentialFlow.

Parameters
sequentialFlow: SequentialFlow

The primary SequentialFlow in the Automation.

Public properties

description

var descriptionString

The description of the automation.

isActive

var isActiveBoolean

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

isRunning

var isRunningBoolean

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

name

var nameString

The name of the automation.