All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.vigoo.zioaws.elasticbeanstalk.model.CreatePlatformVersionResponse.scala Maven / Gradle / Ivy

package io.github.vigoo.zioaws.elasticbeanstalk.model
import zio.ZIO
import io.github.vigoo.zioaws.core.{AwsError, BuilderHelper}
import scala.jdk.CollectionConverters._
final case class CreatePlatformVersionResponse(
    platformSummary: Option[
      io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformSummary
    ] = None,
    platformBuilder: Option[
      io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformBuilder
    ] = None
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.elasticbeanstalk.model.CreatePlatformVersionResponse = {
    import CreatePlatformVersionResponse.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.elasticbeanstalk.model.CreatePlatformVersionResponse
      .builder()
      .optionallyWith(platformSummary.map(value => value.buildAwsValue()))(
        _.platformSummary
      )
      .optionallyWith(platformBuilder.map(value => value.buildAwsValue()))(
        _.platformBuilder
      )
      .build()
  }
  def asReadOnly
      : io.github.vigoo.zioaws.elasticbeanstalk.model.CreatePlatformVersionResponse.ReadOnly =
    io.github.vigoo.zioaws.elasticbeanstalk.model.CreatePlatformVersionResponse
      .wrap(buildAwsValue())
}
object CreatePlatformVersionResponse {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.elasticbeanstalk.model.CreatePlatformVersionResponse
  ] = BuilderHelper.apply
  trait ReadOnly {
    def editable
        : io.github.vigoo.zioaws.elasticbeanstalk.model.CreatePlatformVersionResponse =
      io.github.vigoo.zioaws.elasticbeanstalk.model
        .CreatePlatformVersionResponse(
          platformSummaryValue.map(value => value.editable),
          platformBuilderValue.map(value => value.editable)
        )
    def platformSummaryValue: Option[
      io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformSummary.ReadOnly
    ]
    def platformBuilderValue: Option[
      io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformBuilder.ReadOnly
    ]
    def platformSummary: ZIO[
      Any,
      AwsError,
      io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformSummary.ReadOnly
    ] = AwsError.unwrapOptionField("platformSummary", platformSummaryValue)
    def platformBuilder: ZIO[
      Any,
      AwsError,
      io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformBuilder.ReadOnly
    ] = AwsError.unwrapOptionField("platformBuilder", platformBuilderValue)
  }
  private class Wrapper(
      impl: software.amazon.awssdk.services.elasticbeanstalk.model.CreatePlatformVersionResponse
  ) extends io.github.vigoo.zioaws.elasticbeanstalk.model.CreatePlatformVersionResponse.ReadOnly {
    override def platformSummaryValue: Option[
      io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformSummary.ReadOnly
    ] = scala
      .Option(impl.platformSummary())
      .map(value =>
        io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformSummary
          .wrap(value)
      )
    override def platformBuilderValue: Option[
      io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformBuilder.ReadOnly
    ] = scala
      .Option(impl.platformBuilder())
      .map(value =>
        io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformBuilder
          .wrap(value)
      )
  }
  def wrap(
      impl: software.amazon.awssdk.services.elasticbeanstalk.model.CreatePlatformVersionResponse
  ): io.github.vigoo.zioaws.elasticbeanstalk.model.CreatePlatformVersionResponse.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy