zio.aws.rdsdata.model.UpdateResult.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
The newest version!
package zio.aws.rdsdata.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class UpdateResult(
generatedFields: Optional[Iterable[zio.aws.rdsdata.model.Field]] =
Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.rdsdata.model.UpdateResult = {
import UpdateResult.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.rdsdata.model.UpdateResult
.builder()
.optionallyWith(
generatedFields.map(value =>
value.map { item =>
item.buildAwsValue()
}.asJavaCollection
)
)(_.generatedFields)
.build()
}
def asReadOnly: zio.aws.rdsdata.model.UpdateResult.ReadOnly =
zio.aws.rdsdata.model.UpdateResult.wrap(buildAwsValue())
}
object UpdateResult {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.rdsdata.model.UpdateResult
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.rdsdata.model.UpdateResult =
zio.aws.rdsdata.model.UpdateResult(
generatedFields.map(value =>
value.map { item =>
item.asEditable
}
)
)
def generatedFields: Optional[List[zio.aws.rdsdata.model.Field.ReadOnly]]
def getGeneratedFields
: ZIO[Any, AwsError, List[zio.aws.rdsdata.model.Field.ReadOnly]] =
AwsError.unwrapOptionField("generatedFields", generatedFields)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.rdsdata.model.UpdateResult
) extends zio.aws.rdsdata.model.UpdateResult.ReadOnly {
override val generatedFields
: Optional[List[zio.aws.rdsdata.model.Field.ReadOnly]] =
zio.aws.core.internal
.optionalFromNullable(impl.generatedFields())
.map(value =>
value.asScala.map { item =>
zio.aws.rdsdata.model.Field.wrap(item)
}.toList
)
}
def wrap(
impl: software.amazon.awssdk.services.rdsdata.model.UpdateResult
): zio.aws.rdsdata.model.UpdateResult.ReadOnly = new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy