zio.aws.costoptimizationhub.model.Ec2ReservedInstancesConfiguration.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 Ec2ReservedInstancesConfiguration(
accountScope: Optional[String] = Optional.Absent,
service: Optional[String] = Optional.Absent,
normalizedUnitsToPurchase: Optional[String] = Optional.Absent,
term: Optional[String] = Optional.Absent,
paymentOption: Optional[String] = Optional.Absent,
numberOfInstancesToPurchase: Optional[String] = Optional.Absent,
offeringClass: Optional[String] = Optional.Absent,
instanceFamily: Optional[String] = Optional.Absent,
instanceType: Optional[String] = Optional.Absent,
reservedInstancesRegion: Optional[String] = Optional.Absent,
currentGeneration: Optional[String] = Optional.Absent,
platform: Optional[String] = Optional.Absent,
tenancy: Optional[String] = Optional.Absent,
sizeFlexEligible: Optional[Boolean] = Optional.Absent,
upfrontCost: Optional[String] = Optional.Absent,
monthlyRecurringCost: Optional[String] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.costoptimizationhub.model.Ec2ReservedInstancesConfiguration = {
import Ec2ReservedInstancesConfiguration.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.costoptimizationhub.model.Ec2ReservedInstancesConfiguration
.builder()
.optionallyWith(accountScope.map(value => value: java.lang.String))(
_.accountScope
)
.optionallyWith(service.map(value => value: java.lang.String))(_.service)
.optionallyWith(
normalizedUnitsToPurchase.map(value => value: java.lang.String)
)(_.normalizedUnitsToPurchase)
.optionallyWith(term.map(value => value: java.lang.String))(_.term)
.optionallyWith(paymentOption.map(value => value: java.lang.String))(
_.paymentOption
)
.optionallyWith(
numberOfInstancesToPurchase.map(value => value: java.lang.String)
)(_.numberOfInstancesToPurchase)
.optionallyWith(offeringClass.map(value => value: java.lang.String))(
_.offeringClass
)
.optionallyWith(instanceFamily.map(value => value: java.lang.String))(
_.instanceFamily
)
.optionallyWith(instanceType.map(value => value: java.lang.String))(
_.instanceType
)
.optionallyWith(
reservedInstancesRegion.map(value => value: java.lang.String)
)(_.reservedInstancesRegion)
.optionallyWith(currentGeneration.map(value => value: java.lang.String))(
_.currentGeneration
)
.optionallyWith(platform.map(value => value: java.lang.String))(
_.platform
)
.optionallyWith(tenancy.map(value => value: java.lang.String))(_.tenancy)
.optionallyWith(sizeFlexEligible.map(value => value: java.lang.Boolean))(
_.sizeFlexEligible
)
.optionallyWith(upfrontCost.map(value => value: java.lang.String))(
_.upfrontCost
)
.optionallyWith(
monthlyRecurringCost.map(value => value: java.lang.String)
)(_.monthlyRecurringCost)
.build()
}
def asReadOnly
: zio.aws.costoptimizationhub.model.Ec2ReservedInstancesConfiguration.ReadOnly =
zio.aws.costoptimizationhub.model.Ec2ReservedInstancesConfiguration
.wrap(buildAwsValue())
}
object Ec2ReservedInstancesConfiguration {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.costoptimizationhub.model.Ec2ReservedInstancesConfiguration
] = BuilderHelper.apply
trait ReadOnly {
def asEditable
: zio.aws.costoptimizationhub.model.Ec2ReservedInstancesConfiguration =
zio.aws.costoptimizationhub.model.Ec2ReservedInstancesConfiguration(
accountScope.map(value => value),
service.map(value => value),
normalizedUnitsToPurchase.map(value => value),
term.map(value => value),
paymentOption.map(value => value),
numberOfInstancesToPurchase.map(value => value),
offeringClass.map(value => value),
instanceFamily.map(value => value),
instanceType.map(value => value),
reservedInstancesRegion.map(value => value),
currentGeneration.map(value => value),
platform.map(value => value),
tenancy.map(value => value),
sizeFlexEligible.map(value => value),
upfrontCost.map(value => value),
monthlyRecurringCost.map(value => value)
)
def accountScope: Optional[String]
def service: Optional[String]
def normalizedUnitsToPurchase: Optional[String]
def term: Optional[String]
def paymentOption: Optional[String]
def numberOfInstancesToPurchase: Optional[String]
def offeringClass: Optional[String]
def instanceFamily: Optional[String]
def instanceType: Optional[String]
def reservedInstancesRegion: Optional[String]
def currentGeneration: Optional[String]
def platform: Optional[String]
def tenancy: Optional[String]
def sizeFlexEligible: Optional[Boolean]
def upfrontCost: Optional[String]
def monthlyRecurringCost: Optional[String]
def getAccountScope: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("accountScope", accountScope)
def getService: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("service", service)
def getNormalizedUnitsToPurchase: ZIO[Any, AwsError, String] = AwsError
.unwrapOptionField("normalizedUnitsToPurchase", normalizedUnitsToPurchase)
def getTerm: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("term", term)
def getPaymentOption: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("paymentOption", paymentOption)
def getNumberOfInstancesToPurchase: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField(
"numberOfInstancesToPurchase",
numberOfInstancesToPurchase
)
def getOfferingClass: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("offeringClass", offeringClass)
def getInstanceFamily: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("instanceFamily", instanceFamily)
def getInstanceType: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("instanceType", instanceType)
def getReservedInstancesRegion: ZIO[Any, AwsError, String] = AwsError
.unwrapOptionField("reservedInstancesRegion", reservedInstancesRegion)
def getCurrentGeneration: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("currentGeneration", currentGeneration)
def getPlatform: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("platform", platform)
def getTenancy: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("tenancy", tenancy)
def getSizeFlexEligible: ZIO[Any, AwsError, Boolean] =
AwsError.unwrapOptionField("sizeFlexEligible", sizeFlexEligible)
def getUpfrontCost: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("upfrontCost", upfrontCost)
def getMonthlyRecurringCost: ZIO[Any, AwsError, String] =
AwsError.unwrapOptionField("monthlyRecurringCost", monthlyRecurringCost)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.costoptimizationhub.model.Ec2ReservedInstancesConfiguration
) extends zio.aws.costoptimizationhub.model.Ec2ReservedInstancesConfiguration.ReadOnly {
override val accountScope: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.accountScope())
.map(value => value: String)
override val service: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.service())
.map(value => value: String)
override val normalizedUnitsToPurchase: Optional[String] =
zio.aws.core.internal
.optionalFromNullable(impl.normalizedUnitsToPurchase())
.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 numberOfInstancesToPurchase: Optional[String] =
zio.aws.core.internal
.optionalFromNullable(impl.numberOfInstancesToPurchase())
.map(value => value: String)
override val offeringClass: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.offeringClass())
.map(value => value: String)
override val instanceFamily: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.instanceFamily())
.map(value => value: String)
override val instanceType: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.instanceType())
.map(value => value: String)
override val reservedInstancesRegion: Optional[String] =
zio.aws.core.internal
.optionalFromNullable(impl.reservedInstancesRegion())
.map(value => value: String)
override val currentGeneration: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.currentGeneration())
.map(value => value: String)
override val platform: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.platform())
.map(value => value: String)
override val tenancy: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.tenancy())
.map(value => value: String)
override val sizeFlexEligible: Optional[Boolean] = zio.aws.core.internal
.optionalFromNullable(impl.sizeFlexEligible())
.map(value => value: Boolean)
override val upfrontCost: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.upfrontCost())
.map(value => value: String)
override val monthlyRecurringCost: Optional[String] = zio.aws.core.internal
.optionalFromNullable(impl.monthlyRecurringCost())
.map(value => value: String)
}
def wrap(
impl: software.amazon.awssdk.services.costoptimizationhub.model.Ec2ReservedInstancesConfiguration
): zio.aws.costoptimizationhub.model.Ec2ReservedInstancesConfiguration.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy