{-# 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.ServerlessApplicationRepository.ListApplicationDependencies
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves the list of applications nested in the containing application.
--
-- This operation returns paginated results.
module Amazonka.ServerlessApplicationRepository.ListApplicationDependencies
  ( -- * Creating a Request
    ListApplicationDependencies (..),
    newListApplicationDependencies,

    -- * Request Lenses
    listApplicationDependencies_semanticVersion,
    listApplicationDependencies_nextToken,
    listApplicationDependencies_maxItems,
    listApplicationDependencies_applicationId,

    -- * Destructuring the Response
    ListApplicationDependenciesResponse (..),
    newListApplicationDependenciesResponse,

    -- * Response Lenses
    listApplicationDependenciesResponse_dependencies,
    listApplicationDependenciesResponse_nextToken,
    listApplicationDependenciesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.ServerlessApplicationRepository.Types

-- | /See:/ 'newListApplicationDependencies' smart constructor.
data ListApplicationDependencies = ListApplicationDependencies'
  { -- | The semantic version of the application to get.
    ListApplicationDependencies -> Maybe Text
semanticVersion :: Prelude.Maybe Prelude.Text,
    -- | A token to specify where to start paginating.
    ListApplicationDependencies -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The total number of items to return.
    ListApplicationDependencies -> Maybe Natural
maxItems :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon Resource Name (ARN) of the application.
    ListApplicationDependencies -> Text
applicationId :: Prelude.Text
  }
  deriving (ListApplicationDependencies -> ListApplicationDependencies -> Bool
(ListApplicationDependencies
 -> ListApplicationDependencies -> Bool)
-> (ListApplicationDependencies
    -> ListApplicationDependencies -> Bool)
-> Eq ListApplicationDependencies
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListApplicationDependencies -> ListApplicationDependencies -> Bool
$c/= :: ListApplicationDependencies -> ListApplicationDependencies -> Bool
== :: ListApplicationDependencies -> ListApplicationDependencies -> Bool
$c== :: ListApplicationDependencies -> ListApplicationDependencies -> Bool
Prelude.Eq, ReadPrec [ListApplicationDependencies]
ReadPrec ListApplicationDependencies
Int -> ReadS ListApplicationDependencies
ReadS [ListApplicationDependencies]
(Int -> ReadS ListApplicationDependencies)
-> ReadS [ListApplicationDependencies]
-> ReadPrec ListApplicationDependencies
-> ReadPrec [ListApplicationDependencies]
-> Read ListApplicationDependencies
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListApplicationDependencies]
$creadListPrec :: ReadPrec [ListApplicationDependencies]
readPrec :: ReadPrec ListApplicationDependencies
$creadPrec :: ReadPrec ListApplicationDependencies
readList :: ReadS [ListApplicationDependencies]
$creadList :: ReadS [ListApplicationDependencies]
readsPrec :: Int -> ReadS ListApplicationDependencies
$creadsPrec :: Int -> ReadS ListApplicationDependencies
Prelude.Read, Int -> ListApplicationDependencies -> ShowS
[ListApplicationDependencies] -> ShowS
ListApplicationDependencies -> String
(Int -> ListApplicationDependencies -> ShowS)
-> (ListApplicationDependencies -> String)
-> ([ListApplicationDependencies] -> ShowS)
-> Show ListApplicationDependencies
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListApplicationDependencies] -> ShowS
$cshowList :: [ListApplicationDependencies] -> ShowS
show :: ListApplicationDependencies -> String
$cshow :: ListApplicationDependencies -> String
showsPrec :: Int -> ListApplicationDependencies -> ShowS
$cshowsPrec :: Int -> ListApplicationDependencies -> ShowS
Prelude.Show, (forall x.
 ListApplicationDependencies -> Rep ListApplicationDependencies x)
-> (forall x.
    Rep ListApplicationDependencies x -> ListApplicationDependencies)
-> Generic ListApplicationDependencies
forall x.
Rep ListApplicationDependencies x -> ListApplicationDependencies
forall x.
ListApplicationDependencies -> Rep ListApplicationDependencies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListApplicationDependencies x -> ListApplicationDependencies
$cfrom :: forall x.
ListApplicationDependencies -> Rep ListApplicationDependencies x
Prelude.Generic)

-- |
-- Create a value of 'ListApplicationDependencies' 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:
--
-- 'semanticVersion', 'listApplicationDependencies_semanticVersion' - The semantic version of the application to get.
--
-- 'nextToken', 'listApplicationDependencies_nextToken' - A token to specify where to start paginating.
--
-- 'maxItems', 'listApplicationDependencies_maxItems' - The total number of items to return.
--
-- 'applicationId', 'listApplicationDependencies_applicationId' - The Amazon Resource Name (ARN) of the application.
newListApplicationDependencies ::
  -- | 'applicationId'
  Prelude.Text ->
  ListApplicationDependencies
newListApplicationDependencies :: Text -> ListApplicationDependencies
newListApplicationDependencies Text
pApplicationId_ =
  ListApplicationDependencies' :: Maybe Text
-> Maybe Text
-> Maybe Natural
-> Text
-> ListApplicationDependencies
ListApplicationDependencies'
    { $sel:semanticVersion:ListApplicationDependencies' :: Maybe Text
semanticVersion =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListApplicationDependencies' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListApplicationDependencies' :: Maybe Natural
maxItems = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationId:ListApplicationDependencies' :: Text
applicationId = Text
pApplicationId_
    }

-- | The semantic version of the application to get.
listApplicationDependencies_semanticVersion :: Lens.Lens' ListApplicationDependencies (Prelude.Maybe Prelude.Text)
listApplicationDependencies_semanticVersion :: (Maybe Text -> f (Maybe Text))
-> ListApplicationDependencies -> f ListApplicationDependencies
listApplicationDependencies_semanticVersion = (ListApplicationDependencies -> Maybe Text)
-> (ListApplicationDependencies
    -> Maybe Text -> ListApplicationDependencies)
-> Lens
     ListApplicationDependencies
     ListApplicationDependencies
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationDependencies' {Maybe Text
semanticVersion :: Maybe Text
$sel:semanticVersion:ListApplicationDependencies' :: ListApplicationDependencies -> Maybe Text
semanticVersion} -> Maybe Text
semanticVersion) (\s :: ListApplicationDependencies
s@ListApplicationDependencies' {} Maybe Text
a -> ListApplicationDependencies
s {$sel:semanticVersion:ListApplicationDependencies' :: Maybe Text
semanticVersion = Maybe Text
a} :: ListApplicationDependencies)

-- | A token to specify where to start paginating.
listApplicationDependencies_nextToken :: Lens.Lens' ListApplicationDependencies (Prelude.Maybe Prelude.Text)
listApplicationDependencies_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListApplicationDependencies -> f ListApplicationDependencies
listApplicationDependencies_nextToken = (ListApplicationDependencies -> Maybe Text)
-> (ListApplicationDependencies
    -> Maybe Text -> ListApplicationDependencies)
-> Lens
     ListApplicationDependencies
     ListApplicationDependencies
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationDependencies' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListApplicationDependencies' :: ListApplicationDependencies -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListApplicationDependencies
s@ListApplicationDependencies' {} Maybe Text
a -> ListApplicationDependencies
s {$sel:nextToken:ListApplicationDependencies' :: Maybe Text
nextToken = Maybe Text
a} :: ListApplicationDependencies)

-- | The total number of items to return.
listApplicationDependencies_maxItems :: Lens.Lens' ListApplicationDependencies (Prelude.Maybe Prelude.Natural)
listApplicationDependencies_maxItems :: (Maybe Natural -> f (Maybe Natural))
-> ListApplicationDependencies -> f ListApplicationDependencies
listApplicationDependencies_maxItems = (ListApplicationDependencies -> Maybe Natural)
-> (ListApplicationDependencies
    -> Maybe Natural -> ListApplicationDependencies)
-> Lens
     ListApplicationDependencies
     ListApplicationDependencies
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationDependencies' {Maybe Natural
maxItems :: Maybe Natural
$sel:maxItems:ListApplicationDependencies' :: ListApplicationDependencies -> Maybe Natural
maxItems} -> Maybe Natural
maxItems) (\s :: ListApplicationDependencies
s@ListApplicationDependencies' {} Maybe Natural
a -> ListApplicationDependencies
s {$sel:maxItems:ListApplicationDependencies' :: Maybe Natural
maxItems = Maybe Natural
a} :: ListApplicationDependencies)

-- | The Amazon Resource Name (ARN) of the application.
listApplicationDependencies_applicationId :: Lens.Lens' ListApplicationDependencies Prelude.Text
listApplicationDependencies_applicationId :: (Text -> f Text)
-> ListApplicationDependencies -> f ListApplicationDependencies
listApplicationDependencies_applicationId = (ListApplicationDependencies -> Text)
-> (ListApplicationDependencies
    -> Text -> ListApplicationDependencies)
-> Lens
     ListApplicationDependencies ListApplicationDependencies Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationDependencies' {Text
applicationId :: Text
$sel:applicationId:ListApplicationDependencies' :: ListApplicationDependencies -> Text
applicationId} -> Text
applicationId) (\s :: ListApplicationDependencies
s@ListApplicationDependencies' {} Text
a -> ListApplicationDependencies
s {$sel:applicationId:ListApplicationDependencies' :: Text
applicationId = Text
a} :: ListApplicationDependencies)

instance Core.AWSPager ListApplicationDependencies where
  page :: ListApplicationDependencies
-> AWSResponse ListApplicationDependencies
-> Maybe ListApplicationDependencies
page ListApplicationDependencies
rq AWSResponse ListApplicationDependencies
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListApplicationDependencies
ListApplicationDependenciesResponse
rs
            ListApplicationDependenciesResponse
-> Getting (First Text) ListApplicationDependenciesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListApplicationDependenciesResponse
-> Const (First Text) ListApplicationDependenciesResponse
Lens' ListApplicationDependenciesResponse (Maybe Text)
listApplicationDependenciesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListApplicationDependenciesResponse
 -> Const (First Text) ListApplicationDependenciesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListApplicationDependenciesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListApplicationDependencies
forall a. Maybe a
Prelude.Nothing
    | Maybe [ApplicationDependencySummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListApplicationDependencies
ListApplicationDependenciesResponse
rs
            ListApplicationDependenciesResponse
-> Getting
     (First [ApplicationDependencySummary])
     ListApplicationDependenciesResponse
     [ApplicationDependencySummary]
-> Maybe [ApplicationDependencySummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ApplicationDependencySummary]
 -> Const
      (First [ApplicationDependencySummary])
      (Maybe [ApplicationDependencySummary]))
-> ListApplicationDependenciesResponse
-> Const
     (First [ApplicationDependencySummary])
     ListApplicationDependenciesResponse
Lens'
  ListApplicationDependenciesResponse
  (Maybe [ApplicationDependencySummary])
listApplicationDependenciesResponse_dependencies
              ((Maybe [ApplicationDependencySummary]
  -> Const
       (First [ApplicationDependencySummary])
       (Maybe [ApplicationDependencySummary]))
 -> ListApplicationDependenciesResponse
 -> Const
      (First [ApplicationDependencySummary])
      ListApplicationDependenciesResponse)
-> (([ApplicationDependencySummary]
     -> Const
          (First [ApplicationDependencySummary])
          [ApplicationDependencySummary])
    -> Maybe [ApplicationDependencySummary]
    -> Const
         (First [ApplicationDependencySummary])
         (Maybe [ApplicationDependencySummary]))
-> Getting
     (First [ApplicationDependencySummary])
     ListApplicationDependenciesResponse
     [ApplicationDependencySummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ApplicationDependencySummary]
 -> Const
      (First [ApplicationDependencySummary])
      [ApplicationDependencySummary])
-> Maybe [ApplicationDependencySummary]
-> Const
     (First [ApplicationDependencySummary])
     (Maybe [ApplicationDependencySummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListApplicationDependencies
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListApplicationDependencies -> Maybe ListApplicationDependencies
forall a. a -> Maybe a
Prelude.Just (ListApplicationDependencies -> Maybe ListApplicationDependencies)
-> ListApplicationDependencies -> Maybe ListApplicationDependencies
forall a b. (a -> b) -> a -> b
Prelude.$
        ListApplicationDependencies
rq
          ListApplicationDependencies
-> (ListApplicationDependencies -> ListApplicationDependencies)
-> ListApplicationDependencies
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListApplicationDependencies
-> Identity ListApplicationDependencies
Lens
  ListApplicationDependencies
  ListApplicationDependencies
  (Maybe Text)
  (Maybe Text)
listApplicationDependencies_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListApplicationDependencies
 -> Identity ListApplicationDependencies)
-> Maybe Text
-> ListApplicationDependencies
-> ListApplicationDependencies
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListApplicationDependencies
ListApplicationDependenciesResponse
rs
          ListApplicationDependenciesResponse
-> Getting (First Text) ListApplicationDependenciesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListApplicationDependenciesResponse
-> Const (First Text) ListApplicationDependenciesResponse
Lens' ListApplicationDependenciesResponse (Maybe Text)
listApplicationDependenciesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListApplicationDependenciesResponse
 -> Const (First Text) ListApplicationDependenciesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListApplicationDependenciesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListApplicationDependencies where
  type
    AWSResponse ListApplicationDependencies =
      ListApplicationDependenciesResponse
  request :: ListApplicationDependencies -> Request ListApplicationDependencies
request = Service
-> ListApplicationDependencies
-> Request ListApplicationDependencies
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListApplicationDependencies
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListApplicationDependencies)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListApplicationDependencies))
-> Logger
-> Service
-> Proxy ListApplicationDependencies
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListApplicationDependencies)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [ApplicationDependencySummary]
-> Maybe Text -> Int -> ListApplicationDependenciesResponse
ListApplicationDependenciesResponse'
            (Maybe [ApplicationDependencySummary]
 -> Maybe Text -> Int -> ListApplicationDependenciesResponse)
-> Either String (Maybe [ApplicationDependencySummary])
-> Either
     String (Maybe Text -> Int -> ListApplicationDependenciesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Either String (Maybe (Maybe [ApplicationDependencySummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"dependencies" Either String (Maybe (Maybe [ApplicationDependencySummary]))
-> Maybe [ApplicationDependencySummary]
-> Either String (Maybe [ApplicationDependencySummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ApplicationDependencySummary]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String (Maybe Text -> Int -> ListApplicationDependenciesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListApplicationDependenciesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextToken")
            Either String (Int -> ListApplicationDependenciesResponse)
-> Either String Int
-> Either String ListApplicationDependenciesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListApplicationDependencies

instance Prelude.NFData ListApplicationDependencies

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

instance Core.ToPath ListApplicationDependencies where
  toPath :: ListApplicationDependencies -> ByteString
toPath ListApplicationDependencies' {Maybe Natural
Maybe Text
Text
applicationId :: Text
maxItems :: Maybe Natural
nextToken :: Maybe Text
semanticVersion :: Maybe Text
$sel:applicationId:ListApplicationDependencies' :: ListApplicationDependencies -> Text
$sel:maxItems:ListApplicationDependencies' :: ListApplicationDependencies -> Maybe Natural
$sel:nextToken:ListApplicationDependencies' :: ListApplicationDependencies -> Maybe Text
$sel:semanticVersion:ListApplicationDependencies' :: ListApplicationDependencies -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/applications/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
applicationId,
        ByteString
"/dependencies"
      ]

instance Core.ToQuery ListApplicationDependencies where
  toQuery :: ListApplicationDependencies -> QueryString
toQuery ListApplicationDependencies' {Maybe Natural
Maybe Text
Text
applicationId :: Text
maxItems :: Maybe Natural
nextToken :: Maybe Text
semanticVersion :: Maybe Text
$sel:applicationId:ListApplicationDependencies' :: ListApplicationDependencies -> Text
$sel:maxItems:ListApplicationDependencies' :: ListApplicationDependencies -> Maybe Natural
$sel:nextToken:ListApplicationDependencies' :: ListApplicationDependencies -> Maybe Text
$sel:semanticVersion:ListApplicationDependencies' :: ListApplicationDependencies -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"semanticVersion" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
semanticVersion,
        ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxItems" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxItems
      ]

-- | /See:/ 'newListApplicationDependenciesResponse' smart constructor.
data ListApplicationDependenciesResponse = ListApplicationDependenciesResponse'
  { -- | An array of application summaries nested in the application.
    ListApplicationDependenciesResponse
-> Maybe [ApplicationDependencySummary]
dependencies :: Prelude.Maybe [ApplicationDependencySummary],
    -- | The token to request the next page of results.
    ListApplicationDependenciesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListApplicationDependenciesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListApplicationDependenciesResponse
-> ListApplicationDependenciesResponse -> Bool
(ListApplicationDependenciesResponse
 -> ListApplicationDependenciesResponse -> Bool)
-> (ListApplicationDependenciesResponse
    -> ListApplicationDependenciesResponse -> Bool)
-> Eq ListApplicationDependenciesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListApplicationDependenciesResponse
-> ListApplicationDependenciesResponse -> Bool
$c/= :: ListApplicationDependenciesResponse
-> ListApplicationDependenciesResponse -> Bool
== :: ListApplicationDependenciesResponse
-> ListApplicationDependenciesResponse -> Bool
$c== :: ListApplicationDependenciesResponse
-> ListApplicationDependenciesResponse -> Bool
Prelude.Eq, ReadPrec [ListApplicationDependenciesResponse]
ReadPrec ListApplicationDependenciesResponse
Int -> ReadS ListApplicationDependenciesResponse
ReadS [ListApplicationDependenciesResponse]
(Int -> ReadS ListApplicationDependenciesResponse)
-> ReadS [ListApplicationDependenciesResponse]
-> ReadPrec ListApplicationDependenciesResponse
-> ReadPrec [ListApplicationDependenciesResponse]
-> Read ListApplicationDependenciesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListApplicationDependenciesResponse]
$creadListPrec :: ReadPrec [ListApplicationDependenciesResponse]
readPrec :: ReadPrec ListApplicationDependenciesResponse
$creadPrec :: ReadPrec ListApplicationDependenciesResponse
readList :: ReadS [ListApplicationDependenciesResponse]
$creadList :: ReadS [ListApplicationDependenciesResponse]
readsPrec :: Int -> ReadS ListApplicationDependenciesResponse
$creadsPrec :: Int -> ReadS ListApplicationDependenciesResponse
Prelude.Read, Int -> ListApplicationDependenciesResponse -> ShowS
[ListApplicationDependenciesResponse] -> ShowS
ListApplicationDependenciesResponse -> String
(Int -> ListApplicationDependenciesResponse -> ShowS)
-> (ListApplicationDependenciesResponse -> String)
-> ([ListApplicationDependenciesResponse] -> ShowS)
-> Show ListApplicationDependenciesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListApplicationDependenciesResponse] -> ShowS
$cshowList :: [ListApplicationDependenciesResponse] -> ShowS
show :: ListApplicationDependenciesResponse -> String
$cshow :: ListApplicationDependenciesResponse -> String
showsPrec :: Int -> ListApplicationDependenciesResponse -> ShowS
$cshowsPrec :: Int -> ListApplicationDependenciesResponse -> ShowS
Prelude.Show, (forall x.
 ListApplicationDependenciesResponse
 -> Rep ListApplicationDependenciesResponse x)
-> (forall x.
    Rep ListApplicationDependenciesResponse x
    -> ListApplicationDependenciesResponse)
-> Generic ListApplicationDependenciesResponse
forall x.
Rep ListApplicationDependenciesResponse x
-> ListApplicationDependenciesResponse
forall x.
ListApplicationDependenciesResponse
-> Rep ListApplicationDependenciesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListApplicationDependenciesResponse x
-> ListApplicationDependenciesResponse
$cfrom :: forall x.
ListApplicationDependenciesResponse
-> Rep ListApplicationDependenciesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListApplicationDependenciesResponse' 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:
--
-- 'dependencies', 'listApplicationDependenciesResponse_dependencies' - An array of application summaries nested in the application.
--
-- 'nextToken', 'listApplicationDependenciesResponse_nextToken' - The token to request the next page of results.
--
-- 'httpStatus', 'listApplicationDependenciesResponse_httpStatus' - The response's http status code.
newListApplicationDependenciesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListApplicationDependenciesResponse
newListApplicationDependenciesResponse :: Int -> ListApplicationDependenciesResponse
newListApplicationDependenciesResponse Int
pHttpStatus_ =
  ListApplicationDependenciesResponse' :: Maybe [ApplicationDependencySummary]
-> Maybe Text -> Int -> ListApplicationDependenciesResponse
ListApplicationDependenciesResponse'
    { $sel:dependencies:ListApplicationDependenciesResponse' :: Maybe [ApplicationDependencySummary]
dependencies =
        Maybe [ApplicationDependencySummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListApplicationDependenciesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListApplicationDependenciesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of application summaries nested in the application.
listApplicationDependenciesResponse_dependencies :: Lens.Lens' ListApplicationDependenciesResponse (Prelude.Maybe [ApplicationDependencySummary])
listApplicationDependenciesResponse_dependencies :: (Maybe [ApplicationDependencySummary]
 -> f (Maybe [ApplicationDependencySummary]))
-> ListApplicationDependenciesResponse
-> f ListApplicationDependenciesResponse
listApplicationDependenciesResponse_dependencies = (ListApplicationDependenciesResponse
 -> Maybe [ApplicationDependencySummary])
-> (ListApplicationDependenciesResponse
    -> Maybe [ApplicationDependencySummary]
    -> ListApplicationDependenciesResponse)
-> Lens'
     ListApplicationDependenciesResponse
     (Maybe [ApplicationDependencySummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationDependenciesResponse' {Maybe [ApplicationDependencySummary]
dependencies :: Maybe [ApplicationDependencySummary]
$sel:dependencies:ListApplicationDependenciesResponse' :: ListApplicationDependenciesResponse
-> Maybe [ApplicationDependencySummary]
dependencies} -> Maybe [ApplicationDependencySummary]
dependencies) (\s :: ListApplicationDependenciesResponse
s@ListApplicationDependenciesResponse' {} Maybe [ApplicationDependencySummary]
a -> ListApplicationDependenciesResponse
s {$sel:dependencies:ListApplicationDependenciesResponse' :: Maybe [ApplicationDependencySummary]
dependencies = Maybe [ApplicationDependencySummary]
a} :: ListApplicationDependenciesResponse) ((Maybe [ApplicationDependencySummary]
  -> f (Maybe [ApplicationDependencySummary]))
 -> ListApplicationDependenciesResponse
 -> f ListApplicationDependenciesResponse)
-> ((Maybe [ApplicationDependencySummary]
     -> f (Maybe [ApplicationDependencySummary]))
    -> Maybe [ApplicationDependencySummary]
    -> f (Maybe [ApplicationDependencySummary]))
-> (Maybe [ApplicationDependencySummary]
    -> f (Maybe [ApplicationDependencySummary]))
-> ListApplicationDependenciesResponse
-> f ListApplicationDependenciesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ApplicationDependencySummary]
  [ApplicationDependencySummary]
  [ApplicationDependencySummary]
  [ApplicationDependencySummary]
-> Iso
     (Maybe [ApplicationDependencySummary])
     (Maybe [ApplicationDependencySummary])
     (Maybe [ApplicationDependencySummary])
     (Maybe [ApplicationDependencySummary])
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 AnIso
  [ApplicationDependencySummary]
  [ApplicationDependencySummary]
  [ApplicationDependencySummary]
  [ApplicationDependencySummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token to request the next page of results.
listApplicationDependenciesResponse_nextToken :: Lens.Lens' ListApplicationDependenciesResponse (Prelude.Maybe Prelude.Text)
listApplicationDependenciesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListApplicationDependenciesResponse
-> f ListApplicationDependenciesResponse
listApplicationDependenciesResponse_nextToken = (ListApplicationDependenciesResponse -> Maybe Text)
-> (ListApplicationDependenciesResponse
    -> Maybe Text -> ListApplicationDependenciesResponse)
-> Lens' ListApplicationDependenciesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationDependenciesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListApplicationDependenciesResponse' :: ListApplicationDependenciesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListApplicationDependenciesResponse
s@ListApplicationDependenciesResponse' {} Maybe Text
a -> ListApplicationDependenciesResponse
s {$sel:nextToken:ListApplicationDependenciesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListApplicationDependenciesResponse)

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

instance
  Prelude.NFData
    ListApplicationDependenciesResponse