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