zio.aws.emrcontainers.model.EksInfo.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 zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import zio.aws.emrcontainers.model.primitives.KubernetesNamespace
import scala.jdk.CollectionConverters._
final case class EksInfo(
namespace: Optional[KubernetesNamespace] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.emrcontainers.model.EksInfo = {
import EksInfo.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.emrcontainers.model.EksInfo
.builder()
.optionallyWith(
namespace.map(value =>
KubernetesNamespace.unwrap(value): java.lang.String
)
)(_.namespace)
.build()
}
def asReadOnly: zio.aws.emrcontainers.model.EksInfo.ReadOnly =
zio.aws.emrcontainers.model.EksInfo.wrap(buildAwsValue())
}
object EksInfo {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.emrcontainers.model.EksInfo
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.emrcontainers.model.EksInfo =
zio.aws.emrcontainers.model.EksInfo(namespace.map(value => value))
def namespace: Optional[KubernetesNamespace]
def getNamespace: ZIO[Any, AwsError, KubernetesNamespace] =
AwsError.unwrapOptionField("namespace", namespace)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.emrcontainers.model.EksInfo
) extends zio.aws.emrcontainers.model.EksInfo.ReadOnly {
override val namespace: Optional[KubernetesNamespace] =
zio.aws.core.internal
.optionalFromNullable(impl.namespace())
.map(value =>
zio.aws.emrcontainers.model.primitives.KubernetesNamespace(value)
)
}
def wrap(
impl: software.amazon.awssdk.services.emrcontainers.model.EksInfo
): zio.aws.emrcontainers.model.EksInfo.ReadOnly = new Wrapper(impl)
}