commonMain.aws.sdk.kotlin.services.fsx.model.DeleteVolumeRequest.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 DeleteVolumeRequest 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
/**
* For Amazon FSx for ONTAP volumes, specify whether to take a final backup of the volume and apply tags to the backup. To apply tags to the backup, you must have the `fsx:TagResource` permission.
*/
public val ontapConfiguration: aws.sdk.kotlin.services.fsx.model.DeleteVolumeOntapConfiguration? = builder.ontapConfiguration
/**
* For Amazon FSx for OpenZFS volumes, specify whether to delete all child volumes and snapshots.
*/
public val openZfsConfiguration: aws.sdk.kotlin.services.fsx.model.DeleteVolumeOpenZfsConfiguration? = builder.openZfsConfiguration
/**
* The ID of the volume that you are deleting.
*/
public val volumeId: kotlin.String? = builder.volumeId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.fsx.model.DeleteVolumeRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DeleteVolumeRequest(")
append("clientRequestToken=$clientRequestToken,")
append("ontapConfiguration=$ontapConfiguration,")
append("openZfsConfiguration=$openZfsConfiguration,")
append("volumeId=$volumeId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientRequestToken?.hashCode() ?: 0
result = 31 * result + (ontapConfiguration?.hashCode() ?: 0)
result = 31 * result + (openZfsConfiguration?.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 DeleteVolumeRequest
if (clientRequestToken != other.clientRequestToken) return false
if (ontapConfiguration != other.ontapConfiguration) return false
if (openZfsConfiguration != other.openZfsConfiguration) return false
if (volumeId != other.volumeId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.fsx.model.DeleteVolumeRequest = 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
/**
* For Amazon FSx for ONTAP volumes, specify whether to take a final backup of the volume and apply tags to the backup. To apply tags to the backup, you must have the `fsx:TagResource` permission.
*/
public var ontapConfiguration: aws.sdk.kotlin.services.fsx.model.DeleteVolumeOntapConfiguration? = null
/**
* For Amazon FSx for OpenZFS volumes, specify whether to delete all child volumes and snapshots.
*/
public var openZfsConfiguration: aws.sdk.kotlin.services.fsx.model.DeleteVolumeOpenZfsConfiguration? = null
/**
* The ID of the volume that you are deleting.
*/
public var volumeId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.fsx.model.DeleteVolumeRequest) : this() {
this.clientRequestToken = x.clientRequestToken
this.ontapConfiguration = x.ontapConfiguration
this.openZfsConfiguration = x.openZfsConfiguration
this.volumeId = x.volumeId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.fsx.model.DeleteVolumeRequest = DeleteVolumeRequest(this)
/**
* construct an [aws.sdk.kotlin.services.fsx.model.DeleteVolumeOntapConfiguration] inside the given [block]
*/
public fun ontapConfiguration(block: aws.sdk.kotlin.services.fsx.model.DeleteVolumeOntapConfiguration.Builder.() -> kotlin.Unit) {
this.ontapConfiguration = aws.sdk.kotlin.services.fsx.model.DeleteVolumeOntapConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.fsx.model.DeleteVolumeOpenZfsConfiguration] inside the given [block]
*/
public fun openZfsConfiguration(block: aws.sdk.kotlin.services.fsx.model.DeleteVolumeOpenZfsConfiguration.Builder.() -> kotlin.Unit) {
this.openZfsConfiguration = aws.sdk.kotlin.services.fsx.model.DeleteVolumeOpenZfsConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}