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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy