
io.github.vigoo.zioaws.elasticloadbalancing.model.HealthCheck.scala Maven / Gradle / Ivy
package io.github.vigoo.zioaws.elasticloadbalancing.model
import java.lang.Integer
import zio.ZIO
import io.github.vigoo.zioaws.elasticloadbalancing.model.primitives.{
HealthCheckInterval,
HealthCheckTarget,
HealthCheckTimeout,
HealthyThreshold,
UnhealthyThreshold
}
import io.github.vigoo.zioaws.core.BuilderHelper
import scala.jdk.CollectionConverters._
final case class HealthCheck(
target: HealthCheckTarget,
interval: HealthCheckInterval,
timeout: HealthCheckTimeout,
unhealthyThreshold: UnhealthyThreshold,
healthyThreshold: HealthyThreshold
) {
def buildAwsValue()
: software.amazon.awssdk.services.elasticloadbalancing.model.HealthCheck = {
import HealthCheck.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.elasticloadbalancing.model.HealthCheck
.builder()
.target(target: java.lang.String)
.interval(interval: Integer)
.timeout(timeout: Integer)
.unhealthyThreshold(unhealthyThreshold: Integer)
.healthyThreshold(healthyThreshold: Integer)
.build()
}
def asReadOnly
: io.github.vigoo.zioaws.elasticloadbalancing.model.HealthCheck.ReadOnly =
io.github.vigoo.zioaws.elasticloadbalancing.model.HealthCheck
.wrap(buildAwsValue())
}
object HealthCheck {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.elasticloadbalancing.model.HealthCheck
] = BuilderHelper.apply
trait ReadOnly {
def editable
: io.github.vigoo.zioaws.elasticloadbalancing.model.HealthCheck =
io.github.vigoo.zioaws.elasticloadbalancing.model.HealthCheck(
targetValue,
intervalValue,
timeoutValue,
unhealthyThresholdValue,
healthyThresholdValue
)
def targetValue: HealthCheckTarget
def intervalValue: HealthCheckInterval
def timeoutValue: HealthCheckTimeout
def unhealthyThresholdValue: UnhealthyThreshold
def healthyThresholdValue: HealthyThreshold
def target: ZIO[Any, Nothing, HealthCheckTarget] = ZIO.succeed(targetValue)
def interval: ZIO[Any, Nothing, HealthCheckInterval] =
ZIO.succeed(intervalValue)
def timeout: ZIO[Any, Nothing, HealthCheckTimeout] =
ZIO.succeed(timeoutValue)
def unhealthyThreshold: ZIO[Any, Nothing, UnhealthyThreshold] =
ZIO.succeed(unhealthyThresholdValue)
def healthyThreshold: ZIO[Any, Nothing, HealthyThreshold] =
ZIO.succeed(healthyThresholdValue)
}
private class Wrapper(
impl: software.amazon.awssdk.services.elasticloadbalancing.model.HealthCheck
) extends io.github.vigoo.zioaws.elasticloadbalancing.model.HealthCheck.ReadOnly {
override def targetValue: HealthCheckTarget =
impl.target(): HealthCheckTarget
override def intervalValue: HealthCheckInterval =
impl.interval(): HealthCheckInterval
override def timeoutValue: HealthCheckTimeout =
impl.timeout(): HealthCheckTimeout
override def unhealthyThresholdValue: UnhealthyThreshold =
impl.unhealthyThreshold(): UnhealthyThreshold
override def healthyThresholdValue: HealthyThreshold =
impl.healthyThreshold(): HealthyThreshold
}
def wrap(
impl: software.amazon.awssdk.services.elasticloadbalancing.model.HealthCheck
): io.github.vigoo.zioaws.elasticloadbalancing.model.HealthCheck.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy