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

commonMain.aws.sdk.kotlin.services.waf.model.IpSetSummary.kt Maven / Gradle / Ivy

There is a newer version: 1.4.2
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.waf.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * This is **AWS WAF Classic** documentation. For more information, see [AWS WAF Classic](https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html) in the developer guide.
 *
 * **For the latest version of AWS WAF**, use the AWS WAFV2 API and see the [AWS WAF Developer Guide](https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). With the latest version, AWS WAF has a single set of endpoints for regional and global use.
 *
 * Contains the identifier and the name of the `IPSet`.
 */
public class IpSetSummary private constructor(builder: Builder) {
    /**
     * The `IPSetId` for an IPSet. You can use `IPSetId` in a GetIPSet request to get detailed information about an IPSet.
     */
    public val ipSetId: kotlin.String = requireNotNull(builder.ipSetId) { "A non-null value must be provided for ipSetId" }
    /**
     * A friendly name or description of the IPSet. You can't change the name of an `IPSet` after you create it.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }

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

    override fun toString(): kotlin.String = buildString {
        append("IpSetSummary(")
        append("ipSetId=$ipSetId,")
        append("name=$name")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = ipSetId.hashCode()
        result = 31 * result + (name.hashCode())
        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 IpSetSummary

        if (ipSetId != other.ipSetId) return false
        if (name != other.name) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The `IPSetId` for an IPSet. You can use `IPSetId` in a GetIPSet request to get detailed information about an IPSet.
         */
        public var ipSetId: kotlin.String? = null
        /**
         * A friendly name or description of the IPSet. You can't change the name of an `IPSet` after you create it.
         */
        public var name: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.waf.model.IpSetSummary) : this() {
            this.ipSetId = x.ipSetId
            this.name = x.name
        }

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

        internal fun correctErrors(): Builder {
            if (ipSetId == null) ipSetId = ""
            if (name == null) name = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy