commonMain.aws.sdk.kotlin.services.vpclattice.model.CreateTargetGroupResponse.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
public class CreateTargetGroupResponse private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the target group.
*/
public val arn: kotlin.String? = builder.arn
/**
* The target group configuration.
*/
public val config: aws.sdk.kotlin.services.vpclattice.model.TargetGroupConfig? = builder.config
/**
* The ID of the target group.
*/
public val id: kotlin.String? = builder.id
/**
* The name of the target group.
*/
public val name: kotlin.String? = builder.name
/**
* The status. You can retry the operation if the status is `CREATE_FAILED`. However, if you retry it while the status is `CREATE_IN_PROGRESS`, there is no change in the status.
*/
public val status: aws.sdk.kotlin.services.vpclattice.model.TargetGroupStatus? = builder.status
/**
* The type of target group.
*/
public val type: aws.sdk.kotlin.services.vpclattice.model.TargetGroupType? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.vpclattice.model.CreateTargetGroupResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateTargetGroupResponse(")
append("arn=$arn,")
append("config=$config,")
append("id=$id,")
append("name=$name,")
append("status=$status,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn?.hashCode() ?: 0
result = 31 * result + (config?.hashCode() ?: 0)
result = 31 * result + (id?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (status?.hashCode() ?: 0)
result = 31 * result + (type?.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 CreateTargetGroupResponse
if (arn != other.arn) return false
if (config != other.config) return false
if (id != other.id) return false
if (name != other.name) return false
if (status != other.status) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.vpclattice.model.CreateTargetGroupResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the target group.
*/
public var arn: kotlin.String? = null
/**
* The target group configuration.
*/
public var config: aws.sdk.kotlin.services.vpclattice.model.TargetGroupConfig? = null
/**
* The ID of the target group.
*/
public var id: kotlin.String? = null
/**
* The name of the target group.
*/
public var name: kotlin.String? = null
/**
* The status. You can retry the operation if the status is `CREATE_FAILED`. However, if you retry it while the status is `CREATE_IN_PROGRESS`, there is no change in the status.
*/
public var status: aws.sdk.kotlin.services.vpclattice.model.TargetGroupStatus? = null
/**
* The type of target group.
*/
public var type: aws.sdk.kotlin.services.vpclattice.model.TargetGroupType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.vpclattice.model.CreateTargetGroupResponse) : this() {
this.arn = x.arn
this.config = x.config
this.id = x.id
this.name = x.name
this.status = x.status
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.vpclattice.model.CreateTargetGroupResponse = CreateTargetGroupResponse(this)
/**
* construct an [aws.sdk.kotlin.services.vpclattice.model.TargetGroupConfig] inside the given [block]
*/
public fun config(block: aws.sdk.kotlin.services.vpclattice.model.TargetGroupConfig.Builder.() -> kotlin.Unit) {
this.config = aws.sdk.kotlin.services.vpclattice.model.TargetGroupConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}