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

commonMain.aws.sdk.kotlin.services.wafv2.model.GetRateBasedStatementManagedKeysResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.wafv2.model

import aws.smithy.kotlin.runtime.SdkDsl

public class GetRateBasedStatementManagedKeysResponse private constructor(builder: Builder) {
    /**
     * The keys that are of Internet Protocol version 4 (IPv4).
     */
    public val managedKeysIpv4: aws.sdk.kotlin.services.wafv2.model.RateBasedStatementManagedKeysIpSet? = builder.managedKeysIpv4
    /**
     * The keys that are of Internet Protocol version 6 (IPv6).
     */
    public val managedKeysIpv6: aws.sdk.kotlin.services.wafv2.model.RateBasedStatementManagedKeysIpSet? = builder.managedKeysIpv6

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

    override fun toString(): kotlin.String = buildString {
        append("GetRateBasedStatementManagedKeysResponse(")
        append("managedKeysIpv4=$managedKeysIpv4,")
        append("managedKeysIpv6=$managedKeysIpv6")
        append(")")
    }

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

        if (managedKeysIpv4 != other.managedKeysIpv4) return false
        if (managedKeysIpv6 != other.managedKeysIpv6) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The keys that are of Internet Protocol version 4 (IPv4).
         */
        public var managedKeysIpv4: aws.sdk.kotlin.services.wafv2.model.RateBasedStatementManagedKeysIpSet? = null
        /**
         * The keys that are of Internet Protocol version 6 (IPv6).
         */
        public var managedKeysIpv6: aws.sdk.kotlin.services.wafv2.model.RateBasedStatementManagedKeysIpSet? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.wafv2.model.GetRateBasedStatementManagedKeysResponse) : this() {
            this.managedKeysIpv4 = x.managedKeysIpv4
            this.managedKeysIpv6 = x.managedKeysIpv6
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy