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

commonMain.aws.sdk.kotlin.services.neptune.model.DbClusterMember.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.neptune.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains information about an instance that is part of a DB cluster.
 */
public class DbClusterMember private constructor(builder: Builder) {
    /**
     * Specifies the status of the DB cluster parameter group for this member of the DB cluster.
     */
    public val dbClusterParameterGroupStatus: kotlin.String? = builder.dbClusterParameterGroupStatus
    /**
     * Specifies the instance identifier for this member of the DB cluster.
     */
    public val dbInstanceIdentifier: kotlin.String? = builder.dbInstanceIdentifier
    /**
     * Value that is `true` if the cluster member is the primary instance for the DB cluster and `false` otherwise.
     */
    public val isClusterWriter: kotlin.Boolean? = builder.isClusterWriter
    /**
     * A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
     */
    public val promotionTier: kotlin.Int? = builder.promotionTier

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

    override fun toString(): kotlin.String = buildString {
        append("DbClusterMember(")
        append("dbClusterParameterGroupStatus=$dbClusterParameterGroupStatus,")
        append("dbInstanceIdentifier=$dbInstanceIdentifier,")
        append("isClusterWriter=$isClusterWriter,")
        append("promotionTier=$promotionTier")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dbClusterParameterGroupStatus?.hashCode() ?: 0
        result = 31 * result + (dbInstanceIdentifier?.hashCode() ?: 0)
        result = 31 * result + (isClusterWriter?.hashCode() ?: 0)
        result = 31 * result + (promotionTier ?: 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 DbClusterMember

        if (dbClusterParameterGroupStatus != other.dbClusterParameterGroupStatus) return false
        if (dbInstanceIdentifier != other.dbInstanceIdentifier) return false
        if (isClusterWriter != other.isClusterWriter) return false
        if (promotionTier != other.promotionTier) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies the status of the DB cluster parameter group for this member of the DB cluster.
         */
        public var dbClusterParameterGroupStatus: kotlin.String? = null
        /**
         * Specifies the instance identifier for this member of the DB cluster.
         */
        public var dbInstanceIdentifier: kotlin.String? = null
        /**
         * Value that is `true` if the cluster member is the primary instance for the DB cluster and `false` otherwise.
         */
        public var isClusterWriter: kotlin.Boolean? = null
        /**
         * A value that specifies the order in which a Read Replica is promoted to the primary instance after a failure of the existing primary instance.
         */
        public var promotionTier: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.neptune.model.DbClusterMember) : this() {
            this.dbClusterParameterGroupStatus = x.dbClusterParameterGroupStatus
            this.dbInstanceIdentifier = x.dbInstanceIdentifier
            this.isClusterWriter = x.isClusterWriter
            this.promotionTier = x.promotionTier
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy