zio.aws.tnb.model.GetSolNetworkInstanceResponse.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.{
NsdId,
TagValue,
NsInstanceId,
NsdInfoId,
NsInstanceArn,
TagKey
}
import scala.jdk.CollectionConverters.*
final case class GetSolNetworkInstanceResponse(
arn: NsInstanceArn,
id: NsInstanceId,
lcmOpInfo: Optional[zio.aws.tnb.model.LcmOperationInfo] = Optional.Absent,
metadata: zio.aws.tnb.model.GetSolNetworkInstanceMetadata,
nsInstanceDescription: String,
nsInstanceName: String,
nsState: Optional[zio.aws.tnb.model.NsState] = Optional.Absent,
nsdId: NsdId,
nsdInfoId: NsdInfoId,
tags: Optional[Map[TagKey, TagValue]] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.tnb.model.GetSolNetworkInstanceResponse = {
import GetSolNetworkInstanceResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.tnb.model.GetSolNetworkInstanceResponse
.builder()
.arn(NsInstanceArn.unwrap(arn): java.lang.String)
.id(NsInstanceId.unwrap(id): java.lang.String)
.optionallyWith(lcmOpInfo.map(value => value.buildAwsValue()))(
_.lcmOpInfo
)
.metadata(metadata.buildAwsValue())
.nsInstanceDescription(nsInstanceDescription: java.lang.String)
.nsInstanceName(nsInstanceName: java.lang.String)
.optionallyWith(nsState.map(value => value.unwrap))(_.nsState)
.nsdId(NsdId.unwrap(nsdId): 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.GetSolNetworkInstanceResponse.ReadOnly =
zio.aws.tnb.model.GetSolNetworkInstanceResponse.wrap(buildAwsValue())
}
object GetSolNetworkInstanceResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.tnb.model.GetSolNetworkInstanceResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.tnb.model.GetSolNetworkInstanceResponse =
zio.aws.tnb.model.GetSolNetworkInstanceResponse(
arn,
id,
lcmOpInfo.map(value => value.asEditable),
metadata.asEditable,
nsInstanceDescription,
nsInstanceName,
nsState.map(value => value),
nsdId,
nsdInfoId,
tags.map(value => value)
)
def arn: NsInstanceArn
def id: NsInstanceId
def lcmOpInfo: Optional[zio.aws.tnb.model.LcmOperationInfo.ReadOnly]
def metadata: zio.aws.tnb.model.GetSolNetworkInstanceMetadata.ReadOnly
def nsInstanceDescription: String
def nsInstanceName: String
def nsState: Optional[zio.aws.tnb.model.NsState]
def nsdId: NsdId
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 getLcmOpInfo
: ZIO[Any, AwsError, zio.aws.tnb.model.LcmOperationInfo.ReadOnly] =
AwsError.unwrapOptionField("lcmOpInfo", lcmOpInfo)
def getMetadata: ZIO[
Any,
Nothing,
zio.aws.tnb.model.GetSolNetworkInstanceMetadata.ReadOnly
] = ZIO.succeed(metadata)
def getNsInstanceDescription: ZIO[Any, Nothing, String] =
ZIO.succeed(nsInstanceDescription)
def getNsInstanceName: ZIO[Any, Nothing, String] =
ZIO.succeed(nsInstanceName)
def getNsState: ZIO[Any, AwsError, zio.aws.tnb.model.NsState] =
AwsError.unwrapOptionField("nsState", nsState)
def getNsdId: ZIO[Any, Nothing, NsdId] = ZIO.succeed(nsdId)
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.GetSolNetworkInstanceResponse
) extends zio.aws.tnb.model.GetSolNetworkInstanceResponse.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 lcmOpInfo
: Optional[zio.aws.tnb.model.LcmOperationInfo.ReadOnly] =
zio.aws.core.internal
.optionalFromNullable(impl.lcmOpInfo())
.map(value => zio.aws.tnb.model.LcmOperationInfo.wrap(value))
override val metadata
: zio.aws.tnb.model.GetSolNetworkInstanceMetadata.ReadOnly =
zio.aws.tnb.model.GetSolNetworkInstanceMetadata.wrap(impl.metadata())
override val nsInstanceDescription: String =
impl.nsInstanceDescription(): String
override val nsInstanceName: String = impl.nsInstanceName(): String
override val nsState: Optional[zio.aws.tnb.model.NsState] =
zio.aws.core.internal
.optionalFromNullable(impl.nsState())
.map(value => zio.aws.tnb.model.NsState.wrap(value))
override val nsdId: NsdId = zio.aws.tnb.model.primitives.NsdId(impl.nsdId())
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.GetSolNetworkInstanceResponse
): zio.aws.tnb.model.GetSolNetworkInstanceResponse.ReadOnly = new Wrapper(
impl
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy