zio.aws.tnb.model.FunctionArtifactMeta.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-tnb_3 Show documentation
Show all versions of zio-aws-tnb_3 Show documentation
Low-level AWS wrapper for ZIO
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