zio.aws.emrcontainers.model.RetryPolicyConfiguration.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-emrcontainers_2.12 Show documentation
Show all versions of zio-aws-emrcontainers_2.12 Show documentation
Low-level AWS wrapper for ZIO
The newest version!
package zio.aws.emrcontainers.model
import java.lang.Integer
import zio.ZIO
import zio.aws.core.BuilderHelper
import zio.aws.emrcontainers.model.primitives.JavaInteger
import scala.jdk.CollectionConverters._
final case class RetryPolicyConfiguration(maxAttempts: JavaInteger) {
def buildAwsValue()
: software.amazon.awssdk.services.emrcontainers.model.RetryPolicyConfiguration = {
import RetryPolicyConfiguration.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.emrcontainers.model.RetryPolicyConfiguration
.builder()
.maxAttempts(JavaInteger.unwrap(maxAttempts): Integer)
.build()
}
def asReadOnly
: zio.aws.emrcontainers.model.RetryPolicyConfiguration.ReadOnly =
zio.aws.emrcontainers.model.RetryPolicyConfiguration.wrap(buildAwsValue())
}
object RetryPolicyConfiguration {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.emrcontainers.model.RetryPolicyConfiguration
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.emrcontainers.model.RetryPolicyConfiguration =
zio.aws.emrcontainers.model.RetryPolicyConfiguration(maxAttempts)
def maxAttempts: JavaInteger
def getMaxAttempts: ZIO[Any, Nothing, JavaInteger] =
ZIO.succeed(maxAttempts)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.emrcontainers.model.RetryPolicyConfiguration
) extends zio.aws.emrcontainers.model.RetryPolicyConfiguration.ReadOnly {
override val maxAttempts: JavaInteger =
zio.aws.emrcontainers.model.primitives.JavaInteger(impl.maxAttempts())
}
def wrap(
impl: software.amazon.awssdk.services.emrcontainers.model.RetryPolicyConfiguration
): zio.aws.emrcontainers.model.RetryPolicyConfiguration.ReadOnly =
new Wrapper(impl)
}