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