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