
commonMain.aws.sdk.kotlin.services.lightsail.model.SetupHistoryResource.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* The Lightsail resource that `SetupHistory` was ran on.
*/
public class SetupHistoryResource private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the Lightsail resource.
*/
public val arn: kotlin.String? = builder.arn
/**
* The timestamp for when the resource was created.
*/
public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
/**
* Describes the resource location.
*/
public val location: aws.sdk.kotlin.services.lightsail.model.ResourceLocation? = builder.location
/**
* The name of the Lightsail resource.
*/
public val name: kotlin.String? = builder.name
/**
* The Lightsail resource type. For example, `Instance`.
*/
public val resourceType: aws.sdk.kotlin.services.lightsail.model.ResourceType? = builder.resourceType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lightsail.model.SetupHistoryResource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SetupHistoryResource(")
append("arn=$arn,")
append("createdAt=$createdAt,")
append("location=$location,")
append("name=$name,")
append("resourceType=$resourceType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn?.hashCode() ?: 0
result = 31 * result + (createdAt?.hashCode() ?: 0)
result = 31 * result + (location?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (resourceType?.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 SetupHistoryResource
if (arn != other.arn) return false
if (createdAt != other.createdAt) return false
if (location != other.location) return false
if (name != other.name) return false
if (resourceType != other.resourceType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.SetupHistoryResource = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the Lightsail resource.
*/
public var arn: kotlin.String? = null
/**
* The timestamp for when the resource was created.
*/
public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* Describes the resource location.
*/
public var location: aws.sdk.kotlin.services.lightsail.model.ResourceLocation? = null
/**
* The name of the Lightsail resource.
*/
public var name: kotlin.String? = null
/**
* The Lightsail resource type. For example, `Instance`.
*/
public var resourceType: aws.sdk.kotlin.services.lightsail.model.ResourceType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lightsail.model.SetupHistoryResource) : this() {
this.arn = x.arn
this.createdAt = x.createdAt
this.location = x.location
this.name = x.name
this.resourceType = x.resourceType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lightsail.model.SetupHistoryResource = SetupHistoryResource(this)
/**
* construct an [aws.sdk.kotlin.services.lightsail.model.ResourceLocation] inside the given [block]
*/
public fun location(block: aws.sdk.kotlin.services.lightsail.model.ResourceLocation.Builder.() -> kotlin.Unit) {
this.location = aws.sdk.kotlin.services.lightsail.model.ResourceLocation.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy