commonMain.aws.sdk.kotlin.services.lookoutmetrics.model.Action.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lookoutmetrics-jvm Show documentation
Show all versions of lookoutmetrics-jvm Show documentation
The AWS SDK for Kotlin client for LookoutMetrics
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lookoutmetrics.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A configuration that specifies the action to perform when anomalies are detected.
*/
public class Action private constructor(builder: Builder) {
/**
* A configuration for an AWS Lambda channel.
*/
public val lambdaConfiguration: aws.sdk.kotlin.services.lookoutmetrics.model.LambdaConfiguration? = builder.lambdaConfiguration
/**
* A configuration for an Amazon SNS channel.
*/
public val snsConfiguration: aws.sdk.kotlin.services.lookoutmetrics.model.SnsConfiguration? = builder.snsConfiguration
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lookoutmetrics.model.Action = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Action(")
append("lambdaConfiguration=$lambdaConfiguration,")
append("snsConfiguration=$snsConfiguration")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = lambdaConfiguration?.hashCode() ?: 0
result = 31 * result + (snsConfiguration?.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 Action
if (lambdaConfiguration != other.lambdaConfiguration) return false
if (snsConfiguration != other.snsConfiguration) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lookoutmetrics.model.Action = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A configuration for an AWS Lambda channel.
*/
public var lambdaConfiguration: aws.sdk.kotlin.services.lookoutmetrics.model.LambdaConfiguration? = null
/**
* A configuration for an Amazon SNS channel.
*/
public var snsConfiguration: aws.sdk.kotlin.services.lookoutmetrics.model.SnsConfiguration? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lookoutmetrics.model.Action) : this() {
this.lambdaConfiguration = x.lambdaConfiguration
this.snsConfiguration = x.snsConfiguration
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lookoutmetrics.model.Action = Action(this)
/**
* construct an [aws.sdk.kotlin.services.lookoutmetrics.model.LambdaConfiguration] inside the given [block]
*/
public fun lambdaConfiguration(block: aws.sdk.kotlin.services.lookoutmetrics.model.LambdaConfiguration.Builder.() -> kotlin.Unit) {
this.lambdaConfiguration = aws.sdk.kotlin.services.lookoutmetrics.model.LambdaConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.lookoutmetrics.model.SnsConfiguration] inside the given [block]
*/
public fun snsConfiguration(block: aws.sdk.kotlin.services.lookoutmetrics.model.SnsConfiguration.Builder.() -> kotlin.Unit) {
this.snsConfiguration = aws.sdk.kotlin.services.lookoutmetrics.model.SnsConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy