
commonMain.aws.sdk.kotlin.services.lightsail.model.CreateInstanceSnapshotRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lightsail.model
public class CreateInstanceSnapshotRequest private constructor(builder: Builder) {
/**
* The Lightsail instance on which to base your snapshot.
*/
public val instanceName: kotlin.String? = builder.instanceName
/**
* The name for your new snapshot.
*/
public val instanceSnapshotName: kotlin.String? = builder.instanceSnapshotName
/**
* 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.CreateInstanceSnapshotRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateInstanceSnapshotRequest(")
append("instanceName=$instanceName,")
append("instanceSnapshotName=$instanceSnapshotName,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = instanceName?.hashCode() ?: 0
result = 31 * result + (instanceSnapshotName?.hashCode() ?: 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 CreateInstanceSnapshotRequest
if (instanceName != other.instanceName) return false
if (instanceSnapshotName != other.instanceSnapshotName) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.CreateInstanceSnapshotRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The Lightsail instance on which to base your snapshot.
*/
public var instanceName: kotlin.String? = null
/**
* The name for your new snapshot.
*/
public var instanceSnapshotName: kotlin.String? = 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.CreateInstanceSnapshotRequest) : this() {
this.instanceName = x.instanceName
this.instanceSnapshotName = x.instanceSnapshotName
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lightsail.model.CreateInstanceSnapshotRequest = CreateInstanceSnapshotRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy