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

commonMain.aws.sdk.kotlin.services.redshift.model.OrderableClusterOption.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.redshift.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes an orderable cluster option.
 */
public class OrderableClusterOption private constructor(builder: Builder) {
    /**
     * A list of availability zones for the orderable cluster.
     */
    public val availabilityZones: List? = builder.availabilityZones
    /**
     * The cluster type, for example `multi-node`.
     */
    public val clusterType: kotlin.String? = builder.clusterType
    /**
     * The version of the orderable cluster.
     */
    public val clusterVersion: kotlin.String? = builder.clusterVersion
    /**
     * The node type for the orderable cluster.
     */
    public val nodeType: kotlin.String? = builder.nodeType

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

    override fun toString(): kotlin.String = buildString {
        append("OrderableClusterOption(")
        append("availabilityZones=$availabilityZones,")
        append("clusterType=$clusterType,")
        append("clusterVersion=$clusterVersion,")
        append("nodeType=$nodeType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = availabilityZones?.hashCode() ?: 0
        result = 31 * result + (clusterType?.hashCode() ?: 0)
        result = 31 * result + (clusterVersion?.hashCode() ?: 0)
        result = 31 * result + (nodeType?.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 OrderableClusterOption

        if (availabilityZones != other.availabilityZones) return false
        if (clusterType != other.clusterType) return false
        if (clusterVersion != other.clusterVersion) return false
        if (nodeType != other.nodeType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A list of availability zones for the orderable cluster.
         */
        public var availabilityZones: List? = null
        /**
         * The cluster type, for example `multi-node`.
         */
        public var clusterType: kotlin.String? = null
        /**
         * The version of the orderable cluster.
         */
        public var clusterVersion: kotlin.String? = null
        /**
         * The node type for the orderable cluster.
         */
        public var nodeType: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.redshift.model.OrderableClusterOption) : this() {
            this.availabilityZones = x.availabilityZones
            this.clusterType = x.clusterType
            this.clusterVersion = x.clusterVersion
            this.nodeType = x.nodeType
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy