
commonMain.aws.sdk.kotlin.services.cloudhsmv2.model.CreateHsmRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudhsmv2.model
public class CreateHsmRequest private constructor(builder: Builder) {
/**
* The Availability Zone where you are creating the HSM. To find the cluster's Availability Zones, use DescribeClusters.
*/
public val availabilityZone: kotlin.String? = builder.availabilityZone
/**
* The identifier (ID) of the HSM's cluster. To find the cluster ID, use DescribeClusters.
*/
public val clusterId: kotlin.String? = builder.clusterId
/**
* The HSM's IP address. If you specify an IP address, use an available address from the subnet that maps to the Availability Zone where you are creating the HSM. If you don't specify an IP address, one is chosen for you from that subnet.
*/
public val ipAddress: kotlin.String? = builder.ipAddress
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudhsmv2.model.CreateHsmRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateHsmRequest(")
append("availabilityZone=$availabilityZone,")
append("clusterId=$clusterId,")
append("ipAddress=$ipAddress")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = availabilityZone?.hashCode() ?: 0
result = 31 * result + (clusterId?.hashCode() ?: 0)
result = 31 * result + (ipAddress?.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 CreateHsmRequest
if (availabilityZone != other.availabilityZone) return false
if (clusterId != other.clusterId) return false
if (ipAddress != other.ipAddress) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudhsmv2.model.CreateHsmRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The Availability Zone where you are creating the HSM. To find the cluster's Availability Zones, use DescribeClusters.
*/
public var availabilityZone: kotlin.String? = null
/**
* The identifier (ID) of the HSM's cluster. To find the cluster ID, use DescribeClusters.
*/
public var clusterId: kotlin.String? = null
/**
* The HSM's IP address. If you specify an IP address, use an available address from the subnet that maps to the Availability Zone where you are creating the HSM. If you don't specify an IP address, one is chosen for you from that subnet.
*/
public var ipAddress: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudhsmv2.model.CreateHsmRequest) : this() {
this.availabilityZone = x.availabilityZone
this.clusterId = x.clusterId
this.ipAddress = x.ipAddress
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudhsmv2.model.CreateHsmRequest = CreateHsmRequest(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy