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