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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Limits settings for your subscription.
 */
public class SubscriptionLimits private constructor(builder: Builder) {
    /**
     * Limits settings on protection groups for your subscription.
     */
    public val protectionGroupLimits: aws.sdk.kotlin.services.shield.model.ProtectionGroupLimits? = builder.protectionGroupLimits
    /**
     * Limits settings on protections for your subscription.
     */
    public val protectionLimits: aws.sdk.kotlin.services.shield.model.ProtectionLimits? = builder.protectionLimits

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

    override fun toString(): kotlin.String = buildString {
        append("SubscriptionLimits(")
        append("protectionGroupLimits=$protectionGroupLimits,")
        append("protectionLimits=$protectionLimits")
        append(")")
    }

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

        if (protectionGroupLimits != other.protectionGroupLimits) return false
        if (protectionLimits != other.protectionLimits) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Limits settings on protection groups for your subscription.
         */
        public var protectionGroupLimits: aws.sdk.kotlin.services.shield.model.ProtectionGroupLimits? = null
        /**
         * Limits settings on protections for your subscription.
         */
        public var protectionLimits: aws.sdk.kotlin.services.shield.model.ProtectionLimits? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.shield.model.SubscriptionLimits) : this() {
            this.protectionGroupLimits = x.protectionGroupLimits
            this.protectionLimits = x.protectionLimits
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy