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

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

package io.github.vigoo.zioaws.elasticbeanstalk.model
import java.lang.Integer
import zio.ZIO
import io.github.vigoo.zioaws.elasticbeanstalk.model.primitives.{
  PlatformName,
  BranchOrder,
  SupportedTier,
  PlatformBranchLifecycleState,
  BranchName
}
import io.github.vigoo.zioaws.core.{AwsError, BuilderHelper}
import scala.jdk.CollectionConverters._
final case class PlatformBranchSummary(
    platformName: Option[PlatformName] = None,
    branchName: Option[BranchName] = None,
    lifecycleState: Option[PlatformBranchLifecycleState] = None,
    branchOrder: Option[BranchOrder] = None,
    supportedTierList: Option[Iterable[SupportedTier]] = None
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.elasticbeanstalk.model.PlatformBranchSummary = {
    import PlatformBranchSummary.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.elasticbeanstalk.model.PlatformBranchSummary
      .builder()
      .optionallyWith(platformName.map(value => value: java.lang.String))(
        _.platformName
      )
      .optionallyWith(branchName.map(value => value: java.lang.String))(
        _.branchName
      )
      .optionallyWith(lifecycleState.map(value => value: java.lang.String))(
        _.lifecycleState
      )
      .optionallyWith(branchOrder.map(value => value: Integer))(_.branchOrder)
      .optionallyWith(
        supportedTierList.map(value =>
          value.map { item =>
            item: java.lang.String
          }.asJavaCollection
        )
      )(_.supportedTierList)
      .build()
  }
  def asReadOnly
      : io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformBranchSummary.ReadOnly =
    io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformBranchSummary
      .wrap(buildAwsValue())
}
object PlatformBranchSummary {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.elasticbeanstalk.model.PlatformBranchSummary
  ] = BuilderHelper.apply
  trait ReadOnly {
    def editable
        : io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformBranchSummary =
      io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformBranchSummary(
        platformNameValue.map(value => value),
        branchNameValue.map(value => value),
        lifecycleStateValue.map(value => value),
        branchOrderValue.map(value => value),
        supportedTierListValue.map(value => value)
      )
    def platformNameValue: Option[PlatformName]
    def branchNameValue: Option[BranchName]
    def lifecycleStateValue: Option[PlatformBranchLifecycleState]
    def branchOrderValue: Option[BranchOrder]
    def supportedTierListValue: Option[List[SupportedTier]]
    def platformName: ZIO[Any, AwsError, PlatformName] =
      AwsError.unwrapOptionField("platformName", platformNameValue)
    def branchName: ZIO[Any, AwsError, BranchName] =
      AwsError.unwrapOptionField("branchName", branchNameValue)
    def lifecycleState: ZIO[Any, AwsError, PlatformBranchLifecycleState] =
      AwsError.unwrapOptionField("lifecycleState", lifecycleStateValue)
    def branchOrder: ZIO[Any, AwsError, BranchOrder] =
      AwsError.unwrapOptionField("branchOrder", branchOrderValue)
    def supportedTierList: ZIO[Any, AwsError, List[SupportedTier]] =
      AwsError.unwrapOptionField("supportedTierList", supportedTierListValue)
  }
  private class Wrapper(
      impl: software.amazon.awssdk.services.elasticbeanstalk.model.PlatformBranchSummary
  ) extends io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformBranchSummary.ReadOnly {
    override def platformNameValue: Option[PlatformName] =
      scala.Option(impl.platformName()).map(value => value: PlatformName)
    override def branchNameValue: Option[BranchName] =
      scala.Option(impl.branchName()).map(value => value: BranchName)
    override def lifecycleStateValue: Option[PlatformBranchLifecycleState] =
      scala
        .Option(impl.lifecycleState())
        .map(value => value: PlatformBranchLifecycleState)
    override def branchOrderValue: Option[BranchOrder] =
      scala.Option(impl.branchOrder()).map(value => value: BranchOrder)
    override def supportedTierListValue: Option[List[SupportedTier]] = scala
      .Option(impl.supportedTierList())
      .map(value =>
        value.asScala.map { item =>
          item: SupportedTier
        }.toList
      )
  }
  def wrap(
      impl: software.amazon.awssdk.services.elasticbeanstalk.model.PlatformBranchSummary
  ): io.github.vigoo.zioaws.elasticbeanstalk.model.PlatformBranchSummary.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy