{-# 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.AddDraftAppVersionResourceMappings
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Adds the resource mapping for the draft application version.
module Amazonka.ResilienceHub.AddDraftAppVersionResourceMappings
  ( -- * Creating a Request
    AddDraftAppVersionResourceMappings (..),
    newAddDraftAppVersionResourceMappings,

    -- * Request Lenses
    addDraftAppVersionResourceMappings_appArn,
    addDraftAppVersionResourceMappings_resourceMappings,

    -- * Destructuring the Response
    AddDraftAppVersionResourceMappingsResponse (..),
    newAddDraftAppVersionResourceMappingsResponse,

    -- * Response Lenses
    addDraftAppVersionResourceMappingsResponse_httpStatus,
    addDraftAppVersionResourceMappingsResponse_appArn,
    addDraftAppVersionResourceMappingsResponse_appVersion,
    addDraftAppVersionResourceMappingsResponse_resourceMappings,
  )
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:/ 'newAddDraftAppVersionResourceMappings' smart constructor.
data AddDraftAppVersionResourceMappings = AddDraftAppVersionResourceMappings'
  { -- | 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/.
    AddDraftAppVersionResourceMappings -> Text
appArn :: Prelude.Text,
    -- | Mappings used to map logical resources from the template to physical
    -- resources. You can use the mapping type @CFN_STACK@ if the application
    -- template uses a logical stack name. Or you can map individual resources
    -- by using the mapping type @RESOURCE@. We recommend using the mapping
    -- type @CFN_STACK@ if the application is backed by a CloudFormation stack.
    AddDraftAppVersionResourceMappings -> [ResourceMapping]
resourceMappings :: [ResourceMapping]
  }
  deriving (AddDraftAppVersionResourceMappings
-> AddDraftAppVersionResourceMappings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddDraftAppVersionResourceMappings
-> AddDraftAppVersionResourceMappings -> Bool
$c/= :: AddDraftAppVersionResourceMappings
-> AddDraftAppVersionResourceMappings -> Bool
== :: AddDraftAppVersionResourceMappings
-> AddDraftAppVersionResourceMappings -> Bool
$c== :: AddDraftAppVersionResourceMappings
-> AddDraftAppVersionResourceMappings -> Bool
Prelude.Eq, ReadPrec [AddDraftAppVersionResourceMappings]
ReadPrec AddDraftAppVersionResourceMappings
Int -> ReadS AddDraftAppVersionResourceMappings
ReadS [AddDraftAppVersionResourceMappings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddDraftAppVersionResourceMappings]
$creadListPrec :: ReadPrec [AddDraftAppVersionResourceMappings]
readPrec :: ReadPrec AddDraftAppVersionResourceMappings
$creadPrec :: ReadPrec AddDraftAppVersionResourceMappings
readList :: ReadS [AddDraftAppVersionResourceMappings]
$creadList :: ReadS [AddDraftAppVersionResourceMappings]
readsPrec :: Int -> ReadS AddDraftAppVersionResourceMappings
$creadsPrec :: Int -> ReadS AddDraftAppVersionResourceMappings
Prelude.Read, Int -> AddDraftAppVersionResourceMappings -> ShowS
[AddDraftAppVersionResourceMappings] -> ShowS
AddDraftAppVersionResourceMappings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddDraftAppVersionResourceMappings] -> ShowS
$cshowList :: [AddDraftAppVersionResourceMappings] -> ShowS
show :: AddDraftAppVersionResourceMappings -> String
$cshow :: AddDraftAppVersionResourceMappings -> String
showsPrec :: Int -> AddDraftAppVersionResourceMappings -> ShowS
$cshowsPrec :: Int -> AddDraftAppVersionResourceMappings -> ShowS
Prelude.Show, forall x.
Rep AddDraftAppVersionResourceMappings x
-> AddDraftAppVersionResourceMappings
forall x.
AddDraftAppVersionResourceMappings
-> Rep AddDraftAppVersionResourceMappings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AddDraftAppVersionResourceMappings x
-> AddDraftAppVersionResourceMappings
$cfrom :: forall x.
AddDraftAppVersionResourceMappings
-> Rep AddDraftAppVersionResourceMappings x
Prelude.Generic)

-- |
-- Create a value of 'AddDraftAppVersionResourceMappings' 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', 'addDraftAppVersionResourceMappings_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/.
--
-- 'resourceMappings', 'addDraftAppVersionResourceMappings_resourceMappings' - Mappings used to map logical resources from the template to physical
-- resources. You can use the mapping type @CFN_STACK@ if the application
-- template uses a logical stack name. Or you can map individual resources
-- by using the mapping type @RESOURCE@. We recommend using the mapping
-- type @CFN_STACK@ if the application is backed by a CloudFormation stack.
newAddDraftAppVersionResourceMappings ::
  -- | 'appArn'
  Prelude.Text ->
  AddDraftAppVersionResourceMappings
newAddDraftAppVersionResourceMappings :: Text -> AddDraftAppVersionResourceMappings
newAddDraftAppVersionResourceMappings Text
pAppArn_ =
  AddDraftAppVersionResourceMappings'
    { $sel:appArn:AddDraftAppVersionResourceMappings' :: Text
appArn =
        Text
pAppArn_,
      $sel:resourceMappings:AddDraftAppVersionResourceMappings' :: [ResourceMapping]
resourceMappings = forall a. Monoid a => a
Prelude.mempty
    }

-- | 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/.
addDraftAppVersionResourceMappings_appArn :: Lens.Lens' AddDraftAppVersionResourceMappings Prelude.Text
addDraftAppVersionResourceMappings_appArn :: Lens' AddDraftAppVersionResourceMappings Text
addDraftAppVersionResourceMappings_appArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddDraftAppVersionResourceMappings' {Text
appArn :: Text
$sel:appArn:AddDraftAppVersionResourceMappings' :: AddDraftAppVersionResourceMappings -> Text
appArn} -> Text
appArn) (\s :: AddDraftAppVersionResourceMappings
s@AddDraftAppVersionResourceMappings' {} Text
a -> AddDraftAppVersionResourceMappings
s {$sel:appArn:AddDraftAppVersionResourceMappings' :: Text
appArn = Text
a} :: AddDraftAppVersionResourceMappings)

-- | Mappings used to map logical resources from the template to physical
-- resources. You can use the mapping type @CFN_STACK@ if the application
-- template uses a logical stack name. Or you can map individual resources
-- by using the mapping type @RESOURCE@. We recommend using the mapping
-- type @CFN_STACK@ if the application is backed by a CloudFormation stack.
addDraftAppVersionResourceMappings_resourceMappings :: Lens.Lens' AddDraftAppVersionResourceMappings [ResourceMapping]
addDraftAppVersionResourceMappings_resourceMappings :: Lens' AddDraftAppVersionResourceMappings [ResourceMapping]
addDraftAppVersionResourceMappings_resourceMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddDraftAppVersionResourceMappings' {[ResourceMapping]
resourceMappings :: [ResourceMapping]
$sel:resourceMappings:AddDraftAppVersionResourceMappings' :: AddDraftAppVersionResourceMappings -> [ResourceMapping]
resourceMappings} -> [ResourceMapping]
resourceMappings) (\s :: AddDraftAppVersionResourceMappings
s@AddDraftAppVersionResourceMappings' {} [ResourceMapping]
a -> AddDraftAppVersionResourceMappings
s {$sel:resourceMappings:AddDraftAppVersionResourceMappings' :: [ResourceMapping]
resourceMappings = [ResourceMapping]
a} :: AddDraftAppVersionResourceMappings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.AWSRequest
    AddDraftAppVersionResourceMappings
  where
  type
    AWSResponse AddDraftAppVersionResourceMappings =
      AddDraftAppVersionResourceMappingsResponse
  request :: (Service -> Service)
-> AddDraftAppVersionResourceMappings
-> Request AddDraftAppVersionResourceMappings
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 AddDraftAppVersionResourceMappings
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse AddDraftAppVersionResourceMappings)))
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 ->
          Int
-> Text
-> Text
-> [ResourceMapping]
-> AddDraftAppVersionResourceMappingsResponse
AddDraftAppVersionResourceMappingsResponse'
            forall (f :: * -> *) a b. Functor 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))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String 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 a
Data..:> Key
"appVersion")
            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
"resourceMappings"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance
  Prelude.Hashable
    AddDraftAppVersionResourceMappings
  where
  hashWithSalt :: Int -> AddDraftAppVersionResourceMappings -> Int
hashWithSalt
    Int
_salt
    AddDraftAppVersionResourceMappings' {[ResourceMapping]
Text
resourceMappings :: [ResourceMapping]
appArn :: Text
$sel:resourceMappings:AddDraftAppVersionResourceMappings' :: AddDraftAppVersionResourceMappings -> [ResourceMapping]
$sel:appArn:AddDraftAppVersionResourceMappings' :: AddDraftAppVersionResourceMappings -> Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
appArn
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [ResourceMapping]
resourceMappings

instance
  Prelude.NFData
    AddDraftAppVersionResourceMappings
  where
  rnf :: AddDraftAppVersionResourceMappings -> ()
rnf AddDraftAppVersionResourceMappings' {[ResourceMapping]
Text
resourceMappings :: [ResourceMapping]
appArn :: Text
$sel:resourceMappings:AddDraftAppVersionResourceMappings' :: AddDraftAppVersionResourceMappings -> [ResourceMapping]
$sel:appArn:AddDraftAppVersionResourceMappings' :: AddDraftAppVersionResourceMappings -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
appArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [ResourceMapping]
resourceMappings

instance
  Data.ToHeaders
    AddDraftAppVersionResourceMappings
  where
  toHeaders :: AddDraftAppVersionResourceMappings -> 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
    AddDraftAppVersionResourceMappings
  where
  toJSON :: AddDraftAppVersionResourceMappings -> Value
toJSON AddDraftAppVersionResourceMappings' {[ResourceMapping]
Text
resourceMappings :: [ResourceMapping]
appArn :: Text
$sel:resourceMappings:AddDraftAppVersionResourceMappings' :: AddDraftAppVersionResourceMappings -> [ResourceMapping]
$sel:appArn:AddDraftAppVersionResourceMappings' :: AddDraftAppVersionResourceMappings -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just (Key
"appArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
appArn),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"resourceMappings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [ResourceMapping]
resourceMappings)
          ]
      )

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

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

-- | /See:/ 'newAddDraftAppVersionResourceMappingsResponse' smart constructor.
data AddDraftAppVersionResourceMappingsResponse = AddDraftAppVersionResourceMappingsResponse'
  { -- | The response's http status code.
    AddDraftAppVersionResourceMappingsResponse -> Int
httpStatus :: Prelude.Int,
    -- | 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/.
    AddDraftAppVersionResourceMappingsResponse -> Text
appArn :: Prelude.Text,
    -- | The version of the application.
    AddDraftAppVersionResourceMappingsResponse -> Text
appVersion :: Prelude.Text,
    -- | Mappings used to map logical resources from the template to physical
    -- resources. You can use the mapping type @CFN_STACK@ if the application
    -- template uses a logical stack name. Or you can map individual resources
    -- by using the mapping type @RESOURCE@. We recommend using the mapping
    -- type @CFN_STACK@ if the application is backed by a CloudFormation stack.
    AddDraftAppVersionResourceMappingsResponse -> [ResourceMapping]
resourceMappings :: [ResourceMapping]
  }
  deriving (AddDraftAppVersionResourceMappingsResponse
-> AddDraftAppVersionResourceMappingsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddDraftAppVersionResourceMappingsResponse
-> AddDraftAppVersionResourceMappingsResponse -> Bool
$c/= :: AddDraftAppVersionResourceMappingsResponse
-> AddDraftAppVersionResourceMappingsResponse -> Bool
== :: AddDraftAppVersionResourceMappingsResponse
-> AddDraftAppVersionResourceMappingsResponse -> Bool
$c== :: AddDraftAppVersionResourceMappingsResponse
-> AddDraftAppVersionResourceMappingsResponse -> Bool
Prelude.Eq, ReadPrec [AddDraftAppVersionResourceMappingsResponse]
ReadPrec AddDraftAppVersionResourceMappingsResponse
Int -> ReadS AddDraftAppVersionResourceMappingsResponse
ReadS [AddDraftAppVersionResourceMappingsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddDraftAppVersionResourceMappingsResponse]
$creadListPrec :: ReadPrec [AddDraftAppVersionResourceMappingsResponse]
readPrec :: ReadPrec AddDraftAppVersionResourceMappingsResponse
$creadPrec :: ReadPrec AddDraftAppVersionResourceMappingsResponse
readList :: ReadS [AddDraftAppVersionResourceMappingsResponse]
$creadList :: ReadS [AddDraftAppVersionResourceMappingsResponse]
readsPrec :: Int -> ReadS AddDraftAppVersionResourceMappingsResponse
$creadsPrec :: Int -> ReadS AddDraftAppVersionResourceMappingsResponse
Prelude.Read, Int -> AddDraftAppVersionResourceMappingsResponse -> ShowS
[AddDraftAppVersionResourceMappingsResponse] -> ShowS
AddDraftAppVersionResourceMappingsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddDraftAppVersionResourceMappingsResponse] -> ShowS
$cshowList :: [AddDraftAppVersionResourceMappingsResponse] -> ShowS
show :: AddDraftAppVersionResourceMappingsResponse -> String
$cshow :: AddDraftAppVersionResourceMappingsResponse -> String
showsPrec :: Int -> AddDraftAppVersionResourceMappingsResponse -> ShowS
$cshowsPrec :: Int -> AddDraftAppVersionResourceMappingsResponse -> ShowS
Prelude.Show, forall x.
Rep AddDraftAppVersionResourceMappingsResponse x
-> AddDraftAppVersionResourceMappingsResponse
forall x.
AddDraftAppVersionResourceMappingsResponse
-> Rep AddDraftAppVersionResourceMappingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AddDraftAppVersionResourceMappingsResponse x
-> AddDraftAppVersionResourceMappingsResponse
$cfrom :: forall x.
AddDraftAppVersionResourceMappingsResponse
-> Rep AddDraftAppVersionResourceMappingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'AddDraftAppVersionResourceMappingsResponse' 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:
--
-- 'httpStatus', 'addDraftAppVersionResourceMappingsResponse_httpStatus' - The response's http status code.
--
-- 'appArn', 'addDraftAppVersionResourceMappingsResponse_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', 'addDraftAppVersionResourceMappingsResponse_appVersion' - The version of the application.
--
-- 'resourceMappings', 'addDraftAppVersionResourceMappingsResponse_resourceMappings' - Mappings used to map logical resources from the template to physical
-- resources. You can use the mapping type @CFN_STACK@ if the application
-- template uses a logical stack name. Or you can map individual resources
-- by using the mapping type @RESOURCE@. We recommend using the mapping
-- type @CFN_STACK@ if the application is backed by a CloudFormation stack.
newAddDraftAppVersionResourceMappingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'appArn'
  Prelude.Text ->
  -- | 'appVersion'
  Prelude.Text ->
  AddDraftAppVersionResourceMappingsResponse
newAddDraftAppVersionResourceMappingsResponse :: Int -> Text -> Text -> AddDraftAppVersionResourceMappingsResponse
newAddDraftAppVersionResourceMappingsResponse
  Int
pHttpStatus_
  Text
pAppArn_
  Text
pAppVersion_ =
    AddDraftAppVersionResourceMappingsResponse'
      { $sel:httpStatus:AddDraftAppVersionResourceMappingsResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:appArn:AddDraftAppVersionResourceMappingsResponse' :: Text
appArn = Text
pAppArn_,
        $sel:appVersion:AddDraftAppVersionResourceMappingsResponse' :: Text
appVersion = Text
pAppVersion_,
        $sel:resourceMappings:AddDraftAppVersionResourceMappingsResponse' :: [ResourceMapping]
resourceMappings =
          forall a. Monoid a => a
Prelude.mempty
      }

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

-- | 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/.
addDraftAppVersionResourceMappingsResponse_appArn :: Lens.Lens' AddDraftAppVersionResourceMappingsResponse Prelude.Text
addDraftAppVersionResourceMappingsResponse_appArn :: Lens' AddDraftAppVersionResourceMappingsResponse Text
addDraftAppVersionResourceMappingsResponse_appArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddDraftAppVersionResourceMappingsResponse' {Text
appArn :: Text
$sel:appArn:AddDraftAppVersionResourceMappingsResponse' :: AddDraftAppVersionResourceMappingsResponse -> Text
appArn} -> Text
appArn) (\s :: AddDraftAppVersionResourceMappingsResponse
s@AddDraftAppVersionResourceMappingsResponse' {} Text
a -> AddDraftAppVersionResourceMappingsResponse
s {$sel:appArn:AddDraftAppVersionResourceMappingsResponse' :: Text
appArn = Text
a} :: AddDraftAppVersionResourceMappingsResponse)

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

-- | Mappings used to map logical resources from the template to physical
-- resources. You can use the mapping type @CFN_STACK@ if the application
-- template uses a logical stack name. Or you can map individual resources
-- by using the mapping type @RESOURCE@. We recommend using the mapping
-- type @CFN_STACK@ if the application is backed by a CloudFormation stack.
addDraftAppVersionResourceMappingsResponse_resourceMappings :: Lens.Lens' AddDraftAppVersionResourceMappingsResponse [ResourceMapping]
addDraftAppVersionResourceMappingsResponse_resourceMappings :: Lens' AddDraftAppVersionResourceMappingsResponse [ResourceMapping]
addDraftAppVersionResourceMappingsResponse_resourceMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddDraftAppVersionResourceMappingsResponse' {[ResourceMapping]
resourceMappings :: [ResourceMapping]
$sel:resourceMappings:AddDraftAppVersionResourceMappingsResponse' :: AddDraftAppVersionResourceMappingsResponse -> [ResourceMapping]
resourceMappings} -> [ResourceMapping]
resourceMappings) (\s :: AddDraftAppVersionResourceMappingsResponse
s@AddDraftAppVersionResourceMappingsResponse' {} [ResourceMapping]
a -> AddDraftAppVersionResourceMappingsResponse
s {$sel:resourceMappings:AddDraftAppVersionResourceMappingsResponse' :: [ResourceMapping]
resourceMappings = [ResourceMapping]
a} :: AddDraftAppVersionResourceMappingsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    AddDraftAppVersionResourceMappingsResponse
  where
  rnf :: AddDraftAppVersionResourceMappingsResponse -> ()
rnf AddDraftAppVersionResourceMappingsResponse' {Int
[ResourceMapping]
Text
resourceMappings :: [ResourceMapping]
appVersion :: Text
appArn :: Text
httpStatus :: Int
$sel:resourceMappings:AddDraftAppVersionResourceMappingsResponse' :: AddDraftAppVersionResourceMappingsResponse -> [ResourceMapping]
$sel:appVersion:AddDraftAppVersionResourceMappingsResponse' :: AddDraftAppVersionResourceMappingsResponse -> Text
$sel:appArn:AddDraftAppVersionResourceMappingsResponse' :: AddDraftAppVersionResourceMappingsResponse -> Text
$sel:httpStatus:AddDraftAppVersionResourceMappingsResponse' :: AddDraftAppVersionResourceMappingsResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
appArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
appVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [ResourceMapping]
resourceMappings