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

commonMain.aws.sdk.kotlin.services.route53.model.DelegationSet.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 lists the name servers in a delegation set, as well as the `CallerReference` and the `ID` for the delegation set.
 */
public class DelegationSet private constructor(builder: Builder) {
    /**
     * The value that you specified for `CallerReference` when you created the reusable delegation set.
     */
    public val callerReference: kotlin.String? = builder.callerReference
    /**
     * The ID that Amazon Route 53 assigns to a reusable delegation set.
     */
    public val id: kotlin.String? = builder.id
    /**
     * A complex type that contains a list of the authoritative name servers for a hosted zone or for a reusable delegation set.
     */
    public val nameServers: List = requireNotNull(builder.nameServers) { "A non-null value must be provided for nameServers" }

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

    override fun toString(): kotlin.String = buildString {
        append("DelegationSet(")
        append("callerReference=$callerReference,")
        append("id=$id,")
        append("nameServers=$nameServers")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = callerReference?.hashCode() ?: 0
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (nameServers.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 DelegationSet

        if (callerReference != other.callerReference) return false
        if (id != other.id) return false
        if (nameServers != other.nameServers) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The value that you specified for `CallerReference` when you created the reusable delegation set.
         */
        public var callerReference: kotlin.String? = null
        /**
         * The ID that Amazon Route 53 assigns to a reusable delegation set.
         */
        public var id: kotlin.String? = null
        /**
         * A complex type that contains a list of the authoritative name servers for a hosted zone or for a reusable delegation set.
         */
        public var nameServers: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53.model.DelegationSet) : this() {
            this.callerReference = x.callerReference
            this.id = x.id
            this.nameServers = x.nameServers
        }

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

        internal fun correctErrors(): Builder {
            if (nameServers == null) nameServers = emptyList()
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy