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