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

commonMain.aws.sdk.kotlin.services.redshiftserverless.model.CreateSnapshotRequest.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.redshiftserverless.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateSnapshotRequest private constructor(builder: Builder) {
    /**
     * The namespace to create a snapshot for.
     */
    public val namespaceName: kotlin.String? = builder.namespaceName
    /**
     * How long to retain the created snapshot.
     */
    public val retentionPeriod: kotlin.Int? = builder.retentionPeriod
    /**
     * The name of the snapshot.
     */
    public val snapshotName: kotlin.String? = builder.snapshotName
    /**
     * An array of [Tag objects](https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_Tag.html) to associate with the snapshot.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateSnapshotRequest(")
        append("namespaceName=$namespaceName,")
        append("retentionPeriod=$retentionPeriod,")
        append("snapshotName=$snapshotName,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = namespaceName?.hashCode() ?: 0
        result = 31 * result + (retentionPeriod ?: 0)
        result = 31 * result + (snapshotName?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 CreateSnapshotRequest

        if (namespaceName != other.namespaceName) return false
        if (retentionPeriod != other.retentionPeriod) return false
        if (snapshotName != other.snapshotName) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The namespace to create a snapshot for.
         */
        public var namespaceName: kotlin.String? = null
        /**
         * How long to retain the created snapshot.
         */
        public var retentionPeriod: kotlin.Int? = null
        /**
         * The name of the snapshot.
         */
        public var snapshotName: kotlin.String? = null
        /**
         * An array of [Tag objects](https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_Tag.html) to associate with the snapshot.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.redshiftserverless.model.CreateSnapshotRequest) : this() {
            this.namespaceName = x.namespaceName
            this.retentionPeriod = x.retentionPeriod
            this.snapshotName = x.snapshotName
            this.tags = x.tags
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy