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

commonMain.aws.sdk.kotlin.services.servicediscovery.model.DnsProperties.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 the ID for the Route 53 hosted zone that Cloud Map creates when you create a namespace.
 */
public class DnsProperties private constructor(builder: Builder) {
    /**
     * The ID for the Route 53 hosted zone that Cloud Map creates when you create a namespace.
     */
    public val hostedZoneId: kotlin.String? = builder.hostedZoneId
    /**
     * Start of Authority (SOA) record for the hosted zone.
     */
    public val soa: aws.sdk.kotlin.services.servicediscovery.model.Soa? = builder.soa

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

    override fun toString(): kotlin.String = buildString {
        append("DnsProperties(")
        append("hostedZoneId=$hostedZoneId,")
        append("soa=$soa")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = hostedZoneId?.hashCode() ?: 0
        result = 31 * result + (soa?.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 DnsProperties

        if (hostedZoneId != other.hostedZoneId) return false
        if (soa != other.soa) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID for the Route 53 hosted zone that Cloud Map creates when you create a namespace.
         */
        public var hostedZoneId: kotlin.String? = null
        /**
         * Start of Authority (SOA) record for the hosted zone.
         */
        public var soa: aws.sdk.kotlin.services.servicediscovery.model.Soa? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.servicediscovery.model.DnsProperties) : this() {
            this.hostedZoneId = x.hostedZoneId
            this.soa = x.soa
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.servicediscovery.model.Soa] inside the given [block]
         */
        public fun soa(block: aws.sdk.kotlin.services.servicediscovery.model.Soa.Builder.() -> kotlin.Unit) {
            this.soa = aws.sdk.kotlin.services.servicediscovery.model.Soa.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy