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

commonMain.aws.sdk.kotlin.services.wafv2.model.RegexPatternSet.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.wafv2.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains one or more regular expressions.
 *
 * WAF assigns an ARN to each `RegexPatternSet` that you create. To use a set in a rule, you provide the ARN to the Rule statement RegexPatternSetReferenceStatement.
 */
public class RegexPatternSet private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the entity.
     */
    public val arn: kotlin.String? = builder.arn
    /**
     * A description of the set that helps with identification.
     */
    public val description: kotlin.String? = builder.description
    /**
     * A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The name of the set. You cannot change the name after you create the set.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The regular expression patterns in the set.
     */
    public val regularExpressionList: List? = builder.regularExpressionList

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

    override fun toString(): kotlin.String = buildString {
        append("RegexPatternSet(")
        append("arn=$arn,")
        append("description=$description,")
        append("id=$id,")
        append("name=$name,")
        append("regularExpressionList=$regularExpressionList")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn?.hashCode() ?: 0
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (regularExpressionList?.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 RegexPatternSet

        if (arn != other.arn) return false
        if (description != other.description) return false
        if (id != other.id) return false
        if (name != other.name) return false
        if (regularExpressionList != other.regularExpressionList) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the entity.
         */
        public var arn: kotlin.String? = null
        /**
         * A description of the set that helps with identification.
         */
        public var description: kotlin.String? = null
        /**
         * A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
         */
        public var id: kotlin.String? = null
        /**
         * The name of the set. You cannot change the name after you create the set.
         */
        public var name: kotlin.String? = null
        /**
         * The regular expression patterns in the set.
         */
        public var regularExpressionList: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.wafv2.model.RegexPatternSet) : this() {
            this.arn = x.arn
            this.description = x.description
            this.id = x.id
            this.name = x.name
            this.regularExpressionList = x.regularExpressionList
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy