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

commonMain.aws.sdk.kotlin.services.neptunegraph.model.GraphSnapshotSummary.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
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Details about a graph snapshot.
 */
public class GraphSnapshotSummary private constructor(builder: Builder) {
    /**
     * The ARN of the graph snapshot.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The unique identifier of the graph snapshot.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The ID of the KMS key used to encrypt and decrypt the snapshot.
     */
    public val kmsKeyIdentifier: kotlin.String? = builder.kmsKeyIdentifier
    /**
     * 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 name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The time when the snapshot was created.
     */
    public val snapshotCreateTime: aws.smithy.kotlin.runtime.time.Instant? = builder.snapshotCreateTime
    /**
     * The graph identifier for the graph for which a snapshot is to be created.
     */
    public val sourceGraphId: kotlin.String? = builder.sourceGraphId
    /**
     * The status of the graph snapshot.
     */
    public val status: aws.sdk.kotlin.services.neptunegraph.model.SnapshotStatus? = builder.status

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

    override fun toString(): kotlin.String = buildString {
        append("GraphSnapshotSummary(")
        append("arn=$arn,")
        append("id=$id,")
        append("kmsKeyIdentifier=$kmsKeyIdentifier,")
        append("name=$name,")
        append("snapshotCreateTime=$snapshotCreateTime,")
        append("sourceGraphId=$sourceGraphId,")
        append("status=$status")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (id.hashCode())
        result = 31 * result + (kmsKeyIdentifier?.hashCode() ?: 0)
        result = 31 * result + (name.hashCode())
        result = 31 * result + (snapshotCreateTime?.hashCode() ?: 0)
        result = 31 * result + (sourceGraphId?.hashCode() ?: 0)
        result = 31 * result + (status?.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 GraphSnapshotSummary

        if (arn != other.arn) return false
        if (id != other.id) return false
        if (kmsKeyIdentifier != other.kmsKeyIdentifier) return false
        if (name != other.name) return false
        if (snapshotCreateTime != other.snapshotCreateTime) return false
        if (sourceGraphId != other.sourceGraphId) return false
        if (status != other.status) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ARN of the graph snapshot.
         */
        public var arn: kotlin.String? = null
        /**
         * The unique identifier of the graph snapshot.
         */
        public var id: kotlin.String? = null
        /**
         * The ID of the KMS key used to encrypt and decrypt the snapshot.
         */
        public var kmsKeyIdentifier: 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 name: kotlin.String? = null
        /**
         * The time when the snapshot was created.
         */
        public var snapshotCreateTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The graph identifier for the graph for which a snapshot is to be created.
         */
        public var sourceGraphId: kotlin.String? = null
        /**
         * The status of the graph snapshot.
         */
        public var status: aws.sdk.kotlin.services.neptunegraph.model.SnapshotStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.neptunegraph.model.GraphSnapshotSummary) : this() {
            this.arn = x.arn
            this.id = x.id
            this.kmsKeyIdentifier = x.kmsKeyIdentifier
            this.name = x.name
            this.snapshotCreateTime = x.snapshotCreateTime
            this.sourceGraphId = x.sourceGraphId
            this.status = x.status
        }

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

        internal fun correctErrors(): Builder {
            if (arn == null) arn = ""
            if (id == null) id = ""
            if (name == null) name = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy