![JAR search and dependency download from the Maven repository](/logo.png)
commonMain.aws.sdk.kotlin.services.rdsdata.model.BeginTransactionRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rdsdata-jvm Show documentation
Show all versions of rdsdata-jvm Show documentation
The AWS SDK for Kotlin client for RDS Data
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.rdsdata.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The request parameters represent the input of a request to start a SQL transaction.
*/
public class BeginTransactionRequest private constructor(builder: Builder) {
/**
* The name of the database.
*/
public val database: kotlin.String? = builder.database
/**
* The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
*/
public val resourceArn: kotlin.String = requireNotNull(builder.resourceArn) { "A non-null value must be provided for resourceArn" }
/**
* The name of the database schema.
*/
public val schema: kotlin.String? = builder.schema
/**
* The name or ARN of the secret that enables access to the DB cluster.
*/
public val secretArn: kotlin.String = requireNotNull(builder.secretArn) { "A non-null value must be provided for secretArn" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rdsdata.model.BeginTransactionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BeginTransactionRequest(")
append("database=$database,")
append("resourceArn=$resourceArn,")
append("schema=$schema,")
append("secretArn=$secretArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = database?.hashCode() ?: 0
result = 31 * result + (resourceArn.hashCode())
result = 31 * result + (schema?.hashCode() ?: 0)
result = 31 * result + (secretArn.hashCode())
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 BeginTransactionRequest
if (database != other.database) return false
if (resourceArn != other.resourceArn) return false
if (schema != other.schema) return false
if (secretArn != other.secretArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rdsdata.model.BeginTransactionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the database.
*/
public var database: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.
*/
public var resourceArn: kotlin.String? = null
/**
* The name of the database schema.
*/
public var schema: kotlin.String? = null
/**
* The name or ARN of the secret that enables access to the DB cluster.
*/
public var secretArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rdsdata.model.BeginTransactionRequest) : this() {
this.database = x.database
this.resourceArn = x.resourceArn
this.schema = x.schema
this.secretArn = x.secretArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rdsdata.model.BeginTransactionRequest = BeginTransactionRequest(this)
internal fun correctErrors(): Builder {
if (resourceArn == null) resourceArn = ""
if (secretArn == null) secretArn = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy