zio.aws.tnb.model.CreateSolFunctionPackageResponse.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, VnfPkgId, VnfPkgArn}
import scala.jdk.CollectionConverters.*
final case class CreateSolFunctionPackageResponse(
arn: VnfPkgArn,
id: VnfPkgId,
onboardingState: zio.aws.tnb.model.OnboardingState,
operationalState: zio.aws.tnb.model.OperationalState,
tags: Optional[Map[TagKey, TagValue]] = Optional.Absent,
usageState: zio.aws.tnb.model.UsageState
) {
def buildAwsValue()
: software.amazon.awssdk.services.tnb.model.CreateSolFunctionPackageResponse = {
import CreateSolFunctionPackageResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.tnb.model.CreateSolFunctionPackageResponse
.builder()
.arn(VnfPkgArn.unwrap(arn): java.lang.String)
.id(VnfPkgId.unwrap(id): java.lang.String)
.onboardingState(onboardingState.unwrap)
.operationalState(operationalState.unwrap)
.optionallyWith(
tags.map(value =>
value
.map({ case (key, value) =>
(TagKey.unwrap(key): java.lang.String) -> (TagValue
.unwrap(value): java.lang.String)
})
.asJava
)
)(_.tags)
.usageState(usageState.unwrap)
.build()
}
def asReadOnly: zio.aws.tnb.model.CreateSolFunctionPackageResponse.ReadOnly =
zio.aws.tnb.model.CreateSolFunctionPackageResponse.wrap(buildAwsValue())
}
object CreateSolFunctionPackageResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.tnb.model.CreateSolFunctionPackageResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.tnb.model.CreateSolFunctionPackageResponse =
zio.aws.tnb.model.CreateSolFunctionPackageResponse(
arn,
id,
onboardingState,
operationalState,
tags.map(value => value),
usageState
)
def arn: VnfPkgArn
def id: VnfPkgId
def onboardingState: zio.aws.tnb.model.OnboardingState
def operationalState: zio.aws.tnb.model.OperationalState
def tags: Optional[Map[TagKey, TagValue]]
def usageState: zio.aws.tnb.model.UsageState
def getArn: ZIO[Any, Nothing, VnfPkgArn] = ZIO.succeed(arn)
def getId: ZIO[Any, Nothing, VnfPkgId] = ZIO.succeed(id)
def getOnboardingState
: ZIO[Any, Nothing, zio.aws.tnb.model.OnboardingState] =
ZIO.succeed(onboardingState)
def getOperationalState
: ZIO[Any, Nothing, zio.aws.tnb.model.OperationalState] =
ZIO.succeed(operationalState)
def getTags: ZIO[Any, AwsError, Map[TagKey, TagValue]] =
AwsError.unwrapOptionField("tags", tags)
def getUsageState: ZIO[Any, Nothing, zio.aws.tnb.model.UsageState] =
ZIO.succeed(usageState)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.tnb.model.CreateSolFunctionPackageResponse
) extends zio.aws.tnb.model.CreateSolFunctionPackageResponse.ReadOnly {
override val arn: VnfPkgArn =
zio.aws.tnb.model.primitives.VnfPkgArn(impl.arn())
override val id: VnfPkgId = zio.aws.tnb.model.primitives.VnfPkgId(impl.id())
override val onboardingState: zio.aws.tnb.model.OnboardingState =
zio.aws.tnb.model.OnboardingState.wrap(impl.onboardingState())
override val operationalState: zio.aws.tnb.model.OperationalState =
zio.aws.tnb.model.OperationalState.wrap(impl.operationalState())
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 usageState: zio.aws.tnb.model.UsageState =
zio.aws.tnb.model.UsageState.wrap(impl.usageState())
}
def wrap(
impl: software.amazon.awssdk.services.tnb.model.CreateSolFunctionPackageResponse
): zio.aws.tnb.model.CreateSolFunctionPackageResponse.ReadOnly = new Wrapper(
impl
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy