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

commonMain.aws.sdk.kotlin.services.route53.model.AlarmIdentifier.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.route53.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A complex type that identifies the CloudWatch alarm that you want Amazon Route 53 health checkers to use to determine whether the specified health check is healthy.
 */
public class AlarmIdentifier private constructor(builder: Builder) {
    /**
     * The name of the CloudWatch alarm that you want Amazon Route 53 health checkers to use to determine whether this health check is healthy.
     *
     * Route 53 supports CloudWatch alarms with the following features:
     * + Standard-resolution metrics. High-resolution metrics aren't supported. For more information, see [High-Resolution Metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/publishingMetrics.html#high-resolution-metrics) in the *Amazon CloudWatch User Guide*.
     * + Statistics: Average, Minimum, Maximum, Sum, and SampleCount. Extended statistics aren't supported.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * For the CloudWatch alarm that you want Route 53 health checkers to use to determine whether this health check is healthy, the region that the alarm was created in.
     *
     * For the current list of CloudWatch regions, see [Amazon CloudWatch endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/cw_region.html) in the *Amazon Web Services General Reference*.
     */
    public val region: aws.sdk.kotlin.services.route53.model.CloudWatchRegion = requireNotNull(builder.region) { "A non-null value must be provided for region" }

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

    override fun toString(): kotlin.String = buildString {
        append("AlarmIdentifier(")
        append("name=$name,")
        append("region=$region")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = name.hashCode()
        result = 31 * result + (region.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 AlarmIdentifier

        if (name != other.name) return false
        if (region != other.region) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the CloudWatch alarm that you want Amazon Route 53 health checkers to use to determine whether this health check is healthy.
         *
         * Route 53 supports CloudWatch alarms with the following features:
         * + Standard-resolution metrics. High-resolution metrics aren't supported. For more information, see [High-Resolution Metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/publishingMetrics.html#high-resolution-metrics) in the *Amazon CloudWatch User Guide*.
         * + Statistics: Average, Minimum, Maximum, Sum, and SampleCount. Extended statistics aren't supported.
         */
        public var name: kotlin.String? = null
        /**
         * For the CloudWatch alarm that you want Route 53 health checkers to use to determine whether this health check is healthy, the region that the alarm was created in.
         *
         * For the current list of CloudWatch regions, see [Amazon CloudWatch endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/cw_region.html) in the *Amazon Web Services General Reference*.
         */
        public var region: aws.sdk.kotlin.services.route53.model.CloudWatchRegion? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53.model.AlarmIdentifier) : this() {
            this.name = x.name
            this.region = x.region
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.route53.model.AlarmIdentifier = AlarmIdentifier(this)

        internal fun correctErrors(): Builder {
            if (name == null) name = ""
            if (region == null) region = CloudWatchRegion.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy