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

zio.aws.amplifybackend.model.UpdateBackendAuthMFAConfig.scala Maven / Gradle / Ivy

There is a newer version: 7.28.29.10
Show newest version
package zio.aws.amplifybackend.model
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class UpdateBackendAuthMFAConfig(
    mfaMode: Optional[zio.aws.amplifybackend.model.MFAMode] = Optional.Absent,
    settings: Optional[zio.aws.amplifybackend.model.Settings] = Optional.Absent
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.amplifybackend.model.UpdateBackendAuthMFAConfig = {
    import UpdateBackendAuthMFAConfig.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.amplifybackend.model.UpdateBackendAuthMFAConfig
      .builder()
      .optionallyWith(mfaMode.map(value => value.unwrap))(_.mfaMode)
      .optionallyWith(settings.map(value => value.buildAwsValue()))(_.settings)
      .build()
  }
  def asReadOnly
      : zio.aws.amplifybackend.model.UpdateBackendAuthMFAConfig.ReadOnly =
    zio.aws.amplifybackend.model.UpdateBackendAuthMFAConfig
      .wrap(buildAwsValue())
}
object UpdateBackendAuthMFAConfig {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.amplifybackend.model.UpdateBackendAuthMFAConfig
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.amplifybackend.model.UpdateBackendAuthMFAConfig =
      zio.aws.amplifybackend.model.UpdateBackendAuthMFAConfig(
        mfaMode.map(value => value),
        settings.map(value => value.asEditable)
      )
    def mfaMode: Optional[zio.aws.amplifybackend.model.MFAMode]
    def settings: Optional[zio.aws.amplifybackend.model.Settings.ReadOnly]
    def getMfaMode: ZIO[Any, AwsError, zio.aws.amplifybackend.model.MFAMode] =
      AwsError.unwrapOptionField("mfaMode", mfaMode)
    def getSettings
        : ZIO[Any, AwsError, zio.aws.amplifybackend.model.Settings.ReadOnly] =
      AwsError.unwrapOptionField("settings", settings)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.amplifybackend.model.UpdateBackendAuthMFAConfig
  ) extends zio.aws.amplifybackend.model.UpdateBackendAuthMFAConfig.ReadOnly {
    override val mfaMode: Optional[zio.aws.amplifybackend.model.MFAMode] =
      zio.aws.core.internal
        .optionalFromNullable(impl.mfaMode())
        .map(value => zio.aws.amplifybackend.model.MFAMode.wrap(value))
    override val settings
        : Optional[zio.aws.amplifybackend.model.Settings.ReadOnly] =
      zio.aws.core.internal
        .optionalFromNullable(impl.settings())
        .map(value => zio.aws.amplifybackend.model.Settings.wrap(value))
  }
  def wrap(
      impl: software.amazon.awssdk.services.amplifybackend.model.UpdateBackendAuthMFAConfig
  ): zio.aws.amplifybackend.model.UpdateBackendAuthMFAConfig.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy