zio.aws.tnb.model.GetSolNetworkPackageResponse.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,
NsdInfoId,
NsdInfoArn,
VnfPkgId,
TagKey
}
import scala.jdk.CollectionConverters.*
final case class GetSolNetworkPackageResponse(
arn: NsdInfoArn,
id: NsdInfoId,
metadata: zio.aws.tnb.model.GetSolNetworkPackageMetadata,
nsdId: NsdId,
nsdName: String,
nsdOnboardingState: zio.aws.tnb.model.NsdOnboardingState,
nsdOperationalState: zio.aws.tnb.model.NsdOperationalState,
nsdUsageState: zio.aws.tnb.model.NsdUsageState,
nsdVersion: String,
tags: Optional[Map[TagKey, TagValue]] = Optional.Absent,
vnfPkgIds: Iterable[VnfPkgId]
) {
def buildAwsValue()
: software.amazon.awssdk.services.tnb.model.GetSolNetworkPackageResponse = {
import GetSolNetworkPackageResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.tnb.model.GetSolNetworkPackageResponse
.builder()
.arn(NsdInfoArn.unwrap(arn): java.lang.String)
.id(NsdInfoId.unwrap(id): java.lang.String)
.metadata(metadata.buildAwsValue())
.nsdId(NsdId.unwrap(nsdId): java.lang.String)
.nsdName(nsdName: java.lang.String)
.nsdOnboardingState(nsdOnboardingState.unwrap)
.nsdOperationalState(nsdOperationalState.unwrap)
.nsdUsageState(nsdUsageState.unwrap)
.nsdVersion(nsdVersion: 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)
.vnfPkgIds(vnfPkgIds.map { item =>
VnfPkgId.unwrap(item): java.lang.String
}.asJavaCollection)
.build()
}
def asReadOnly: zio.aws.tnb.model.GetSolNetworkPackageResponse.ReadOnly =
zio.aws.tnb.model.GetSolNetworkPackageResponse.wrap(buildAwsValue())
}
object GetSolNetworkPackageResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.tnb.model.GetSolNetworkPackageResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.tnb.model.GetSolNetworkPackageResponse =
zio.aws.tnb.model.GetSolNetworkPackageResponse(
arn,
id,
metadata.asEditable,
nsdId,
nsdName,
nsdOnboardingState,
nsdOperationalState,
nsdUsageState,
nsdVersion,
tags.map(value => value),
vnfPkgIds
)
def arn: NsdInfoArn
def id: NsdInfoId
def metadata: zio.aws.tnb.model.GetSolNetworkPackageMetadata.ReadOnly
def nsdId: NsdId
def nsdName: String
def nsdOnboardingState: zio.aws.tnb.model.NsdOnboardingState
def nsdOperationalState: zio.aws.tnb.model.NsdOperationalState
def nsdUsageState: zio.aws.tnb.model.NsdUsageState
def nsdVersion: String
def tags: Optional[Map[TagKey, TagValue]]
def vnfPkgIds: List[VnfPkgId]
def getArn: ZIO[Any, Nothing, NsdInfoArn] = ZIO.succeed(arn)
def getId: ZIO[Any, Nothing, NsdInfoId] = ZIO.succeed(id)
def getMetadata: ZIO[
Any,
Nothing,
zio.aws.tnb.model.GetSolNetworkPackageMetadata.ReadOnly
] = ZIO.succeed(metadata)
def getNsdId: ZIO[Any, Nothing, NsdId] = ZIO.succeed(nsdId)
def getNsdName: ZIO[Any, Nothing, String] = ZIO.succeed(nsdName)
def getNsdOnboardingState
: ZIO[Any, Nothing, zio.aws.tnb.model.NsdOnboardingState] =
ZIO.succeed(nsdOnboardingState)
def getNsdOperationalState
: ZIO[Any, Nothing, zio.aws.tnb.model.NsdOperationalState] =
ZIO.succeed(nsdOperationalState)
def getNsdUsageState: ZIO[Any, Nothing, zio.aws.tnb.model.NsdUsageState] =
ZIO.succeed(nsdUsageState)
def getNsdVersion: ZIO[Any, Nothing, String] = ZIO.succeed(nsdVersion)
def getTags: ZIO[Any, AwsError, Map[TagKey, TagValue]] =
AwsError.unwrapOptionField("tags", tags)
def getVnfPkgIds: ZIO[Any, Nothing, List[VnfPkgId]] = ZIO.succeed(vnfPkgIds)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.tnb.model.GetSolNetworkPackageResponse
) extends zio.aws.tnb.model.GetSolNetworkPackageResponse.ReadOnly {
override val arn: NsdInfoArn =
zio.aws.tnb.model.primitives.NsdInfoArn(impl.arn())
override val id: NsdInfoId =
zio.aws.tnb.model.primitives.NsdInfoId(impl.id())
override val metadata
: zio.aws.tnb.model.GetSolNetworkPackageMetadata.ReadOnly =
zio.aws.tnb.model.GetSolNetworkPackageMetadata.wrap(impl.metadata())
override val nsdId: NsdId = zio.aws.tnb.model.primitives.NsdId(impl.nsdId())
override val nsdName: String = impl.nsdName(): String
override val nsdOnboardingState: zio.aws.tnb.model.NsdOnboardingState =
zio.aws.tnb.model.NsdOnboardingState.wrap(impl.nsdOnboardingState())
override val nsdOperationalState: zio.aws.tnb.model.NsdOperationalState =
zio.aws.tnb.model.NsdOperationalState.wrap(impl.nsdOperationalState())
override val nsdUsageState: zio.aws.tnb.model.NsdUsageState =
zio.aws.tnb.model.NsdUsageState.wrap(impl.nsdUsageState())
override val nsdVersion: String = impl.nsdVersion(): String
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 vnfPkgIds: List[VnfPkgId] = impl
.vnfPkgIds()
.asScala
.map { item =>
zio.aws.tnb.model.primitives.VnfPkgId(item)
}
.toList
}
def wrap(
impl: software.amazon.awssdk.services.tnb.model.GetSolNetworkPackageResponse
): zio.aws.tnb.model.GetSolNetworkPackageResponse.ReadOnly = new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy