All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.vigoo.zioaws.elasticloadbalancing.model.ConfigureHealthCheckResponse.scala Maven / Gradle / Ivy

package io.github.vigoo.zioaws.elasticloadbalancing.model
import zio.ZIO
import io.github.vigoo.zioaws.core.{AwsError, BuilderHelper}
import scala.jdk.CollectionConverters._
final case class ConfigureHealthCheckResponse(
    healthCheck: Option[
      io.github.vigoo.zioaws.elasticloadbalancing.model.HealthCheck
    ] = None
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.elasticloadbalancing.model.ConfigureHealthCheckResponse = {
    import ConfigureHealthCheckResponse.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.elasticloadbalancing.model.ConfigureHealthCheckResponse
      .builder()
      .optionallyWith(healthCheck.map(value => value.buildAwsValue()))(
        _.healthCheck
      )
      .build()
  }
  def asReadOnly
      : io.github.vigoo.zioaws.elasticloadbalancing.model.ConfigureHealthCheckResponse.ReadOnly =
    io.github.vigoo.zioaws.elasticloadbalancing.model.ConfigureHealthCheckResponse
      .wrap(buildAwsValue())
}
object ConfigureHealthCheckResponse {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.elasticloadbalancing.model.ConfigureHealthCheckResponse
  ] = BuilderHelper.apply
  trait ReadOnly {
    def editable
        : io.github.vigoo.zioaws.elasticloadbalancing.model.ConfigureHealthCheckResponse =
      io.github.vigoo.zioaws.elasticloadbalancing.model
        .ConfigureHealthCheckResponse(
          healthCheckValue.map(value => value.editable)
        )
    def healthCheckValue: Option[
      io.github.vigoo.zioaws.elasticloadbalancing.model.HealthCheck.ReadOnly
    ]
    def healthCheck: ZIO[
      Any,
      AwsError,
      io.github.vigoo.zioaws.elasticloadbalancing.model.HealthCheck.ReadOnly
    ] = AwsError.unwrapOptionField("healthCheck", healthCheckValue)
  }
  private class Wrapper(
      impl: software.amazon.awssdk.services.elasticloadbalancing.model.ConfigureHealthCheckResponse
  ) extends io.github.vigoo.zioaws.elasticloadbalancing.model.ConfigureHealthCheckResponse.ReadOnly {
    override def healthCheckValue: Option[
      io.github.vigoo.zioaws.elasticloadbalancing.model.HealthCheck.ReadOnly
    ] = scala
      .Option(impl.healthCheck())
      .map(value =>
        io.github.vigoo.zioaws.elasticloadbalancing.model.HealthCheck
          .wrap(value)
      )
  }
  def wrap(
      impl: software.amazon.awssdk.services.elasticloadbalancing.model.ConfigureHealthCheckResponse
  ): io.github.vigoo.zioaws.elasticloadbalancing.model.ConfigureHealthCheckResponse.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy