
io.github.vigoo.zioaws.elasticbeanstalk.model.StatusCodes.scala Maven / Gradle / Ivy
package io.github.vigoo.zioaws.elasticbeanstalk.model
import java.lang.Integer
import zio.ZIO
import io.github.vigoo.zioaws.elasticbeanstalk.model.primitives.NullableInteger
import io.github.vigoo.zioaws.core.{AwsError, BuilderHelper}
import scala.jdk.CollectionConverters._
final case class StatusCodes(
status2xx: Option[NullableInteger] = None,
status3xx: Option[NullableInteger] = None,
status4xx: Option[NullableInteger] = None,
status5xx: Option[NullableInteger] = None
) {
def buildAwsValue()
: software.amazon.awssdk.services.elasticbeanstalk.model.StatusCodes = {
import StatusCodes.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.elasticbeanstalk.model.StatusCodes
.builder()
.optionallyWith(status2xx.map(value => value: Integer))(_.status2xx)
.optionallyWith(status3xx.map(value => value: Integer))(_.status3xx)
.optionallyWith(status4xx.map(value => value: Integer))(_.status4xx)
.optionallyWith(status5xx.map(value => value: Integer))(_.status5xx)
.build()
}
def asReadOnly
: io.github.vigoo.zioaws.elasticbeanstalk.model.StatusCodes.ReadOnly =
io.github.vigoo.zioaws.elasticbeanstalk.model.StatusCodes
.wrap(buildAwsValue())
}
object StatusCodes {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.elasticbeanstalk.model.StatusCodes
] = BuilderHelper.apply
trait ReadOnly {
def editable: io.github.vigoo.zioaws.elasticbeanstalk.model.StatusCodes =
io.github.vigoo.zioaws.elasticbeanstalk.model.StatusCodes(
status2xxValue.map(value => value),
status3xxValue.map(value => value),
status4xxValue.map(value => value),
status5xxValue.map(value => value)
)
def status2xxValue: Option[NullableInteger]
def status3xxValue: Option[NullableInteger]
def status4xxValue: Option[NullableInteger]
def status5xxValue: Option[NullableInteger]
def status2xx: ZIO[Any, AwsError, NullableInteger] =
AwsError.unwrapOptionField("status2xx", status2xxValue)
def status3xx: ZIO[Any, AwsError, NullableInteger] =
AwsError.unwrapOptionField("status3xx", status3xxValue)
def status4xx: ZIO[Any, AwsError, NullableInteger] =
AwsError.unwrapOptionField("status4xx", status4xxValue)
def status5xx: ZIO[Any, AwsError, NullableInteger] =
AwsError.unwrapOptionField("status5xx", status5xxValue)
}
private class Wrapper(
impl: software.amazon.awssdk.services.elasticbeanstalk.model.StatusCodes
) extends io.github.vigoo.zioaws.elasticbeanstalk.model.StatusCodes.ReadOnly {
override def status2xxValue: Option[NullableInteger] =
scala.Option(impl.status2xx()).map(value => value: NullableInteger)
override def status3xxValue: Option[NullableInteger] =
scala.Option(impl.status3xx()).map(value => value: NullableInteger)
override def status4xxValue: Option[NullableInteger] =
scala.Option(impl.status4xx()).map(value => value: NullableInteger)
override def status5xxValue: Option[NullableInteger] =
scala.Option(impl.status5xx()).map(value => value: NullableInteger)
}
def wrap(
impl: software.amazon.awssdk.services.elasticbeanstalk.model.StatusCodes
): io.github.vigoo.zioaws.elasticbeanstalk.model.StatusCodes.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy