zio.aws.tnb.model.ListSolFunctionPackageInfo.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, VnfPkgArn}
import scala.jdk.CollectionConverters.*
final case class ListSolFunctionPackageInfo(
arn: VnfPkgArn,
id: VnfPkgId,
metadata: Optional[zio.aws.tnb.model.ListSolFunctionPackageMetadata] =
Optional.Absent,
onboardingState: zio.aws.tnb.model.OnboardingState,
operationalState: zio.aws.tnb.model.OperationalState,
usageState: zio.aws.tnb.model.UsageState,
vnfProductName: Optional[String] = Optional.Absent,
vnfProvider: Optional[String] = Optional.Absent,
vnfdId: Optional[String] = Optional.Absent,
vnfdVersion: Optional[String] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.tnb.model.ListSolFunctionPackageInfo = {
import ListSolFunctionPackageInfo.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.tnb.model.ListSolFunctionPackageInfo
.builder()
.arn(VnfPkgArn.unwrap(arn): java.lang.String)
.id(VnfPkgId.unwrap(id): java.lang.String)
.optionallyWith(metadata.map(value => value.buildAwsValue()))(_.metadata)
.onboardingState(onboardingState.unwrap)
.operationalState(operationalState.unwrap)
.usageState(usageState.unwrap)
.optionallyWith(vnfProductName.map(value => value: java.lang.String))(
_.vnfProductName
)
.optionallyWith(vnfProvider.map(value => value: java.lang.String))(
_.vnfProvider
)
.optionallyWith(vnfdId.map(value => value: java.lang.String))(_.vnfdId)
.optionallyWith(vnfdVersion.map(value => value: java.lang.String))(
_.vnfdVersion
)
.build()
}
def asReadOnly: zio.aws.tnb.model.ListSolFunctionPackageInfo.ReadOnly =
zio.aws.tnb.model.ListSolFunctionPackageInfo.wrap(buildAwsValue())
}
object ListSolFunctionPackageInfo {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.tnb.model.ListSolFunctionPackageInfo
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.tnb.model.ListSolFunctionPackageInfo =
zio.aws.tnb.model.ListSolFunctionPackageInfo(
arn,
id,
metadata.map(value => value.asEditable),
onboardingState,
operationalState,
usageState,
vnfProductName.map(value => value),
vnfProvider.map(value => value),
vnfdId.map(value => value),
vnfdVersion.map(value => value)
)
def arn: VnfPkgArn
def id: VnfPkgId
def metadata
: Optional[zio.aws.tnb.model.ListSolFunctionPackageMetadata.ReadOnly]
def onboardingState: zio.aws.tnb.model.OnboardingState
def operationalState: zio.aws.tnb.model.OperationalState
def usageState: zio.aws.tnb.model.UsageState
def vnfProductName: Optional[String]
def vnfProvider: Optional[String]
def vnfdId: Optional[String]
def vnfdVersion: Optional[String]
def getArn: ZIO[Any, Nothing, VnfPkgArn] = ZIO.succeed(arn)
def getId: ZIO[Any, Nothing, VnfPkgId] = ZIO.succeed(id)
def getMetadata: ZIO[
Any,
AwsError,
zio.aws.tnb.model.ListSolFunctionPackageMetadata.ReadOnly
] = AwsError.unwrapOptionField("metadata", metadata)
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 getUsageState: ZIO[Any, Nothing, zio.aws.tnb.model.UsageState] =
ZIO.succeed(usageState)
def getVnfProductName: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("vnfProductName", vnfProductName)
def getVnfProvider: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("vnfProvider", vnfProvider)
def getVnfdId: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("vnfdId", vnfdId)
def getVnfdVersion: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("vnfdVersion", vnfdVersion)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.tnb.model.ListSolFunctionPackageInfo
) extends zio.aws.tnb.model.ListSolFunctionPackageInfo.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 metadata
: Optional[zio.aws.tnb.model.ListSolFunctionPackageMetadata.ReadOnly] =
zio.aws.core.internal
.optionalFromNullable(impl.metadata())
.map(value =>
zio.aws.tnb.model.ListSolFunctionPackageMetadata.wrap(value)
)
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 usageState: zio.aws.tnb.model.UsageState =
zio.aws.tnb.model.UsageState.wrap(impl.usageState())
override val vnfProductName: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.vnfProductName())
.map(value => value: String)
override val vnfProvider: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.vnfProvider())
.map(value => value: String)
override val vnfdId: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.vnfdId())
.map(value => value: String)
override val vnfdVersion: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.vnfdVersion())
.map(value => value: String)
}
def wrap(
impl: software.amazon.awssdk.services.tnb.model.ListSolFunctionPackageInfo
): zio.aws.tnb.model.ListSolFunctionPackageInfo.ReadOnly = new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy