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

zio.aws.costoptimizationhub.model.RdsDbInstanceConfiguration.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 RdsDbInstanceConfiguration(
    instance: Optional[
      zio.aws.costoptimizationhub.model.DbInstanceConfiguration
    ] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.costoptimizationhub.model.RdsDbInstanceConfiguration = {
    import RdsDbInstanceConfiguration.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.costoptimizationhub.model.RdsDbInstanceConfiguration
      .builder()
      .optionallyWith(instance.map(value => value.buildAwsValue()))(_.instance)
      .build()
  }
  def asReadOnly
      : zio.aws.costoptimizationhub.model.RdsDbInstanceConfiguration.ReadOnly =
    zio.aws.costoptimizationhub.model.RdsDbInstanceConfiguration
      .wrap(buildAwsValue())
}
object RdsDbInstanceConfiguration {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.costoptimizationhub.model.RdsDbInstanceConfiguration
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable
        : zio.aws.costoptimizationhub.model.RdsDbInstanceConfiguration =
      zio.aws.costoptimizationhub.model
        .RdsDbInstanceConfiguration(instance.map(value => value.asEditable))
    def instance: Optional[
      zio.aws.costoptimizationhub.model.DbInstanceConfiguration.ReadOnly
    ]
    def getInstance: ZIO[
      Any,
      AwsError,
      zio.aws.costoptimizationhub.model.DbInstanceConfiguration.ReadOnly
    ] = AwsError.unwrapOptionField("instance", instance)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.costoptimizationhub.model.RdsDbInstanceConfiguration
  ) extends zio.aws.costoptimizationhub.model.RdsDbInstanceConfiguration.ReadOnly {
    override val instance: Optional[
      zio.aws.costoptimizationhub.model.DbInstanceConfiguration.ReadOnly
    ] = zio.aws.core.internal
      .optionalFromNullable(impl.instance())
      .map(value =>
        zio.aws.costoptimizationhub.model.DbInstanceConfiguration.wrap(value)
      )
  }
  def wrap(
      impl: software.amazon.awssdk.services.costoptimizationhub.model.RdsDbInstanceConfiguration
  ): zio.aws.costoptimizationhub.model.RdsDbInstanceConfiguration.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy