commonMain.aws.sdk.kotlin.services.route53.model.TestDnsAnswerResponse.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 the response to a `TestDNSAnswer` request.
*/
public class TestDnsAnswerResponse private constructor(builder: Builder) {
/**
* The Amazon Route 53 name server used to respond to the request.
*/
public val nameserver: kotlin.String = requireNotNull(builder.nameserver) { "A non-null value must be provided for nameserver" }
/**
* The protocol that Amazon Route 53 used to respond to the request, either `UDP` or `TCP`.
*/
public val protocol: kotlin.String = requireNotNull(builder.protocol) { "A non-null value must be provided for protocol" }
/**
* A list that contains values that Amazon Route 53 returned for this resource record set.
*/
public val recordData: List = requireNotNull(builder.recordData) { "A non-null value must be provided for recordData" }
/**
* The name of the resource record set that you submitted a request for.
*/
public val recordName: kotlin.String = requireNotNull(builder.recordName) { "A non-null value must be provided for recordName" }
/**
* The type of the resource record set that you submitted a request for.
*/
public val recordType: aws.sdk.kotlin.services.route53.model.RrType = requireNotNull(builder.recordType) { "A non-null value must be provided for recordType" }
/**
* A code that indicates whether the request is valid or not. The most common response code is `NOERROR`, meaning that the request is valid. If the response is not valid, Amazon Route 53 returns a response code that describes the error. For a list of possible response codes, see [DNS RCODES](http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6) on the IANA website.
*/
public val responseCode: kotlin.String = requireNotNull(builder.responseCode) { "A non-null value must be provided for responseCode" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53.model.TestDnsAnswerResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TestDnsAnswerResponse(")
append("nameserver=$nameserver,")
append("protocol=$protocol,")
append("recordData=$recordData,")
append("recordName=$recordName,")
append("recordType=$recordType,")
append("responseCode=$responseCode")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = nameserver.hashCode()
result = 31 * result + (protocol.hashCode())
result = 31 * result + (recordData.hashCode())
result = 31 * result + (recordName.hashCode())
result = 31 * result + (recordType.hashCode())
result = 31 * result + (responseCode.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 TestDnsAnswerResponse
if (nameserver != other.nameserver) return false
if (protocol != other.protocol) return false
if (recordData != other.recordData) return false
if (recordName != other.recordName) return false
if (recordType != other.recordType) return false
if (responseCode != other.responseCode) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53.model.TestDnsAnswerResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Route 53 name server used to respond to the request.
*/
public var nameserver: kotlin.String? = null
/**
* The protocol that Amazon Route 53 used to respond to the request, either `UDP` or `TCP`.
*/
public var protocol: kotlin.String? = null
/**
* A list that contains values that Amazon Route 53 returned for this resource record set.
*/
public var recordData: List? = null
/**
* The name of the resource record set that you submitted a request for.
*/
public var recordName: kotlin.String? = null
/**
* The type of the resource record set that you submitted a request for.
*/
public var recordType: aws.sdk.kotlin.services.route53.model.RrType? = null
/**
* A code that indicates whether the request is valid or not. The most common response code is `NOERROR`, meaning that the request is valid. If the response is not valid, Amazon Route 53 returns a response code that describes the error. For a list of possible response codes, see [DNS RCODES](http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6) on the IANA website.
*/
public var responseCode: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53.model.TestDnsAnswerResponse) : this() {
this.nameserver = x.nameserver
this.protocol = x.protocol
this.recordData = x.recordData
this.recordName = x.recordName
this.recordType = x.recordType
this.responseCode = x.responseCode
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53.model.TestDnsAnswerResponse = TestDnsAnswerResponse(this)
internal fun correctErrors(): Builder {
if (nameserver == null) nameserver = ""
if (protocol == null) protocol = ""
if (recordData == null) recordData = emptyList()
if (recordName == null) recordName = ""
if (recordType == null) recordType = RrType.SdkUnknown("no value provided")
if (responseCode == null) responseCode = ""
return this
}
}
}