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

commonMain.aws.sdk.kotlin.services.fms.model.StatefulRuleGroup.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.fms.model



/**
 * Network Firewall stateful rule group, used in a NetworkFirewallPolicyDescription.
 */
public class StatefulRuleGroup private constructor(builder: Builder) {
    /**
     * The action that allows the policy owner to override the behavior of the rule group within a policy.
     */
    public val override: aws.sdk.kotlin.services.fms.model.NetworkFirewallStatefulRuleGroupOverride? = builder.override
    /**
     * An integer setting that indicates the order in which to run the stateful rule groups in a single Network Firewall firewall policy. This setting only applies to firewall policies that specify the `STRICT_ORDER` rule order in the stateful engine options settings.
     *
     *  Network Firewall evalutes each stateful rule group against a packet starting with the group that has the lowest priority setting. You must ensure that the priority settings are unique within each policy. For information about
     *
     *  You can change the priority settings of your rule groups at any time. To make it easier to insert rule groups later, number them so there's a wide range in between, for example use 100, 200, and so on.
     */
    public val priority: kotlin.Int? = builder.priority
    /**
     * The resource ID of the rule group.
     */
    public val resourceId: kotlin.String? = builder.resourceId
    /**
     * The name of the rule group.
     */
    public val ruleGroupName: kotlin.String? = builder.ruleGroupName

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

    override fun toString(): kotlin.String = buildString {
        append("StatefulRuleGroup(")
        append("override=$override,")
        append("priority=$priority,")
        append("resourceId=$resourceId,")
        append("ruleGroupName=$ruleGroupName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = override?.hashCode() ?: 0
        result = 31 * result + (priority ?: 0)
        result = 31 * result + (resourceId?.hashCode() ?: 0)
        result = 31 * result + (ruleGroupName?.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 StatefulRuleGroup

        if (override != other.override) return false
        if (priority != other.priority) return false
        if (resourceId != other.resourceId) return false
        if (ruleGroupName != other.ruleGroupName) return false

        return true
    }

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

    public class Builder {
        /**
         * The action that allows the policy owner to override the behavior of the rule group within a policy.
         */
        public var override: aws.sdk.kotlin.services.fms.model.NetworkFirewallStatefulRuleGroupOverride? = null
        /**
         * An integer setting that indicates the order in which to run the stateful rule groups in a single Network Firewall firewall policy. This setting only applies to firewall policies that specify the `STRICT_ORDER` rule order in the stateful engine options settings.
         *
         *  Network Firewall evalutes each stateful rule group against a packet starting with the group that has the lowest priority setting. You must ensure that the priority settings are unique within each policy. For information about
         *
         *  You can change the priority settings of your rule groups at any time. To make it easier to insert rule groups later, number them so there's a wide range in between, for example use 100, 200, and so on.
         */
        public var priority: kotlin.Int? = null
        /**
         * The resource ID of the rule group.
         */
        public var resourceId: kotlin.String? = null
        /**
         * The name of the rule group.
         */
        public var ruleGroupName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.fms.model.StatefulRuleGroup) : this() {
            this.override = x.override
            this.priority = x.priority
            this.resourceId = x.resourceId
            this.ruleGroupName = x.ruleGroupName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy