commonMain.aws.sdk.kotlin.services.fsx.model.CreateSnapshotRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fsx-jvm Show documentation
Show all versions of fsx-jvm Show documentation
The AWS SDK for Kotlin client for FSx
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.fsx.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateSnapshotRequest private constructor(builder: Builder) {
/**
* (Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.
*/
public val clientRequestToken: kotlin.String? = builder.clientRequestToken
/**
* The name of the snapshot.
*/
public val name: kotlin.String? = builder.name
/**
* A list of `Tag` values, with a maximum of 50 elements.
*/
public val tags: List? = builder.tags
/**
* The ID of the volume that you are taking a snapshot of.
*/
public val volumeId: kotlin.String? = builder.volumeId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.fsx.model.CreateSnapshotRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateSnapshotRequest(")
append("clientRequestToken=$clientRequestToken,")
append("name=$name,")
append("tags=$tags,")
append("volumeId=$volumeId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientRequestToken?.hashCode() ?: 0
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (volumeId?.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 (clientRequestToken != other.clientRequestToken) return false
if (name != other.name) return false
if (tags != other.tags) return false
if (volumeId != other.volumeId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.fsx.model.CreateSnapshotRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* (Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.
*/
public var clientRequestToken: kotlin.String? = null
/**
* The name of the snapshot.
*/
public var name: kotlin.String? = null
/**
* A list of `Tag` values, with a maximum of 50 elements.
*/
public var tags: List? = null
/**
* The ID of the volume that you are taking a snapshot of.
*/
public var volumeId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.fsx.model.CreateSnapshotRequest) : this() {
this.clientRequestToken = x.clientRequestToken
this.name = x.name
this.tags = x.tags
this.volumeId = x.volumeId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.fsx.model.CreateSnapshotRequest = CreateSnapshotRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}