All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.budgets.model.ActionThreshold.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.budgets.model



/**
 * The trigger threshold of the action.
 */
public class ActionThreshold private constructor(builder: Builder) {
    /**
     * The type of threshold for a notification.
     */
    public val actionThresholdType: aws.sdk.kotlin.services.budgets.model.ThresholdType? = builder.actionThresholdType
    /**
     * The threshold of a notification.
     */
    public val actionThresholdValue: kotlin.Double = builder.actionThresholdValue

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.budgets.model.ActionThreshold = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("ActionThreshold(")
        append("actionThresholdType=$actionThresholdType,")
        append("actionThresholdValue=$actionThresholdValue)")
    }

    override fun hashCode(): kotlin.Int {
        var result = actionThresholdType?.hashCode() ?: 0
        result = 31 * result + (actionThresholdValue.hashCode())
        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 ActionThreshold

        if (actionThresholdType != other.actionThresholdType) return false
        if (actionThresholdValue != other.actionThresholdValue) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.budgets.model.ActionThreshold = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The type of threshold for a notification.
         */
        public var actionThresholdType: aws.sdk.kotlin.services.budgets.model.ThresholdType? = null
        /**
         * The threshold of a notification.
         */
        public var actionThresholdValue: kotlin.Double = 0.0

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.budgets.model.ActionThreshold) : this() {
            this.actionThresholdType = x.actionThresholdType
            this.actionThresholdValue = x.actionThresholdValue
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.budgets.model.ActionThreshold = ActionThreshold(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy