commonMain.aws.sdk.kotlin.services.fsx.model.CreateVolumeRequest.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 CreateVolumeRequest 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
/**
* Specifies the name of the volume that you're creating.
*/
public val name: kotlin.String? = builder.name
/**
* Specifies the configuration to use when creating the ONTAP volume.
*/
public val ontapConfiguration: aws.sdk.kotlin.services.fsx.model.CreateOntapVolumeConfiguration? = builder.ontapConfiguration
/**
* Specifies the configuration to use when creating the OpenZFS volume.
*/
public val openZfsConfiguration: aws.sdk.kotlin.services.fsx.model.CreateOpenZfsVolumeConfiguration? = builder.openZfsConfiguration
/**
* A list of `Tag` values, with a maximum of 50 elements.
*/
public val tags: List? = builder.tags
/**
* Specifies the type of volume to create; `ONTAP` and `OPENZFS` are the only valid volume types.
*/
public val volumeType: aws.sdk.kotlin.services.fsx.model.VolumeType? = builder.volumeType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.fsx.model.CreateVolumeRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateVolumeRequest(")
append("clientRequestToken=$clientRequestToken,")
append("name=$name,")
append("ontapConfiguration=$ontapConfiguration,")
append("openZfsConfiguration=$openZfsConfiguration,")
append("tags=$tags,")
append("volumeType=$volumeType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientRequestToken?.hashCode() ?: 0
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (ontapConfiguration?.hashCode() ?: 0)
result = 31 * result + (openZfsConfiguration?.hashCode() ?: 0)
result = 31 * result + (tags?.hashCode() ?: 0)
result = 31 * result + (volumeType?.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 CreateVolumeRequest
if (clientRequestToken != other.clientRequestToken) return false
if (name != other.name) return false
if (ontapConfiguration != other.ontapConfiguration) return false
if (openZfsConfiguration != other.openZfsConfiguration) return false
if (tags != other.tags) return false
if (volumeType != other.volumeType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.fsx.model.CreateVolumeRequest = 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
/**
* Specifies the name of the volume that you're creating.
*/
public var name: kotlin.String? = null
/**
* Specifies the configuration to use when creating the ONTAP volume.
*/
public var ontapConfiguration: aws.sdk.kotlin.services.fsx.model.CreateOntapVolumeConfiguration? = null
/**
* Specifies the configuration to use when creating the OpenZFS volume.
*/
public var openZfsConfiguration: aws.sdk.kotlin.services.fsx.model.CreateOpenZfsVolumeConfiguration? = null
/**
* A list of `Tag` values, with a maximum of 50 elements.
*/
public var tags: List? = null
/**
* Specifies the type of volume to create; `ONTAP` and `OPENZFS` are the only valid volume types.
*/
public var volumeType: aws.sdk.kotlin.services.fsx.model.VolumeType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.fsx.model.CreateVolumeRequest) : this() {
this.clientRequestToken = x.clientRequestToken
this.name = x.name
this.ontapConfiguration = x.ontapConfiguration
this.openZfsConfiguration = x.openZfsConfiguration
this.tags = x.tags
this.volumeType = x.volumeType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.fsx.model.CreateVolumeRequest = CreateVolumeRequest(this)
/**
* construct an [aws.sdk.kotlin.services.fsx.model.CreateOntapVolumeConfiguration] inside the given [block]
*/
public fun ontapConfiguration(block: aws.sdk.kotlin.services.fsx.model.CreateOntapVolumeConfiguration.Builder.() -> kotlin.Unit) {
this.ontapConfiguration = aws.sdk.kotlin.services.fsx.model.CreateOntapVolumeConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.fsx.model.CreateOpenZfsVolumeConfiguration] inside the given [block]
*/
public fun openZfsConfiguration(block: aws.sdk.kotlin.services.fsx.model.CreateOpenZfsVolumeConfiguration.Builder.() -> kotlin.Unit) {
this.openZfsConfiguration = aws.sdk.kotlin.services.fsx.model.CreateOpenZfsVolumeConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}