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

zio.aws.workmail.model.CreateMobileDeviceAccessRuleResponse.scala Maven / Gradle / Ivy

There is a newer version: 7.28.29.5
Show newest version
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)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy