commonMain.aws.sdk.kotlin.services.eventbridge.model.Primary.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eventbridge-jvm Show documentation
Show all versions of eventbridge-jvm Show documentation
The AWS SDK for Kotlin client for EventBridge
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.eventbridge.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The primary Region of the endpoint.
*/
public class Primary private constructor(builder: Builder) {
/**
* The ARN of the health check used by the endpoint to determine whether failover is triggered.
*/
public val healthCheck: kotlin.String = requireNotNull(builder.healthCheck) { "A non-null value must be provided for healthCheck" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.eventbridge.model.Primary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Primary(")
append("healthCheck=$healthCheck")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = healthCheck.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 Primary
if (healthCheck != other.healthCheck) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.eventbridge.model.Primary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ARN of the health check used by the endpoint to determine whether failover is triggered.
*/
public var healthCheck: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.eventbridge.model.Primary) : this() {
this.healthCheck = x.healthCheck
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.eventbridge.model.Primary = Primary(this)
internal fun correctErrors(): Builder {
if (healthCheck == null) healthCheck = ""
return this
}
}
}