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

commonMain.aws.sdk.kotlin.services.opensearch.model.CompatibleVersionsMap.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.opensearch.model



/**
 * A map of OpenSearch or Elasticsearch versions and the versions you can upgrade them to.
 */
public class CompatibleVersionsMap private constructor(builder: Builder) {
    /**
     * The current version that the OpenSearch Service domain is running.
     */
    public val sourceVersion: kotlin.String? = builder.sourceVersion
    /**
     * The possible versions that you can upgrade the domain to.
     */
    public val targetVersions: List? = builder.targetVersions

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

    override fun toString(): kotlin.String = buildString {
        append("CompatibleVersionsMap(")
        append("sourceVersion=$sourceVersion,")
        append("targetVersions=$targetVersions")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = sourceVersion?.hashCode() ?: 0
        result = 31 * result + (targetVersions?.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 CompatibleVersionsMap

        if (sourceVersion != other.sourceVersion) return false
        if (targetVersions != other.targetVersions) return false

        return true
    }

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

    public class Builder {
        /**
         * The current version that the OpenSearch Service domain is running.
         */
        public var sourceVersion: kotlin.String? = null
        /**
         * The possible versions that you can upgrade the domain to.
         */
        public var targetVersions: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.opensearch.model.CompatibleVersionsMap) : this() {
            this.sourceVersion = x.sourceVersion
            this.targetVersions = x.targetVersions
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy