
commonMain.aws.sdk.kotlin.services.lightsail.model.CreateDiskRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lightsail.model
public class CreateDiskRequest private constructor(builder: Builder) {
/**
* An array of objects that represent the add-ons to enable for the new disk.
*/
public val addOns: List? = builder.addOns
/**
* The Availability Zone where you want to create the disk (e.g., `us-east-2a`). Use the same Availability Zone as the Lightsail instance to which you want to attach the disk.
*
* Use the `get regions` operation to list the Availability Zones where Lightsail is currently available.
*/
public val availabilityZone: kotlin.String? = builder.availabilityZone
/**
* The unique Lightsail disk name (e.g., `my-disk`).
*/
public val diskName: kotlin.String? = builder.diskName
/**
* The size of the disk in GB (e.g., `32`).
*/
public val sizeInGb: kotlin.Int? = builder.sizeInGb
/**
* The tag keys and optional values to add to the resource during create.
*
* Use the `TagResource` action to tag a resource after it's created.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lightsail.model.CreateDiskRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateDiskRequest(")
append("addOns=$addOns,")
append("availabilityZone=$availabilityZone,")
append("diskName=$diskName,")
append("sizeInGb=$sizeInGb,")
append("tags=$tags)")
}
override fun hashCode(): kotlin.Int {
var result = addOns?.hashCode() ?: 0
result = 31 * result + (availabilityZone?.hashCode() ?: 0)
result = 31 * result + (diskName?.hashCode() ?: 0)
result = 31 * result + (sizeInGb ?: 0)
result = 31 * result + (tags?.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 CreateDiskRequest
if (addOns != other.addOns) return false
if (availabilityZone != other.availabilityZone) return false
if (diskName != other.diskName) return false
if (sizeInGb != other.sizeInGb) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.CreateDiskRequest = Builder(this).apply(block).build()
public class Builder {
/**
* An array of objects that represent the add-ons to enable for the new disk.
*/
public var addOns: List? = null
/**
* The Availability Zone where you want to create the disk (e.g., `us-east-2a`). Use the same Availability Zone as the Lightsail instance to which you want to attach the disk.
*
* Use the `get regions` operation to list the Availability Zones where Lightsail is currently available.
*/
public var availabilityZone: kotlin.String? = null
/**
* The unique Lightsail disk name (e.g., `my-disk`).
*/
public var diskName: kotlin.String? = null
/**
* The size of the disk in GB (e.g., `32`).
*/
public var sizeInGb: kotlin.Int? = null
/**
* The tag keys and optional values to add to the resource during create.
*
* Use the `TagResource` action to tag a resource after it's created.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lightsail.model.CreateDiskRequest) : this() {
this.addOns = x.addOns
this.availabilityZone = x.availabilityZone
this.diskName = x.diskName
this.sizeInGb = x.sizeInGb
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lightsail.model.CreateDiskRequest = CreateDiskRequest(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy