commonMain.aws.sdk.kotlin.services.route53domains.model.Nameserver.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of route53domains-jvm Show documentation
Show all versions of route53domains-jvm Show documentation
The AWS SDK for Kotlin client for Route 53 Domains
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53domains.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Name server includes the following elements.
*/
public class Nameserver private constructor(builder: Builder) {
/**
* Glue IP address of a name server entry. Glue IP addresses are required only when the name of the name server is a subdomain of the domain. For example, if your domain is example.com and the name server for the domain is ns.example.com, you need to specify the IP address for ns.example.com.
*
* Constraints: The list can contain only one IPv4 and one IPv6 address.
*/
public val glueIps: List? = builder.glueIps
/**
* The fully qualified host name of the name server.
*
* Constraint: Maximum 255 characters
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53domains.model.Nameserver = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Nameserver(")
append("glueIps=$glueIps,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = glueIps?.hashCode() ?: 0
result = 31 * result + (name.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 Nameserver
if (glueIps != other.glueIps) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53domains.model.Nameserver = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Glue IP address of a name server entry. Glue IP addresses are required only when the name of the name server is a subdomain of the domain. For example, if your domain is example.com and the name server for the domain is ns.example.com, you need to specify the IP address for ns.example.com.
*
* Constraints: The list can contain only one IPv4 and one IPv6 address.
*/
public var glueIps: List? = null
/**
* The fully qualified host name of the name server.
*
* Constraint: Maximum 255 characters
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53domains.model.Nameserver) : this() {
this.glueIps = x.glueIps
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53domains.model.Nameserver = Nameserver(this)
internal fun correctErrors(): Builder {
if (name == null) name = ""
return this
}
}
}