commonMain.aws.sdk.kotlin.services.cloudwatchlogs.model.SuppressionPeriod.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudwatchlogs-jvm Show documentation
Show all versions of cloudwatchlogs-jvm Show documentation
The AWS SDK for Kotlin client for CloudWatch Logs
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatchlogs.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* If you are suppressing an anomaly temporariliy, this structure defines how long the suppression period is to be.
*/
public class SuppressionPeriod private constructor(builder: Builder) {
/**
* Specifies whether the value of `value` is in seconds, minutes, or hours.
*/
public val suppressionUnit: aws.sdk.kotlin.services.cloudwatchlogs.model.SuppressionUnit? = builder.suppressionUnit
/**
* Specifies the number of seconds, minutes or hours to suppress this anomaly. There is no maximum.
*/
public val value: kotlin.Int = builder.value
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchlogs.model.SuppressionPeriod = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SuppressionPeriod(")
append("suppressionUnit=$suppressionUnit,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = suppressionUnit?.hashCode() ?: 0
result = 31 * result + (value)
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 SuppressionPeriod
if (suppressionUnit != other.suppressionUnit) return false
if (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchlogs.model.SuppressionPeriod = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies whether the value of `value` is in seconds, minutes, or hours.
*/
public var suppressionUnit: aws.sdk.kotlin.services.cloudwatchlogs.model.SuppressionUnit? = null
/**
* Specifies the number of seconds, minutes or hours to suppress this anomaly. There is no maximum.
*/
public var value: kotlin.Int = 0
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchlogs.model.SuppressionPeriod) : this() {
this.suppressionUnit = x.suppressionUnit
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchlogs.model.SuppressionPeriod = SuppressionPeriod(this)
internal fun correctErrors(): Builder {
return this
}
}
}