zio.aws.amplifybackend.model.S3BucketInfo.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-amplifybackend_3 Show documentation
Show all versions of zio-aws-amplifybackend_3 Show documentation
Low-level AWS wrapper for ZIO
package zio.aws.amplifybackend.model
import zio.aws.amplifybackend.model.primitives.__string
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class S3BucketInfo(
creationDate: Optional[__string] = Optional.Absent,
name: Optional[__string] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.amplifybackend.model.S3BucketInfo = {
import S3BucketInfo.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.amplifybackend.model.S3BucketInfo
.builder()
.optionallyWith(creationDate.map(value => value: java.lang.String))(
_.creationDate
)
.optionallyWith(name.map(value => value: java.lang.String))(_.name)
.build()
}
def asReadOnly: zio.aws.amplifybackend.model.S3BucketInfo.ReadOnly =
zio.aws.amplifybackend.model.S3BucketInfo.wrap(buildAwsValue())
}
object S3BucketInfo {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.amplifybackend.model.S3BucketInfo
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.amplifybackend.model.S3BucketInfo =
zio.aws.amplifybackend.model.S3BucketInfo(
creationDate.map(value => value),
name.map(value => value)
)
def creationDate: Optional[__string]
def name: Optional[__string]
def getCreationDate: ZIO[Any, AwsError, __string] =
AwsError.unwrapOptionField("creationDate", creationDate)
def getName: ZIO[Any, AwsError, __string] =
AwsError.unwrapOptionField("name", name)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.amplifybackend.model.S3BucketInfo
) extends zio.aws.amplifybackend.model.S3BucketInfo.ReadOnly {
override val creationDate: Optional[__string] = zio.aws.core.internal
.optionalFromNullable(impl.creationDate())
.map(value => value: __string)
override val name: Optional[__string] = zio.aws.core.internal
.optionalFromNullable(impl.name())
.map(value => value: __string)
}
def wrap(
impl: software.amazon.awssdk.services.amplifybackend.model.S3BucketInfo
): zio.aws.amplifybackend.model.S3BucketInfo.ReadOnly = new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy