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

commonMain.aws.sdk.kotlin.services.devopsguru.model.DescribeAnomalyResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.devopsguru.model

import aws.smithy.kotlin.runtime.SdkDsl

public class DescribeAnomalyResponse private constructor(builder: Builder) {
    /**
     * A `ProactiveAnomaly` object that represents the requested anomaly.
     */
    public val proactiveAnomaly: aws.sdk.kotlin.services.devopsguru.model.ProactiveAnomaly? = builder.proactiveAnomaly
    /**
     * A `ReactiveAnomaly` object that represents the requested anomaly.
     */
    public val reactiveAnomaly: aws.sdk.kotlin.services.devopsguru.model.ReactiveAnomaly? = builder.reactiveAnomaly

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeAnomalyResponse(")
        append("proactiveAnomaly=$proactiveAnomaly,")
        append("reactiveAnomaly=$reactiveAnomaly")
        append(")")
    }

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

        if (proactiveAnomaly != other.proactiveAnomaly) return false
        if (reactiveAnomaly != other.reactiveAnomaly) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A `ProactiveAnomaly` object that represents the requested anomaly.
         */
        public var proactiveAnomaly: aws.sdk.kotlin.services.devopsguru.model.ProactiveAnomaly? = null
        /**
         * A `ReactiveAnomaly` object that represents the requested anomaly.
         */
        public var reactiveAnomaly: aws.sdk.kotlin.services.devopsguru.model.ReactiveAnomaly? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.devopsguru.model.DescribeAnomalyResponse) : this() {
            this.proactiveAnomaly = x.proactiveAnomaly
            this.reactiveAnomaly = x.reactiveAnomaly
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.devopsguru.model.ProactiveAnomaly] inside the given [block]
         */
        public fun proactiveAnomaly(block: aws.sdk.kotlin.services.devopsguru.model.ProactiveAnomaly.Builder.() -> kotlin.Unit) {
            this.proactiveAnomaly = aws.sdk.kotlin.services.devopsguru.model.ProactiveAnomaly.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.devopsguru.model.ReactiveAnomaly] inside the given [block]
         */
        public fun reactiveAnomaly(block: aws.sdk.kotlin.services.devopsguru.model.ReactiveAnomaly.Builder.() -> kotlin.Unit) {
            this.reactiveAnomaly = aws.sdk.kotlin.services.devopsguru.model.ReactiveAnomaly.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy