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

commonMain.aws.sdk.kotlin.services.servicediscovery.model.DnsConfigChange.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.servicediscovery.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A complex type that contains information about changes to the Route 53 DNS records that Cloud Map creates when you register an instance.
 */
public class DnsConfigChange private constructor(builder: Builder) {
    /**
     * An array that contains one `DnsRecord` object for each Route 53 record that you want Cloud Map to create when you register an instance.
     */
    public val dnsRecords: List = requireNotNull(builder.dnsRecords) { "A non-null value must be provided for dnsRecords" }

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

    override fun toString(): kotlin.String = buildString {
        append("DnsConfigChange(")
        append("dnsRecords=$dnsRecords")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dnsRecords.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 DnsConfigChange

        if (dnsRecords != other.dnsRecords) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * An array that contains one `DnsRecord` object for each Route 53 record that you want Cloud Map to create when you register an instance.
         */
        public var dnsRecords: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.servicediscovery.model.DnsConfigChange) : this() {
            this.dnsRecords = x.dnsRecords
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy