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

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

The newest version!
package zio.aws.emrcontainers.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters._
final case class EncryptionConfiguration(
    inTransitEncryptionConfiguration: Optional[
      zio.aws.emrcontainers.model.InTransitEncryptionConfiguration
    ] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.emrcontainers.model.EncryptionConfiguration = {
    import EncryptionConfiguration.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.emrcontainers.model.EncryptionConfiguration
      .builder()
      .optionallyWith(
        inTransitEncryptionConfiguration.map(value => value.buildAwsValue())
      )(_.inTransitEncryptionConfiguration)
      .build()
  }
  def asReadOnly: zio.aws.emrcontainers.model.EncryptionConfiguration.ReadOnly =
    zio.aws.emrcontainers.model.EncryptionConfiguration.wrap(buildAwsValue())
}
object EncryptionConfiguration {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.emrcontainers.model.EncryptionConfiguration
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.emrcontainers.model.EncryptionConfiguration =
      zio.aws.emrcontainers.model.EncryptionConfiguration(
        inTransitEncryptionConfiguration.map(value => value.asEditable)
      )
    def inTransitEncryptionConfiguration: Optional[
      zio.aws.emrcontainers.model.InTransitEncryptionConfiguration.ReadOnly
    ]
    def getInTransitEncryptionConfiguration: ZIO[
      Any,
      AwsError,
      zio.aws.emrcontainers.model.InTransitEncryptionConfiguration.ReadOnly
    ] = AwsError.unwrapOptionField(
      "inTransitEncryptionConfiguration",
      inTransitEncryptionConfiguration
    )
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.emrcontainers.model.EncryptionConfiguration
  ) extends zio.aws.emrcontainers.model.EncryptionConfiguration.ReadOnly {
    override val inTransitEncryptionConfiguration: Optional[
      zio.aws.emrcontainers.model.InTransitEncryptionConfiguration.ReadOnly
    ] = zio.aws.core.internal
      .optionalFromNullable(impl.inTransitEncryptionConfiguration())
      .map(value =>
        zio.aws.emrcontainers.model.InTransitEncryptionConfiguration.wrap(value)
      )
  }
  def wrap(
      impl: software.amazon.awssdk.services.emrcontainers.model.EncryptionConfiguration
  ): zio.aws.emrcontainers.model.EncryptionConfiguration.ReadOnly = new Wrapper(
    impl
  )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy