commonMain.aws.sdk.kotlin.services.neptune.model.Subnet.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neptune-jvm Show documentation
Show all versions of neptune-jvm Show documentation
The AWS SDK for Kotlin client for Neptune
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.neptune.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies a subnet.
*
* This data type is used as a response element in the DescribeDBSubnetGroups action.
*/
public class Subnet private constructor(builder: Builder) {
/**
* Specifies the EC2 Availability Zone that the subnet is in.
*/
public val subnetAvailabilityZone: aws.sdk.kotlin.services.neptune.model.AvailabilityZone? = builder.subnetAvailabilityZone
/**
* Specifies the identifier of the subnet.
*/
public val subnetIdentifier: kotlin.String? = builder.subnetIdentifier
/**
* Specifies 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.neptune.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.neptune.model.Subnet = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies the EC2 Availability Zone that the subnet is in.
*/
public var subnetAvailabilityZone: aws.sdk.kotlin.services.neptune.model.AvailabilityZone? = null
/**
* Specifies the identifier of the subnet.
*/
public var subnetIdentifier: kotlin.String? = null
/**
* Specifies the status of the subnet.
*/
public var subnetStatus: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.neptune.model.Subnet) : this() {
this.subnetAvailabilityZone = x.subnetAvailabilityZone
this.subnetIdentifier = x.subnetIdentifier
this.subnetStatus = x.subnetStatus
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.neptune.model.Subnet = Subnet(this)
/**
* construct an [aws.sdk.kotlin.services.neptune.model.AvailabilityZone] inside the given [block]
*/
public fun subnetAvailabilityZone(block: aws.sdk.kotlin.services.neptune.model.AvailabilityZone.Builder.() -> kotlin.Unit) {
this.subnetAvailabilityZone = aws.sdk.kotlin.services.neptune.model.AvailabilityZone.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}