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

zio.aws.tnb.model.FunctionArtifactMeta.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 FunctionArtifactMeta(
    overrides: Optional[Iterable[zio.aws.tnb.model.ToscaOverride]] =
      Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.tnb.model.FunctionArtifactMeta = {
    import FunctionArtifactMeta.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.tnb.model.FunctionArtifactMeta
      .builder()
      .optionallyWith(
        overrides.map(value =>
          value.map { item =>
            item.buildAwsValue()
          }.asJavaCollection
        )
      )(_.overrides)
      .build()
  }
  def asReadOnly: zio.aws.tnb.model.FunctionArtifactMeta.ReadOnly =
    zio.aws.tnb.model.FunctionArtifactMeta.wrap(buildAwsValue())
}
object FunctionArtifactMeta {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.tnb.model.FunctionArtifactMeta
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.tnb.model.FunctionArtifactMeta =
      zio.aws.tnb.model.FunctionArtifactMeta(
        overrides.map(value =>
          value.map { item =>
            item.asEditable
          }
        )
      )
    def overrides: Optional[List[zio.aws.tnb.model.ToscaOverride.ReadOnly]]
    def getOverrides
        : ZIO[Any, AwsError, List[zio.aws.tnb.model.ToscaOverride.ReadOnly]] =
      AwsError.unwrapOptionField("overrides", overrides)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.tnb.model.FunctionArtifactMeta
  ) extends zio.aws.tnb.model.FunctionArtifactMeta.ReadOnly {
    override val overrides
        : Optional[List[zio.aws.tnb.model.ToscaOverride.ReadOnly]] =
      zio.aws.core.internal
        .optionalFromNullable(impl.overrides())
        .map(value =>
          value.asScala.map { item =>
            zio.aws.tnb.model.ToscaOverride.wrap(item)
          }.toList
        )
  }
  def wrap(
      impl: software.amazon.awssdk.services.tnb.model.FunctionArtifactMeta
  ): zio.aws.tnb.model.FunctionArtifactMeta.ReadOnly = new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy