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