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

commonMain.aws.sdk.kotlin.services.route53.model.DeleteVpcAssociationAuthorizationRequest.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 request to remove authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account.
 */
public class DeleteVpcAssociationAuthorizationRequest private constructor(builder: Builder) {
    /**
     * When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account, the ID of the hosted zone.
     */
    public val hostedZoneId: kotlin.String? = builder.hostedZoneId
    /**
     * When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account, a complex type that includes the ID and region of the VPC.
     */
    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.DeleteVpcAssociationAuthorizationRequest = Builder().apply(block).build()
    }

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

    override fun hashCode(): kotlin.Int {
        var 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 DeleteVpcAssociationAuthorizationRequest

        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.DeleteVpcAssociationAuthorizationRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account, the ID of the hosted zone.
         */
        public var hostedZoneId: kotlin.String? = null
        /**
         * When removing authorization to associate a VPC that was created by one Amazon Web Services account with a hosted zone that was created with a different Amazon Web Services account, a complex type that includes the ID and region of the VPC.
         */
        public var vpc: aws.sdk.kotlin.services.route53.model.Vpc? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53.model.DeleteVpcAssociationAuthorizationRequest) : this() {
            this.hostedZoneId = x.hostedZoneId
            this.vpc = x.vpc
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.route53.model.DeleteVpcAssociationAuthorizationRequest = DeleteVpcAssociationAuthorizationRequest(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