commonMain.aws.sdk.kotlin.services.route53.model.AssociateVpcWithHostedZoneRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of route53-jvm Show documentation
Show all versions of route53-jvm Show documentation
The AWS SDK for Kotlin client for Route 53
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 that contains information about the request to associate a VPC with a private hosted zone.
*/
public class AssociateVpcWithHostedZoneRequest private constructor(builder: Builder) {
/**
* *Optional:* A comment about the association request.
*/
public val comment: kotlin.String? = builder.comment
/**
* The ID of the private hosted zone that you want to associate an Amazon VPC with.
*
* Note that you can't associate a VPC with a hosted zone that doesn't have an existing VPC association.
*/
public val hostedZoneId: kotlin.String? = builder.hostedZoneId
/**
* A complex type that contains information about the VPC that you want to associate with a private 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.AssociateVpcWithHostedZoneRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AssociateVpcWithHostedZoneRequest(")
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 AssociateVpcWithHostedZoneRequest
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.AssociateVpcWithHostedZoneRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* *Optional:* A comment about the association request.
*/
public var comment: kotlin.String? = null
/**
* The ID of the private hosted zone that you want to associate an Amazon VPC with.
*
* Note that you can't associate a VPC with a hosted zone that doesn't have an existing VPC association.
*/
public var hostedZoneId: kotlin.String? = null
/**
* A complex type that contains information about the VPC that you want to associate with a private 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.AssociateVpcWithHostedZoneRequest) : this() {
this.comment = x.comment
this.hostedZoneId = x.hostedZoneId
this.vpc = x.vpc
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53.model.AssociateVpcWithHostedZoneRequest = AssociateVpcWithHostedZoneRequest(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
}
}
}