io.github.vigoo.zioaws.rdsdata.model.RollbackTransactionResponse.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.TransactionStatus
import io.github.vigoo.zioaws.core.{AwsError, BuilderHelper}
import scala.jdk.CollectionConverters.*
final case class RollbackTransactionResponse(
transactionStatus: Option[TransactionStatus] = None
) {
def buildAwsValue()
: software.amazon.awssdk.services.rdsdata.model.RollbackTransactionResponse = {
import RollbackTransactionResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.rdsdata.model.RollbackTransactionResponse
.builder()
.optionallyWith(transactionStatus.map(value => value: java.lang.String))(
_.transactionStatus
)
.build()
}
def asReadOnly
: io.github.vigoo.zioaws.rdsdata.model.RollbackTransactionResponse.ReadOnly =
io.github.vigoo.zioaws.rdsdata.model.RollbackTransactionResponse
.wrap(buildAwsValue())
}
object RollbackTransactionResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.rdsdata.model.RollbackTransactionResponse
] = BuilderHelper.apply
trait ReadOnly {
def editable
: io.github.vigoo.zioaws.rdsdata.model.RollbackTransactionResponse =
io.github.vigoo.zioaws.rdsdata.model
.RollbackTransactionResponse(transactionStatusValue.map(value => value))
def transactionStatusValue: Option[TransactionStatus]
def transactionStatus: ZIO[Any, AwsError, TransactionStatus] =
AwsError.unwrapOptionField("transactionStatus", transactionStatusValue)
}
private class Wrapper(
impl: software.amazon.awssdk.services.rdsdata.model.RollbackTransactionResponse
) extends io.github.vigoo.zioaws.rdsdata.model.RollbackTransactionResponse.ReadOnly {
override def transactionStatusValue: Option[TransactionStatus] = scala
.Option(impl.transactionStatus())
.map(value => value: TransactionStatus)
}
def wrap(
impl: software.amazon.awssdk.services.rdsdata.model.RollbackTransactionResponse
): io.github.vigoo.zioaws.rdsdata.model.RollbackTransactionResponse.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy