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

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

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.lightsail.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes the Amazon Web Services Region.
 */
public class Region private constructor(builder: Builder) {
    /**
     * The Availability Zones. Follows the format `us-east-2a` (case-sensitive).
     */
    public val availabilityZones: List? = builder.availabilityZones
    /**
     * The continent code (`NA`, meaning North America).
     */
    public val continentCode: kotlin.String? = builder.continentCode
    /**
     * The description of the Amazon Web Services Region (`This region is recommended to serve users in the eastern United States and eastern Canada`).
     */
    public val description: kotlin.String? = builder.description
    /**
     * The display name (`Ohio`).
     */
    public val displayName: kotlin.String? = builder.displayName
    /**
     * The region name (`us-east-2`).
     */
    public val name: aws.sdk.kotlin.services.lightsail.model.RegionName? = builder.name
    /**
     * The Availability Zones for databases. Follows the format `us-east-2a` (case-sensitive).
     */
    public val relationalDatabaseAvailabilityZones: List? = builder.relationalDatabaseAvailabilityZones

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lightsail.model.Region = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("Region(")
        append("availabilityZones=$availabilityZones,")
        append("continentCode=$continentCode,")
        append("description=$description,")
        append("displayName=$displayName,")
        append("name=$name,")
        append("relationalDatabaseAvailabilityZones=$relationalDatabaseAvailabilityZones")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = availabilityZones?.hashCode() ?: 0
        result = 31 * result + (continentCode?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (displayName?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (relationalDatabaseAvailabilityZones?.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 (availabilityZones != other.availabilityZones) return false
        if (continentCode != other.continentCode) return false
        if (description != other.description) return false
        if (displayName != other.displayName) return false
        if (name != other.name) return false
        if (relationalDatabaseAvailabilityZones != other.relationalDatabaseAvailabilityZones) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.Region = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The Availability Zones. Follows the format `us-east-2a` (case-sensitive).
         */
        public var availabilityZones: List? = null
        /**
         * The continent code (`NA`, meaning North America).
         */
        public var continentCode: kotlin.String? = null
        /**
         * The description of the Amazon Web Services Region (`This region is recommended to serve users in the eastern United States and eastern Canada`).
         */
        public var description: kotlin.String? = null
        /**
         * The display name (`Ohio`).
         */
        public var displayName: kotlin.String? = null
        /**
         * The region name (`us-east-2`).
         */
        public var name: aws.sdk.kotlin.services.lightsail.model.RegionName? = null
        /**
         * The Availability Zones for databases. Follows the format `us-east-2a` (case-sensitive).
         */
        public var relationalDatabaseAvailabilityZones: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lightsail.model.Region) : this() {
            this.availabilityZones = x.availabilityZones
            this.continentCode = x.continentCode
            this.description = x.description
            this.displayName = x.displayName
            this.name = x.name
            this.relationalDatabaseAvailabilityZones = x.relationalDatabaseAvailabilityZones
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.lightsail.model.Region = Region(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy