io.github.vigoo.zioaws.rdsdata.model.CommitTransactionRequest.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-rdsdata_3 Show documentation
Show all versions of zio-aws-rdsdata_3 Show documentation
Low-level AWS wrapper for ZIO
package io.github.vigoo.zioaws.rdsdata.model
import zio.ZIO
import io.github.vigoo.zioaws.rdsdata.model.primitives.{Id, Arn}
import io.github.vigoo.zioaws.core.BuilderHelper
import scala.jdk.CollectionConverters.*
final case class CommitTransactionRequest(
resourceArn: Arn,
secretArn: Arn,
transactionId: Id
) {
def buildAwsValue()
: software.amazon.awssdk.services.rdsdata.model.CommitTransactionRequest = {
import CommitTransactionRequest.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.rdsdata.model.CommitTransactionRequest
.builder()
.resourceArn(resourceArn: java.lang.String)
.secretArn(secretArn: java.lang.String)
.transactionId(transactionId: java.lang.String)
.build()
}
def asReadOnly
: io.github.vigoo.zioaws.rdsdata.model.CommitTransactionRequest.ReadOnly =
io.github.vigoo.zioaws.rdsdata.model.CommitTransactionRequest
.wrap(buildAwsValue())
}
object CommitTransactionRequest {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.rdsdata.model.CommitTransactionRequest
] = BuilderHelper.apply
trait ReadOnly {
def editable
: io.github.vigoo.zioaws.rdsdata.model.CommitTransactionRequest =
io.github.vigoo.zioaws.rdsdata.model.CommitTransactionRequest(
resourceArnValue,
secretArnValue,
transactionIdValue
)
def resourceArnValue: Arn
def secretArnValue: Arn
def transactionIdValue: Id
def resourceArn: ZIO[Any, Nothing, Arn] = ZIO.succeed(resourceArnValue)
def secretArn: ZIO[Any, Nothing, Arn] = ZIO.succeed(secretArnValue)
def transactionId: ZIO[Any, Nothing, Id] = ZIO.succeed(transactionIdValue)
}
private class Wrapper(
impl: software.amazon.awssdk.services.rdsdata.model.CommitTransactionRequest
) extends io.github.vigoo.zioaws.rdsdata.model.CommitTransactionRequest.ReadOnly {
override def resourceArnValue: Arn = impl.resourceArn(): Arn
override def secretArnValue: Arn = impl.secretArn(): Arn
override def transactionIdValue: Id = impl.transactionId(): Id
}
def wrap(
impl: software.amazon.awssdk.services.rdsdata.model.CommitTransactionRequest
): io.github.vigoo.zioaws.rdsdata.model.CommitTransactionRequest.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy