zio.aws.tnb.model.InstantiateSolNetworkInstanceRequest.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 zio.aws.tnb.model.primitives.{TagValue, TagKey, NsInstanceId}
import scala.jdk.CollectionConverters.*
final case class InstantiateSolNetworkInstanceRequest(
additionalParamsForNs: Optional[zio.aws.tnb.model.Document] =
Optional.Absent,
dryRun: Optional[Boolean] = Optional.Absent,
nsInstanceId: NsInstanceId,
tags: Optional[Map[TagKey, TagValue]] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.tnb.model.InstantiateSolNetworkInstanceRequest = {
import InstantiateSolNetworkInstanceRequest.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.tnb.model.InstantiateSolNetworkInstanceRequest
.builder()
.optionallyWith(additionalParamsForNs.map(value => value))(
_.additionalParamsForNs
)
.optionallyWith(dryRun.map(value => value: java.lang.Boolean))(_.dryRun)
.nsInstanceId(NsInstanceId.unwrap(nsInstanceId): 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.InstantiateSolNetworkInstanceRequest.ReadOnly =
zio.aws.tnb.model.InstantiateSolNetworkInstanceRequest.wrap(buildAwsValue())
}
object InstantiateSolNetworkInstanceRequest {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.tnb.model.InstantiateSolNetworkInstanceRequest
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.tnb.model.InstantiateSolNetworkInstanceRequest =
zio.aws.tnb.model.InstantiateSolNetworkInstanceRequest(
additionalParamsForNs.map(value => value),
dryRun.map(value => value),
nsInstanceId,
tags.map(value => value)
)
def additionalParamsForNs
: Optional[software.amazon.awssdk.core.document.Document]
def dryRun: Optional[Boolean]
def nsInstanceId: NsInstanceId
def tags: Optional[Map[TagKey, TagValue]]
def getAdditionalParamsForNs
: ZIO[Any, AwsError, software.amazon.awssdk.core.document.Document] =
AwsError.unwrapOptionField("additionalParamsForNs", additionalParamsForNs)
def getDryRun: ZIO[Any, AwsError, Boolean] =
AwsError.unwrapOptionField("dryRun", dryRun)
def getNsInstanceId: ZIO[Any, Nothing, NsInstanceId] =
ZIO.succeed(nsInstanceId)
def getTags: ZIO[Any, AwsError, Map[TagKey, TagValue]] =
AwsError.unwrapOptionField("tags", tags)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.tnb.model.InstantiateSolNetworkInstanceRequest
) extends zio.aws.tnb.model.InstantiateSolNetworkInstanceRequest.ReadOnly {
override val additionalParamsForNs
: Optional[software.amazon.awssdk.core.document.Document] =
zio.aws.core.internal.optionalFromNullable(impl.additionalParamsForNs())
override val dryRun: Optional[Boolean] = zio.aws.core.internal
.optionalFromNullable(impl.dryRun())
.map(value => value: Boolean)
override val nsInstanceId: NsInstanceId =
zio.aws.tnb.model.primitives.NsInstanceId(impl.nsInstanceId())
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.InstantiateSolNetworkInstanceRequest
): zio.aws.tnb.model.InstantiateSolNetworkInstanceRequest.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy