zio.aws.gamelift.model.DescribeBuildResponse.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-gamelift_3 Show documentation
Show all versions of zio-aws-gamelift_3 Show documentation
Low-level AWS wrapper for ZIO
The newest version!
package zio.aws.gamelift.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class DescribeBuildResponse(
build: Optional[zio.aws.gamelift.model.Build] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.gamelift.model.DescribeBuildResponse = {
import DescribeBuildResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.gamelift.model.DescribeBuildResponse
.builder()
.optionallyWith(build.map(value => value.buildAwsValue()))(_.build)
.build()
}
def asReadOnly: zio.aws.gamelift.model.DescribeBuildResponse.ReadOnly =
zio.aws.gamelift.model.DescribeBuildResponse.wrap(buildAwsValue())
}
object DescribeBuildResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.gamelift.model.DescribeBuildResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.gamelift.model.DescribeBuildResponse =
zio.aws.gamelift.model
.DescribeBuildResponse(build.map(value => value.asEditable))
def build: Optional[zio.aws.gamelift.model.Build.ReadOnly]
def getBuild: ZIO[Any, AwsError, zio.aws.gamelift.model.Build.ReadOnly] =
AwsError.unwrapOptionField("build", build)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.gamelift.model.DescribeBuildResponse
) extends zio.aws.gamelift.model.DescribeBuildResponse.ReadOnly {
override val build: Optional[zio.aws.gamelift.model.Build.ReadOnly] =
zio.aws.core.internal
.optionalFromNullable(impl.build())
.map(value => zio.aws.gamelift.model.Build.wrap(value))
}
def wrap(
impl: software.amazon.awssdk.services.gamelift.model.DescribeBuildResponse
): zio.aws.gamelift.model.DescribeBuildResponse.ReadOnly = new Wrapper(impl)
}