commonMain.aws.sdk.kotlin.services.eventbridge.model.RunCommandParameters.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eventbridge-jvm Show documentation
Show all versions of eventbridge-jvm Show documentation
The AWS SDK for Kotlin client for EventBridge
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.eventbridge.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* This parameter contains the criteria (either InstanceIds or a tag) used to specify which EC2 instances are to be sent the command.
*/
public class RunCommandParameters private constructor(builder: Builder) {
/**
* Currently, we support including only one RunCommandTarget block, which specifies either an array of InstanceIds or a tag.
*/
public val runCommandTargets: List = requireNotNull(builder.runCommandTargets) { "A non-null value must be provided for runCommandTargets" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.eventbridge.model.RunCommandParameters = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RunCommandParameters(")
append("runCommandTargets=$runCommandTargets")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = runCommandTargets.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 RunCommandParameters
if (runCommandTargets != other.runCommandTargets) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.eventbridge.model.RunCommandParameters = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Currently, we support including only one RunCommandTarget block, which specifies either an array of InstanceIds or a tag.
*/
public var runCommandTargets: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.eventbridge.model.RunCommandParameters) : this() {
this.runCommandTargets = x.runCommandTargets
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.eventbridge.model.RunCommandParameters = RunCommandParameters(this)
internal fun correctErrors(): Builder {
if (runCommandTargets == null) runCommandTargets = emptyList()
return this
}
}
}