zio.aws.tnb.model.CreateSolNetworkInstanceResponse.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,
NsInstanceId,
NsdInfoId,
NsInstanceArn,
TagKey
}
import scala.jdk.CollectionConverters.*
final case class CreateSolNetworkInstanceResponse(
arn: NsInstanceArn,
id: NsInstanceId,
nsInstanceName: String,
nsdInfoId: NsdInfoId,
tags: Optional[Map[TagKey, TagValue]] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.tnb.model.CreateSolNetworkInstanceResponse = {
import CreateSolNetworkInstanceResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.tnb.model.CreateSolNetworkInstanceResponse
.builder()
.arn(NsInstanceArn.unwrap(arn): java.lang.String)
.id(NsInstanceId.unwrap(id): java.lang.String)
.nsInstanceName(nsInstanceName: java.lang.String)
.nsdInfoId(NsdInfoId.unwrap(nsdInfoId): 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.CreateSolNetworkInstanceResponse.ReadOnly =
zio.aws.tnb.model.CreateSolNetworkInstanceResponse.wrap(buildAwsValue())
}
object CreateSolNetworkInstanceResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.tnb.model.CreateSolNetworkInstanceResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.tnb.model.CreateSolNetworkInstanceResponse =
zio.aws.tnb.model.CreateSolNetworkInstanceResponse(
arn,
id,
nsInstanceName,
nsdInfoId,
tags.map(value => value)
)
def arn: NsInstanceArn
def id: NsInstanceId
def nsInstanceName: String
def nsdInfoId: NsdInfoId
def tags: Optional[Map[TagKey, TagValue]]
def getArn: ZIO[Any, Nothing, NsInstanceArn] = ZIO.succeed(arn)
def getId: ZIO[Any, Nothing, NsInstanceId] = ZIO.succeed(id)
def getNsInstanceName: ZIO[Any, Nothing, String] =
ZIO.succeed(nsInstanceName)
def getNsdInfoId: ZIO[Any, Nothing, NsdInfoId] = ZIO.succeed(nsdInfoId)
def getTags: ZIO[Any, AwsError, Map[TagKey, TagValue]] =
AwsError.unwrapOptionField("tags", tags)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.tnb.model.CreateSolNetworkInstanceResponse
) extends zio.aws.tnb.model.CreateSolNetworkInstanceResponse.ReadOnly {
override val arn: NsInstanceArn =
zio.aws.tnb.model.primitives.NsInstanceArn(impl.arn())
override val id: NsInstanceId =
zio.aws.tnb.model.primitives.NsInstanceId(impl.id())
override val nsInstanceName: String = impl.nsInstanceName(): String
override val nsdInfoId: NsdInfoId =
zio.aws.tnb.model.primitives.NsdInfoId(impl.nsdInfoId())
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.CreateSolNetworkInstanceResponse
): zio.aws.tnb.model.CreateSolNetworkInstanceResponse.ReadOnly = new Wrapper(
impl
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy