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

zio.aws.amplifybackend.model.DeleteBackendApiRequest.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.__string
import zio.ZIO
import zio.aws.core.{AwsError, BuilderHelper}
import zio.prelude.data.Optional
import scala.jdk.CollectionConverters.*
final case class DeleteBackendApiRequest(
    appId: __string,
    backendEnvironmentName: __string,
    resourceConfig: Optional[
      zio.aws.amplifybackend.model.BackendAPIResourceConfig
    ] = Optional.Absent,
    resourceName: __string
) {
  def buildAwsValue()
      : software.amazon.awssdk.services.amplifybackend.model.DeleteBackendApiRequest = {
    import DeleteBackendApiRequest.zioAwsBuilderHelper.BuilderOps
    software.amazon.awssdk.services.amplifybackend.model.DeleteBackendApiRequest
      .builder()
      .appId(appId: java.lang.String)
      .backendEnvironmentName(backendEnvironmentName: java.lang.String)
      .optionallyWith(resourceConfig.map(value => value.buildAwsValue()))(
        _.resourceConfig
      )
      .resourceName(resourceName: java.lang.String)
      .build()
  }
  def asReadOnly
      : zio.aws.amplifybackend.model.DeleteBackendApiRequest.ReadOnly =
    zio.aws.amplifybackend.model.DeleteBackendApiRequest.wrap(buildAwsValue())
}
object DeleteBackendApiRequest {
  private lazy val zioAwsBuilderHelper: BuilderHelper[
    software.amazon.awssdk.services.amplifybackend.model.DeleteBackendApiRequest
  ] = BuilderHelper.apply
  trait ReadOnly {
    def asEditable: zio.aws.amplifybackend.model.DeleteBackendApiRequest =
      zio.aws.amplifybackend.model.DeleteBackendApiRequest(
        appId,
        backendEnvironmentName,
        resourceConfig.map(value => value.asEditable),
        resourceName
      )
    def appId: __string
    def backendEnvironmentName: __string
    def resourceConfig: Optional[
      zio.aws.amplifybackend.model.BackendAPIResourceConfig.ReadOnly
    ]
    def resourceName: __string
    def getAppId: ZIO[Any, Nothing, __string] = ZIO.succeed(appId)
    def getBackendEnvironmentName: ZIO[Any, Nothing, __string] =
      ZIO.succeed(backendEnvironmentName)
    def getResourceConfig: ZIO[
      Any,
      AwsError,
      zio.aws.amplifybackend.model.BackendAPIResourceConfig.ReadOnly
    ] = AwsError.unwrapOptionField("resourceConfig", resourceConfig)
    def getResourceName: ZIO[Any, Nothing, __string] = ZIO.succeed(resourceName)
  }
  private final class Wrapper(
      impl: software.amazon.awssdk.services.amplifybackend.model.DeleteBackendApiRequest
  ) extends zio.aws.amplifybackend.model.DeleteBackendApiRequest.ReadOnly {
    override val appId: __string = impl.appId(): __string
    override val backendEnvironmentName: __string =
      impl.backendEnvironmentName(): __string
    override val resourceConfig: Optional[
      zio.aws.amplifybackend.model.BackendAPIResourceConfig.ReadOnly
    ] = zio.aws.core.internal
      .optionalFromNullable(impl.resourceConfig())
      .map(value =>
        zio.aws.amplifybackend.model.BackendAPIResourceConfig.wrap(value)
      )
    override val resourceName: __string = impl.resourceName(): __string
  }
  def wrap(
      impl: software.amazon.awssdk.services.amplifybackend.model.DeleteBackendApiRequest
  ): zio.aws.amplifybackend.model.DeleteBackendApiRequest.ReadOnly =
    new Wrapper(impl)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy