commonMain.aws.sdk.kotlin.services.route53.model.HostedZone.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 general information about the hosted zone.
*/
public class HostedZone private constructor(builder: Builder) {
/**
* The value that you specified for `CallerReference` when you created the hosted zone.
*/
public val callerReference: kotlin.String = requireNotNull(builder.callerReference) { "A non-null value must be provided for callerReference" }
/**
* A complex type that includes the `Comment` and `PrivateZone` elements. If you omitted the `HostedZoneConfig` and `Comment` elements from the request, the `Config` and `Comment` elements don't appear in the response.
*/
public val config: aws.sdk.kotlin.services.route53.model.HostedZoneConfig? = builder.config
/**
* The ID that Amazon Route 53 assigned to the hosted zone when you created it.
*/
public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
/**
* If the hosted zone was created by another service, the service that created the hosted zone. When a hosted zone is created by another service, you can't edit or delete it using Route 53.
*/
public val linkedService: aws.sdk.kotlin.services.route53.model.LinkedService? = builder.linkedService
/**
* The name of the domain. For public hosted zones, this is the name that you have registered with your DNS registrar.
*
* For information about how to specify characters other than `a-z`, `0-9`, and `-` (hyphen) and how to specify internationalized domain names, see [CreateHostedZone](https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateHostedZone.html).
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The number of resource record sets in the hosted zone.
*/
public val resourceRecordSetCount: kotlin.Long? = builder.resourceRecordSetCount
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53.model.HostedZone = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("HostedZone(")
append("callerReference=$callerReference,")
append("config=$config,")
append("id=$id,")
append("linkedService=$linkedService,")
append("name=$name,")
append("resourceRecordSetCount=$resourceRecordSetCount")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = callerReference.hashCode()
result = 31 * result + (config?.hashCode() ?: 0)
result = 31 * result + (id.hashCode())
result = 31 * result + (linkedService?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (resourceRecordSetCount?.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 HostedZone
if (callerReference != other.callerReference) return false
if (config != other.config) return false
if (id != other.id) return false
if (linkedService != other.linkedService) return false
if (name != other.name) return false
if (resourceRecordSetCount != other.resourceRecordSetCount) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53.model.HostedZone = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The value that you specified for `CallerReference` when you created the hosted zone.
*/
public var callerReference: kotlin.String? = null
/**
* A complex type that includes the `Comment` and `PrivateZone` elements. If you omitted the `HostedZoneConfig` and `Comment` elements from the request, the `Config` and `Comment` elements don't appear in the response.
*/
public var config: aws.sdk.kotlin.services.route53.model.HostedZoneConfig? = null
/**
* The ID that Amazon Route 53 assigned to the hosted zone when you created it.
*/
public var id: kotlin.String? = null
/**
* If the hosted zone was created by another service, the service that created the hosted zone. When a hosted zone is created by another service, you can't edit or delete it using Route 53.
*/
public var linkedService: aws.sdk.kotlin.services.route53.model.LinkedService? = null
/**
* The name of the domain. For public hosted zones, this is the name that you have registered with your DNS registrar.
*
* For information about how to specify characters other than `a-z`, `0-9`, and `-` (hyphen) and how to specify internationalized domain names, see [CreateHostedZone](https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateHostedZone.html).
*/
public var name: kotlin.String? = null
/**
* The number of resource record sets in the hosted zone.
*/
public var resourceRecordSetCount: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53.model.HostedZone) : this() {
this.callerReference = x.callerReference
this.config = x.config
this.id = x.id
this.linkedService = x.linkedService
this.name = x.name
this.resourceRecordSetCount = x.resourceRecordSetCount
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53.model.HostedZone = HostedZone(this)
/**
* construct an [aws.sdk.kotlin.services.route53.model.HostedZoneConfig] inside the given [block]
*/
public fun config(block: aws.sdk.kotlin.services.route53.model.HostedZoneConfig.Builder.() -> kotlin.Unit) {
this.config = aws.sdk.kotlin.services.route53.model.HostedZoneConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.route53.model.LinkedService] inside the given [block]
*/
public fun linkedService(block: aws.sdk.kotlin.services.route53.model.LinkedService.Builder.() -> kotlin.Unit) {
this.linkedService = aws.sdk.kotlin.services.route53.model.LinkedService.invoke(block)
}
internal fun correctErrors(): Builder {
if (callerReference == null) callerReference = ""
if (id == null) id = ""
if (name == null) name = ""
return this
}
}
}