
commonMain.aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetGroupTuple.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 how traffic will be distributed between multiple target groups in a forward rule.
*/
public class TargetGroupTuple private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the target group.
*/
public val targetGroupArn: kotlin.String? = builder.targetGroupArn
/**
* The weight. The range is 0 to 999.
*/
public val weight: kotlin.Int? = builder.weight
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetGroupTuple = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TargetGroupTuple(")
append("targetGroupArn=$targetGroupArn,")
append("weight=$weight")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = targetGroupArn?.hashCode() ?: 0
result = 31 * result + (weight ?: 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 TargetGroupTuple
if (targetGroupArn != other.targetGroupArn) return false
if (weight != other.weight) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetGroupTuple = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the target group.
*/
public var targetGroupArn: kotlin.String? = null
/**
* The weight. The range is 0 to 999.
*/
public var weight: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetGroupTuple) : this() {
this.targetGroupArn = x.targetGroupArn
this.weight = x.weight
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.elasticloadbalancingv2.model.TargetGroupTuple = TargetGroupTuple(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy