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

commonMain.aws.sdk.kotlin.services.neptune.model.DbClusterSnapshotAttribute.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 the name and values of a manual DB cluster snapshot attribute.
 *
 * Manual DB cluster snapshot attributes are used to authorize other Amazon accounts to restore a manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute API action.
 */
public class DbClusterSnapshotAttribute private constructor(builder: Builder) {
    /**
     * The name of the manual DB cluster snapshot attribute.
     *
     * The attribute named `restore` refers to the list of Amazon accounts that have permission to copy or restore the manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute API action.
     */
    public val attributeName: kotlin.String? = builder.attributeName
    /**
     * The value(s) for the manual DB cluster snapshot attribute.
     *
     * If the `AttributeName` field is set to `restore`, then this element returns a list of IDs of the Amazon accounts that are authorized to copy or restore the manual DB cluster snapshot. If a value of `all` is in the list, then the manual DB cluster snapshot is public and available for any Amazon account to copy or restore.
     */
    public val attributeValues: List? = builder.attributeValues

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

    override fun toString(): kotlin.String = buildString {
        append("DbClusterSnapshotAttribute(")
        append("attributeName=$attributeName,")
        append("attributeValues=$attributeValues")
        append(")")
    }

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

        if (attributeName != other.attributeName) return false
        if (attributeValues != other.attributeValues) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the manual DB cluster snapshot attribute.
         *
         * The attribute named `restore` refers to the list of Amazon accounts that have permission to copy or restore the manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute API action.
         */
        public var attributeName: kotlin.String? = null
        /**
         * The value(s) for the manual DB cluster snapshot attribute.
         *
         * If the `AttributeName` field is set to `restore`, then this element returns a list of IDs of the Amazon accounts that are authorized to copy or restore the manual DB cluster snapshot. If a value of `all` is in the list, then the manual DB cluster snapshot is public and available for any Amazon account to copy or restore.
         */
        public var attributeValues: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.neptune.model.DbClusterSnapshotAttribute) : this() {
            this.attributeName = x.attributeName
            this.attributeValues = x.attributeValues
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy