zio.aws.tnb.model.ListSolNetworkPackageInfo.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.{VnfPkgId, NsdInfoId, NsdInfoArn}
import scala.jdk.CollectionConverters.*
final case class ListSolNetworkPackageInfo(
arn: NsdInfoArn,
id: NsdInfoId,
metadata: zio.aws.tnb.model.ListSolNetworkPackageMetadata,
nsdDesigner: Optional[String] = Optional.Absent,
nsdId: Optional[String] = Optional.Absent,
nsdInvariantId: Optional[String] = Optional.Absent,
nsdName: Optional[String] = Optional.Absent,
nsdOnboardingState: zio.aws.tnb.model.NsdOnboardingState,
nsdOperationalState: zio.aws.tnb.model.NsdOperationalState,
nsdUsageState: zio.aws.tnb.model.NsdUsageState,
nsdVersion: Optional[String] = Optional.Absent,
vnfPkgIds: Optional[Iterable[VnfPkgId]] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.tnb.model.ListSolNetworkPackageInfo = {
import ListSolNetworkPackageInfo.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.tnb.model.ListSolNetworkPackageInfo
.builder()
.arn(NsdInfoArn.unwrap(arn): java.lang.String)
.id(NsdInfoId.unwrap(id): java.lang.String)
.metadata(metadata.buildAwsValue())
.optionallyWith(nsdDesigner.map(value => value: java.lang.String))(
_.nsdDesigner
)
.optionallyWith(nsdId.map(value => value: java.lang.String))(_.nsdId)
.optionallyWith(nsdInvariantId.map(value => value: java.lang.String))(
_.nsdInvariantId
)
.optionallyWith(nsdName.map(value => value: java.lang.String))(_.nsdName)
.nsdOnboardingState(nsdOnboardingState.unwrap)
.nsdOperationalState(nsdOperationalState.unwrap)
.nsdUsageState(nsdUsageState.unwrap)
.optionallyWith(nsdVersion.map(value => value: java.lang.String))(
_.nsdVersion
)
.optionallyWith(
vnfPkgIds.map(value =>
value.map { item =>
VnfPkgId.unwrap(item): java.lang.String
}.asJavaCollection
)
)(_.vnfPkgIds)
.build()
}
def asReadOnly: zio.aws.tnb.model.ListSolNetworkPackageInfo.ReadOnly =
zio.aws.tnb.model.ListSolNetworkPackageInfo.wrap(buildAwsValue())
}
object ListSolNetworkPackageInfo {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.tnb.model.ListSolNetworkPackageInfo
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.tnb.model.ListSolNetworkPackageInfo =
zio.aws.tnb.model.ListSolNetworkPackageInfo(
arn,
id,
metadata.asEditable,
nsdDesigner.map(value => value),
nsdId.map(value => value),
nsdInvariantId.map(value => value),
nsdName.map(value => value),
nsdOnboardingState,
nsdOperationalState,
nsdUsageState,
nsdVersion.map(value => value),
vnfPkgIds.map(value => value)
)
def arn: NsdInfoArn
def id: NsdInfoId
def metadata: zio.aws.tnb.model.ListSolNetworkPackageMetadata.ReadOnly
def nsdDesigner: Optional[String]
def nsdId: Optional[String]
def nsdInvariantId: Optional[String]
def nsdName: Optional[String]
def nsdOnboardingState: zio.aws.tnb.model.NsdOnboardingState
def nsdOperationalState: zio.aws.tnb.model.NsdOperationalState
def nsdUsageState: zio.aws.tnb.model.NsdUsageState
def nsdVersion: Optional[String]
def vnfPkgIds: Optional[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.ListSolNetworkPackageMetadata.ReadOnly
] = ZIO.succeed(metadata)
def getNsdDesigner: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("nsdDesigner", nsdDesigner)
def getNsdId: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("nsdId", nsdId)
def getNsdInvariantId: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("nsdInvariantId", nsdInvariantId)
def getNsdName: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("nsdName", 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, AwsError, String] =
AwsError.unwrapOptionField("nsdVersion", nsdVersion)
def getVnfPkgIds: ZIO[Any, AwsError, List[VnfPkgId]] =
AwsError.unwrapOptionField("vnfPkgIds", vnfPkgIds)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.tnb.model.ListSolNetworkPackageInfo
) extends zio.aws.tnb.model.ListSolNetworkPackageInfo.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.ListSolNetworkPackageMetadata.ReadOnly =
zio.aws.tnb.model.ListSolNetworkPackageMetadata.wrap(impl.metadata())
override val nsdDesigner: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.nsdDesigner())
.map(value => value: String)
override val nsdId: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.nsdId())
.map(value => value: String)
override val nsdInvariantId: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.nsdInvariantId())
.map(value => value: String)
override val nsdName: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.nsdName())
.map(value => value: 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: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.nsdVersion())
.map(value => value: String)
override val vnfPkgIds: Optional[List[VnfPkgId]] = zio.aws.core.internal
.optionalFromNullable(impl.vnfPkgIds())
.map(value =>
value.asScala.map { item =>
zio.aws.tnb.model.primitives.VnfPkgId(item)
}.toList
)
}
def wrap(
impl: software.amazon.awssdk.services.tnb.model.ListSolNetworkPackageInfo
): zio.aws.tnb.model.ListSolNetworkPackageInfo.ReadOnly = new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy