zio.aws.amplifybackend.model.GetBackendStorageResponse.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 GetBackendStorageResponse(
appId: Optional[__string] = Optional.Absent,
backendEnvironmentName: Optional[__string] = Optional.Absent,
resourceConfig: Optional[
zio.aws.amplifybackend.model.GetBackendStorageResourceConfig
] = Optional.Absent,
resourceName: Optional[__string] = Optional.Absent
) {
def buildAwsValue()
: software.amazon.awssdk.services.amplifybackend.model.GetBackendStorageResponse = {
import GetBackendStorageResponse.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.amplifybackend.model.GetBackendStorageResponse
.builder()
.optionallyWith(appId.map(value => value: java.lang.String))(_.appId)
.optionallyWith(
backendEnvironmentName.map(value => value: java.lang.String)
)(_.backendEnvironmentName)
.optionallyWith(resourceConfig.map(value => value.buildAwsValue()))(
_.resourceConfig
)
.optionallyWith(resourceName.map(value => value: java.lang.String))(
_.resourceName
)
.build()
}
def asReadOnly
: zio.aws.amplifybackend.model.GetBackendStorageResponse.ReadOnly =
zio.aws.amplifybackend.model.GetBackendStorageResponse.wrap(buildAwsValue())
}
object GetBackendStorageResponse {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.amplifybackend.model.GetBackendStorageResponse
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.amplifybackend.model.GetBackendStorageResponse =
zio.aws.amplifybackend.model.GetBackendStorageResponse(
appId.map(value => value),
backendEnvironmentName.map(value => value),
resourceConfig.map(value => value.asEditable),
resourceName.map(value => value)
)
def appId: Optional[__string]
def backendEnvironmentName: Optional[__string]
def resourceConfig: Optional[
zio.aws.amplifybackend.model.GetBackendStorageResourceConfig.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 getResourceConfig: ZIO[
Any,
AwsError,
zio.aws.amplifybackend.model.GetBackendStorageResourceConfig.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.GetBackendStorageResponse
) extends zio.aws.amplifybackend.model.GetBackendStorageResponse.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 resourceConfig: Optional[
zio.aws.amplifybackend.model.GetBackendStorageResourceConfig.ReadOnly
] = zio.aws.core.internal
.optionalFromNullable(impl.resourceConfig())
.map(value =>
zio.aws.amplifybackend.model.GetBackendStorageResourceConfig.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.GetBackendStorageResponse
): zio.aws.amplifybackend.model.GetBackendStorageResponse.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy