zio.aws.costoptimizationhub.model.LambdaFunctionConfiguration.scala Maven / Gradle / Ivy
package zio.aws.costoptimizationhub.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters._
final case class LambdaFunctionConfiguration(
compute: Optional[zio.aws.costoptimizationhub.model.ComputeConfiguration] =
Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.costoptimizationhub.model.LambdaFunctionConfiguration = {
import LambdaFunctionConfiguration.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.costoptimizationhub.model.LambdaFunctionConfiguration
.builder()
.optionallyWith(compute.map(value => value.buildAwsValue()))(_.compute)
.build()
}
def asReadOnly
: zio.aws.costoptimizationhub.model.LambdaFunctionConfiguration.ReadOnly =
zio.aws.costoptimizationhub.model.LambdaFunctionConfiguration
.wrap(buildAwsValue())
}
object LambdaFunctionConfiguration {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.costoptimizationhub.model.LambdaFunctionConfiguration
] = BuilderHelper.apply
trait ReadOnly {
def asEditable
: zio.aws.costoptimizationhub.model.LambdaFunctionConfiguration =
zio.aws.costoptimizationhub.model
.LambdaFunctionConfiguration(compute.map(value => value.asEditable))
def compute: Optional[
zio.aws.costoptimizationhub.model.ComputeConfiguration.ReadOnly
]
def getCompute: ZIO[
Any,
AwsError,
zio.aws.costoptimizationhub.model.ComputeConfiguration.ReadOnly
] = AwsError.unwrapOptionField("compute", compute)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.costoptimizationhub.model.LambdaFunctionConfiguration
) extends zio.aws.costoptimizationhub.model.LambdaFunctionConfiguration.ReadOnly {
override val compute: Optional[
zio.aws.costoptimizationhub.model.ComputeConfiguration.ReadOnly
] = zio.aws.core.internal
.optionalFromNullable(impl.compute())
.map(value =>
zio.aws.costoptimizationhub.model.ComputeConfiguration.wrap(value)
)
}
def wrap(
impl: software.amazon.awssdk.services.costoptimizationhub.model.LambdaFunctionConfiguration
): zio.aws.costoptimizationhub.model.LambdaFunctionConfiguration.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy