zio.aws.amplifybackend.model.ImportBackendStorageRequest.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 ImportBackendStorageRequest(
appId: __string,
backendEnvironmentName: __string,
bucketName: Optional[__string] = Optional.Absent,
serviceName: zio.aws.amplifybackend.model.ServiceName
) {
def buildAwsValue()
: software.amazon.awssdk.services.amplifybackend.model.ImportBackendStorageRequest = {
import ImportBackendStorageRequest.zioAwsBuilderHelper.BuilderOps
software.amazon.awssdk.services.amplifybackend.model.ImportBackendStorageRequest
.builder()
.appId(appId: java.lang.String)
.backendEnvironmentName(backendEnvironmentName: java.lang.String)
.optionallyWith(bucketName.map(value => value: java.lang.String))(
_.bucketName
)
.serviceName(serviceName.unwrap)
.build()
}
def asReadOnly
: zio.aws.amplifybackend.model.ImportBackendStorageRequest.ReadOnly =
zio.aws.amplifybackend.model.ImportBackendStorageRequest
.wrap(buildAwsValue())
}
object ImportBackendStorageRequest {
private lazy val zioAwsBuilderHelper: BuilderHelper[
software.amazon.awssdk.services.amplifybackend.model.ImportBackendStorageRequest
] = BuilderHelper.apply
trait ReadOnly {
def asEditable: zio.aws.amplifybackend.model.ImportBackendStorageRequest =
zio.aws.amplifybackend.model.ImportBackendStorageRequest(
appId,
backendEnvironmentName,
bucketName.map(value => value),
serviceName
)
def appId: __string
def backendEnvironmentName: __string
def bucketName: Optional[__string]
def serviceName: zio.aws.amplifybackend.model.ServiceName
def getAppId: ZIO[Any, Nothing, __string] = ZIO.succeed(appId)
def getBackendEnvironmentName: ZIO[Any, Nothing, __string] =
ZIO.succeed(backendEnvironmentName)
def getBucketName: ZIO[Any, AwsError, __string] =
AwsError.unwrapOptionField("bucketName", bucketName)
def getServiceName
: ZIO[Any, Nothing, zio.aws.amplifybackend.model.ServiceName] =
ZIO.succeed(serviceName)
}
private final class Wrapper(
impl: software.amazon.awssdk.services.amplifybackend.model.ImportBackendStorageRequest
) extends zio.aws.amplifybackend.model.ImportBackendStorageRequest.ReadOnly {
override val appId: __string = impl.appId(): __string
override val backendEnvironmentName: __string =
impl.backendEnvironmentName(): __string
override val bucketName: Optional[__string] = zio.aws.core.internal
.optionalFromNullable(impl.bucketName())
.map(value => value: __string)
override val serviceName: zio.aws.amplifybackend.model.ServiceName =
zio.aws.amplifybackend.model.ServiceName.wrap(impl.serviceName())
}
def wrap(
impl: software.amazon.awssdk.services.amplifybackend.model.ImportBackendStorageRequest
): zio.aws.amplifybackend.model.ImportBackendStorageRequest.ReadOnly =
new Wrapper(impl)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy