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

commonMain.aws.sdk.kotlin.services.route53.model.CidrCollection.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.route53.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A complex type that identifies a CIDR collection.
 */
public class CidrCollection private constructor(builder: Builder) {
    /**
     * The ARN of the collection. Can be used to reference the collection in IAM policy or in another Amazon Web Services account.
     */
    public val arn: kotlin.String? = builder.arn
    /**
     * The unique ID of the CIDR collection.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The name of a CIDR collection.
     */
    public val name: kotlin.String? = builder.name
    /**
     * A sequential counter that Route 53 sets to 1 when you create a CIDR collection and increments by 1 each time you update settings for the CIDR collection.
     */
    public val version: kotlin.Long? = builder.version

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

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

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

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

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ARN of the collection. Can be used to reference the collection in IAM policy or in another Amazon Web Services account.
         */
        public var arn: kotlin.String? = null
        /**
         * The unique ID of the CIDR collection.
         */
        public var id: kotlin.String? = null
        /**
         * The name of a CIDR collection.
         */
        public var name: kotlin.String? = null
        /**
         * A sequential counter that Route 53 sets to 1 when you create a CIDR collection and increments by 1 each time you update settings for the CIDR collection.
         */
        public var version: kotlin.Long? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53.model.CidrCollection) : this() {
            this.arn = x.arn
            this.id = x.id
            this.name = x.name
            this.version = x.version
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy