All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.account.model.Region.kt Maven / Gradle / Ivy

There is a newer version: 1.4.1
Show newest version
// 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