commonMain.aws.sdk.kotlin.services.route53.model.DelegationSet.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 lists the name servers in a delegation set, as well as the `CallerReference` and the `ID` for the delegation set.
*/
public class DelegationSet private constructor(builder: Builder) {
/**
* The value that you specified for `CallerReference` when you created the reusable delegation set.
*/
public val callerReference: kotlin.String? = builder.callerReference
/**
* The ID that Amazon Route 53 assigns to a reusable delegation set.
*/
public val id: kotlin.String? = builder.id
/**
* A complex type that contains a list of the authoritative name servers for a hosted zone or for a reusable delegation set.
*/
public val nameServers: List = requireNotNull(builder.nameServers) { "A non-null value must be provided for nameServers" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53.model.DelegationSet = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DelegationSet(")
append("callerReference=$callerReference,")
append("id=$id,")
append("nameServers=$nameServers")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = callerReference?.hashCode() ?: 0
result = 31 * result + (id?.hashCode() ?: 0)
result = 31 * result + (nameServers.hashCode())
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 DelegationSet
if (callerReference != other.callerReference) return false
if (id != other.id) return false
if (nameServers != other.nameServers) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53.model.DelegationSet = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The value that you specified for `CallerReference` when you created the reusable delegation set.
*/
public var callerReference: kotlin.String? = null
/**
* The ID that Amazon Route 53 assigns to a reusable delegation set.
*/
public var id: kotlin.String? = null
/**
* A complex type that contains a list of the authoritative name servers for a hosted zone or for a reusable delegation set.
*/
public var nameServers: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53.model.DelegationSet) : this() {
this.callerReference = x.callerReference
this.id = x.id
this.nameServers = x.nameServers
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53.model.DelegationSet = DelegationSet(this)
internal fun correctErrors(): Builder {
if (nameServers == null) nameServers = emptyList()
return this
}
}
}