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

zio.aws.emrcontainers.model.RetryPolicyConfiguration.scala Maven / Gradle / Ivy

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)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy