
commonMain.aws.sdk.kotlin.services.iot.model.StepFunctionsAction.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* Starts execution of a Step Functions state machine.
*/
public class StepFunctionsAction private constructor(builder: Builder) {
/**
* (Optional) A name will be given to the state machine execution consisting of this prefix followed by a UUID. Step Functions automatically creates a unique name for each state machine execution if one is not provided.
*/
public val executionNamePrefix: kotlin.String? = builder.executionNamePrefix
/**
* The ARN of the role that grants IoT permission to start execution of a state machine ("Action":"states:StartExecution").
*/
public val roleArn: kotlin.String = requireNotNull(builder.roleArn) { "A non-null value must be provided for roleArn" }
/**
* The name of the Step Functions state machine whose execution will be started.
*/
public val stateMachineName: kotlin.String = requireNotNull(builder.stateMachineName) { "A non-null value must be provided for stateMachineName" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.StepFunctionsAction = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StepFunctionsAction(")
append("executionNamePrefix=$executionNamePrefix,")
append("roleArn=$roleArn,")
append("stateMachineName=$stateMachineName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = executionNamePrefix?.hashCode() ?: 0
result = 31 * result + (roleArn.hashCode())
result = 31 * result + (stateMachineName.hashCode())
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as StepFunctionsAction
if (executionNamePrefix != other.executionNamePrefix) return false
if (roleArn != other.roleArn) return false
if (stateMachineName != other.stateMachineName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.StepFunctionsAction = Builder(this).apply(block).build()
public class Builder {
/**
* (Optional) A name will be given to the state machine execution consisting of this prefix followed by a UUID. Step Functions automatically creates a unique name for each state machine execution if one is not provided.
*/
public var executionNamePrefix: kotlin.String? = null
/**
* The ARN of the role that grants IoT permission to start execution of a state machine ("Action":"states:StartExecution").
*/
public var roleArn: kotlin.String? = null
/**
* The name of the Step Functions state machine whose execution will be started.
*/
public var stateMachineName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.StepFunctionsAction) : this() {
this.executionNamePrefix = x.executionNamePrefix
this.roleArn = x.roleArn
this.stateMachineName = x.stateMachineName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.StepFunctionsAction = StepFunctionsAction(this)
internal fun correctErrors(): Builder {
if (roleArn == null) roleArn = ""
if (stateMachineName == null) stateMachineName = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy