zio.aws.tnb.model.UpdateSolNetworkInstanceRequest.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 UpdateSolNetworkInstanceRequest(
modifyVnfInfoData: Optional[zio.aws.tnb.model.UpdateSolNetworkModify] =
Optional.Absent,
nsInstanceId: NsInstanceId,
tags: Optional[Map[TagKey, TagValue]] = Optional.Absent,
updateType: zio.aws.tnb.model.UpdateSolNetworkType
) {
def buildAwsValue()
: software.amazon.awssdk.services.tnb.model.UpdateSolNetworkInstanceRequest = {
import UpdateSolNetworkInstanceRequest.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.tnb.model.UpdateSolNetworkInstanceRequest
.builder()
.optionallyWith(modifyVnfInfoData.map(value => value.buildAwsValue()))(
_.modifyVnfInfoData
)
.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)
.updateType(updateType.unwrap)
.build()
}
def asReadOnly: zio.aws.tnb.model.UpdateSolNetworkInstanceRequest.ReadOnly =
zio.aws.tnb.model.UpdateSolNetworkInstanceRequest.wrap(buildAwsValue())
}
object UpdateSolNetworkInstanceRequest {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.tnb.model.UpdateSolNetworkInstanceRequest
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.tnb.model.UpdateSolNetworkInstanceRequest =
zio.aws.tnb.model.UpdateSolNetworkInstanceRequest(
modifyVnfInfoData.map(value => value.asEditable),
nsInstanceId,
tags.map(value => value),
updateType
)
def modifyVnfInfoData
: Optional[zio.aws.tnb.model.UpdateSolNetworkModify.ReadOnly]
def nsInstanceId: NsInstanceId
def tags: Optional[Map[TagKey, TagValue]]
def updateType: zio.aws.tnb.model.UpdateSolNetworkType
def getModifyVnfInfoData: ZIO[
Any,
AwsError,
zio.aws.tnb.model.UpdateSolNetworkModify.ReadOnly
] = AwsError.unwrapOptionField("modifyVnfInfoData", modifyVnfInfoData)
def getNsInstanceId: ZIO[Any, Nothing, NsInstanceId] =
ZIO.succeed(nsInstanceId)
def getTags: ZIO[Any, AwsError, Map[TagKey, TagValue]] =
AwsError.unwrapOptionField("tags", tags)
def getUpdateType
: ZIO[Any, Nothing, zio.aws.tnb.model.UpdateSolNetworkType] =
ZIO.succeed(updateType)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.tnb.model.UpdateSolNetworkInstanceRequest
) extends zio.aws.tnb.model.UpdateSolNetworkInstanceRequest.ReadOnly {
override val modifyVnfInfoData
: Optional[zio.aws.tnb.model.UpdateSolNetworkModify.ReadOnly] =
zio.aws.core.internal
.optionalFromNullable(impl.modifyVnfInfoData())
.map(value => zio.aws.tnb.model.UpdateSolNetworkModify.wrap(value))
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
)
override val updateType: zio.aws.tnb.model.UpdateSolNetworkType =
zio.aws.tnb.model.UpdateSolNetworkType.wrap(impl.updateType())
}
def wrap(
impl: software.amazon.awssdk.services.tnb.model.UpdateSolNetworkInstanceRequest
): zio.aws.tnb.model.UpdateSolNetworkInstanceRequest.ReadOnly = new Wrapper(
impl
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy