
commonMain.aws.sdk.kotlin.services.iot.model.MitigationAction.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* Describes which changes should be applied as part of a mitigation action.
*/
public class MitigationAction private constructor(builder: Builder) {
/**
* The set of parameters for this mitigation action. The parameters vary, depending on the kind of action you apply.
*/
public val actionParams: aws.sdk.kotlin.services.iot.model.MitigationActionParams? = builder.actionParams
/**
* A unique identifier for the mitigation action.
*/
public val id: kotlin.String? = builder.id
/**
* A user-friendly name for the mitigation action.
*/
public val name: kotlin.String? = builder.name
/**
* The IAM role ARN used to apply this mitigation action.
*/
public val roleArn: kotlin.String? = builder.roleArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.MitigationAction = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MitigationAction(")
append("actionParams=$actionParams,")
append("id=$id,")
append("name=$name,")
append("roleArn=$roleArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = actionParams?.hashCode() ?: 0
result = 31 * result + (id?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (roleArn?.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 MitigationAction
if (actionParams != other.actionParams) return false
if (id != other.id) return false
if (name != other.name) return false
if (roleArn != other.roleArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.MitigationAction = Builder(this).apply(block).build()
public class Builder {
/**
* The set of parameters for this mitigation action. The parameters vary, depending on the kind of action you apply.
*/
public var actionParams: aws.sdk.kotlin.services.iot.model.MitigationActionParams? = null
/**
* A unique identifier for the mitigation action.
*/
public var id: kotlin.String? = null
/**
* A user-friendly name for the mitigation action.
*/
public var name: kotlin.String? = null
/**
* The IAM role ARN used to apply this mitigation action.
*/
public var roleArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.MitigationAction) : this() {
this.actionParams = x.actionParams
this.id = x.id
this.name = x.name
this.roleArn = x.roleArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.MitigationAction = MitigationAction(this)
/**
* construct an [aws.sdk.kotlin.services.iot.model.MitigationActionParams] inside the given [block]
*/
public fun actionParams(block: aws.sdk.kotlin.services.iot.model.MitigationActionParams.Builder.() -> kotlin.Unit) {
this.actionParams = aws.sdk.kotlin.services.iot.model.MitigationActionParams.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy