zio.aws.amplifybackend.model.GetBackendAuthResponse.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zio-aws-amplifybackend_3 Show documentation
Show all versions of zio-aws-amplifybackend_3 Show documentation
Low-level AWS wrapper for ZIO
package zio.aws.amplifybackend.model
import zio.aws.amplifybackend.model.primitives.__string
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class GetBackendAuthResponse(
appId: Optional[__string] = Optional.Absent,
backendEnvironmentName: Optional[__string] = Optional.Absent,
error: Optional[__string] = Optional.Absent,
resourceConfig: Optional[
zio.aws.amplifybackend.model.CreateBackendAuthResourceConfig
] = Optional.Absent,
resourceName: Optional[__string] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.amplifybackend.model.GetBackendAuthResponse = {
import GetBackendAuthResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.amplifybackend.model.GetBackendAuthResponse
.builder()
.optionallyWith(appId.map(value => value: java.lang.String))(_.appId)
.optionallyWith(
backendEnvironmentName.map(value => value: java.lang.String)
)(_.backendEnvironmentName)
.optionallyWith(error.map(value => value: java.lang.String))(_.error)
.optionallyWith(resourceConfig.map(value => value.buildAwsValue()))(
_.resourceConfig
)
.optionallyWith(resourceName.map(value => value: java.lang.String))(
_.resourceName
)
.build()
}
def asReadOnly: zio.aws.amplifybackend.model.GetBackendAuthResponse.ReadOnly =
zio.aws.amplifybackend.model.GetBackendAuthResponse.wrap(buildAwsValue())
}
object GetBackendAuthResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.amplifybackend.model.GetBackendAuthResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.amplifybackend.model.GetBackendAuthResponse =
zio.aws.amplifybackend.model.GetBackendAuthResponse(
appId.map(value => value),
backendEnvironmentName.map(value => value),
error.map(value => value),
resourceConfig.map(value => value.asEditable),
resourceName.map(value => value)
)
def appId: Optional[__string]
def backendEnvironmentName: Optional[__string]
def error: Optional[__string]
def resourceConfig: Optional[
zio.aws.amplifybackend.model.CreateBackendAuthResourceConfig.ReadOnly
]
def resourceName: Optional[__string]
def getAppId: ZIO[Any, AwsError, __string] =
AwsError.unwrapOptionField("appId", appId)
def getBackendEnvironmentName: ZIO[Any, AwsError, __string] = AwsError
.unwrapOptionField("backendEnvironmentName", backendEnvironmentName)
def getError: ZIO[Any, AwsError, __string] =
AwsError.unwrapOptionField("error", error)
def getResourceConfig: ZIO[
Any,
AwsError,
zio.aws.amplifybackend.model.CreateBackendAuthResourceConfig.ReadOnly
] = AwsError.unwrapOptionField("resourceConfig", resourceConfig)
def getResourceName: ZIO[Any, AwsError, __string] =
AwsError.unwrapOptionField("resourceName", resourceName)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.amplifybackend.model.GetBackendAuthResponse
) extends zio.aws.amplifybackend.model.GetBackendAuthResponse.ReadOnly {
override val appId: Optional[__string] = zio.aws.core.internal
.optionalFromNullable(impl.appId())
.map(value => value: __string)
override val backendEnvironmentName: Optional[__string] =
zio.aws.core.internal
.optionalFromNullable(impl.backendEnvironmentName())
.map(value => value: __string)
override val error: Optional[__string] = zio.aws.core.internal
.optionalFromNullable(impl.error())
.map(value => value: __string)
override val resourceConfig: Optional[
zio.aws.amplifybackend.model.CreateBackendAuthResourceConfig.ReadOnly
] = zio.aws.core.internal
.optionalFromNullable(impl.resourceConfig())
.map(value =>
zio.aws.amplifybackend.model.CreateBackendAuthResourceConfig.wrap(value)
)
override val resourceName: Optional[__string] = zio.aws.core.internal
.optionalFromNullable(impl.resourceName())
.map(value => value: __string)
}
def wrap(
impl: software.amazon.awssdk.services.amplifybackend.model.GetBackendAuthResponse
): zio.aws.amplifybackend.model.GetBackendAuthResponse.ReadOnly = new Wrapper(
impl
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy