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

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



/**
 * Limits settings on protection groups for your subscription.
 */
public class ProtectionGroupLimits private constructor(builder: Builder) {
    /**
     * The maximum number of protection groups that you can have at one time.
     */
    public val maxProtectionGroups: kotlin.Long = builder.maxProtectionGroups
    /**
     * Limits settings by pattern type in the protection groups for your subscription.
     */
    public val patternTypeLimits: aws.sdk.kotlin.services.shield.model.ProtectionGroupPatternTypeLimits? = builder.patternTypeLimits

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

    override fun toString(): kotlin.String = buildString {
        append("ProtectionGroupLimits(")
        append("maxProtectionGroups=$maxProtectionGroups,")
        append("patternTypeLimits=$patternTypeLimits")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = maxProtectionGroups.hashCode()
        result = 31 * result + (patternTypeLimits?.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 ProtectionGroupLimits

        if (maxProtectionGroups != other.maxProtectionGroups) return false
        if (patternTypeLimits != other.patternTypeLimits) return false

        return true
    }

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

    public class Builder {
        /**
         * The maximum number of protection groups that you can have at one time.
         */
        public var maxProtectionGroups: kotlin.Long = 0L
        /**
         * Limits settings by pattern type in the protection groups for your subscription.
         */
        public var patternTypeLimits: aws.sdk.kotlin.services.shield.model.ProtectionGroupPatternTypeLimits? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.shield.model.ProtectionGroupLimits) : this() {
            this.maxProtectionGroups = x.maxProtectionGroups
            this.patternTypeLimits = x.patternTypeLimits
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy