{-# 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.CloudFormation.DescribeAccountLimits
-- 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 your account\'s CloudFormation limits, such as the maximum
-- number of stacks that you can create in your account. For more
-- information about account limits, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html CloudFormation Limits>
-- in the /CloudFormation User Guide/.
--
-- This operation returns paginated results.
module Amazonka.CloudFormation.DescribeAccountLimits
  ( -- * Creating a Request
    DescribeAccountLimits (..),
    newDescribeAccountLimits,

    -- * Request Lenses
    describeAccountLimits_nextToken,

    -- * Destructuring the Response
    DescribeAccountLimitsResponse (..),
    newDescribeAccountLimitsResponse,

    -- * Response Lenses
    describeAccountLimitsResponse_nextToken,
    describeAccountLimitsResponse_accountLimits,
    describeAccountLimitsResponse_httpStatus,
  )
where

import Amazonka.CloudFormation.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

-- | The input for the DescribeAccountLimits action.
--
-- /See:/ 'newDescribeAccountLimits' smart constructor.
data DescribeAccountLimits = DescribeAccountLimits'
  { -- | A string that identifies the next page of limits that you want to
    -- retrieve.
    DescribeAccountLimits -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeAccountLimits -> DescribeAccountLimits -> Bool
(DescribeAccountLimits -> DescribeAccountLimits -> Bool)
-> (DescribeAccountLimits -> DescribeAccountLimits -> Bool)
-> Eq DescribeAccountLimits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAccountLimits -> DescribeAccountLimits -> Bool
$c/= :: DescribeAccountLimits -> DescribeAccountLimits -> Bool
== :: DescribeAccountLimits -> DescribeAccountLimits -> Bool
$c== :: DescribeAccountLimits -> DescribeAccountLimits -> Bool
Prelude.Eq, ReadPrec [DescribeAccountLimits]
ReadPrec DescribeAccountLimits
Int -> ReadS DescribeAccountLimits
ReadS [DescribeAccountLimits]
(Int -> ReadS DescribeAccountLimits)
-> ReadS [DescribeAccountLimits]
-> ReadPrec DescribeAccountLimits
-> ReadPrec [DescribeAccountLimits]
-> Read DescribeAccountLimits
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAccountLimits]
$creadListPrec :: ReadPrec [DescribeAccountLimits]
readPrec :: ReadPrec DescribeAccountLimits
$creadPrec :: ReadPrec DescribeAccountLimits
readList :: ReadS [DescribeAccountLimits]
$creadList :: ReadS [DescribeAccountLimits]
readsPrec :: Int -> ReadS DescribeAccountLimits
$creadsPrec :: Int -> ReadS DescribeAccountLimits
Prelude.Read, Int -> DescribeAccountLimits -> ShowS
[DescribeAccountLimits] -> ShowS
DescribeAccountLimits -> String
(Int -> DescribeAccountLimits -> ShowS)
-> (DescribeAccountLimits -> String)
-> ([DescribeAccountLimits] -> ShowS)
-> Show DescribeAccountLimits
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAccountLimits] -> ShowS
$cshowList :: [DescribeAccountLimits] -> ShowS
show :: DescribeAccountLimits -> String
$cshow :: DescribeAccountLimits -> String
showsPrec :: Int -> DescribeAccountLimits -> ShowS
$cshowsPrec :: Int -> DescribeAccountLimits -> ShowS
Prelude.Show, (forall x. DescribeAccountLimits -> Rep DescribeAccountLimits x)
-> (forall x. Rep DescribeAccountLimits x -> DescribeAccountLimits)
-> Generic DescribeAccountLimits
forall x. Rep DescribeAccountLimits x -> DescribeAccountLimits
forall x. DescribeAccountLimits -> Rep DescribeAccountLimits x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeAccountLimits x -> DescribeAccountLimits
$cfrom :: forall x. DescribeAccountLimits -> Rep DescribeAccountLimits x
Prelude.Generic)

-- |
-- Create a value of 'DescribeAccountLimits' 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', 'describeAccountLimits_nextToken' - A string that identifies the next page of limits that you want to
-- retrieve.
newDescribeAccountLimits ::
  DescribeAccountLimits
newDescribeAccountLimits :: DescribeAccountLimits
newDescribeAccountLimits =
  DescribeAccountLimits' :: Maybe Text -> DescribeAccountLimits
DescribeAccountLimits' {$sel:nextToken:DescribeAccountLimits' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing}

-- | A string that identifies the next page of limits that you want to
-- retrieve.
describeAccountLimits_nextToken :: Lens.Lens' DescribeAccountLimits (Prelude.Maybe Prelude.Text)
describeAccountLimits_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeAccountLimits -> f DescribeAccountLimits
describeAccountLimits_nextToken = (DescribeAccountLimits -> Maybe Text)
-> (DescribeAccountLimits -> Maybe Text -> DescribeAccountLimits)
-> Lens
     DescribeAccountLimits
     DescribeAccountLimits
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccountLimits' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAccountLimits' :: DescribeAccountLimits -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAccountLimits
s@DescribeAccountLimits' {} Maybe Text
a -> DescribeAccountLimits
s {$sel:nextToken:DescribeAccountLimits' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAccountLimits)

instance Core.AWSPager DescribeAccountLimits where
  page :: DescribeAccountLimits
-> AWSResponse DescribeAccountLimits -> Maybe DescribeAccountLimits
page DescribeAccountLimits
rq AWSResponse DescribeAccountLimits
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeAccountLimits
DescribeAccountLimitsResponse
rs
            DescribeAccountLimitsResponse
-> Getting (First Text) DescribeAccountLimitsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeAccountLimitsResponse
-> Const (First Text) DescribeAccountLimitsResponse
Lens' DescribeAccountLimitsResponse (Maybe Text)
describeAccountLimitsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeAccountLimitsResponse
 -> Const (First Text) DescribeAccountLimitsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeAccountLimitsResponse 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 DescribeAccountLimits
forall a. Maybe a
Prelude.Nothing
    | Maybe [AccountLimit] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeAccountLimits
DescribeAccountLimitsResponse
rs
            DescribeAccountLimitsResponse
-> Getting
     (First [AccountLimit]) DescribeAccountLimitsResponse [AccountLimit]
-> Maybe [AccountLimit]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [AccountLimit]
 -> Const (First [AccountLimit]) (Maybe [AccountLimit]))
-> DescribeAccountLimitsResponse
-> Const (First [AccountLimit]) DescribeAccountLimitsResponse
Lens' DescribeAccountLimitsResponse (Maybe [AccountLimit])
describeAccountLimitsResponse_accountLimits
              ((Maybe [AccountLimit]
  -> Const (First [AccountLimit]) (Maybe [AccountLimit]))
 -> DescribeAccountLimitsResponse
 -> Const (First [AccountLimit]) DescribeAccountLimitsResponse)
-> (([AccountLimit] -> Const (First [AccountLimit]) [AccountLimit])
    -> Maybe [AccountLimit]
    -> Const (First [AccountLimit]) (Maybe [AccountLimit]))
-> Getting
     (First [AccountLimit]) DescribeAccountLimitsResponse [AccountLimit]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AccountLimit] -> Const (First [AccountLimit]) [AccountLimit])
-> Maybe [AccountLimit]
-> Const (First [AccountLimit]) (Maybe [AccountLimit])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeAccountLimits
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeAccountLimits -> Maybe DescribeAccountLimits
forall a. a -> Maybe a
Prelude.Just (DescribeAccountLimits -> Maybe DescribeAccountLimits)
-> DescribeAccountLimits -> Maybe DescribeAccountLimits
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeAccountLimits
rq
          DescribeAccountLimits
-> (DescribeAccountLimits -> DescribeAccountLimits)
-> DescribeAccountLimits
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeAccountLimits -> Identity DescribeAccountLimits
Lens
  DescribeAccountLimits
  DescribeAccountLimits
  (Maybe Text)
  (Maybe Text)
describeAccountLimits_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeAccountLimits -> Identity DescribeAccountLimits)
-> Maybe Text -> DescribeAccountLimits -> DescribeAccountLimits
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeAccountLimits
DescribeAccountLimitsResponse
rs
          DescribeAccountLimitsResponse
-> Getting (First Text) DescribeAccountLimitsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeAccountLimitsResponse
-> Const (First Text) DescribeAccountLimitsResponse
Lens' DescribeAccountLimitsResponse (Maybe Text)
describeAccountLimitsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeAccountLimitsResponse
 -> Const (First Text) DescribeAccountLimitsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeAccountLimitsResponse 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 DescribeAccountLimits where
  type
    AWSResponse DescribeAccountLimits =
      DescribeAccountLimitsResponse
  request :: DescribeAccountLimits -> Request DescribeAccountLimits
request = Service -> DescribeAccountLimits -> Request DescribeAccountLimits
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeAccountLimits
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeAccountLimits)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeAccountLimits))
-> Logger
-> Service
-> Proxy DescribeAccountLimits
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeAccountLimits)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeAccountLimitsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [AccountLimit] -> Int -> DescribeAccountLimitsResponse
DescribeAccountLimitsResponse'
            (Maybe Text
 -> Maybe [AccountLimit] -> Int -> DescribeAccountLimitsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [AccountLimit] -> Int -> DescribeAccountLimitsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextToken")
            Either
  String
  (Maybe [AccountLimit] -> Int -> DescribeAccountLimitsResponse)
-> Either String (Maybe [AccountLimit])
-> Either String (Int -> DescribeAccountLimitsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AccountLimits" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [AccountLimit]))
-> Either String (Maybe [AccountLimit])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [AccountLimit])
-> [Node] -> Either String (Maybe [AccountLimit])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [AccountLimit]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either String (Int -> DescribeAccountLimitsResponse)
-> Either String Int -> Either String DescribeAccountLimitsResponse
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 DescribeAccountLimits

instance Prelude.NFData DescribeAccountLimits

instance Core.ToHeaders DescribeAccountLimits where
  toHeaders :: DescribeAccountLimits -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeAccountLimits -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

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

instance Core.ToQuery DescribeAccountLimits where
  toQuery :: DescribeAccountLimits -> QueryString
toQuery DescribeAccountLimits' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAccountLimits' :: DescribeAccountLimits -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeAccountLimits" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
        ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken
      ]

-- | The output for the DescribeAccountLimits action.
--
-- /See:/ 'newDescribeAccountLimitsResponse' smart constructor.
data DescribeAccountLimitsResponse = DescribeAccountLimitsResponse'
  { -- | If the output exceeds 1 MB in size, a string that identifies the next
    -- page of limits. If no additional page exists, this value is null.
    DescribeAccountLimitsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | An account limit structure that contain a list of CloudFormation account
    -- limits and their values.
    DescribeAccountLimitsResponse -> Maybe [AccountLimit]
accountLimits :: Prelude.Maybe [AccountLimit],
    -- | The response's http status code.
    DescribeAccountLimitsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeAccountLimitsResponse
-> DescribeAccountLimitsResponse -> Bool
(DescribeAccountLimitsResponse
 -> DescribeAccountLimitsResponse -> Bool)
-> (DescribeAccountLimitsResponse
    -> DescribeAccountLimitsResponse -> Bool)
-> Eq DescribeAccountLimitsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAccountLimitsResponse
-> DescribeAccountLimitsResponse -> Bool
$c/= :: DescribeAccountLimitsResponse
-> DescribeAccountLimitsResponse -> Bool
== :: DescribeAccountLimitsResponse
-> DescribeAccountLimitsResponse -> Bool
$c== :: DescribeAccountLimitsResponse
-> DescribeAccountLimitsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAccountLimitsResponse]
ReadPrec DescribeAccountLimitsResponse
Int -> ReadS DescribeAccountLimitsResponse
ReadS [DescribeAccountLimitsResponse]
(Int -> ReadS DescribeAccountLimitsResponse)
-> ReadS [DescribeAccountLimitsResponse]
-> ReadPrec DescribeAccountLimitsResponse
-> ReadPrec [DescribeAccountLimitsResponse]
-> Read DescribeAccountLimitsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAccountLimitsResponse]
$creadListPrec :: ReadPrec [DescribeAccountLimitsResponse]
readPrec :: ReadPrec DescribeAccountLimitsResponse
$creadPrec :: ReadPrec DescribeAccountLimitsResponse
readList :: ReadS [DescribeAccountLimitsResponse]
$creadList :: ReadS [DescribeAccountLimitsResponse]
readsPrec :: Int -> ReadS DescribeAccountLimitsResponse
$creadsPrec :: Int -> ReadS DescribeAccountLimitsResponse
Prelude.Read, Int -> DescribeAccountLimitsResponse -> ShowS
[DescribeAccountLimitsResponse] -> ShowS
DescribeAccountLimitsResponse -> String
(Int -> DescribeAccountLimitsResponse -> ShowS)
-> (DescribeAccountLimitsResponse -> String)
-> ([DescribeAccountLimitsResponse] -> ShowS)
-> Show DescribeAccountLimitsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAccountLimitsResponse] -> ShowS
$cshowList :: [DescribeAccountLimitsResponse] -> ShowS
show :: DescribeAccountLimitsResponse -> String
$cshow :: DescribeAccountLimitsResponse -> String
showsPrec :: Int -> DescribeAccountLimitsResponse -> ShowS
$cshowsPrec :: Int -> DescribeAccountLimitsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeAccountLimitsResponse
 -> Rep DescribeAccountLimitsResponse x)
-> (forall x.
    Rep DescribeAccountLimitsResponse x
    -> DescribeAccountLimitsResponse)
-> Generic DescribeAccountLimitsResponse
forall x.
Rep DescribeAccountLimitsResponse x
-> DescribeAccountLimitsResponse
forall x.
DescribeAccountLimitsResponse
-> Rep DescribeAccountLimitsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAccountLimitsResponse x
-> DescribeAccountLimitsResponse
$cfrom :: forall x.
DescribeAccountLimitsResponse
-> Rep DescribeAccountLimitsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeAccountLimitsResponse' 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', 'describeAccountLimitsResponse_nextToken' - If the output exceeds 1 MB in size, a string that identifies the next
-- page of limits. If no additional page exists, this value is null.
--
-- 'accountLimits', 'describeAccountLimitsResponse_accountLimits' - An account limit structure that contain a list of CloudFormation account
-- limits and their values.
--
-- 'httpStatus', 'describeAccountLimitsResponse_httpStatus' - The response's http status code.
newDescribeAccountLimitsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeAccountLimitsResponse
newDescribeAccountLimitsResponse :: Int -> DescribeAccountLimitsResponse
newDescribeAccountLimitsResponse Int
pHttpStatus_ =
  DescribeAccountLimitsResponse' :: Maybe Text
-> Maybe [AccountLimit] -> Int -> DescribeAccountLimitsResponse
DescribeAccountLimitsResponse'
    { $sel:nextToken:DescribeAccountLimitsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:accountLimits:DescribeAccountLimitsResponse' :: Maybe [AccountLimit]
accountLimits = Maybe [AccountLimit]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeAccountLimitsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If the output exceeds 1 MB in size, a string that identifies the next
-- page of limits. If no additional page exists, this value is null.
describeAccountLimitsResponse_nextToken :: Lens.Lens' DescribeAccountLimitsResponse (Prelude.Maybe Prelude.Text)
describeAccountLimitsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeAccountLimitsResponse -> f DescribeAccountLimitsResponse
describeAccountLimitsResponse_nextToken = (DescribeAccountLimitsResponse -> Maybe Text)
-> (DescribeAccountLimitsResponse
    -> Maybe Text -> DescribeAccountLimitsResponse)
-> Lens' DescribeAccountLimitsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccountLimitsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAccountLimitsResponse' :: DescribeAccountLimitsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAccountLimitsResponse
s@DescribeAccountLimitsResponse' {} Maybe Text
a -> DescribeAccountLimitsResponse
s {$sel:nextToken:DescribeAccountLimitsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAccountLimitsResponse)

-- | An account limit structure that contain a list of CloudFormation account
-- limits and their values.
describeAccountLimitsResponse_accountLimits :: Lens.Lens' DescribeAccountLimitsResponse (Prelude.Maybe [AccountLimit])
describeAccountLimitsResponse_accountLimits :: (Maybe [AccountLimit] -> f (Maybe [AccountLimit]))
-> DescribeAccountLimitsResponse -> f DescribeAccountLimitsResponse
describeAccountLimitsResponse_accountLimits = (DescribeAccountLimitsResponse -> Maybe [AccountLimit])
-> (DescribeAccountLimitsResponse
    -> Maybe [AccountLimit] -> DescribeAccountLimitsResponse)
-> Lens' DescribeAccountLimitsResponse (Maybe [AccountLimit])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccountLimitsResponse' {Maybe [AccountLimit]
accountLimits :: Maybe [AccountLimit]
$sel:accountLimits:DescribeAccountLimitsResponse' :: DescribeAccountLimitsResponse -> Maybe [AccountLimit]
accountLimits} -> Maybe [AccountLimit]
accountLimits) (\s :: DescribeAccountLimitsResponse
s@DescribeAccountLimitsResponse' {} Maybe [AccountLimit]
a -> DescribeAccountLimitsResponse
s {$sel:accountLimits:DescribeAccountLimitsResponse' :: Maybe [AccountLimit]
accountLimits = Maybe [AccountLimit]
a} :: DescribeAccountLimitsResponse) ((Maybe [AccountLimit] -> f (Maybe [AccountLimit]))
 -> DescribeAccountLimitsResponse
 -> f DescribeAccountLimitsResponse)
-> ((Maybe [AccountLimit] -> f (Maybe [AccountLimit]))
    -> Maybe [AccountLimit] -> f (Maybe [AccountLimit]))
-> (Maybe [AccountLimit] -> f (Maybe [AccountLimit]))
-> DescribeAccountLimitsResponse
-> f DescribeAccountLimitsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AccountLimit] [AccountLimit] [AccountLimit] [AccountLimit]
-> Iso
     (Maybe [AccountLimit])
     (Maybe [AccountLimit])
     (Maybe [AccountLimit])
     (Maybe [AccountLimit])
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 [AccountLimit] [AccountLimit] [AccountLimit] [AccountLimit]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeAccountLimitsResponse