
commonMain.aws.sdk.kotlin.services.lightsail.model.CreateRelationalDatabaseSnapshotRequest.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
public class CreateRelationalDatabaseSnapshotRequest private constructor(builder: Builder) {
/**
* The name of the database on which to base your new snapshot.
*/
public val relationalDatabaseName: kotlin.String? = builder.relationalDatabaseName
/**
* The name for your new database snapshot.
*
* Constraints:
* + Must contain from 2 to 255 alphanumeric characters, or hyphens.
* + The first and last character must be a letter or number.
*/
public val relationalDatabaseSnapshotName: kotlin.String? = builder.relationalDatabaseSnapshotName
/**
* 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.CreateRelationalDatabaseSnapshotRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateRelationalDatabaseSnapshotRequest(")
append("relationalDatabaseName=$relationalDatabaseName,")
append("relationalDatabaseSnapshotName=$relationalDatabaseSnapshotName,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = relationalDatabaseName?.hashCode() ?: 0
result = 31 * result + (relationalDatabaseSnapshotName?.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 CreateRelationalDatabaseSnapshotRequest
if (relationalDatabaseName != other.relationalDatabaseName) return false
if (relationalDatabaseSnapshotName != other.relationalDatabaseSnapshotName) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.CreateRelationalDatabaseSnapshotRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the database on which to base your new snapshot.
*/
public var relationalDatabaseName: kotlin.String? = null
/**
* The name for your new database snapshot.
*
* Constraints:
* + Must contain from 2 to 255 alphanumeric characters, or hyphens.
* + The first and last character must be a letter or number.
*/
public var relationalDatabaseSnapshotName: 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.CreateRelationalDatabaseSnapshotRequest) : this() {
this.relationalDatabaseName = x.relationalDatabaseName
this.relationalDatabaseSnapshotName = x.relationalDatabaseSnapshotName
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lightsail.model.CreateRelationalDatabaseSnapshotRequest = CreateRelationalDatabaseSnapshotRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy