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

zio.aws.tnb.model.InstantiateSolNetworkInstanceResponse.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 zio.aws.tnb.model.primitives.{TagValue, TagKey, NsLcmOpOccId}
import scala.jdk.CollectionConverters.*
final case class InstantiateSolNetworkInstanceResponse(
    nsLcmOpOccId: NsLcmOpOccId,
    tags: Optional[Map[TagKey, TagValue]] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.tnb.model.InstantiateSolNetworkInstanceResponse = {
    import InstantiateSolNetworkInstanceResponse.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.tnb.model.InstantiateSolNetworkInstanceResponse
      .builder()
      .nsLcmOpOccId(NsLcmOpOccId.unwrap(nsLcmOpOccId): java.lang.String)
      .optionallyWith(
        tags.map(value =>
          value
            .map({ case (key, value) =>
              (TagKey.unwrap(key): java.lang.String) -> (TagValue
                .unwrap(value): java.lang.String)
            })
            .asJava
        )
      )(_.tags)
      .build()
  }
  def asReadOnly
      : zio.aws.tnb.model.InstantiateSolNetworkInstanceResponse.ReadOnly =
    zio.aws.tnb.model.InstantiateSolNetworkInstanceResponse
      .wrap(buildAwsValue())
}
object InstantiateSolNetworkInstanceResponse {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.tnb.model.InstantiateSolNetworkInstanceResponse
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.tnb.model.InstantiateSolNetworkInstanceResponse =
      zio.aws.tnb.model.InstantiateSolNetworkInstanceResponse(
        nsLcmOpOccId,
        tags.map(value => value)
      )
    def nsLcmOpOccId: NsLcmOpOccId
    def tags: Optional[Map[TagKey, TagValue]]
    def getNsLcmOpOccId: ZIO[Any, Nothing, NsLcmOpOccId] =
      ZIO.succeed(nsLcmOpOccId)
    def getTags: ZIO[Any, AwsError, Map[TagKey, TagValue]] =
      AwsError.unwrapOptionField("tags", tags)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.tnb.model.InstantiateSolNetworkInstanceResponse
  ) extends zio.aws.tnb.model.InstantiateSolNetworkInstanceResponse.ReadOnly {
    override val nsLcmOpOccId: NsLcmOpOccId =
      zio.aws.tnb.model.primitives.NsLcmOpOccId(impl.nsLcmOpOccId())
    override val tags: Optional[Map[TagKey, TagValue]] = zio.aws.core.internal
      .optionalFromNullable(impl.tags())
      .map(value =>
        value.asScala
          .map({ case (key, value) =>
            zio.aws.tnb.model.primitives
              .TagKey(key) -> zio.aws.tnb.model.primitives.TagValue(value)
          })
          .toMap
      )
  }
  def wrap(
      impl: software.amazon.awssdk.services.tnb.model.InstantiateSolNetworkInstanceResponse
  ): zio.aws.tnb.model.InstantiateSolNetworkInstanceResponse.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy