zio.aws.workmail.model.DescribeInboundDmarcSettingsResponse.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-workmail_2.12 Show documentation
Show all versions of zio-aws-workmail_2.12 Show documentation
Low-level AWS wrapper for ZIO
package zio.aws.workmail.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters._
final case class DescribeInboundDmarcSettingsResponse(
enforced: Optional[Boolean] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.workmail.model.DescribeInboundDmarcSettingsResponse = {
import DescribeInboundDmarcSettingsResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.workmail.model.DescribeInboundDmarcSettingsResponse
.builder()
.optionallyWith(enforced.map(value => value: java.lang.Boolean))(
_.enforced
)
.build()
}
def asReadOnly
: zio.aws.workmail.model.DescribeInboundDmarcSettingsResponse.ReadOnly =
zio.aws.workmail.model.DescribeInboundDmarcSettingsResponse
.wrap(buildAwsValue())
}
object DescribeInboundDmarcSettingsResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.workmail.model.DescribeInboundDmarcSettingsResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable
: zio.aws.workmail.model.DescribeInboundDmarcSettingsResponse =
zio.aws.workmail.model
.DescribeInboundDmarcSettingsResponse(enforced.map(value => value))
def enforced: Optional[Boolean]
def getEnforced: ZIO[Any, AwsError, Boolean] =
AwsError.unwrapOptionField("enforced", enforced)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.workmail.model.DescribeInboundDmarcSettingsResponse
) extends zio.aws.workmail.model.DescribeInboundDmarcSettingsResponse.ReadOnly {
override val enforced: Optional[Boolean] = zio.aws.core.internal
.optionalFromNullable(impl.enforced())
.map(value => value: Boolean)
}
def wrap(
impl: software.amazon.awssdk.services.workmail.model.DescribeInboundDmarcSettingsResponse
): zio.aws.workmail.model.DescribeInboundDmarcSettingsResponse.ReadOnly =
new Wrapper(impl)
}