commonMain.aws.sdk.kotlin.services.neptunegraph.model.CreateGraphSnapshotResponse.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
public class CreateGraphSnapshotResponse private constructor(builder: Builder) {
/**
* The ARN of the snapshot created.
*/
public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
/**
* The ID of the snapshot created.
*/
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 graph data.
*/
public val kmsKeyIdentifier: kotlin.String? = builder.kmsKeyIdentifier
/**
* The name of the snapshot created.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The snapshot creation time
*/
public val snapshotCreateTime: aws.smithy.kotlin.runtime.time.Instant? = builder.snapshotCreateTime
/**
* The Id of the Neptune Analytics graph from which the snapshot is created.
*/
public val sourceGraphId: kotlin.String? = builder.sourceGraphId
/**
* The current state of the 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.CreateGraphSnapshotResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateGraphSnapshotResponse(")
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 CreateGraphSnapshotResponse
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.CreateGraphSnapshotResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ARN of the snapshot created.
*/
public var arn: kotlin.String? = null
/**
* The ID of the snapshot created.
*/
public var id: kotlin.String? = null
/**
* The ID of the KMS key used to encrypt and decrypt graph data.
*/
public var kmsKeyIdentifier: kotlin.String? = null
/**
* The name of the snapshot created.
*/
public var name: kotlin.String? = null
/**
* The snapshot creation time
*/
public var snapshotCreateTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The Id of the Neptune Analytics graph from which the snapshot is created.
*/
public var sourceGraphId: kotlin.String? = null
/**
* The current state of the 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.CreateGraphSnapshotResponse) : 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.CreateGraphSnapshotResponse = CreateGraphSnapshotResponse(this)
internal fun correctErrors(): Builder {
if (arn == null) arn = ""
if (id == null) id = ""
if (name == null) name = ""
return this
}
}
}