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