
commonMain.aws.sdk.kotlin.services.lightsail.model.ResourceLocation.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lightsail.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Describes the resource location.
*/
public class ResourceLocation private constructor(builder: Builder) {
/**
* The Availability Zone. Follows the format `us-east-2a` (case-sensitive).
*/
public val availabilityZone: kotlin.String? = builder.availabilityZone
/**
* The Amazon Web Services Region name.
*/
public val regionName: aws.sdk.kotlin.services.lightsail.model.RegionName? = builder.regionName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lightsail.model.ResourceLocation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ResourceLocation(")
append("availabilityZone=$availabilityZone,")
append("regionName=$regionName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = availabilityZone?.hashCode() ?: 0
result = 31 * result + (regionName?.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 ResourceLocation
if (availabilityZone != other.availabilityZone) return false
if (regionName != other.regionName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.ResourceLocation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Availability Zone. Follows the format `us-east-2a` (case-sensitive).
*/
public var availabilityZone: kotlin.String? = null
/**
* The Amazon Web Services Region name.
*/
public var regionName: aws.sdk.kotlin.services.lightsail.model.RegionName? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lightsail.model.ResourceLocation) : this() {
this.availabilityZone = x.availabilityZone
this.regionName = x.regionName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lightsail.model.ResourceLocation = ResourceLocation(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy