
commonMain.aws.sdk.kotlin.services.fis.model.CreateExperimentTemplateActionInput.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.fis.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies an action for an experiment template.
*
* For more information, see [Actions](https://docs.aws.amazon.com/fis/latest/userguide/actions.html) in the *Fault Injection Service User Guide*.
*/
public class CreateExperimentTemplateActionInput private constructor(builder: Builder) {
/**
* The ID of the action. The format of the action ID is: aws:*service-name*:*action-type*.
*/
public val actionId: kotlin.String = requireNotNull(builder.actionId) { "A non-null value must be provided for actionId" }
/**
* A description for the action.
*/
public val description: kotlin.String? = builder.description
/**
* The parameters for the action, if applicable.
*/
public val parameters: Map? = builder.parameters
/**
* The name of the action that must be completed before the current action starts. Omit this parameter to run the action at the start of the experiment.
*/
public val startAfter: List? = builder.startAfter
/**
* The targets for the action.
*/
public val targets: Map? = builder.targets
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.fis.model.CreateExperimentTemplateActionInput = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateExperimentTemplateActionInput(")
append("actionId=$actionId,")
append("description=$description,")
append("parameters=$parameters,")
append("startAfter=$startAfter,")
append("targets=$targets")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = actionId.hashCode()
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (parameters?.hashCode() ?: 0)
result = 31 * result + (startAfter?.hashCode() ?: 0)
result = 31 * result + (targets?.hashCode() ?: 0)
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 CreateExperimentTemplateActionInput
if (actionId != other.actionId) return false
if (description != other.description) return false
if (parameters != other.parameters) return false
if (startAfter != other.startAfter) return false
if (targets != other.targets) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.fis.model.CreateExperimentTemplateActionInput = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID of the action. The format of the action ID is: aws:*service-name*:*action-type*.
*/
public var actionId: kotlin.String? = null
/**
* A description for the action.
*/
public var description: kotlin.String? = null
/**
* The parameters for the action, if applicable.
*/
public var parameters: Map? = null
/**
* The name of the action that must be completed before the current action starts. Omit this parameter to run the action at the start of the experiment.
*/
public var startAfter: List? = null
/**
* The targets for the action.
*/
public var targets: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.fis.model.CreateExperimentTemplateActionInput) : this() {
this.actionId = x.actionId
this.description = x.description
this.parameters = x.parameters
this.startAfter = x.startAfter
this.targets = x.targets
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.fis.model.CreateExperimentTemplateActionInput = CreateExperimentTemplateActionInput(this)
internal fun correctErrors(): Builder {
if (actionId == null) actionId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy