zio.aws.costoptimizationhub.model.EbsVolume.scala Maven / Gradle / Ivy
The newest version!
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 EbsVolume(
configuration: Optional[
zio.aws.costoptimizationhub.model.EbsVolumeConfiguration
] = Optional.Absent,
costCalculation: Optional[
zio.aws.costoptimizationhub.model.ResourceCostCalculation
] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.costoptimizationhub.model.EbsVolume = {
import EbsVolume.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.costoptimizationhub.model.EbsVolume
.builder()
.optionallyWith(configuration.map(value => value.buildAwsValue()))(
_.configuration
)
.optionallyWith(costCalculation.map(value => value.buildAwsValue()))(
_.costCalculation
)
.build()
}
def asReadOnly: zio.aws.costoptimizationhub.model.EbsVolume.ReadOnly =
zio.aws.costoptimizationhub.model.EbsVolume.wrap(buildAwsValue())
}
object EbsVolume {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.costoptimizationhub.model.EbsVolume
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.costoptimizationhub.model.EbsVolume =
zio.aws.costoptimizationhub.model.EbsVolume(
configuration.map(value => value.asEditable),
costCalculation.map(value => value.asEditable)
)
def configuration: Optional[
zio.aws.costoptimizationhub.model.EbsVolumeConfiguration.ReadOnly
]
def costCalculation: Optional[
zio.aws.costoptimizationhub.model.ResourceCostCalculation.ReadOnly
]
def getConfiguration: ZIO[
Any,
AwsError,
zio.aws.costoptimizationhub.model.EbsVolumeConfiguration.ReadOnly
] = AwsError.unwrapOptionField("configuration", configuration)
def getCostCalculation: ZIO[
Any,
AwsError,
zio.aws.costoptimizationhub.model.ResourceCostCalculation.ReadOnly
] = AwsError.unwrapOptionField("costCalculation", costCalculation)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.costoptimizationhub.model.EbsVolume
) extends zio.aws.costoptimizationhub.model.EbsVolume.ReadOnly {
override val configuration: Optional[
zio.aws.costoptimizationhub.model.EbsVolumeConfiguration.ReadOnly
] = zio.aws.core.internal
.optionalFromNullable(impl.configuration())
.map(value =>
zio.aws.costoptimizationhub.model.EbsVolumeConfiguration.wrap(value)
)
override val costCalculation: Optional[
zio.aws.costoptimizationhub.model.ResourceCostCalculation.ReadOnly
] = zio.aws.core.internal
.optionalFromNullable(impl.costCalculation())
.map(value =>
zio.aws.costoptimizationhub.model.ResourceCostCalculation.wrap(value)
)
}
def wrap(
impl: software.amazon.awssdk.services.costoptimizationhub.model.EbsVolume
): zio.aws.costoptimizationhub.model.EbsVolume.ReadOnly = new Wrapper(impl)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy