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

commonMain.aws.sdk.kotlin.services.neptune.model.GlobalClusterMember.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

/**
 * A data structure with information about any primary and secondary clusters associated with an Neptune global database.
 */
public class GlobalClusterMember private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) for each Neptune cluster.
     */
    public val dbClusterArn: kotlin.String? = builder.dbClusterArn
    /**
     * Specifies whether the Neptune cluster is the primary cluster (that is, has read-write capability) for the Neptune global database with which it is associated.
     */
    public val isWriter: kotlin.Boolean? = builder.isWriter
    /**
     * The Amazon Resource Name (ARN) for each read-only secondary cluster associated with the Neptune global database.
     */
    public val readers: List? = builder.readers

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

    override fun toString(): kotlin.String = buildString {
        append("GlobalClusterMember(")
        append("dbClusterArn=$dbClusterArn,")
        append("isWriter=$isWriter,")
        append("readers=$readers")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dbClusterArn?.hashCode() ?: 0
        result = 31 * result + (isWriter?.hashCode() ?: 0)
        result = 31 * result + (readers?.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 GlobalClusterMember

        if (dbClusterArn != other.dbClusterArn) return false
        if (isWriter != other.isWriter) return false
        if (readers != other.readers) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) for each Neptune cluster.
         */
        public var dbClusterArn: kotlin.String? = null
        /**
         * Specifies whether the Neptune cluster is the primary cluster (that is, has read-write capability) for the Neptune global database with which it is associated.
         */
        public var isWriter: kotlin.Boolean? = null
        /**
         * The Amazon Resource Name (ARN) for each read-only secondary cluster associated with the Neptune global database.
         */
        public var readers: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.neptune.model.GlobalClusterMember) : this() {
            this.dbClusterArn = x.dbClusterArn
            this.isWriter = x.isWriter
            this.readers = x.readers
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy