
commonMain.aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetHealthDescription.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.elasticloadbalancingv2.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Information about the health of a target.
*/
public class TargetHealthDescription private constructor(builder: Builder) {
/**
* The anomaly detection result for the target.
*
* If no anomalies were detected, the result is `normal`.
*
* If anomalies were detected, the result is `anomalous`.
*/
public val anomalyDetection: aws.sdk.kotlin.services.elasticloadbalancingv2.model.AnomalyDetection? = builder.anomalyDetection
/**
* The port to use to connect with the target.
*/
public val healthCheckPort: kotlin.String? = builder.healthCheckPort
/**
* The description of the target.
*/
public val target: aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetDescription? = builder.target
/**
* The health information for the target.
*/
public val targetHealth: aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetHealth? = builder.targetHealth
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetHealthDescription = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TargetHealthDescription(")
append("anomalyDetection=$anomalyDetection,")
append("healthCheckPort=$healthCheckPort,")
append("target=$target,")
append("targetHealth=$targetHealth")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = anomalyDetection?.hashCode() ?: 0
result = 31 * result + (healthCheckPort?.hashCode() ?: 0)
result = 31 * result + (target?.hashCode() ?: 0)
result = 31 * result + (targetHealth?.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 TargetHealthDescription
if (anomalyDetection != other.anomalyDetection) return false
if (healthCheckPort != other.healthCheckPort) return false
if (target != other.target) return false
if (targetHealth != other.targetHealth) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetHealthDescription = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The anomaly detection result for the target.
*
* If no anomalies were detected, the result is `normal`.
*
* If anomalies were detected, the result is `anomalous`.
*/
public var anomalyDetection: aws.sdk.kotlin.services.elasticloadbalancingv2.model.AnomalyDetection? = null
/**
* The port to use to connect with the target.
*/
public var healthCheckPort: kotlin.String? = null
/**
* The description of the target.
*/
public var target: aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetDescription? = null
/**
* The health information for the target.
*/
public var targetHealth: aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetHealth? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetHealthDescription) : this() {
this.anomalyDetection = x.anomalyDetection
this.healthCheckPort = x.healthCheckPort
this.target = x.target
this.targetHealth = x.targetHealth
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetHealthDescription = TargetHealthDescription(this)
/**
* construct an [aws.sdk.kotlin.services.elasticloadbalancingv2.model.AnomalyDetection] inside the given [block]
*/
public fun anomalyDetection(block: aws.sdk.kotlin.services.elasticloadbalancingv2.model.AnomalyDetection.Builder.() -> kotlin.Unit) {
this.anomalyDetection = aws.sdk.kotlin.services.elasticloadbalancingv2.model.AnomalyDetection.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetDescription] inside the given [block]
*/
public fun target(block: aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetDescription.Builder.() -> kotlin.Unit) {
this.target = aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetDescription.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetHealth] inside the given [block]
*/
public fun targetHealth(block: aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetHealth.Builder.() -> kotlin.Unit) {
this.targetHealth = aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetHealth.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy