{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ResilienceHub.RemoveDraftAppVersionResourceMappings
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Removes resource mappings from a draft application version.
module Amazonka.ResilienceHub.RemoveDraftAppVersionResourceMappings
  ( -- * Creating a Request
    RemoveDraftAppVersionResourceMappings (..),
    newRemoveDraftAppVersionResourceMappings,

    -- * Request Lenses
    removeDraftAppVersionResourceMappings_appRegistryAppNames,
    removeDraftAppVersionResourceMappings_logicalStackNames,
    removeDraftAppVersionResourceMappings_resourceGroupNames,
    removeDraftAppVersionResourceMappings_resourceNames,
    removeDraftAppVersionResourceMappings_terraformSourceNames,
    removeDraftAppVersionResourceMappings_appArn,

    -- * Destructuring the Response
    RemoveDraftAppVersionResourceMappingsResponse (..),
    newRemoveDraftAppVersionResourceMappingsResponse,

    -- * Response Lenses
    removeDraftAppVersionResourceMappingsResponse_appArn,
    removeDraftAppVersionResourceMappingsResponse_appVersion,
    removeDraftAppVersionResourceMappingsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import Amazonka.ResilienceHub.Types
import qualified Amazonka.Response as Response

-- | /See:/ 'newRemoveDraftAppVersionResourceMappings' smart constructor.
data RemoveDraftAppVersionResourceMappings = RemoveDraftAppVersionResourceMappings'
  { -- | The names of the registered applications to remove from the resource
    -- mappings.
    RemoveDraftAppVersionResourceMappings -> Maybe [Text]
appRegistryAppNames :: Prelude.Maybe [Prelude.Text],
    -- | The names of the CloudFormation stacks to remove from the resource
    -- mappings.
    RemoveDraftAppVersionResourceMappings -> Maybe [Text]
logicalStackNames :: Prelude.Maybe [Prelude.Text],
    -- | The names of the resource groups to remove from the resource mappings.
    RemoveDraftAppVersionResourceMappings -> Maybe [Text]
resourceGroupNames :: Prelude.Maybe [Prelude.Text],
    -- | The names of the resources to remove from the resource mappings.
    RemoveDraftAppVersionResourceMappings -> Maybe [Text]
resourceNames :: Prelude.Maybe [Prelude.Text],
    -- | > </p>
    RemoveDraftAppVersionResourceMappings -> Maybe [Text]
terraformSourceNames :: Prelude.Maybe [Prelude.Text],
    -- | The Amazon Resource Name (ARN) of the application. The format for this
    -- ARN is: arn:@partition@:resiliencehub:@region@:@account@:app\/@app-id@.
    -- For more information about ARNs, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
    -- in the /AWS General Reference/.
    RemoveDraftAppVersionResourceMappings -> Text
appArn :: Prelude.Text
  }
  deriving (RemoveDraftAppVersionResourceMappings
-> RemoveDraftAppVersionResourceMappings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveDraftAppVersionResourceMappings
-> RemoveDraftAppVersionResourceMappings -> Bool
$c/= :: RemoveDraftAppVersionResourceMappings
-> RemoveDraftAppVersionResourceMappings -> Bool
== :: RemoveDraftAppVersionResourceMappings
-> RemoveDraftAppVersionResourceMappings -> Bool
$c== :: RemoveDraftAppVersionResourceMappings
-> RemoveDraftAppVersionResourceMappings -> Bool
Prelude.Eq, ReadPrec [RemoveDraftAppVersionResourceMappings]
ReadPrec RemoveDraftAppVersionResourceMappings
Int -> ReadS RemoveDraftAppVersionResourceMappings
ReadS [RemoveDraftAppVersionResourceMappings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveDraftAppVersionResourceMappings]
$creadListPrec :: ReadPrec [RemoveDraftAppVersionResourceMappings]
readPrec :: ReadPrec RemoveDraftAppVersionResourceMappings
$creadPrec :: ReadPrec RemoveDraftAppVersionResourceMappings
readList :: ReadS [RemoveDraftAppVersionResourceMappings]
$creadList :: ReadS [RemoveDraftAppVersionResourceMappings]
readsPrec :: Int -> ReadS RemoveDraftAppVersionResourceMappings
$creadsPrec :: Int -> ReadS RemoveDraftAppVersionResourceMappings
Prelude.Read, Int -> RemoveDraftAppVersionResourceMappings -> ShowS
[RemoveDraftAppVersionResourceMappings] -> ShowS
RemoveDraftAppVersionResourceMappings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveDraftAppVersionResourceMappings] -> ShowS
$cshowList :: [RemoveDraftAppVersionResourceMappings] -> ShowS
show :: RemoveDraftAppVersionResourceMappings -> String
$cshow :: RemoveDraftAppVersionResourceMappings -> String
showsPrec :: Int -> RemoveDraftAppVersionResourceMappings -> ShowS
$cshowsPrec :: Int -> RemoveDraftAppVersionResourceMappings -> ShowS
Prelude.Show, forall x.
Rep RemoveDraftAppVersionResourceMappings x
-> RemoveDraftAppVersionResourceMappings
forall x.
RemoveDraftAppVersionResourceMappings
-> Rep RemoveDraftAppVersionResourceMappings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveDraftAppVersionResourceMappings x
-> RemoveDraftAppVersionResourceMappings
$cfrom :: forall x.
RemoveDraftAppVersionResourceMappings
-> Rep RemoveDraftAppVersionResourceMappings x
Prelude.Generic)

-- |
-- Create a value of 'RemoveDraftAppVersionResourceMappings' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'appRegistryAppNames', 'removeDraftAppVersionResourceMappings_appRegistryAppNames' - The names of the registered applications to remove from the resource
-- mappings.
--
-- 'logicalStackNames', 'removeDraftAppVersionResourceMappings_logicalStackNames' - The names of the CloudFormation stacks to remove from the resource
-- mappings.
--
-- 'resourceGroupNames', 'removeDraftAppVersionResourceMappings_resourceGroupNames' - The names of the resource groups to remove from the resource mappings.
--
-- 'resourceNames', 'removeDraftAppVersionResourceMappings_resourceNames' - The names of the resources to remove from the resource mappings.
--
-- 'terraformSourceNames', 'removeDraftAppVersionResourceMappings_terraformSourceNames' - > </p>
--
-- 'appArn', 'removeDraftAppVersionResourceMappings_appArn' - The Amazon Resource Name (ARN) of the application. The format for this
-- ARN is: arn:@partition@:resiliencehub:@region@:@account@:app\/@app-id@.
-- For more information about ARNs, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /AWS General Reference/.
newRemoveDraftAppVersionResourceMappings ::
  -- | 'appArn'
  Prelude.Text ->
  RemoveDraftAppVersionResourceMappings
newRemoveDraftAppVersionResourceMappings :: Text -> RemoveDraftAppVersionResourceMappings
newRemoveDraftAppVersionResourceMappings Text
pAppArn_ =
  RemoveDraftAppVersionResourceMappings'
    { $sel:appRegistryAppNames:RemoveDraftAppVersionResourceMappings' :: Maybe [Text]
appRegistryAppNames =
        forall a. Maybe a
Prelude.Nothing,
      $sel:logicalStackNames:RemoveDraftAppVersionResourceMappings' :: Maybe [Text]
logicalStackNames = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceGroupNames:RemoveDraftAppVersionResourceMappings' :: Maybe [Text]
resourceGroupNames = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceNames:RemoveDraftAppVersionResourceMappings' :: Maybe [Text]
resourceNames = forall a. Maybe a
Prelude.Nothing,
      $sel:terraformSourceNames:RemoveDraftAppVersionResourceMappings' :: Maybe [Text]
terraformSourceNames =
        forall a. Maybe a
Prelude.Nothing,
      $sel:appArn:RemoveDraftAppVersionResourceMappings' :: Text
appArn = Text
pAppArn_
    }

-- | The names of the registered applications to remove from the resource
-- mappings.
removeDraftAppVersionResourceMappings_appRegistryAppNames :: Lens.Lens' RemoveDraftAppVersionResourceMappings (Prelude.Maybe [Prelude.Text])
removeDraftAppVersionResourceMappings_appRegistryAppNames :: Lens' RemoveDraftAppVersionResourceMappings (Maybe [Text])
removeDraftAppVersionResourceMappings_appRegistryAppNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveDraftAppVersionResourceMappings' {Maybe [Text]
appRegistryAppNames :: Maybe [Text]
$sel:appRegistryAppNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
appRegistryAppNames} -> Maybe [Text]
appRegistryAppNames) (\s :: RemoveDraftAppVersionResourceMappings
s@RemoveDraftAppVersionResourceMappings' {} Maybe [Text]
a -> RemoveDraftAppVersionResourceMappings
s {$sel:appRegistryAppNames:RemoveDraftAppVersionResourceMappings' :: Maybe [Text]
appRegistryAppNames = Maybe [Text]
a} :: RemoveDraftAppVersionResourceMappings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The names of the CloudFormation stacks to remove from the resource
-- mappings.
removeDraftAppVersionResourceMappings_logicalStackNames :: Lens.Lens' RemoveDraftAppVersionResourceMappings (Prelude.Maybe [Prelude.Text])
removeDraftAppVersionResourceMappings_logicalStackNames :: Lens' RemoveDraftAppVersionResourceMappings (Maybe [Text])
removeDraftAppVersionResourceMappings_logicalStackNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveDraftAppVersionResourceMappings' {Maybe [Text]
logicalStackNames :: Maybe [Text]
$sel:logicalStackNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
logicalStackNames} -> Maybe [Text]
logicalStackNames) (\s :: RemoveDraftAppVersionResourceMappings
s@RemoveDraftAppVersionResourceMappings' {} Maybe [Text]
a -> RemoveDraftAppVersionResourceMappings
s {$sel:logicalStackNames:RemoveDraftAppVersionResourceMappings' :: Maybe [Text]
logicalStackNames = Maybe [Text]
a} :: RemoveDraftAppVersionResourceMappings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The names of the resource groups to remove from the resource mappings.
removeDraftAppVersionResourceMappings_resourceGroupNames :: Lens.Lens' RemoveDraftAppVersionResourceMappings (Prelude.Maybe [Prelude.Text])
removeDraftAppVersionResourceMappings_resourceGroupNames :: Lens' RemoveDraftAppVersionResourceMappings (Maybe [Text])
removeDraftAppVersionResourceMappings_resourceGroupNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveDraftAppVersionResourceMappings' {Maybe [Text]
resourceGroupNames :: Maybe [Text]
$sel:resourceGroupNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
resourceGroupNames} -> Maybe [Text]
resourceGroupNames) (\s :: RemoveDraftAppVersionResourceMappings
s@RemoveDraftAppVersionResourceMappings' {} Maybe [Text]
a -> RemoveDraftAppVersionResourceMappings
s {$sel:resourceGroupNames:RemoveDraftAppVersionResourceMappings' :: Maybe [Text]
resourceGroupNames = Maybe [Text]
a} :: RemoveDraftAppVersionResourceMappings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The names of the resources to remove from the resource mappings.
removeDraftAppVersionResourceMappings_resourceNames :: Lens.Lens' RemoveDraftAppVersionResourceMappings (Prelude.Maybe [Prelude.Text])
removeDraftAppVersionResourceMappings_resourceNames :: Lens' RemoveDraftAppVersionResourceMappings (Maybe [Text])
removeDraftAppVersionResourceMappings_resourceNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveDraftAppVersionResourceMappings' {Maybe [Text]
resourceNames :: Maybe [Text]
$sel:resourceNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
resourceNames} -> Maybe [Text]
resourceNames) (\s :: RemoveDraftAppVersionResourceMappings
s@RemoveDraftAppVersionResourceMappings' {} Maybe [Text]
a -> RemoveDraftAppVersionResourceMappings
s {$sel:resourceNames:RemoveDraftAppVersionResourceMappings' :: Maybe [Text]
resourceNames = Maybe [Text]
a} :: RemoveDraftAppVersionResourceMappings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | > </p>
removeDraftAppVersionResourceMappings_terraformSourceNames :: Lens.Lens' RemoveDraftAppVersionResourceMappings (Prelude.Maybe [Prelude.Text])
removeDraftAppVersionResourceMappings_terraformSourceNames :: Lens' RemoveDraftAppVersionResourceMappings (Maybe [Text])
removeDraftAppVersionResourceMappings_terraformSourceNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveDraftAppVersionResourceMappings' {Maybe [Text]
terraformSourceNames :: Maybe [Text]
$sel:terraformSourceNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
terraformSourceNames} -> Maybe [Text]
terraformSourceNames) (\s :: RemoveDraftAppVersionResourceMappings
s@RemoveDraftAppVersionResourceMappings' {} Maybe [Text]
a -> RemoveDraftAppVersionResourceMappings
s {$sel:terraformSourceNames:RemoveDraftAppVersionResourceMappings' :: Maybe [Text]
terraformSourceNames = Maybe [Text]
a} :: RemoveDraftAppVersionResourceMappings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of the application. The format for this
-- ARN is: arn:@partition@:resiliencehub:@region@:@account@:app\/@app-id@.
-- For more information about ARNs, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /AWS General Reference/.
removeDraftAppVersionResourceMappings_appArn :: Lens.Lens' RemoveDraftAppVersionResourceMappings Prelude.Text
removeDraftAppVersionResourceMappings_appArn :: Lens' RemoveDraftAppVersionResourceMappings Text
removeDraftAppVersionResourceMappings_appArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveDraftAppVersionResourceMappings' {Text
appArn :: Text
$sel:appArn:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Text
appArn} -> Text
appArn) (\s :: RemoveDraftAppVersionResourceMappings
s@RemoveDraftAppVersionResourceMappings' {} Text
a -> RemoveDraftAppVersionResourceMappings
s {$sel:appArn:RemoveDraftAppVersionResourceMappings' :: Text
appArn = Text
a} :: RemoveDraftAppVersionResourceMappings)

instance
  Core.AWSRequest
    RemoveDraftAppVersionResourceMappings
  where
  type
    AWSResponse
      RemoveDraftAppVersionResourceMappings =
      RemoveDraftAppVersionResourceMappingsResponse
  request :: (Service -> Service)
-> RemoveDraftAppVersionResourceMappings
-> Request RemoveDraftAppVersionResourceMappings
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy RemoveDraftAppVersionResourceMappings
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse RemoveDraftAppVersionResourceMappings)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Int
-> RemoveDraftAppVersionResourceMappingsResponse
RemoveDraftAppVersionResourceMappingsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"appArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"appVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    RemoveDraftAppVersionResourceMappings
  where
  hashWithSalt :: Int -> RemoveDraftAppVersionResourceMappings -> Int
hashWithSalt
    Int
_salt
    RemoveDraftAppVersionResourceMappings' {Maybe [Text]
Text
appArn :: Text
terraformSourceNames :: Maybe [Text]
resourceNames :: Maybe [Text]
resourceGroupNames :: Maybe [Text]
logicalStackNames :: Maybe [Text]
appRegistryAppNames :: Maybe [Text]
$sel:appArn:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Text
$sel:terraformSourceNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
$sel:resourceNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
$sel:resourceGroupNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
$sel:logicalStackNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
$sel:appRegistryAppNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
appRegistryAppNames
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
logicalStackNames
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
resourceGroupNames
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
resourceNames
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
terraformSourceNames
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
appArn

instance
  Prelude.NFData
    RemoveDraftAppVersionResourceMappings
  where
  rnf :: RemoveDraftAppVersionResourceMappings -> ()
rnf RemoveDraftAppVersionResourceMappings' {Maybe [Text]
Text
appArn :: Text
terraformSourceNames :: Maybe [Text]
resourceNames :: Maybe [Text]
resourceGroupNames :: Maybe [Text]
logicalStackNames :: Maybe [Text]
appRegistryAppNames :: Maybe [Text]
$sel:appArn:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Text
$sel:terraformSourceNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
$sel:resourceNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
$sel:resourceGroupNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
$sel:logicalStackNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
$sel:appRegistryAppNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
appRegistryAppNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
logicalStackNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
resourceGroupNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
resourceNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
terraformSourceNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
appArn

instance
  Data.ToHeaders
    RemoveDraftAppVersionResourceMappings
  where
  toHeaders :: RemoveDraftAppVersionResourceMappings -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance
  Data.ToJSON
    RemoveDraftAppVersionResourceMappings
  where
  toJSON :: RemoveDraftAppVersionResourceMappings -> Value
toJSON RemoveDraftAppVersionResourceMappings' {Maybe [Text]
Text
appArn :: Text
terraformSourceNames :: Maybe [Text]
resourceNames :: Maybe [Text]
resourceGroupNames :: Maybe [Text]
logicalStackNames :: Maybe [Text]
appRegistryAppNames :: Maybe [Text]
$sel:appArn:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Text
$sel:terraformSourceNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
$sel:resourceNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
$sel:resourceGroupNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
$sel:logicalStackNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
$sel:appRegistryAppNames:RemoveDraftAppVersionResourceMappings' :: RemoveDraftAppVersionResourceMappings -> Maybe [Text]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"appRegistryAppNames" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
appRegistryAppNames,
            (Key
"logicalStackNames" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
logicalStackNames,
            (Key
"resourceGroupNames" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
resourceGroupNames,
            (Key
"resourceNames" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
resourceNames,
            (Key
"terraformSourceNames" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
terraformSourceNames,
            forall a. a -> Maybe a
Prelude.Just (Key
"appArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
appArn)
          ]
      )

instance
  Data.ToPath
    RemoveDraftAppVersionResourceMappings
  where
  toPath :: RemoveDraftAppVersionResourceMappings -> ByteString
toPath =
    forall a b. a -> b -> a
Prelude.const
      ByteString
"/remove-draft-app-version-resource-mappings"

instance
  Data.ToQuery
    RemoveDraftAppVersionResourceMappings
  where
  toQuery :: RemoveDraftAppVersionResourceMappings -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newRemoveDraftAppVersionResourceMappingsResponse' smart constructor.
data RemoveDraftAppVersionResourceMappingsResponse = RemoveDraftAppVersionResourceMappingsResponse'
  { -- | The Amazon Resource Name (ARN) of the application. The format for this
    -- ARN is: arn:@partition@:resiliencehub:@region@:@account@:app\/@app-id@.
    -- For more information about ARNs, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
    -- in the /AWS General Reference/.
    RemoveDraftAppVersionResourceMappingsResponse -> Maybe Text
appArn :: Prelude.Maybe Prelude.Text,
    -- | The version of the application.
    RemoveDraftAppVersionResourceMappingsResponse -> Maybe Text
appVersion :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    RemoveDraftAppVersionResourceMappingsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (RemoveDraftAppVersionResourceMappingsResponse
-> RemoveDraftAppVersionResourceMappingsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveDraftAppVersionResourceMappingsResponse
-> RemoveDraftAppVersionResourceMappingsResponse -> Bool
$c/= :: RemoveDraftAppVersionResourceMappingsResponse
-> RemoveDraftAppVersionResourceMappingsResponse -> Bool
== :: RemoveDraftAppVersionResourceMappingsResponse
-> RemoveDraftAppVersionResourceMappingsResponse -> Bool
$c== :: RemoveDraftAppVersionResourceMappingsResponse
-> RemoveDraftAppVersionResourceMappingsResponse -> Bool
Prelude.Eq, ReadPrec [RemoveDraftAppVersionResourceMappingsResponse]
ReadPrec RemoveDraftAppVersionResourceMappingsResponse
Int -> ReadS RemoveDraftAppVersionResourceMappingsResponse
ReadS [RemoveDraftAppVersionResourceMappingsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveDraftAppVersionResourceMappingsResponse]
$creadListPrec :: ReadPrec [RemoveDraftAppVersionResourceMappingsResponse]
readPrec :: ReadPrec RemoveDraftAppVersionResourceMappingsResponse
$creadPrec :: ReadPrec RemoveDraftAppVersionResourceMappingsResponse
readList :: ReadS [RemoveDraftAppVersionResourceMappingsResponse]
$creadList :: ReadS [RemoveDraftAppVersionResourceMappingsResponse]
readsPrec :: Int -> ReadS RemoveDraftAppVersionResourceMappingsResponse
$creadsPrec :: Int -> ReadS RemoveDraftAppVersionResourceMappingsResponse
Prelude.Read, Int -> RemoveDraftAppVersionResourceMappingsResponse -> ShowS
[RemoveDraftAppVersionResourceMappingsResponse] -> ShowS
RemoveDraftAppVersionResourceMappingsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveDraftAppVersionResourceMappingsResponse] -> ShowS
$cshowList :: [RemoveDraftAppVersionResourceMappingsResponse] -> ShowS
show :: RemoveDraftAppVersionResourceMappingsResponse -> String
$cshow :: RemoveDraftAppVersionResourceMappingsResponse -> String
showsPrec :: Int -> RemoveDraftAppVersionResourceMappingsResponse -> ShowS
$cshowsPrec :: Int -> RemoveDraftAppVersionResourceMappingsResponse -> ShowS
Prelude.Show, forall x.
Rep RemoveDraftAppVersionResourceMappingsResponse x
-> RemoveDraftAppVersionResourceMappingsResponse
forall x.
RemoveDraftAppVersionResourceMappingsResponse
-> Rep RemoveDraftAppVersionResourceMappingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveDraftAppVersionResourceMappingsResponse x
-> RemoveDraftAppVersionResourceMappingsResponse
$cfrom :: forall x.
RemoveDraftAppVersionResourceMappingsResponse
-> Rep RemoveDraftAppVersionResourceMappingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'RemoveDraftAppVersionResourceMappingsResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'appArn', 'removeDraftAppVersionResourceMappingsResponse_appArn' - The Amazon Resource Name (ARN) of the application. The format for this
-- ARN is: arn:@partition@:resiliencehub:@region@:@account@:app\/@app-id@.
-- For more information about ARNs, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /AWS General Reference/.
--
-- 'appVersion', 'removeDraftAppVersionResourceMappingsResponse_appVersion' - The version of the application.
--
-- 'httpStatus', 'removeDraftAppVersionResourceMappingsResponse_httpStatus' - The response's http status code.
newRemoveDraftAppVersionResourceMappingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RemoveDraftAppVersionResourceMappingsResponse
newRemoveDraftAppVersionResourceMappingsResponse :: Int -> RemoveDraftAppVersionResourceMappingsResponse
newRemoveDraftAppVersionResourceMappingsResponse
  Int
pHttpStatus_ =
    RemoveDraftAppVersionResourceMappingsResponse'
      { $sel:appArn:RemoveDraftAppVersionResourceMappingsResponse' :: Maybe Text
appArn =
          forall a. Maybe a
Prelude.Nothing,
        $sel:appVersion:RemoveDraftAppVersionResourceMappingsResponse' :: Maybe Text
appVersion = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:RemoveDraftAppVersionResourceMappingsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The Amazon Resource Name (ARN) of the application. The format for this
-- ARN is: arn:@partition@:resiliencehub:@region@:@account@:app\/@app-id@.
-- For more information about ARNs, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /AWS General Reference/.
removeDraftAppVersionResourceMappingsResponse_appArn :: Lens.Lens' RemoveDraftAppVersionResourceMappingsResponse (Prelude.Maybe Prelude.Text)
removeDraftAppVersionResourceMappingsResponse_appArn :: Lens' RemoveDraftAppVersionResourceMappingsResponse (Maybe Text)
removeDraftAppVersionResourceMappingsResponse_appArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveDraftAppVersionResourceMappingsResponse' {Maybe Text
appArn :: Maybe Text
$sel:appArn:RemoveDraftAppVersionResourceMappingsResponse' :: RemoveDraftAppVersionResourceMappingsResponse -> Maybe Text
appArn} -> Maybe Text
appArn) (\s :: RemoveDraftAppVersionResourceMappingsResponse
s@RemoveDraftAppVersionResourceMappingsResponse' {} Maybe Text
a -> RemoveDraftAppVersionResourceMappingsResponse
s {$sel:appArn:RemoveDraftAppVersionResourceMappingsResponse' :: Maybe Text
appArn = Maybe Text
a} :: RemoveDraftAppVersionResourceMappingsResponse)

-- | The version of the application.
removeDraftAppVersionResourceMappingsResponse_appVersion :: Lens.Lens' RemoveDraftAppVersionResourceMappingsResponse (Prelude.Maybe Prelude.Text)
removeDraftAppVersionResourceMappingsResponse_appVersion :: Lens' RemoveDraftAppVersionResourceMappingsResponse (Maybe Text)
removeDraftAppVersionResourceMappingsResponse_appVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveDraftAppVersionResourceMappingsResponse' {Maybe Text
appVersion :: Maybe Text
$sel:appVersion:RemoveDraftAppVersionResourceMappingsResponse' :: RemoveDraftAppVersionResourceMappingsResponse -> Maybe Text
appVersion} -> Maybe Text
appVersion) (\s :: RemoveDraftAppVersionResourceMappingsResponse
s@RemoveDraftAppVersionResourceMappingsResponse' {} Maybe Text
a -> RemoveDraftAppVersionResourceMappingsResponse
s {$sel:appVersion:RemoveDraftAppVersionResourceMappingsResponse' :: Maybe Text
appVersion = Maybe Text
a} :: RemoveDraftAppVersionResourceMappingsResponse)

-- | The response's http status code.
removeDraftAppVersionResourceMappingsResponse_httpStatus :: Lens.Lens' RemoveDraftAppVersionResourceMappingsResponse Prelude.Int
removeDraftAppVersionResourceMappingsResponse_httpStatus :: Lens' RemoveDraftAppVersionResourceMappingsResponse Int
removeDraftAppVersionResourceMappingsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveDraftAppVersionResourceMappingsResponse' {Int
httpStatus :: Int
$sel:httpStatus:RemoveDraftAppVersionResourceMappingsResponse' :: RemoveDraftAppVersionResourceMappingsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RemoveDraftAppVersionResourceMappingsResponse
s@RemoveDraftAppVersionResourceMappingsResponse' {} Int
a -> RemoveDraftAppVersionResourceMappingsResponse
s {$sel:httpStatus:RemoveDraftAppVersionResourceMappingsResponse' :: Int
httpStatus = Int
a} :: RemoveDraftAppVersionResourceMappingsResponse)

instance
  Prelude.NFData
    RemoveDraftAppVersionResourceMappingsResponse
  where
  rnf :: RemoveDraftAppVersionResourceMappingsResponse -> ()
rnf
    RemoveDraftAppVersionResourceMappingsResponse' {Int
Maybe Text
httpStatus :: Int
appVersion :: Maybe Text
appArn :: Maybe Text
$sel:httpStatus:RemoveDraftAppVersionResourceMappingsResponse' :: RemoveDraftAppVersionResourceMappingsResponse -> Int
$sel:appVersion:RemoveDraftAppVersionResourceMappingsResponse' :: RemoveDraftAppVersionResourceMappingsResponse -> Maybe Text
$sel:appArn:RemoveDraftAppVersionResourceMappingsResponse' :: RemoveDraftAppVersionResourceMappingsResponse -> Maybe Text
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
appArn
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
appVersion
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus