commonMain.aws.sdk.kotlin.services.route53recoveryreadiness.model.TargetResource.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of route53recoveryreadiness-jvm Show documentation
Show all versions of route53recoveryreadiness-jvm Show documentation
The AWS SDK for Kotlin client for Route53 Recovery Readiness
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53recoveryreadiness.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The target resource that the Route 53 record points to.
*/
public class TargetResource private constructor(builder: Builder) {
/**
* The Network Load Balancer Resource.
*/
public val nlbResource: aws.sdk.kotlin.services.route53recoveryreadiness.model.NlbResource? = builder.nlbResource
/**
* The Route 53 resource.
*/
public val r53Resource: aws.sdk.kotlin.services.route53recoveryreadiness.model.R53ResourceRecord? = builder.r53Resource
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.route53recoveryreadiness.model.TargetResource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TargetResource(")
append("nlbResource=$nlbResource,")
append("r53Resource=$r53Resource")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = nlbResource?.hashCode() ?: 0
result = 31 * result + (r53Resource?.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 TargetResource
if (nlbResource != other.nlbResource) return false
if (r53Resource != other.r53Resource) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.route53recoveryreadiness.model.TargetResource = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Network Load Balancer Resource.
*/
public var nlbResource: aws.sdk.kotlin.services.route53recoveryreadiness.model.NlbResource? = null
/**
* The Route 53 resource.
*/
public var r53Resource: aws.sdk.kotlin.services.route53recoveryreadiness.model.R53ResourceRecord? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.route53recoveryreadiness.model.TargetResource) : this() {
this.nlbResource = x.nlbResource
this.r53Resource = x.r53Resource
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.route53recoveryreadiness.model.TargetResource = TargetResource(this)
/**
* construct an [aws.sdk.kotlin.services.route53recoveryreadiness.model.NlbResource] inside the given [block]
*/
public fun nlbResource(block: aws.sdk.kotlin.services.route53recoveryreadiness.model.NlbResource.Builder.() -> kotlin.Unit) {
this.nlbResource = aws.sdk.kotlin.services.route53recoveryreadiness.model.NlbResource.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.route53recoveryreadiness.model.R53ResourceRecord] inside the given [block]
*/
public fun r53Resource(block: aws.sdk.kotlin.services.route53recoveryreadiness.model.R53ResourceRecord.Builder.() -> kotlin.Unit) {
this.r53Resource = aws.sdk.kotlin.services.route53recoveryreadiness.model.R53ResourceRecord.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}