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

commonMain.aws.sdk.kotlin.services.route53.model.CreateHostedZoneResponse.kt Maven / Gradle / Ivy

The 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 containing the response information for the hosted zone.
 */
public class CreateHostedZoneResponse private constructor(builder: Builder) {
    /**
     * A complex type that contains information about the `CreateHostedZone` request.
     */
    public val changeInfo: aws.sdk.kotlin.services.route53.model.ChangeInfo? = builder.changeInfo
    /**
     * A complex type that describes the name servers for this hosted zone.
     */
    public val delegationSet: aws.sdk.kotlin.services.route53.model.DelegationSet? = builder.delegationSet
    /**
     * A complex type that contains general information about the hosted zone.
     */
    public val hostedZone: aws.sdk.kotlin.services.route53.model.HostedZone? = builder.hostedZone
    /**
     * The unique URL representing the new hosted zone.
     */
    public val location: kotlin.String = requireNotNull(builder.location) { "A non-null value must be provided for location" }
    /**
     * A complex type that contains information about an Amazon VPC that you associated with this hosted zone.
     */
    public val vpc: aws.sdk.kotlin.services.route53.model.Vpc? = builder.vpc

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

    override fun toString(): kotlin.String = buildString {
        append("CreateHostedZoneResponse(")
        append("changeInfo=$changeInfo,")
        append("delegationSet=$delegationSet,")
        append("hostedZone=$hostedZone,")
        append("location=$location,")
        append("vpc=$vpc")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = changeInfo?.hashCode() ?: 0
        result = 31 * result + (delegationSet?.hashCode() ?: 0)
        result = 31 * result + (hostedZone?.hashCode() ?: 0)
        result = 31 * result + (location.hashCode())
        result = 31 * result + (vpc?.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 CreateHostedZoneResponse

        if (changeInfo != other.changeInfo) return false
        if (delegationSet != other.delegationSet) return false
        if (hostedZone != other.hostedZone) return false
        if (location != other.location) return false
        if (vpc != other.vpc) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A complex type that contains information about the `CreateHostedZone` request.
         */
        public var changeInfo: aws.sdk.kotlin.services.route53.model.ChangeInfo? = null
        /**
         * A complex type that describes the name servers for this hosted zone.
         */
        public var delegationSet: aws.sdk.kotlin.services.route53.model.DelegationSet? = null
        /**
         * A complex type that contains general information about the hosted zone.
         */
        public var hostedZone: aws.sdk.kotlin.services.route53.model.HostedZone? = null
        /**
         * The unique URL representing the new hosted zone.
         */
        public var location: kotlin.String? = null
        /**
         * A complex type that contains information about an Amazon VPC that you associated with this hosted zone.
         */
        public var vpc: aws.sdk.kotlin.services.route53.model.Vpc? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53.model.CreateHostedZoneResponse) : this() {
            this.changeInfo = x.changeInfo
            this.delegationSet = x.delegationSet
            this.hostedZone = x.hostedZone
            this.location = x.location
            this.vpc = x.vpc
        }

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy