{-# 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.ServiceCatalogAppRegistry.ListApplications
-- 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 a list of all of your applications. Results are paginated.
--
-- This operation returns paginated results.
module Amazonka.ServiceCatalogAppRegistry.ListApplications
  ( -- * Creating a Request
    ListApplications (..),
    newListApplications,

    -- * Request Lenses
    listApplications_nextToken,
    listApplications_maxResults,

    -- * Destructuring the Response
    ListApplicationsResponse (..),
    newListApplicationsResponse,

    -- * Response Lenses
    listApplicationsResponse_nextToken,
    listApplicationsResponse_applications,
    listApplicationsResponse_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.ServiceCatalogAppRegistry.Types

-- | /See:/ 'newListApplications' smart constructor.
data ListApplications = ListApplications'
  { -- | The token to use to get the next page of results after a previous API
    -- call.
    ListApplications -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The upper bound of the number of results to return (cannot exceed 25).
    -- If this parameter is omitted, it defaults to 25. This value is optional.
    ListApplications -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListApplications -> ListApplications -> Bool
(ListApplications -> ListApplications -> Bool)
-> (ListApplications -> ListApplications -> Bool)
-> Eq ListApplications
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListApplications -> ListApplications -> Bool
$c/= :: ListApplications -> ListApplications -> Bool
== :: ListApplications -> ListApplications -> Bool
$c== :: ListApplications -> ListApplications -> Bool
Prelude.Eq, ReadPrec [ListApplications]
ReadPrec ListApplications
Int -> ReadS ListApplications
ReadS [ListApplications]
(Int -> ReadS ListApplications)
-> ReadS [ListApplications]
-> ReadPrec ListApplications
-> ReadPrec [ListApplications]
-> Read ListApplications
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListApplications]
$creadListPrec :: ReadPrec [ListApplications]
readPrec :: ReadPrec ListApplications
$creadPrec :: ReadPrec ListApplications
readList :: ReadS [ListApplications]
$creadList :: ReadS [ListApplications]
readsPrec :: Int -> ReadS ListApplications
$creadsPrec :: Int -> ReadS ListApplications
Prelude.Read, Int -> ListApplications -> ShowS
[ListApplications] -> ShowS
ListApplications -> String
(Int -> ListApplications -> ShowS)
-> (ListApplications -> String)
-> ([ListApplications] -> ShowS)
-> Show ListApplications
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListApplications] -> ShowS
$cshowList :: [ListApplications] -> ShowS
show :: ListApplications -> String
$cshow :: ListApplications -> String
showsPrec :: Int -> ListApplications -> ShowS
$cshowsPrec :: Int -> ListApplications -> ShowS
Prelude.Show, (forall x. ListApplications -> Rep ListApplications x)
-> (forall x. Rep ListApplications x -> ListApplications)
-> Generic ListApplications
forall x. Rep ListApplications x -> ListApplications
forall x. ListApplications -> Rep ListApplications x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListApplications x -> ListApplications
$cfrom :: forall x. ListApplications -> Rep ListApplications x
Prelude.Generic)

-- |
-- Create a value of 'ListApplications' 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', 'listApplications_nextToken' - The token to use to get the next page of results after a previous API
-- call.
--
-- 'maxResults', 'listApplications_maxResults' - The upper bound of the number of results to return (cannot exceed 25).
-- If this parameter is omitted, it defaults to 25. This value is optional.
newListApplications ::
  ListApplications
newListApplications :: ListApplications
newListApplications =
  ListApplications' :: Maybe Text -> Maybe Natural -> ListApplications
ListApplications'
    { $sel:nextToken:ListApplications' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListApplications' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The token to use to get the next page of results after a previous API
-- call.
listApplications_nextToken :: Lens.Lens' ListApplications (Prelude.Maybe Prelude.Text)
listApplications_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListApplications -> f ListApplications
listApplications_nextToken = (ListApplications -> Maybe Text)
-> (ListApplications -> Maybe Text -> ListApplications)
-> Lens ListApplications ListApplications (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplications' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListApplications' :: ListApplications -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListApplications
s@ListApplications' {} Maybe Text
a -> ListApplications
s {$sel:nextToken:ListApplications' :: Maybe Text
nextToken = Maybe Text
a} :: ListApplications)

-- | The upper bound of the number of results to return (cannot exceed 25).
-- If this parameter is omitted, it defaults to 25. This value is optional.
listApplications_maxResults :: Lens.Lens' ListApplications (Prelude.Maybe Prelude.Natural)
listApplications_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListApplications -> f ListApplications
listApplications_maxResults = (ListApplications -> Maybe Natural)
-> (ListApplications -> Maybe Natural -> ListApplications)
-> Lens
     ListApplications ListApplications (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplications' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListApplications' :: ListApplications -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListApplications
s@ListApplications' {} Maybe Natural
a -> ListApplications
s {$sel:maxResults:ListApplications' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListApplications)

instance Core.AWSPager ListApplications where
  page :: ListApplications
-> AWSResponse ListApplications -> Maybe ListApplications
page ListApplications
rq AWSResponse ListApplications
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListApplications
ListApplicationsResponse
rs
            ListApplicationsResponse
-> Getting (First Text) ListApplicationsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListApplicationsResponse
-> Const (First Text) ListApplicationsResponse
Lens' ListApplicationsResponse (Maybe Text)
listApplicationsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListApplicationsResponse
 -> Const (First Text) ListApplicationsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListApplicationsResponse 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 ListApplications
forall a. Maybe a
Prelude.Nothing
    | Maybe [ApplicationSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListApplications
ListApplicationsResponse
rs
            ListApplicationsResponse
-> Getting
     (First [ApplicationSummary])
     ListApplicationsResponse
     [ApplicationSummary]
-> Maybe [ApplicationSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ApplicationSummary]
 -> Const (First [ApplicationSummary]) (Maybe [ApplicationSummary]))
-> ListApplicationsResponse
-> Const (First [ApplicationSummary]) ListApplicationsResponse
Lens' ListApplicationsResponse (Maybe [ApplicationSummary])
listApplicationsResponse_applications
              ((Maybe [ApplicationSummary]
  -> Const (First [ApplicationSummary]) (Maybe [ApplicationSummary]))
 -> ListApplicationsResponse
 -> Const (First [ApplicationSummary]) ListApplicationsResponse)
-> (([ApplicationSummary]
     -> Const (First [ApplicationSummary]) [ApplicationSummary])
    -> Maybe [ApplicationSummary]
    -> Const (First [ApplicationSummary]) (Maybe [ApplicationSummary]))
-> Getting
     (First [ApplicationSummary])
     ListApplicationsResponse
     [ApplicationSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ApplicationSummary]
 -> Const (First [ApplicationSummary]) [ApplicationSummary])
-> Maybe [ApplicationSummary]
-> Const (First [ApplicationSummary]) (Maybe [ApplicationSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListApplications
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListApplications -> Maybe ListApplications
forall a. a -> Maybe a
Prelude.Just (ListApplications -> Maybe ListApplications)
-> ListApplications -> Maybe ListApplications
forall a b. (a -> b) -> a -> b
Prelude.$
        ListApplications
rq
          ListApplications
-> (ListApplications -> ListApplications) -> ListApplications
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListApplications -> Identity ListApplications
Lens ListApplications ListApplications (Maybe Text) (Maybe Text)
listApplications_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListApplications -> Identity ListApplications)
-> Maybe Text -> ListApplications -> ListApplications
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListApplications
ListApplicationsResponse
rs
          ListApplicationsResponse
-> Getting (First Text) ListApplicationsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListApplicationsResponse
-> Const (First Text) ListApplicationsResponse
Lens' ListApplicationsResponse (Maybe Text)
listApplicationsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListApplicationsResponse
 -> Const (First Text) ListApplicationsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListApplicationsResponse 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 ListApplications where
  type
    AWSResponse ListApplications =
      ListApplicationsResponse
  request :: ListApplications -> Request ListApplications
request = Service -> ListApplications -> Request ListApplications
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListApplications
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListApplications)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListApplications))
-> Logger
-> Service
-> Proxy ListApplications
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListApplications)))
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 Text
-> Maybe [ApplicationSummary] -> Int -> ListApplicationsResponse
ListApplicationsResponse'
            (Maybe Text
 -> Maybe [ApplicationSummary] -> Int -> ListApplicationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ApplicationSummary] -> Int -> ListApplicationsResponse)
forall (f :: * -> *) a b. Functor 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
  (Maybe [ApplicationSummary] -> Int -> ListApplicationsResponse)
-> Either String (Maybe [ApplicationSummary])
-> Either String (Int -> ListApplicationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe (Maybe [ApplicationSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"applications" Either String (Maybe (Maybe [ApplicationSummary]))
-> Maybe [ApplicationSummary]
-> Either String (Maybe [ApplicationSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ApplicationSummary]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> ListApplicationsResponse)
-> Either String Int -> Either String ListApplicationsResponse
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 ListApplications

instance Prelude.NFData ListApplications

instance Core.ToHeaders ListApplications where
  toHeaders :: ListApplications -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListApplications -> 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 ListApplications where
  toPath :: ListApplications -> ByteString
toPath = ByteString -> ListApplications -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/applications"

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

-- | /See:/ 'newListApplicationsResponse' smart constructor.
data ListApplicationsResponse = ListApplicationsResponse'
  { -- | The token to use to get the next page of results after a previous API
    -- call.
    ListApplicationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | This list of applications.
    ListApplicationsResponse -> Maybe [ApplicationSummary]
applications :: Prelude.Maybe [ApplicationSummary],
    -- | The response's http status code.
    ListApplicationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListApplicationsResponse -> ListApplicationsResponse -> Bool
(ListApplicationsResponse -> ListApplicationsResponse -> Bool)
-> (ListApplicationsResponse -> ListApplicationsResponse -> Bool)
-> Eq ListApplicationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListApplicationsResponse -> ListApplicationsResponse -> Bool
$c/= :: ListApplicationsResponse -> ListApplicationsResponse -> Bool
== :: ListApplicationsResponse -> ListApplicationsResponse -> Bool
$c== :: ListApplicationsResponse -> ListApplicationsResponse -> Bool
Prelude.Eq, ReadPrec [ListApplicationsResponse]
ReadPrec ListApplicationsResponse
Int -> ReadS ListApplicationsResponse
ReadS [ListApplicationsResponse]
(Int -> ReadS ListApplicationsResponse)
-> ReadS [ListApplicationsResponse]
-> ReadPrec ListApplicationsResponse
-> ReadPrec [ListApplicationsResponse]
-> Read ListApplicationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListApplicationsResponse]
$creadListPrec :: ReadPrec [ListApplicationsResponse]
readPrec :: ReadPrec ListApplicationsResponse
$creadPrec :: ReadPrec ListApplicationsResponse
readList :: ReadS [ListApplicationsResponse]
$creadList :: ReadS [ListApplicationsResponse]
readsPrec :: Int -> ReadS ListApplicationsResponse
$creadsPrec :: Int -> ReadS ListApplicationsResponse
Prelude.Read, Int -> ListApplicationsResponse -> ShowS
[ListApplicationsResponse] -> ShowS
ListApplicationsResponse -> String
(Int -> ListApplicationsResponse -> ShowS)
-> (ListApplicationsResponse -> String)
-> ([ListApplicationsResponse] -> ShowS)
-> Show ListApplicationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListApplicationsResponse] -> ShowS
$cshowList :: [ListApplicationsResponse] -> ShowS
show :: ListApplicationsResponse -> String
$cshow :: ListApplicationsResponse -> String
showsPrec :: Int -> ListApplicationsResponse -> ShowS
$cshowsPrec :: Int -> ListApplicationsResponse -> ShowS
Prelude.Show, (forall x.
 ListApplicationsResponse -> Rep ListApplicationsResponse x)
-> (forall x.
    Rep ListApplicationsResponse x -> ListApplicationsResponse)
-> Generic ListApplicationsResponse
forall x.
Rep ListApplicationsResponse x -> ListApplicationsResponse
forall x.
ListApplicationsResponse -> Rep ListApplicationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListApplicationsResponse x -> ListApplicationsResponse
$cfrom :: forall x.
ListApplicationsResponse -> Rep ListApplicationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListApplicationsResponse' 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', 'listApplicationsResponse_nextToken' - The token to use to get the next page of results after a previous API
-- call.
--
-- 'applications', 'listApplicationsResponse_applications' - This list of applications.
--
-- 'httpStatus', 'listApplicationsResponse_httpStatus' - The response's http status code.
newListApplicationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListApplicationsResponse
newListApplicationsResponse :: Int -> ListApplicationsResponse
newListApplicationsResponse Int
pHttpStatus_ =
  ListApplicationsResponse' :: Maybe Text
-> Maybe [ApplicationSummary] -> Int -> ListApplicationsResponse
ListApplicationsResponse'
    { $sel:nextToken:ListApplicationsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:applications:ListApplicationsResponse' :: Maybe [ApplicationSummary]
applications = Maybe [ApplicationSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListApplicationsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token to use to get the next page of results after a previous API
-- call.
listApplicationsResponse_nextToken :: Lens.Lens' ListApplicationsResponse (Prelude.Maybe Prelude.Text)
listApplicationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListApplicationsResponse -> f ListApplicationsResponse
listApplicationsResponse_nextToken = (ListApplicationsResponse -> Maybe Text)
-> (ListApplicationsResponse
    -> Maybe Text -> ListApplicationsResponse)
-> Lens' ListApplicationsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListApplicationsResponse' :: ListApplicationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListApplicationsResponse
s@ListApplicationsResponse' {} Maybe Text
a -> ListApplicationsResponse
s {$sel:nextToken:ListApplicationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListApplicationsResponse)

-- | This list of applications.
listApplicationsResponse_applications :: Lens.Lens' ListApplicationsResponse (Prelude.Maybe [ApplicationSummary])
listApplicationsResponse_applications :: (Maybe [ApplicationSummary] -> f (Maybe [ApplicationSummary]))
-> ListApplicationsResponse -> f ListApplicationsResponse
listApplicationsResponse_applications = (ListApplicationsResponse -> Maybe [ApplicationSummary])
-> (ListApplicationsResponse
    -> Maybe [ApplicationSummary] -> ListApplicationsResponse)
-> Lens' ListApplicationsResponse (Maybe [ApplicationSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationsResponse' {Maybe [ApplicationSummary]
applications :: Maybe [ApplicationSummary]
$sel:applications:ListApplicationsResponse' :: ListApplicationsResponse -> Maybe [ApplicationSummary]
applications} -> Maybe [ApplicationSummary]
applications) (\s :: ListApplicationsResponse
s@ListApplicationsResponse' {} Maybe [ApplicationSummary]
a -> ListApplicationsResponse
s {$sel:applications:ListApplicationsResponse' :: Maybe [ApplicationSummary]
applications = Maybe [ApplicationSummary]
a} :: ListApplicationsResponse) ((Maybe [ApplicationSummary] -> f (Maybe [ApplicationSummary]))
 -> ListApplicationsResponse -> f ListApplicationsResponse)
-> ((Maybe [ApplicationSummary] -> f (Maybe [ApplicationSummary]))
    -> Maybe [ApplicationSummary] -> f (Maybe [ApplicationSummary]))
-> (Maybe [ApplicationSummary] -> f (Maybe [ApplicationSummary]))
-> ListApplicationsResponse
-> f ListApplicationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ApplicationSummary]
  [ApplicationSummary]
  [ApplicationSummary]
  [ApplicationSummary]
-> Iso
     (Maybe [ApplicationSummary])
     (Maybe [ApplicationSummary])
     (Maybe [ApplicationSummary])
     (Maybe [ApplicationSummary])
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
  [ApplicationSummary]
  [ApplicationSummary]
  [ApplicationSummary]
  [ApplicationSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListApplicationsResponse