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