zio.aws.tnb.model.NetworkArtifactMeta.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 NetworkArtifactMeta(
overrides: Optional[Iterable[zio.aws.tnb.model.ToscaOverride]] =
Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.tnb.model.NetworkArtifactMeta = {
import NetworkArtifactMeta.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.tnb.model.NetworkArtifactMeta
.builder()
.optionallyWith(
overrides.map(value =>
value.map { item =>
item.buildAwsValue()
}.asJavaCollection
)
)(_.overrides)
.build()
}
def asReadOnly: zio.aws.tnb.model.NetworkArtifactMeta.ReadOnly =
zio.aws.tnb.model.NetworkArtifactMeta.wrap(buildAwsValue())
}
object NetworkArtifactMeta {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.tnb.model.NetworkArtifactMeta
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.tnb.model.NetworkArtifactMeta =
zio.aws.tnb.model.NetworkArtifactMeta(
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.NetworkArtifactMeta
) extends zio.aws.tnb.model.NetworkArtifactMeta.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.NetworkArtifactMeta
): zio.aws.tnb.model.NetworkArtifactMeta.ReadOnly = new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy