zio.aws.emrcontainers.model.EncryptionConfiguration.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 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
)
}