
commonMain.aws.sdk.kotlin.services.route53resolver.model.TargetAddress.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53resolver.model
/**
* In a [CreateResolverRule](https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_CreateResolverRule.html) request, an array of the IPs that you want to forward DNS queries to.
*/
public class TargetAddress private constructor(builder: Builder) {
/**
* One IPv4 address that you want to forward DNS queries to.
*/
public val ip: kotlin.String? = builder.ip
/**
* One IPv6 address that you want to forward DNS queries to.
*/
public val ipv6: kotlin.String? = builder.ipv6
/**
* The port at `Ip` that you want to forward DNS queries to.
*/
public val port: kotlin.Int? = builder.port
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53resolver.model.TargetAddress = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TargetAddress(")
append("ip=$ip,")
append("ipv6=$ipv6,")
append("port=$port")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = ip?.hashCode() ?: 0
result = 31 * result + (ipv6?.hashCode() ?: 0)
result = 31 * result + (port ?: 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 TargetAddress
if (ip != other.ip) return false
if (ipv6 != other.ipv6) return false
if (port != other.port) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53resolver.model.TargetAddress = Builder(this).apply(block).build()
public class Builder {
/**
* One IPv4 address that you want to forward DNS queries to.
*/
public var ip: kotlin.String? = null
/**
* One IPv6 address that you want to forward DNS queries to.
*/
public var ipv6: kotlin.String? = null
/**
* The port at `Ip` that you want to forward DNS queries to.
*/
public var port: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53resolver.model.TargetAddress) : this() {
this.ip = x.ip
this.ipv6 = x.ipv6
this.port = x.port
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53resolver.model.TargetAddress = TargetAddress(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy