{-# 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.ListAppVersionResourceMappings
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists how the resources in an application version are mapped\/sourced
-- from. Mappings can be physical resource identifiers, CloudFormation
-- stacks, resource-groups, or an application registry app.
module Amazonka.ResilienceHub.ListAppVersionResourceMappings
  ( -- * Creating a Request
    ListAppVersionResourceMappings (..),
    newListAppVersionResourceMappings,

    -- * Request Lenses
    listAppVersionResourceMappings_maxResults,
    listAppVersionResourceMappings_nextToken,
    listAppVersionResourceMappings_appArn,
    listAppVersionResourceMappings_appVersion,

    -- * Destructuring the Response
    ListAppVersionResourceMappingsResponse (..),
    newListAppVersionResourceMappingsResponse,

    -- * Response Lenses
    listAppVersionResourceMappingsResponse_nextToken,
    listAppVersionResourceMappingsResponse_httpStatus,
    listAppVersionResourceMappingsResponse_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:/ 'newListAppVersionResourceMappings' smart constructor.
data ListAppVersionResourceMappings = ListAppVersionResourceMappings'
  { -- | The maximum number of results to include in the response. If more
    -- results exist than the specified @MaxResults@ value, a token is included
    -- in the response so that the remaining results can be retrieved.
    ListAppVersionResourceMappings -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Null, or the token from a previous call to get the next set of results.
    ListAppVersionResourceMappings -> Maybe Text
nextToken :: 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/.
    ListAppVersionResourceMappings -> Text
appArn :: Prelude.Text,
    -- | The version of the application.
    ListAppVersionResourceMappings -> Text
appVersion :: Prelude.Text
  }
  deriving (ListAppVersionResourceMappings
-> ListAppVersionResourceMappings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAppVersionResourceMappings
-> ListAppVersionResourceMappings -> Bool
$c/= :: ListAppVersionResourceMappings
-> ListAppVersionResourceMappings -> Bool
== :: ListAppVersionResourceMappings
-> ListAppVersionResourceMappings -> Bool
$c== :: ListAppVersionResourceMappings
-> ListAppVersionResourceMappings -> Bool
Prelude.Eq, ReadPrec [ListAppVersionResourceMappings]
ReadPrec ListAppVersionResourceMappings
Int -> ReadS ListAppVersionResourceMappings
ReadS [ListAppVersionResourceMappings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAppVersionResourceMappings]
$creadListPrec :: ReadPrec [ListAppVersionResourceMappings]
readPrec :: ReadPrec ListAppVersionResourceMappings
$creadPrec :: ReadPrec ListAppVersionResourceMappings
readList :: ReadS [ListAppVersionResourceMappings]
$creadList :: ReadS [ListAppVersionResourceMappings]
readsPrec :: Int -> ReadS ListAppVersionResourceMappings
$creadsPrec :: Int -> ReadS ListAppVersionResourceMappings
Prelude.Read, Int -> ListAppVersionResourceMappings -> ShowS
[ListAppVersionResourceMappings] -> ShowS
ListAppVersionResourceMappings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAppVersionResourceMappings] -> ShowS
$cshowList :: [ListAppVersionResourceMappings] -> ShowS
show :: ListAppVersionResourceMappings -> String
$cshow :: ListAppVersionResourceMappings -> String
showsPrec :: Int -> ListAppVersionResourceMappings -> ShowS
$cshowsPrec :: Int -> ListAppVersionResourceMappings -> ShowS
Prelude.Show, forall x.
Rep ListAppVersionResourceMappings x
-> ListAppVersionResourceMappings
forall x.
ListAppVersionResourceMappings
-> Rep ListAppVersionResourceMappings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAppVersionResourceMappings x
-> ListAppVersionResourceMappings
$cfrom :: forall x.
ListAppVersionResourceMappings
-> Rep ListAppVersionResourceMappings x
Prelude.Generic)

-- |
-- Create a value of 'ListAppVersionResourceMappings' 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:
--
-- 'maxResults', 'listAppVersionResourceMappings_maxResults' - The maximum number of results to include in the response. If more
-- results exist than the specified @MaxResults@ value, a token is included
-- in the response so that the remaining results can be retrieved.
--
-- 'nextToken', 'listAppVersionResourceMappings_nextToken' - Null, or the token from a previous call to get the next set of results.
--
-- 'appArn', 'listAppVersionResourceMappings_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', 'listAppVersionResourceMappings_appVersion' - The version of the application.
newListAppVersionResourceMappings ::
  -- | 'appArn'
  Prelude.Text ->
  -- | 'appVersion'
  Prelude.Text ->
  ListAppVersionResourceMappings
newListAppVersionResourceMappings :: Text -> Text -> ListAppVersionResourceMappings
newListAppVersionResourceMappings
  Text
pAppArn_
  Text
pAppVersion_ =
    ListAppVersionResourceMappings'
      { $sel:maxResults:ListAppVersionResourceMappings' :: Maybe Natural
maxResults =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListAppVersionResourceMappings' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:appArn:ListAppVersionResourceMappings' :: Text
appArn = Text
pAppArn_,
        $sel:appVersion:ListAppVersionResourceMappings' :: Text
appVersion = Text
pAppVersion_
      }

-- | The maximum number of results to include in the response. If more
-- results exist than the specified @MaxResults@ value, a token is included
-- in the response so that the remaining results can be retrieved.
listAppVersionResourceMappings_maxResults :: Lens.Lens' ListAppVersionResourceMappings (Prelude.Maybe Prelude.Natural)
listAppVersionResourceMappings_maxResults :: Lens' ListAppVersionResourceMappings (Maybe Natural)
listAppVersionResourceMappings_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAppVersionResourceMappings' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListAppVersionResourceMappings' :: ListAppVersionResourceMappings -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListAppVersionResourceMappings
s@ListAppVersionResourceMappings' {} Maybe Natural
a -> ListAppVersionResourceMappings
s {$sel:maxResults:ListAppVersionResourceMappings' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListAppVersionResourceMappings)

-- | Null, or the token from a previous call to get the next set of results.
listAppVersionResourceMappings_nextToken :: Lens.Lens' ListAppVersionResourceMappings (Prelude.Maybe Prelude.Text)
listAppVersionResourceMappings_nextToken :: Lens' ListAppVersionResourceMappings (Maybe Text)
listAppVersionResourceMappings_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAppVersionResourceMappings' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAppVersionResourceMappings' :: ListAppVersionResourceMappings -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAppVersionResourceMappings
s@ListAppVersionResourceMappings' {} Maybe Text
a -> ListAppVersionResourceMappings
s {$sel:nextToken:ListAppVersionResourceMappings' :: Maybe Text
nextToken = Maybe Text
a} :: ListAppVersionResourceMappings)

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

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

instance
  Core.AWSRequest
    ListAppVersionResourceMappings
  where
  type
    AWSResponse ListAppVersionResourceMappings =
      ListAppVersionResourceMappingsResponse
  request :: (Service -> Service)
-> ListAppVersionResourceMappings
-> Request ListAppVersionResourceMappings
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 ListAppVersionResourceMappings
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListAppVersionResourceMappings)))
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
-> Int
-> [ResourceMapping]
-> ListAppVersionResourceMappingsResponse
ListAppVersionResourceMappingsResponse'
            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
"nextToken")
            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))
            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
    ListAppVersionResourceMappings
  where
  hashWithSalt :: Int -> ListAppVersionResourceMappings -> Int
hashWithSalt
    Int
_salt
    ListAppVersionResourceMappings' {Maybe Natural
Maybe Text
Text
appVersion :: Text
appArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:appVersion:ListAppVersionResourceMappings' :: ListAppVersionResourceMappings -> Text
$sel:appArn:ListAppVersionResourceMappings' :: ListAppVersionResourceMappings -> Text
$sel:nextToken:ListAppVersionResourceMappings' :: ListAppVersionResourceMappings -> Maybe Text
$sel:maxResults:ListAppVersionResourceMappings' :: ListAppVersionResourceMappings -> Maybe Natural
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
appArn
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
appVersion

instance
  Prelude.NFData
    ListAppVersionResourceMappings
  where
  rnf :: ListAppVersionResourceMappings -> ()
rnf ListAppVersionResourceMappings' {Maybe Natural
Maybe Text
Text
appVersion :: Text
appArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:appVersion:ListAppVersionResourceMappings' :: ListAppVersionResourceMappings -> Text
$sel:appArn:ListAppVersionResourceMappings' :: ListAppVersionResourceMappings -> Text
$sel:nextToken:ListAppVersionResourceMappings' :: ListAppVersionResourceMappings -> Maybe Text
$sel:maxResults:ListAppVersionResourceMappings' :: ListAppVersionResourceMappings -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      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

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

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

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

-- | /See:/ 'newListAppVersionResourceMappingsResponse' smart constructor.
data ListAppVersionResourceMappingsResponse = ListAppVersionResourceMappingsResponse'
  { -- | The token for the next set of results, or null if there are no more
    -- results.
    ListAppVersionResourceMappingsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListAppVersionResourceMappingsResponse -> Int
httpStatus :: Prelude.Int,
    -- | 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.
    ListAppVersionResourceMappingsResponse -> [ResourceMapping]
resourceMappings :: [ResourceMapping]
  }
  deriving (ListAppVersionResourceMappingsResponse
-> ListAppVersionResourceMappingsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAppVersionResourceMappingsResponse
-> ListAppVersionResourceMappingsResponse -> Bool
$c/= :: ListAppVersionResourceMappingsResponse
-> ListAppVersionResourceMappingsResponse -> Bool
== :: ListAppVersionResourceMappingsResponse
-> ListAppVersionResourceMappingsResponse -> Bool
$c== :: ListAppVersionResourceMappingsResponse
-> ListAppVersionResourceMappingsResponse -> Bool
Prelude.Eq, ReadPrec [ListAppVersionResourceMappingsResponse]
ReadPrec ListAppVersionResourceMappingsResponse
Int -> ReadS ListAppVersionResourceMappingsResponse
ReadS [ListAppVersionResourceMappingsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAppVersionResourceMappingsResponse]
$creadListPrec :: ReadPrec [ListAppVersionResourceMappingsResponse]
readPrec :: ReadPrec ListAppVersionResourceMappingsResponse
$creadPrec :: ReadPrec ListAppVersionResourceMappingsResponse
readList :: ReadS [ListAppVersionResourceMappingsResponse]
$creadList :: ReadS [ListAppVersionResourceMappingsResponse]
readsPrec :: Int -> ReadS ListAppVersionResourceMappingsResponse
$creadsPrec :: Int -> ReadS ListAppVersionResourceMappingsResponse
Prelude.Read, Int -> ListAppVersionResourceMappingsResponse -> ShowS
[ListAppVersionResourceMappingsResponse] -> ShowS
ListAppVersionResourceMappingsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAppVersionResourceMappingsResponse] -> ShowS
$cshowList :: [ListAppVersionResourceMappingsResponse] -> ShowS
show :: ListAppVersionResourceMappingsResponse -> String
$cshow :: ListAppVersionResourceMappingsResponse -> String
showsPrec :: Int -> ListAppVersionResourceMappingsResponse -> ShowS
$cshowsPrec :: Int -> ListAppVersionResourceMappingsResponse -> ShowS
Prelude.Show, forall x.
Rep ListAppVersionResourceMappingsResponse x
-> ListAppVersionResourceMappingsResponse
forall x.
ListAppVersionResourceMappingsResponse
-> Rep ListAppVersionResourceMappingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAppVersionResourceMappingsResponse x
-> ListAppVersionResourceMappingsResponse
$cfrom :: forall x.
ListAppVersionResourceMappingsResponse
-> Rep ListAppVersionResourceMappingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListAppVersionResourceMappingsResponse' 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:
--
-- 'nextToken', 'listAppVersionResourceMappingsResponse_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'httpStatus', 'listAppVersionResourceMappingsResponse_httpStatus' - The response's http status code.
--
-- 'resourceMappings', 'listAppVersionResourceMappingsResponse_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.
newListAppVersionResourceMappingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListAppVersionResourceMappingsResponse
newListAppVersionResourceMappingsResponse :: Int -> ListAppVersionResourceMappingsResponse
newListAppVersionResourceMappingsResponse
  Int
pHttpStatus_ =
    ListAppVersionResourceMappingsResponse'
      { $sel:nextToken:ListAppVersionResourceMappingsResponse' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListAppVersionResourceMappingsResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:resourceMappings:ListAppVersionResourceMappingsResponse' :: [ResourceMapping]
resourceMappings = forall a. Monoid a => a
Prelude.mempty
      }

-- | The token for the next set of results, or null if there are no more
-- results.
listAppVersionResourceMappingsResponse_nextToken :: Lens.Lens' ListAppVersionResourceMappingsResponse (Prelude.Maybe Prelude.Text)
listAppVersionResourceMappingsResponse_nextToken :: Lens' ListAppVersionResourceMappingsResponse (Maybe Text)
listAppVersionResourceMappingsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAppVersionResourceMappingsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAppVersionResourceMappingsResponse' :: ListAppVersionResourceMappingsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAppVersionResourceMappingsResponse
s@ListAppVersionResourceMappingsResponse' {} Maybe Text
a -> ListAppVersionResourceMappingsResponse
s {$sel:nextToken:ListAppVersionResourceMappingsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListAppVersionResourceMappingsResponse)

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

-- | 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.
listAppVersionResourceMappingsResponse_resourceMappings :: Lens.Lens' ListAppVersionResourceMappingsResponse [ResourceMapping]
listAppVersionResourceMappingsResponse_resourceMappings :: Lens' ListAppVersionResourceMappingsResponse [ResourceMapping]
listAppVersionResourceMappingsResponse_resourceMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAppVersionResourceMappingsResponse' {[ResourceMapping]
resourceMappings :: [ResourceMapping]
$sel:resourceMappings:ListAppVersionResourceMappingsResponse' :: ListAppVersionResourceMappingsResponse -> [ResourceMapping]
resourceMappings} -> [ResourceMapping]
resourceMappings) (\s :: ListAppVersionResourceMappingsResponse
s@ListAppVersionResourceMappingsResponse' {} [ResourceMapping]
a -> ListAppVersionResourceMappingsResponse
s {$sel:resourceMappings:ListAppVersionResourceMappingsResponse' :: [ResourceMapping]
resourceMappings = [ResourceMapping]
a} :: ListAppVersionResourceMappingsResponse) 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
    ListAppVersionResourceMappingsResponse
  where
  rnf :: ListAppVersionResourceMappingsResponse -> ()
rnf ListAppVersionResourceMappingsResponse' {Int
[ResourceMapping]
Maybe Text
resourceMappings :: [ResourceMapping]
httpStatus :: Int
nextToken :: Maybe Text
$sel:resourceMappings:ListAppVersionResourceMappingsResponse' :: ListAppVersionResourceMappingsResponse -> [ResourceMapping]
$sel:httpStatus:ListAppVersionResourceMappingsResponse' :: ListAppVersionResourceMappingsResponse -> Int
$sel:nextToken:ListAppVersionResourceMappingsResponse' :: ListAppVersionResourceMappingsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 [ResourceMapping]
resourceMappings