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