commonMain.aws.sdk.kotlin.services.lookoutmetrics.model.UpdateAlertRequest.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
public class UpdateAlertRequest private constructor(builder: Builder) {
/**
* Action that will be triggered when there is an alert.
*/
public val action: aws.sdk.kotlin.services.lookoutmetrics.model.Action? = builder.action
/**
* The ARN of the alert to update.
*/
public val alertArn: kotlin.String? = builder.alertArn
/**
* A description of the alert.
*/
public val alertDescription: kotlin.String? = builder.alertDescription
/**
* The configuration of the alert filters, containing MetricList and DimensionFilterList.
*/
public val alertFilters: aws.sdk.kotlin.services.lookoutmetrics.model.AlertFilters? = builder.alertFilters
/**
* An integer from 0 to 100 specifying the alert sensitivity threshold.
*/
public val alertSensitivityThreshold: kotlin.Int? = builder.alertSensitivityThreshold
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lookoutmetrics.model.UpdateAlertRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateAlertRequest(")
append("action=$action,")
append("alertArn=$alertArn,")
append("alertDescription=$alertDescription,")
append("alertFilters=$alertFilters,")
append("alertSensitivityThreshold=$alertSensitivityThreshold")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = action?.hashCode() ?: 0
result = 31 * result + (alertArn?.hashCode() ?: 0)
result = 31 * result + (alertDescription?.hashCode() ?: 0)
result = 31 * result + (alertFilters?.hashCode() ?: 0)
result = 31 * result + (alertSensitivityThreshold ?: 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 UpdateAlertRequest
if (action != other.action) return false
if (alertArn != other.alertArn) return false
if (alertDescription != other.alertDescription) return false
if (alertFilters != other.alertFilters) return false
if (alertSensitivityThreshold != other.alertSensitivityThreshold) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lookoutmetrics.model.UpdateAlertRequest = Builder(this).apply(block).build()
public class Builder {
/**
* Action that will be triggered when there is an alert.
*/
public var action: aws.sdk.kotlin.services.lookoutmetrics.model.Action? = null
/**
* The ARN of the alert to update.
*/
public var alertArn: kotlin.String? = null
/**
* A description of the alert.
*/
public var alertDescription: kotlin.String? = null
/**
* The configuration of the alert filters, containing MetricList and DimensionFilterList.
*/
public var alertFilters: aws.sdk.kotlin.services.lookoutmetrics.model.AlertFilters? = null
/**
* An integer from 0 to 100 specifying the alert sensitivity threshold.
*/
public var alertSensitivityThreshold: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lookoutmetrics.model.UpdateAlertRequest) : this() {
this.action = x.action
this.alertArn = x.alertArn
this.alertDescription = x.alertDescription
this.alertFilters = x.alertFilters
this.alertSensitivityThreshold = x.alertSensitivityThreshold
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lookoutmetrics.model.UpdateAlertRequest = UpdateAlertRequest(this)
/**
* construct an [aws.sdk.kotlin.services.lookoutmetrics.model.Action] inside the given [block]
*/
public fun action(block: aws.sdk.kotlin.services.lookoutmetrics.model.Action.Builder.() -> kotlin.Unit) {
this.action = aws.sdk.kotlin.services.lookoutmetrics.model.Action.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.lookoutmetrics.model.AlertFilters] inside the given [block]
*/
public fun alertFilters(block: aws.sdk.kotlin.services.lookoutmetrics.model.AlertFilters.Builder.() -> kotlin.Unit) {
this.alertFilters = aws.sdk.kotlin.services.lookoutmetrics.model.AlertFilters.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy