commonMain.aws.sdk.kotlin.services.account.model.Region.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of account-jvm Show documentation
Show all versions of account-jvm Show documentation
The AWS SDK for Kotlin client for Account
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.account.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* This is a structure that expresses the Region for a given account, consisting of a name and opt-in status.
*/
public class Region private constructor(builder: Builder) {
/**
* The Region code of a given Region (for example, `us-east-1`).
*/
public val regionName: kotlin.String? = builder.regionName
/**
* One of potential statuses a Region can undergo (Enabled, Enabling, Disabled, Disabling, Enabled_By_Default).
*/
public val regionOptStatus: aws.sdk.kotlin.services.account.model.RegionOptStatus? = builder.regionOptStatus
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.account.model.Region = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Region(")
append("regionName=$regionName,")
append("regionOptStatus=$regionOptStatus")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = regionName?.hashCode() ?: 0
result = 31 * result + (regionOptStatus?.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 Region
if (regionName != other.regionName) return false
if (regionOptStatus != other.regionOptStatus) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.account.model.Region = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Region code of a given Region (for example, `us-east-1`).
*/
public var regionName: kotlin.String? = null
/**
* One of potential statuses a Region can undergo (Enabled, Enabling, Disabled, Disabling, Enabled_By_Default).
*/
public var regionOptStatus: aws.sdk.kotlin.services.account.model.RegionOptStatus? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.account.model.Region) : this() {
this.regionName = x.regionName
this.regionOptStatus = x.regionOptStatus
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.account.model.Region = Region(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy