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

commonMain.aws.sdk.kotlin.services.neptunegraph.model.CreateGraphSnapshotRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.neptunegraph.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateGraphSnapshotRequest private constructor(builder: Builder) {
    /**
     * The unique identifier of the Neptune Analytics graph.
     */
    public val graphIdentifier: kotlin.String? = builder.graphIdentifier
    /**
     * The snapshot name. For example: `my-snapshot-1`.
     *
     * The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens.
     */
    public val snapshotName: kotlin.String? = builder.snapshotName
    /**
     * Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.
     */
    public val tags: Map? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateGraphSnapshotRequest(")
        append("graphIdentifier=$graphIdentifier,")
        append("snapshotName=$snapshotName,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = graphIdentifier?.hashCode() ?: 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 CreateGraphSnapshotRequest

        if (graphIdentifier != other.graphIdentifier) 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.neptunegraph.model.CreateGraphSnapshotRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The unique identifier of the Neptune Analytics graph.
         */
        public var graphIdentifier: kotlin.String? = null
        /**
         * The snapshot name. For example: `my-snapshot-1`.
         *
         * The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens.
         */
        public var snapshotName: kotlin.String? = null
        /**
         * Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.neptunegraph.model.CreateGraphSnapshotRequest) : this() {
            this.graphIdentifier = x.graphIdentifier
            this.snapshotName = x.snapshotName
            this.tags = x.tags
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy