{-# 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.ListAppVersionResources
-- 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 all the resources in an application version.
module Amazonka.ResilienceHub.ListAppVersionResources
  ( -- * Creating a Request
    ListAppVersionResources (..),
    newListAppVersionResources,

    -- * Request Lenses
    listAppVersionResources_maxResults,
    listAppVersionResources_nextToken,
    listAppVersionResources_resolutionId,
    listAppVersionResources_appArn,
    listAppVersionResources_appVersion,

    -- * Destructuring the Response
    ListAppVersionResourcesResponse (..),
    newListAppVersionResourcesResponse,

    -- * Response Lenses
    listAppVersionResourcesResponse_nextToken,
    listAppVersionResourcesResponse_httpStatus,
    listAppVersionResourcesResponse_physicalResources,
    listAppVersionResourcesResponse_resolutionId,
  )
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:/ 'newListAppVersionResources' smart constructor.
data ListAppVersionResources = ListAppVersionResources'
  { -- | 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.
    ListAppVersionResources -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Null, or the token from a previous call to get the next set of results.
    ListAppVersionResources -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The identifier for a specific resolution.
    ListAppVersionResources -> Maybe Text
resolutionId :: 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/.
    ListAppVersionResources -> Text
appArn :: Prelude.Text,
    -- | The version of the application.
    ListAppVersionResources -> Text
appVersion :: Prelude.Text
  }
  deriving (ListAppVersionResources -> ListAppVersionResources -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAppVersionResources -> ListAppVersionResources -> Bool
$c/= :: ListAppVersionResources -> ListAppVersionResources -> Bool
== :: ListAppVersionResources -> ListAppVersionResources -> Bool
$c== :: ListAppVersionResources -> ListAppVersionResources -> Bool
Prelude.Eq, ReadPrec [ListAppVersionResources]
ReadPrec ListAppVersionResources
Int -> ReadS ListAppVersionResources
ReadS [ListAppVersionResources]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAppVersionResources]
$creadListPrec :: ReadPrec [ListAppVersionResources]
readPrec :: ReadPrec ListAppVersionResources
$creadPrec :: ReadPrec ListAppVersionResources
readList :: ReadS [ListAppVersionResources]
$creadList :: ReadS [ListAppVersionResources]
readsPrec :: Int -> ReadS ListAppVersionResources
$creadsPrec :: Int -> ReadS ListAppVersionResources
Prelude.Read, Int -> ListAppVersionResources -> ShowS
[ListAppVersionResources] -> ShowS
ListAppVersionResources -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAppVersionResources] -> ShowS
$cshowList :: [ListAppVersionResources] -> ShowS
show :: ListAppVersionResources -> String
$cshow :: ListAppVersionResources -> String
showsPrec :: Int -> ListAppVersionResources -> ShowS
$cshowsPrec :: Int -> ListAppVersionResources -> ShowS
Prelude.Show, forall x. Rep ListAppVersionResources x -> ListAppVersionResources
forall x. ListAppVersionResources -> Rep ListAppVersionResources x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAppVersionResources x -> ListAppVersionResources
$cfrom :: forall x. ListAppVersionResources -> Rep ListAppVersionResources x
Prelude.Generic)

-- |
-- Create a value of 'ListAppVersionResources' 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', 'listAppVersionResources_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', 'listAppVersionResources_nextToken' - Null, or the token from a previous call to get the next set of results.
--
-- 'resolutionId', 'listAppVersionResources_resolutionId' - The identifier for a specific resolution.
--
-- 'appArn', 'listAppVersionResources_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', 'listAppVersionResources_appVersion' - The version of the application.
newListAppVersionResources ::
  -- | 'appArn'
  Prelude.Text ->
  -- | 'appVersion'
  Prelude.Text ->
  ListAppVersionResources
newListAppVersionResources :: Text -> Text -> ListAppVersionResources
newListAppVersionResources Text
pAppArn_ Text
pAppVersion_ =
  ListAppVersionResources'
    { $sel:maxResults:ListAppVersionResources' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListAppVersionResources' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:resolutionId:ListAppVersionResources' :: Maybe Text
resolutionId = forall a. Maybe a
Prelude.Nothing,
      $sel:appArn:ListAppVersionResources' :: Text
appArn = Text
pAppArn_,
      $sel:appVersion:ListAppVersionResources' :: 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.
listAppVersionResources_maxResults :: Lens.Lens' ListAppVersionResources (Prelude.Maybe Prelude.Natural)
listAppVersionResources_maxResults :: Lens' ListAppVersionResources (Maybe Natural)
listAppVersionResources_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAppVersionResources' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListAppVersionResources' :: ListAppVersionResources -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListAppVersionResources
s@ListAppVersionResources' {} Maybe Natural
a -> ListAppVersionResources
s {$sel:maxResults:ListAppVersionResources' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListAppVersionResources)

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

-- | The identifier for a specific resolution.
listAppVersionResources_resolutionId :: Lens.Lens' ListAppVersionResources (Prelude.Maybe Prelude.Text)
listAppVersionResources_resolutionId :: Lens' ListAppVersionResources (Maybe Text)
listAppVersionResources_resolutionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAppVersionResources' {Maybe Text
resolutionId :: Maybe Text
$sel:resolutionId:ListAppVersionResources' :: ListAppVersionResources -> Maybe Text
resolutionId} -> Maybe Text
resolutionId) (\s :: ListAppVersionResources
s@ListAppVersionResources' {} Maybe Text
a -> ListAppVersionResources
s {$sel:resolutionId:ListAppVersionResources' :: Maybe Text
resolutionId = Maybe Text
a} :: ListAppVersionResources)

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

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

instance Core.AWSRequest ListAppVersionResources where
  type
    AWSResponse ListAppVersionResources =
      ListAppVersionResourcesResponse
  request :: (Service -> Service)
-> ListAppVersionResources -> Request ListAppVersionResources
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 ListAppVersionResources
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListAppVersionResources)))
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
-> [PhysicalResource]
-> Text
-> ListAppVersionResourcesResponse
ListAppVersionResourcesResponse'
            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
"physicalResources"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            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
"resolutionId")
      )

instance Prelude.Hashable ListAppVersionResources where
  hashWithSalt :: Int -> ListAppVersionResources -> Int
hashWithSalt Int
_salt ListAppVersionResources' {Maybe Natural
Maybe Text
Text
appVersion :: Text
appArn :: Text
resolutionId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:appVersion:ListAppVersionResources' :: ListAppVersionResources -> Text
$sel:appArn:ListAppVersionResources' :: ListAppVersionResources -> Text
$sel:resolutionId:ListAppVersionResources' :: ListAppVersionResources -> Maybe Text
$sel:nextToken:ListAppVersionResources' :: ListAppVersionResources -> Maybe Text
$sel:maxResults:ListAppVersionResources' :: ListAppVersionResources -> 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` Maybe Text
resolutionId
      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 ListAppVersionResources where
  rnf :: ListAppVersionResources -> ()
rnf ListAppVersionResources' {Maybe Natural
Maybe Text
Text
appVersion :: Text
appArn :: Text
resolutionId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:appVersion:ListAppVersionResources' :: ListAppVersionResources -> Text
$sel:appArn:ListAppVersionResources' :: ListAppVersionResources -> Text
$sel:resolutionId:ListAppVersionResources' :: ListAppVersionResources -> Maybe Text
$sel:nextToken:ListAppVersionResources' :: ListAppVersionResources -> Maybe Text
$sel:maxResults:ListAppVersionResources' :: ListAppVersionResources -> 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 Maybe Text
resolutionId
      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 ListAppVersionResources where
  toHeaders :: ListAppVersionResources -> 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 ListAppVersionResources where
  toJSON :: ListAppVersionResources -> Value
toJSON ListAppVersionResources' {Maybe Natural
Maybe Text
Text
appVersion :: Text
appArn :: Text
resolutionId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:appVersion:ListAppVersionResources' :: ListAppVersionResources -> Text
$sel:appArn:ListAppVersionResources' :: ListAppVersionResources -> Text
$sel:resolutionId:ListAppVersionResources' :: ListAppVersionResources -> Maybe Text
$sel:nextToken:ListAppVersionResources' :: ListAppVersionResources -> Maybe Text
$sel:maxResults:ListAppVersionResources' :: ListAppVersionResources -> 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,
            (Key
"resolutionId" 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
resolutionId,
            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 ListAppVersionResources where
  toPath :: ListAppVersionResources -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/list-app-version-resources"

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

-- | /See:/ 'newListAppVersionResourcesResponse' smart constructor.
data ListAppVersionResourcesResponse = ListAppVersionResourcesResponse'
  { -- | The token for the next set of results, or null if there are no more
    -- results.
    ListAppVersionResourcesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListAppVersionResourcesResponse -> Int
httpStatus :: Prelude.Int,
    -- | The physical resources in the application version.
    ListAppVersionResourcesResponse -> [PhysicalResource]
physicalResources :: [PhysicalResource],
    -- | The identifier for a specific resolution.
    ListAppVersionResourcesResponse -> Text
resolutionId :: Prelude.Text
  }
  deriving (ListAppVersionResourcesResponse
-> ListAppVersionResourcesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAppVersionResourcesResponse
-> ListAppVersionResourcesResponse -> Bool
$c/= :: ListAppVersionResourcesResponse
-> ListAppVersionResourcesResponse -> Bool
== :: ListAppVersionResourcesResponse
-> ListAppVersionResourcesResponse -> Bool
$c== :: ListAppVersionResourcesResponse
-> ListAppVersionResourcesResponse -> Bool
Prelude.Eq, ReadPrec [ListAppVersionResourcesResponse]
ReadPrec ListAppVersionResourcesResponse
Int -> ReadS ListAppVersionResourcesResponse
ReadS [ListAppVersionResourcesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAppVersionResourcesResponse]
$creadListPrec :: ReadPrec [ListAppVersionResourcesResponse]
readPrec :: ReadPrec ListAppVersionResourcesResponse
$creadPrec :: ReadPrec ListAppVersionResourcesResponse
readList :: ReadS [ListAppVersionResourcesResponse]
$creadList :: ReadS [ListAppVersionResourcesResponse]
readsPrec :: Int -> ReadS ListAppVersionResourcesResponse
$creadsPrec :: Int -> ReadS ListAppVersionResourcesResponse
Prelude.Read, Int -> ListAppVersionResourcesResponse -> ShowS
[ListAppVersionResourcesResponse] -> ShowS
ListAppVersionResourcesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAppVersionResourcesResponse] -> ShowS
$cshowList :: [ListAppVersionResourcesResponse] -> ShowS
show :: ListAppVersionResourcesResponse -> String
$cshow :: ListAppVersionResourcesResponse -> String
showsPrec :: Int -> ListAppVersionResourcesResponse -> ShowS
$cshowsPrec :: Int -> ListAppVersionResourcesResponse -> ShowS
Prelude.Show, forall x.
Rep ListAppVersionResourcesResponse x
-> ListAppVersionResourcesResponse
forall x.
ListAppVersionResourcesResponse
-> Rep ListAppVersionResourcesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAppVersionResourcesResponse x
-> ListAppVersionResourcesResponse
$cfrom :: forall x.
ListAppVersionResourcesResponse
-> Rep ListAppVersionResourcesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListAppVersionResourcesResponse' 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', 'listAppVersionResourcesResponse_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'httpStatus', 'listAppVersionResourcesResponse_httpStatus' - The response's http status code.
--
-- 'physicalResources', 'listAppVersionResourcesResponse_physicalResources' - The physical resources in the application version.
--
-- 'resolutionId', 'listAppVersionResourcesResponse_resolutionId' - The identifier for a specific resolution.
newListAppVersionResourcesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'resolutionId'
  Prelude.Text ->
  ListAppVersionResourcesResponse
newListAppVersionResourcesResponse :: Int -> Text -> ListAppVersionResourcesResponse
newListAppVersionResourcesResponse
  Int
pHttpStatus_
  Text
pResolutionId_ =
    ListAppVersionResourcesResponse'
      { $sel:nextToken:ListAppVersionResourcesResponse' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListAppVersionResourcesResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:physicalResources:ListAppVersionResourcesResponse' :: [PhysicalResource]
physicalResources = forall a. Monoid a => a
Prelude.mempty,
        $sel:resolutionId:ListAppVersionResourcesResponse' :: Text
resolutionId = Text
pResolutionId_
      }

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

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

-- | The physical resources in the application version.
listAppVersionResourcesResponse_physicalResources :: Lens.Lens' ListAppVersionResourcesResponse [PhysicalResource]
listAppVersionResourcesResponse_physicalResources :: Lens' ListAppVersionResourcesResponse [PhysicalResource]
listAppVersionResourcesResponse_physicalResources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAppVersionResourcesResponse' {[PhysicalResource]
physicalResources :: [PhysicalResource]
$sel:physicalResources:ListAppVersionResourcesResponse' :: ListAppVersionResourcesResponse -> [PhysicalResource]
physicalResources} -> [PhysicalResource]
physicalResources) (\s :: ListAppVersionResourcesResponse
s@ListAppVersionResourcesResponse' {} [PhysicalResource]
a -> ListAppVersionResourcesResponse
s {$sel:physicalResources:ListAppVersionResourcesResponse' :: [PhysicalResource]
physicalResources = [PhysicalResource]
a} :: ListAppVersionResourcesResponse) 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

-- | The identifier for a specific resolution.
listAppVersionResourcesResponse_resolutionId :: Lens.Lens' ListAppVersionResourcesResponse Prelude.Text
listAppVersionResourcesResponse_resolutionId :: Lens' ListAppVersionResourcesResponse Text
listAppVersionResourcesResponse_resolutionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAppVersionResourcesResponse' {Text
resolutionId :: Text
$sel:resolutionId:ListAppVersionResourcesResponse' :: ListAppVersionResourcesResponse -> Text
resolutionId} -> Text
resolutionId) (\s :: ListAppVersionResourcesResponse
s@ListAppVersionResourcesResponse' {} Text
a -> ListAppVersionResourcesResponse
s {$sel:resolutionId:ListAppVersionResourcesResponse' :: Text
resolutionId = Text
a} :: ListAppVersionResourcesResponse)

instance
  Prelude.NFData
    ListAppVersionResourcesResponse
  where
  rnf :: ListAppVersionResourcesResponse -> ()
rnf ListAppVersionResourcesResponse' {Int
[PhysicalResource]
Maybe Text
Text
resolutionId :: Text
physicalResources :: [PhysicalResource]
httpStatus :: Int
nextToken :: Maybe Text
$sel:resolutionId:ListAppVersionResourcesResponse' :: ListAppVersionResourcesResponse -> Text
$sel:physicalResources:ListAppVersionResourcesResponse' :: ListAppVersionResourcesResponse -> [PhysicalResource]
$sel:httpStatus:ListAppVersionResourcesResponse' :: ListAppVersionResourcesResponse -> Int
$sel:nextToken:ListAppVersionResourcesResponse' :: ListAppVersionResourcesResponse -> 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 [PhysicalResource]
physicalResources
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
resolutionId