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

commonMain.aws.sdk.kotlin.services.shield.model.DescribeProtectionResponse.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.shield.model



public class DescribeProtectionResponse private constructor(builder: Builder) {
    /**
     * The Protection that you requested.
     */
    public val protection: aws.sdk.kotlin.services.shield.model.Protection? = builder.protection

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeProtectionResponse(")
        append("protection=$protection)")
    }

    override fun hashCode(): kotlin.Int {
        var result = protection?.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 DescribeProtectionResponse

        if (protection != other.protection) return false

        return true
    }

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

    public class Builder {
        /**
         * The Protection that you requested.
         */
        public var protection: aws.sdk.kotlin.services.shield.model.Protection? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.shield.model.DescribeProtectionResponse) : this() {
            this.protection = x.protection
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy