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

commonMain.aws.sdk.kotlin.services.route53.model.DisassociateVpcFromHostedZoneRequest.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 contains information about the VPC that you want to disassociate from a specified private hosted zone.
 */
public class DisassociateVpcFromHostedZoneRequest private constructor(builder: Builder) {
    /**
     * *Optional:* A comment about the disassociation request.
     */
    public val comment: kotlin.String? = builder.comment
    /**
     * The ID of the private hosted zone that you want to disassociate a VPC from.
     */
    public val hostedZoneId: kotlin.String? = builder.hostedZoneId
    /**
     * A complex type that contains information about the VPC that you're disassociating from the specified 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.DisassociateVpcFromHostedZoneRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("DisassociateVpcFromHostedZoneRequest(")
        append("comment=$comment,")
        append("hostedZoneId=$hostedZoneId,")
        append("vpc=$vpc")
        append(")")
    }

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

        if (comment != other.comment) return false
        if (hostedZoneId != other.hostedZoneId) return false
        if (vpc != other.vpc) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * *Optional:* A comment about the disassociation request.
         */
        public var comment: kotlin.String? = null
        /**
         * The ID of the private hosted zone that you want to disassociate a VPC from.
         */
        public var hostedZoneId: kotlin.String? = null
        /**
         * A complex type that contains information about the VPC that you're disassociating from the specified 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.DisassociateVpcFromHostedZoneRequest) : this() {
            this.comment = x.comment
            this.hostedZoneId = x.hostedZoneId
            this.vpc = x.vpc
        }

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

        /**
         * 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 {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy