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

zio.aws.tnb.model.GetSolVnfInfo.scala Maven / Gradle / Ivy

There is a newer version: 7.28.29.10
Show newest version
package zio.aws.tnb.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class GetSolVnfInfo(
    vnfState: Optional[zio.aws.tnb.model.VnfOperationalState] = Optional.Absent,
    vnfcResourceInfo: Optional[
      Iterable[zio.aws.tnb.model.GetSolVnfcResourceInfo]
    ] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.tnb.model.GetSolVnfInfo = {
    import GetSolVnfInfo.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.tnb.model.GetSolVnfInfo
      .builder()
      .optionallyWith(vnfState.map(value => value.unwrap))(_.vnfState)
      .optionallyWith(
        vnfcResourceInfo.map(value =>
          value.map { item =>
            item.buildAwsValue()
          }.asJavaCollection
        )
      )(_.vnfcResourceInfo)
      .build()
  }
  def asReadOnly: zio.aws.tnb.model.GetSolVnfInfo.ReadOnly =
    zio.aws.tnb.model.GetSolVnfInfo.wrap(buildAwsValue())
}
object GetSolVnfInfo {
  private lazy val zioAwsBuilderHelper
      : BuilderHelper[software.amazon.awssdk.services.tnb.model.GetSolVnfInfo] =
    BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.tnb.model.GetSolVnfInfo =
      zio.aws.tnb.model.GetSolVnfInfo(
        vnfState.map(value => value),
        vnfcResourceInfo.map(value =>
          value.map { item =>
            item.asEditable
          }
        )
      )
    def vnfState: Optional[zio.aws.tnb.model.VnfOperationalState]
    def vnfcResourceInfo
        : Optional[List[zio.aws.tnb.model.GetSolVnfcResourceInfo.ReadOnly]]
    def getVnfState: ZIO[Any, AwsError, zio.aws.tnb.model.VnfOperationalState] =
      AwsError.unwrapOptionField("vnfState", vnfState)
    def getVnfcResourceInfo: ZIO[Any, AwsError, List[
      zio.aws.tnb.model.GetSolVnfcResourceInfo.ReadOnly
    ]] = AwsError.unwrapOptionField("vnfcResourceInfo", vnfcResourceInfo)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.tnb.model.GetSolVnfInfo
  ) extends zio.aws.tnb.model.GetSolVnfInfo.ReadOnly {
    override val vnfState: Optional[zio.aws.tnb.model.VnfOperationalState] =
      zio.aws.core.internal
        .optionalFromNullable(impl.vnfState())
        .map(value => zio.aws.tnb.model.VnfOperationalState.wrap(value))
    override val vnfcResourceInfo
        : Optional[List[zio.aws.tnb.model.GetSolVnfcResourceInfo.ReadOnly]] =
      zio.aws.core.internal
        .optionalFromNullable(impl.vnfcResourceInfo())
        .map(value =>
          value.asScala.map { item =>
            zio.aws.tnb.model.GetSolVnfcResourceInfo.wrap(item)
          }.toList
        )
  }
  def wrap(
      impl: software.amazon.awssdk.services.tnb.model.GetSolVnfInfo
  ): zio.aws.tnb.model.GetSolVnfInfo.ReadOnly = new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy