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

zio.aws.costoptimizationhub.model.RecommendationSummary.scala Maven / Gradle / Ivy

The newest version!
package zio.aws.costoptimizationhub.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.aws.costoptimizationhub.model.primitives.Integer
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class RecommendationSummary(
    group: Optional[String] = Optional.Absent,
    estimatedMonthlySavings: Optional[Double] = Optional.Absent,
    recommendationCount: Optional[Integer] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.costoptimizationhub.model.RecommendationSummary = {
    import RecommendationSummary.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.costoptimizationhub.model.RecommendationSummary
      .builder()
      .optionallyWith(group.map(value => value: java.lang.String))(_.group)
      .optionallyWith(
        estimatedMonthlySavings.map(value => value: java.lang.Double)
      )(_.estimatedMonthlySavings)
      .optionallyWith(
        recommendationCount.map(value => value: java.lang.Integer)
      )(_.recommendationCount)
      .build()
  }
  def asReadOnly
      : zio.aws.costoptimizationhub.model.RecommendationSummary.ReadOnly =
    zio.aws.costoptimizationhub.model.RecommendationSummary
      .wrap(buildAwsValue())
}
object RecommendationSummary {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.costoptimizationhub.model.RecommendationSummary
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.costoptimizationhub.model.RecommendationSummary =
      zio.aws.costoptimizationhub.model.RecommendationSummary(
        group.map(value => value),
        estimatedMonthlySavings.map(value => value),
        recommendationCount.map(value => value)
      )
    def group: Optional[String]
    def estimatedMonthlySavings: Optional[Double]
    def recommendationCount: Optional[Integer]
    def getGroup: ZIO[Any, AwsError, String] =
      AwsError.unwrapOptionField("group", group)
    def getEstimatedMonthlySavings: ZIO[Any, AwsError, Double] = AwsError
      .unwrapOptionField("estimatedMonthlySavings", estimatedMonthlySavings)
    def getRecommendationCount: ZIO[Any, AwsError, Integer] =
      AwsError.unwrapOptionField("recommendationCount", recommendationCount)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.costoptimizationhub.model.RecommendationSummary
  ) extends zio.aws.costoptimizationhub.model.RecommendationSummary.ReadOnly {
    override val group: Optional[String] = zio.aws.core.internal
      .optionalFromNullable(impl.group())
      .map(value => value: String)
    override val estimatedMonthlySavings: Optional[Double] =
      zio.aws.core.internal
        .optionalFromNullable(impl.estimatedMonthlySavings())
        .map(value => value: Double)
    override val recommendationCount: Optional[Integer] = zio.aws.core.internal
      .optionalFromNullable(impl.recommendationCount())
      .map(value => value: Integer)
  }
  def wrap(
      impl: software.amazon.awssdk.services.costoptimizationhub.model.RecommendationSummary
  ): zio.aws.costoptimizationhub.model.RecommendationSummary.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy