commonMain.aws.sdk.kotlin.services.vpclattice.model.TargetFailure.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vpclattice-jvm Show documentation
Show all versions of vpclattice-jvm Show documentation
The AWS SDK for Kotlin client for VPC Lattice
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.vpclattice.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Describes a target failure.
*/
public class TargetFailure private constructor(builder: Builder) {
/**
* The failure code.
*/
public val failureCode: kotlin.String? = builder.failureCode
/**
* The failure message.
*/
public val failureMessage: kotlin.String? = builder.failureMessage
/**
* The ID of the target. If the target group type is `INSTANCE`, this is an instance ID. If the target group type is `IP`, this is an IP address. If the target group type is `LAMBDA`, this is the ARN of a Lambda function. If the target group type is `ALB`, this is the ARN of an Application Load Balancer.
*/
public val id: kotlin.String? = builder.id
/**
* The port on which the target is listening. This parameter doesn't apply if the target is a Lambda function.
*/
public val port: kotlin.Int? = builder.port
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.vpclattice.model.TargetFailure = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TargetFailure(")
append("failureCode=$failureCode,")
append("failureMessage=$failureMessage,")
append("id=$id,")
append("port=$port")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = failureCode?.hashCode() ?: 0
result = 31 * result + (failureMessage?.hashCode() ?: 0)
result = 31 * result + (id?.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 TargetFailure
if (failureCode != other.failureCode) return false
if (failureMessage != other.failureMessage) return false
if (id != other.id) return false
if (port != other.port) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.vpclattice.model.TargetFailure = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The failure code.
*/
public var failureCode: kotlin.String? = null
/**
* The failure message.
*/
public var failureMessage: kotlin.String? = null
/**
* The ID of the target. If the target group type is `INSTANCE`, this is an instance ID. If the target group type is `IP`, this is an IP address. If the target group type is `LAMBDA`, this is the ARN of a Lambda function. If the target group type is `ALB`, this is the ARN of an Application Load Balancer.
*/
public var id: kotlin.String? = null
/**
* The port on which the target is listening. This parameter doesn't apply if the target is a Lambda function.
*/
public var port: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.vpclattice.model.TargetFailure) : this() {
this.failureCode = x.failureCode
this.failureMessage = x.failureMessage
this.id = x.id
this.port = x.port
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.vpclattice.model.TargetFailure = TargetFailure(this)
internal fun correctErrors(): Builder {
return this
}
}
}