commonMain.aws.sdk.kotlin.services.route53.model.CreateVpcAssociationAuthorizationRequest.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
// 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 authorize associating a VPC with your private hosted zone. Authorization is only required when a private hosted zone and a VPC were created by using different accounts.
*/
public class CreateVpcAssociationAuthorizationRequest private constructor(builder: Builder) {
/**
* The ID of the private hosted zone that you want to authorize associating a VPC with.
*/
public val hostedZoneId: kotlin.String? = builder.hostedZoneId
/**
* A complex type that contains the VPC ID and region for the VPC that you want to authorize associating with your 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.CreateVpcAssociationAuthorizationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateVpcAssociationAuthorizationRequest(")
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 CreateVpcAssociationAuthorizationRequest
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.CreateVpcAssociationAuthorizationRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID of the private hosted zone that you want to authorize associating a VPC with.
*/
public var hostedZoneId: kotlin.String? = null
/**
* A complex type that contains the VPC ID and region for the VPC that you want to authorize associating with your 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.CreateVpcAssociationAuthorizationRequest) : this() {
this.hostedZoneId = x.hostedZoneId
this.vpc = x.vpc
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53.model.CreateVpcAssociationAuthorizationRequest = CreateVpcAssociationAuthorizationRequest(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
}
}
}