commonMain.aws.sdk.kotlin.services.route53.model.HostedZoneSummary.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
/**
* In the response to a `ListHostedZonesByVPC` request, the `HostedZoneSummaries` element contains one `HostedZoneSummary` element for each hosted zone that the specified Amazon VPC is associated with. Each `HostedZoneSummary` element contains the hosted zone name and ID, and information about who owns the hosted zone.
*/
public class HostedZoneSummary private constructor(builder: Builder) {
/**
* The Route 53 hosted zone ID of a private hosted zone that the specified VPC is associated with.
*/
public val hostedZoneId: kotlin.String = requireNotNull(builder.hostedZoneId) { "A non-null value must be provided for hostedZoneId" }
/**
* The name of the private hosted zone, such as `example.com`.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The owner of a private hosted zone that the specified VPC is associated with. The owner can be either an Amazon Web Services account or an Amazon Web Services service.
*/
public val owner: aws.sdk.kotlin.services.route53.model.HostedZoneOwner? = builder.owner
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53.model.HostedZoneSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("HostedZoneSummary(")
append("hostedZoneId=$hostedZoneId,")
append("name=$name,")
append("owner=$owner")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = hostedZoneId.hashCode()
result = 31 * result + (name.hashCode())
result = 31 * result + (owner?.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 HostedZoneSummary
if (hostedZoneId != other.hostedZoneId) return false
if (name != other.name) return false
if (owner != other.owner) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53.model.HostedZoneSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Route 53 hosted zone ID of a private hosted zone that the specified VPC is associated with.
*/
public var hostedZoneId: kotlin.String? = null
/**
* The name of the private hosted zone, such as `example.com`.
*/
public var name: kotlin.String? = null
/**
* The owner of a private hosted zone that the specified VPC is associated with. The owner can be either an Amazon Web Services account or an Amazon Web Services service.
*/
public var owner: aws.sdk.kotlin.services.route53.model.HostedZoneOwner? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53.model.HostedZoneSummary) : this() {
this.hostedZoneId = x.hostedZoneId
this.name = x.name
this.owner = x.owner
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53.model.HostedZoneSummary = HostedZoneSummary(this)
/**
* construct an [aws.sdk.kotlin.services.route53.model.HostedZoneOwner] inside the given [block]
*/
public fun owner(block: aws.sdk.kotlin.services.route53.model.HostedZoneOwner.Builder.() -> kotlin.Unit) {
this.owner = aws.sdk.kotlin.services.route53.model.HostedZoneOwner.invoke(block)
}
internal fun correctErrors(): Builder {
if (hostedZoneId == null) hostedZoneId = ""
if (name == null) name = ""
return this
}
}
}