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