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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy