{-# 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.AppStream.DescribeStacks
-- 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 that describes one or more specified stacks, if the
-- stack names are provided. Otherwise, all stacks in the account are
-- described.
--
-- This operation returns paginated results.
module Amazonka.AppStream.DescribeStacks
  ( -- * Creating a Request
    DescribeStacks (..),
    newDescribeStacks,

    -- * Request Lenses
    describeStacks_nextToken,
    describeStacks_names,

    -- * Destructuring the Response
    DescribeStacksResponse (..),
    newDescribeStacksResponse,

    -- * Response Lenses
    describeStacksResponse_nextToken,
    describeStacksResponse_stacks,
    describeStacksResponse_httpStatus,
  )
where

import Amazonka.AppStream.Types
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

-- | /See:/ 'newDescribeStacks' smart constructor.
data DescribeStacks = DescribeStacks'
  { -- | The pagination token to use to retrieve the next page of results for
    -- this operation. If this value is null, it retrieves the first page.
    DescribeStacks -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The names of the stacks to describe.
    DescribeStacks -> Maybe [Text]
names :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DescribeStacks -> DescribeStacks -> Bool
(DescribeStacks -> DescribeStacks -> Bool)
-> (DescribeStacks -> DescribeStacks -> Bool) -> Eq DescribeStacks
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeStacks -> DescribeStacks -> Bool
$c/= :: DescribeStacks -> DescribeStacks -> Bool
== :: DescribeStacks -> DescribeStacks -> Bool
$c== :: DescribeStacks -> DescribeStacks -> Bool
Prelude.Eq, ReadPrec [DescribeStacks]
ReadPrec DescribeStacks
Int -> ReadS DescribeStacks
ReadS [DescribeStacks]
(Int -> ReadS DescribeStacks)
-> ReadS [DescribeStacks]
-> ReadPrec DescribeStacks
-> ReadPrec [DescribeStacks]
-> Read DescribeStacks
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeStacks]
$creadListPrec :: ReadPrec [DescribeStacks]
readPrec :: ReadPrec DescribeStacks
$creadPrec :: ReadPrec DescribeStacks
readList :: ReadS [DescribeStacks]
$creadList :: ReadS [DescribeStacks]
readsPrec :: Int -> ReadS DescribeStacks
$creadsPrec :: Int -> ReadS DescribeStacks
Prelude.Read, Int -> DescribeStacks -> ShowS
[DescribeStacks] -> ShowS
DescribeStacks -> String
(Int -> DescribeStacks -> ShowS)
-> (DescribeStacks -> String)
-> ([DescribeStacks] -> ShowS)
-> Show DescribeStacks
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeStacks] -> ShowS
$cshowList :: [DescribeStacks] -> ShowS
show :: DescribeStacks -> String
$cshow :: DescribeStacks -> String
showsPrec :: Int -> DescribeStacks -> ShowS
$cshowsPrec :: Int -> DescribeStacks -> ShowS
Prelude.Show, (forall x. DescribeStacks -> Rep DescribeStacks x)
-> (forall x. Rep DescribeStacks x -> DescribeStacks)
-> Generic DescribeStacks
forall x. Rep DescribeStacks x -> DescribeStacks
forall x. DescribeStacks -> Rep DescribeStacks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeStacks x -> DescribeStacks
$cfrom :: forall x. DescribeStacks -> Rep DescribeStacks x
Prelude.Generic)

-- |
-- Create a value of 'DescribeStacks' 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', 'describeStacks_nextToken' - The pagination token to use to retrieve the next page of results for
-- this operation. If this value is null, it retrieves the first page.
--
-- 'names', 'describeStacks_names' - The names of the stacks to describe.
newDescribeStacks ::
  DescribeStacks
newDescribeStacks :: DescribeStacks
newDescribeStacks =
  DescribeStacks' :: Maybe Text -> Maybe [Text] -> DescribeStacks
DescribeStacks'
    { $sel:nextToken:DescribeStacks' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:names:DescribeStacks' :: Maybe [Text]
names = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
    }

-- | The pagination token to use to retrieve the next page of results for
-- this operation. If this value is null, it retrieves the first page.
describeStacks_nextToken :: Lens.Lens' DescribeStacks (Prelude.Maybe Prelude.Text)
describeStacks_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeStacks -> f DescribeStacks
describeStacks_nextToken = (DescribeStacks -> Maybe Text)
-> (DescribeStacks -> Maybe Text -> DescribeStacks)
-> Lens DescribeStacks DescribeStacks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStacks' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeStacks' :: DescribeStacks -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeStacks
s@DescribeStacks' {} Maybe Text
a -> DescribeStacks
s {$sel:nextToken:DescribeStacks' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeStacks)

-- | The names of the stacks to describe.
describeStacks_names :: Lens.Lens' DescribeStacks (Prelude.Maybe [Prelude.Text])
describeStacks_names :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeStacks -> f DescribeStacks
describeStacks_names = (DescribeStacks -> Maybe [Text])
-> (DescribeStacks -> Maybe [Text] -> DescribeStacks)
-> Lens DescribeStacks DescribeStacks (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStacks' {Maybe [Text]
names :: Maybe [Text]
$sel:names:DescribeStacks' :: DescribeStacks -> Maybe [Text]
names} -> Maybe [Text]
names) (\s :: DescribeStacks
s@DescribeStacks' {} Maybe [Text]
a -> DescribeStacks
s {$sel:names:DescribeStacks' :: Maybe [Text]
names = Maybe [Text]
a} :: DescribeStacks) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeStacks -> f DescribeStacks)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeStacks
-> f DescribeStacks
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeStacks

instance Core.ToHeaders DescribeStacks where
  toHeaders :: DescribeStacks -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeStacks -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"PhotonAdminProxyService.DescribeStacks" ::
                          Prelude.ByteString
                      ),
            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.ToJSON DescribeStacks where
  toJSON :: DescribeStacks -> Value
toJSON DescribeStacks' {Maybe [Text]
Maybe Text
names :: Maybe [Text]
nextToken :: Maybe Text
$sel:names:DescribeStacks' :: DescribeStacks -> Maybe [Text]
$sel:nextToken:DescribeStacks' :: DescribeStacks -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"Names" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
names
          ]
      )

instance Core.ToPath DescribeStacks where
  toPath :: DescribeStacks -> ByteString
toPath = ByteString -> DescribeStacks -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newDescribeStacksResponse' smart constructor.
data DescribeStacksResponse = DescribeStacksResponse'
  { -- | The pagination token to use to retrieve the next page of results for
    -- this operation. If there are no more pages, this value is null.
    DescribeStacksResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the stacks.
    DescribeStacksResponse -> Maybe [Stack]
stacks :: Prelude.Maybe [Stack],
    -- | The response's http status code.
    DescribeStacksResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeStacksResponse -> DescribeStacksResponse -> Bool
(DescribeStacksResponse -> DescribeStacksResponse -> Bool)
-> (DescribeStacksResponse -> DescribeStacksResponse -> Bool)
-> Eq DescribeStacksResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeStacksResponse -> DescribeStacksResponse -> Bool
$c/= :: DescribeStacksResponse -> DescribeStacksResponse -> Bool
== :: DescribeStacksResponse -> DescribeStacksResponse -> Bool
$c== :: DescribeStacksResponse -> DescribeStacksResponse -> Bool
Prelude.Eq, ReadPrec [DescribeStacksResponse]
ReadPrec DescribeStacksResponse
Int -> ReadS DescribeStacksResponse
ReadS [DescribeStacksResponse]
(Int -> ReadS DescribeStacksResponse)
-> ReadS [DescribeStacksResponse]
-> ReadPrec DescribeStacksResponse
-> ReadPrec [DescribeStacksResponse]
-> Read DescribeStacksResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeStacksResponse]
$creadListPrec :: ReadPrec [DescribeStacksResponse]
readPrec :: ReadPrec DescribeStacksResponse
$creadPrec :: ReadPrec DescribeStacksResponse
readList :: ReadS [DescribeStacksResponse]
$creadList :: ReadS [DescribeStacksResponse]
readsPrec :: Int -> ReadS DescribeStacksResponse
$creadsPrec :: Int -> ReadS DescribeStacksResponse
Prelude.Read, Int -> DescribeStacksResponse -> ShowS
[DescribeStacksResponse] -> ShowS
DescribeStacksResponse -> String
(Int -> DescribeStacksResponse -> ShowS)
-> (DescribeStacksResponse -> String)
-> ([DescribeStacksResponse] -> ShowS)
-> Show DescribeStacksResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeStacksResponse] -> ShowS
$cshowList :: [DescribeStacksResponse] -> ShowS
show :: DescribeStacksResponse -> String
$cshow :: DescribeStacksResponse -> String
showsPrec :: Int -> DescribeStacksResponse -> ShowS
$cshowsPrec :: Int -> DescribeStacksResponse -> ShowS
Prelude.Show, (forall x. DescribeStacksResponse -> Rep DescribeStacksResponse x)
-> (forall x.
    Rep DescribeStacksResponse x -> DescribeStacksResponse)
-> Generic DescribeStacksResponse
forall x. Rep DescribeStacksResponse x -> DescribeStacksResponse
forall x. DescribeStacksResponse -> Rep DescribeStacksResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeStacksResponse x -> DescribeStacksResponse
$cfrom :: forall x. DescribeStacksResponse -> Rep DescribeStacksResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeStacksResponse' 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', 'describeStacksResponse_nextToken' - The pagination token to use to retrieve the next page of results for
-- this operation. If there are no more pages, this value is null.
--
-- 'stacks', 'describeStacksResponse_stacks' - Information about the stacks.
--
-- 'httpStatus', 'describeStacksResponse_httpStatus' - The response's http status code.
newDescribeStacksResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeStacksResponse
newDescribeStacksResponse :: Int -> DescribeStacksResponse
newDescribeStacksResponse Int
pHttpStatus_ =
  DescribeStacksResponse' :: Maybe Text -> Maybe [Stack] -> Int -> DescribeStacksResponse
DescribeStacksResponse'
    { $sel:nextToken:DescribeStacksResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stacks:DescribeStacksResponse' :: Maybe [Stack]
stacks = Maybe [Stack]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeStacksResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The pagination token to use to retrieve the next page of results for
-- this operation. If there are no more pages, this value is null.
describeStacksResponse_nextToken :: Lens.Lens' DescribeStacksResponse (Prelude.Maybe Prelude.Text)
describeStacksResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeStacksResponse -> f DescribeStacksResponse
describeStacksResponse_nextToken = (DescribeStacksResponse -> Maybe Text)
-> (DescribeStacksResponse -> Maybe Text -> DescribeStacksResponse)
-> Lens' DescribeStacksResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStacksResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeStacksResponse' :: DescribeStacksResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeStacksResponse
s@DescribeStacksResponse' {} Maybe Text
a -> DescribeStacksResponse
s {$sel:nextToken:DescribeStacksResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeStacksResponse)

-- | Information about the stacks.
describeStacksResponse_stacks :: Lens.Lens' DescribeStacksResponse (Prelude.Maybe [Stack])
describeStacksResponse_stacks :: (Maybe [Stack] -> f (Maybe [Stack]))
-> DescribeStacksResponse -> f DescribeStacksResponse
describeStacksResponse_stacks = (DescribeStacksResponse -> Maybe [Stack])
-> (DescribeStacksResponse
    -> Maybe [Stack] -> DescribeStacksResponse)
-> Lens' DescribeStacksResponse (Maybe [Stack])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStacksResponse' {Maybe [Stack]
stacks :: Maybe [Stack]
$sel:stacks:DescribeStacksResponse' :: DescribeStacksResponse -> Maybe [Stack]
stacks} -> Maybe [Stack]
stacks) (\s :: DescribeStacksResponse
s@DescribeStacksResponse' {} Maybe [Stack]
a -> DescribeStacksResponse
s {$sel:stacks:DescribeStacksResponse' :: Maybe [Stack]
stacks = Maybe [Stack]
a} :: DescribeStacksResponse) ((Maybe [Stack] -> f (Maybe [Stack]))
 -> DescribeStacksResponse -> f DescribeStacksResponse)
-> ((Maybe [Stack] -> f (Maybe [Stack]))
    -> Maybe [Stack] -> f (Maybe [Stack]))
-> (Maybe [Stack] -> f (Maybe [Stack]))
-> DescribeStacksResponse
-> f DescribeStacksResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Stack] [Stack] [Stack] [Stack]
-> Iso
     (Maybe [Stack]) (Maybe [Stack]) (Maybe [Stack]) (Maybe [Stack])
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 [Stack] [Stack] [Stack] [Stack]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeStacksResponse