All Downloads are FREE. Search and download functionalities are using the official Maven repository.

zio.aws.costoptimizationhub.model.RdsDbInstanceStorageConfiguration.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 RdsDbInstanceStorageConfiguration(
    storageType: Optional[String] = Optional.Absent,
    allocatedStorageInGb: Optional[Double] = Optional.Absent,
    iops: Optional[Double] = Optional.Absent,
    storageThroughput: Optional[Double] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.costoptimizationhub.model.RdsDbInstanceStorageConfiguration = {
    import RdsDbInstanceStorageConfiguration.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.costoptimizationhub.model.RdsDbInstanceStorageConfiguration
      .builder()
      .optionallyWith(storageType.map(value => value: java.lang.String))(
        _.storageType
      )
      .optionallyWith(
        allocatedStorageInGb.map(value => value: java.lang.Double)
      )(_.allocatedStorageInGb)
      .optionallyWith(iops.map(value => value: java.lang.Double))(_.iops)
      .optionallyWith(storageThroughput.map(value => value: java.lang.Double))(
        _.storageThroughput
      )
      .build()
  }
  def asReadOnly
      : zio.aws.costoptimizationhub.model.RdsDbInstanceStorageConfiguration.ReadOnly =
    zio.aws.costoptimizationhub.model.RdsDbInstanceStorageConfiguration
      .wrap(buildAwsValue())
}
object RdsDbInstanceStorageConfiguration {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.costoptimizationhub.model.RdsDbInstanceStorageConfiguration
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable
        : zio.aws.costoptimizationhub.model.RdsDbInstanceStorageConfiguration =
      zio.aws.costoptimizationhub.model.RdsDbInstanceStorageConfiguration(
        storageType.map(value => value),
        allocatedStorageInGb.map(value => value),
        iops.map(value => value),
        storageThroughput.map(value => value)
      )
    def storageType: Optional[String]
    def allocatedStorageInGb: Optional[Double]
    def iops: Optional[Double]
    def storageThroughput: Optional[Double]
    def getStorageType: ZIO[Any, AwsError, String] =
      AwsError.unwrapOptionField("storageType", storageType)
    def getAllocatedStorageInGb: ZIO[Any, AwsError, Double] =
      AwsError.unwrapOptionField("allocatedStorageInGb", allocatedStorageInGb)
    def getIops: ZIO[Any, AwsError, Double] =
      AwsError.unwrapOptionField("iops", iops)
    def getStorageThroughput: ZIO[Any, AwsError, Double] =
      AwsError.unwrapOptionField("storageThroughput", storageThroughput)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.costoptimizationhub.model.RdsDbInstanceStorageConfiguration
  ) extends zio.aws.costoptimizationhub.model.RdsDbInstanceStorageConfiguration.ReadOnly {
    override val storageType: Optional[String] = zio.aws.core.internal
      .optionalFromNullable(impl.storageType())
      .map(value => value: String)
    override val allocatedStorageInGb: Optional[Double] = zio.aws.core.internal
      .optionalFromNullable(impl.allocatedStorageInGb())
      .map(value => value: Double)
    override val iops: Optional[Double] = zio.aws.core.internal
      .optionalFromNullable(impl.iops())
      .map(value => value: Double)
    override val storageThroughput: Optional[Double] = zio.aws.core.internal
      .optionalFromNullable(impl.storageThroughput())
      .map(value => value: Double)
  }
  def wrap(
      impl: software.amazon.awssdk.services.costoptimizationhub.model.RdsDbInstanceStorageConfiguration
  ): zio.aws.costoptimizationhub.model.RdsDbInstanceStorageConfiguration.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy