commonMain.aws.sdk.kotlin.services.redshift.model.Subnet.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshift-jvm Show documentation
Show all versions of redshift-jvm Show documentation
The AWS SDK for Kotlin client for Redshift
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshift.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Describes a subnet.
*/
public class Subnet private constructor(builder: Builder) {
/**
*
*/
public val subnetAvailabilityZone: aws.sdk.kotlin.services.redshift.model.AvailabilityZone? = builder.subnetAvailabilityZone
/**
* The identifier of the subnet.
*/
public val subnetIdentifier: kotlin.String? = builder.subnetIdentifier
/**
* The status of the subnet.
*/
public val subnetStatus: kotlin.String? = builder.subnetStatus
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshift.model.Subnet = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Subnet(")
append("subnetAvailabilityZone=$subnetAvailabilityZone,")
append("subnetIdentifier=$subnetIdentifier,")
append("subnetStatus=$subnetStatus")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = subnetAvailabilityZone?.hashCode() ?: 0
result = 31 * result + (subnetIdentifier?.hashCode() ?: 0)
result = 31 * result + (subnetStatus?.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 Subnet
if (subnetAvailabilityZone != other.subnetAvailabilityZone) return false
if (subnetIdentifier != other.subnetIdentifier) return false
if (subnetStatus != other.subnetStatus) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.redshift.model.Subnet = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
*
*/
public var subnetAvailabilityZone: aws.sdk.kotlin.services.redshift.model.AvailabilityZone? = null
/**
* The identifier of the subnet.
*/
public var subnetIdentifier: kotlin.String? = null
/**
* The status of the subnet.
*/
public var subnetStatus: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshift.model.Subnet) : this() {
this.subnetAvailabilityZone = x.subnetAvailabilityZone
this.subnetIdentifier = x.subnetIdentifier
this.subnetStatus = x.subnetStatus
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshift.model.Subnet = Subnet(this)
/**
* construct an [aws.sdk.kotlin.services.redshift.model.AvailabilityZone] inside the given [block]
*/
public fun subnetAvailabilityZone(block: aws.sdk.kotlin.services.redshift.model.AvailabilityZone.Builder.() -> kotlin.Unit) {
this.subnetAvailabilityZone = aws.sdk.kotlin.services.redshift.model.AvailabilityZone.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}