zio.aws.costoptimizationhub.model.BlockStoragePerformanceConfiguration.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 BlockStoragePerformanceConfiguration(
iops: Optional[Double] = Optional.Absent,
throughput: Optional[Double] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.costoptimizationhub.model.BlockStoragePerformanceConfiguration = {
import BlockStoragePerformanceConfiguration.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.costoptimizationhub.model.BlockStoragePerformanceConfiguration
.builder()
.optionallyWith(iops.map(value => value: java.lang.Double))(_.iops)
.optionallyWith(throughput.map(value => value: java.lang.Double))(
_.throughput
)
.build()
}
def asReadOnly
: zio.aws.costoptimizationhub.model.BlockStoragePerformanceConfiguration.ReadOnly =
zio.aws.costoptimizationhub.model.BlockStoragePerformanceConfiguration
.wrap(buildAwsValue())
}
object BlockStoragePerformanceConfiguration {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.costoptimizationhub.model.BlockStoragePerformanceConfiguration
] = BuilderHelper.apply
trait ReadOnly {
def asEditable
: zio.aws.costoptimizationhub.model.BlockStoragePerformanceConfiguration =
zio.aws.costoptimizationhub.model.BlockStoragePerformanceConfiguration(
iops.map(value => value),
throughput.map(value => value)
)
def iops: Optional[Double]
def throughput: Optional[Double]
def getIops: ZIO[Any, AwsError, Double] =
AwsError.unwrapOptionField("iops", iops)
def getThroughput: ZIO[Any, AwsError, Double] =
AwsError.unwrapOptionField("throughput", throughput)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.costoptimizationhub.model.BlockStoragePerformanceConfiguration
) extends zio.aws.costoptimizationhub.model.BlockStoragePerformanceConfiguration.ReadOnly {
override val iops: Optional[Double] = zio.aws.core.internal
.optionalFromNullable(impl.iops())
.map(value => value: Double)
override val throughput: Optional[Double] = zio.aws.core.internal
.optionalFromNullable(impl.throughput())
.map(value => value: Double)
}
def wrap(
impl: software.amazon.awssdk.services.costoptimizationhub.model.BlockStoragePerformanceConfiguration
): zio.aws.costoptimizationhub.model.BlockStoragePerformanceConfiguration.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy