{-# 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.Budgets.DescribeBudgetActionsForAccount
-- 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)
--
-- Describes all of the budget actions for an account.
--
-- This operation returns paginated results.
module Amazonka.Budgets.DescribeBudgetActionsForAccount
  ( -- * Creating a Request
    DescribeBudgetActionsForAccount (..),
    newDescribeBudgetActionsForAccount,

    -- * Request Lenses
    describeBudgetActionsForAccount_nextToken,
    describeBudgetActionsForAccount_maxResults,
    describeBudgetActionsForAccount_accountId,

    -- * Destructuring the Response
    DescribeBudgetActionsForAccountResponse (..),
    newDescribeBudgetActionsForAccountResponse,

    -- * Response Lenses
    describeBudgetActionsForAccountResponse_nextToken,
    describeBudgetActionsForAccountResponse_httpStatus,
    describeBudgetActionsForAccountResponse_actions,
  )
where

import Amazonka.Budgets.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:/ 'newDescribeBudgetActionsForAccount' smart constructor.
data DescribeBudgetActionsForAccount = DescribeBudgetActionsForAccount'
  { DescribeBudgetActionsForAccount -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    DescribeBudgetActionsForAccount -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    DescribeBudgetActionsForAccount -> Text
accountId :: Prelude.Text
  }
  deriving (DescribeBudgetActionsForAccount
-> DescribeBudgetActionsForAccount -> Bool
(DescribeBudgetActionsForAccount
 -> DescribeBudgetActionsForAccount -> Bool)
-> (DescribeBudgetActionsForAccount
    -> DescribeBudgetActionsForAccount -> Bool)
-> Eq DescribeBudgetActionsForAccount
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeBudgetActionsForAccount
-> DescribeBudgetActionsForAccount -> Bool
$c/= :: DescribeBudgetActionsForAccount
-> DescribeBudgetActionsForAccount -> Bool
== :: DescribeBudgetActionsForAccount
-> DescribeBudgetActionsForAccount -> Bool
$c== :: DescribeBudgetActionsForAccount
-> DescribeBudgetActionsForAccount -> Bool
Prelude.Eq, ReadPrec [DescribeBudgetActionsForAccount]
ReadPrec DescribeBudgetActionsForAccount
Int -> ReadS DescribeBudgetActionsForAccount
ReadS [DescribeBudgetActionsForAccount]
(Int -> ReadS DescribeBudgetActionsForAccount)
-> ReadS [DescribeBudgetActionsForAccount]
-> ReadPrec DescribeBudgetActionsForAccount
-> ReadPrec [DescribeBudgetActionsForAccount]
-> Read DescribeBudgetActionsForAccount
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeBudgetActionsForAccount]
$creadListPrec :: ReadPrec [DescribeBudgetActionsForAccount]
readPrec :: ReadPrec DescribeBudgetActionsForAccount
$creadPrec :: ReadPrec DescribeBudgetActionsForAccount
readList :: ReadS [DescribeBudgetActionsForAccount]
$creadList :: ReadS [DescribeBudgetActionsForAccount]
readsPrec :: Int -> ReadS DescribeBudgetActionsForAccount
$creadsPrec :: Int -> ReadS DescribeBudgetActionsForAccount
Prelude.Read, Int -> DescribeBudgetActionsForAccount -> ShowS
[DescribeBudgetActionsForAccount] -> ShowS
DescribeBudgetActionsForAccount -> String
(Int -> DescribeBudgetActionsForAccount -> ShowS)
-> (DescribeBudgetActionsForAccount -> String)
-> ([DescribeBudgetActionsForAccount] -> ShowS)
-> Show DescribeBudgetActionsForAccount
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeBudgetActionsForAccount] -> ShowS
$cshowList :: [DescribeBudgetActionsForAccount] -> ShowS
show :: DescribeBudgetActionsForAccount -> String
$cshow :: DescribeBudgetActionsForAccount -> String
showsPrec :: Int -> DescribeBudgetActionsForAccount -> ShowS
$cshowsPrec :: Int -> DescribeBudgetActionsForAccount -> ShowS
Prelude.Show, (forall x.
 DescribeBudgetActionsForAccount
 -> Rep DescribeBudgetActionsForAccount x)
-> (forall x.
    Rep DescribeBudgetActionsForAccount x
    -> DescribeBudgetActionsForAccount)
-> Generic DescribeBudgetActionsForAccount
forall x.
Rep DescribeBudgetActionsForAccount x
-> DescribeBudgetActionsForAccount
forall x.
DescribeBudgetActionsForAccount
-> Rep DescribeBudgetActionsForAccount x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeBudgetActionsForAccount x
-> DescribeBudgetActionsForAccount
$cfrom :: forall x.
DescribeBudgetActionsForAccount
-> Rep DescribeBudgetActionsForAccount x
Prelude.Generic)

-- |
-- Create a value of 'DescribeBudgetActionsForAccount' 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', 'describeBudgetActionsForAccount_nextToken' - Undocumented member.
--
-- 'maxResults', 'describeBudgetActionsForAccount_maxResults' - Undocumented member.
--
-- 'accountId', 'describeBudgetActionsForAccount_accountId' - Undocumented member.
newDescribeBudgetActionsForAccount ::
  -- | 'accountId'
  Prelude.Text ->
  DescribeBudgetActionsForAccount
newDescribeBudgetActionsForAccount :: Text -> DescribeBudgetActionsForAccount
newDescribeBudgetActionsForAccount Text
pAccountId_ =
  DescribeBudgetActionsForAccount' :: Maybe Text
-> Maybe Natural -> Text -> DescribeBudgetActionsForAccount
DescribeBudgetActionsForAccount'
    { $sel:nextToken:DescribeBudgetActionsForAccount' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeBudgetActionsForAccount' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:accountId:DescribeBudgetActionsForAccount' :: Text
accountId = Text
pAccountId_
    }

-- | Undocumented member.
describeBudgetActionsForAccount_nextToken :: Lens.Lens' DescribeBudgetActionsForAccount (Prelude.Maybe Prelude.Text)
describeBudgetActionsForAccount_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeBudgetActionsForAccount
-> f DescribeBudgetActionsForAccount
describeBudgetActionsForAccount_nextToken = (DescribeBudgetActionsForAccount -> Maybe Text)
-> (DescribeBudgetActionsForAccount
    -> Maybe Text -> DescribeBudgetActionsForAccount)
-> Lens
     DescribeBudgetActionsForAccount
     DescribeBudgetActionsForAccount
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBudgetActionsForAccount' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeBudgetActionsForAccount' :: DescribeBudgetActionsForAccount -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeBudgetActionsForAccount
s@DescribeBudgetActionsForAccount' {} Maybe Text
a -> DescribeBudgetActionsForAccount
s {$sel:nextToken:DescribeBudgetActionsForAccount' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeBudgetActionsForAccount)

-- | Undocumented member.
describeBudgetActionsForAccount_maxResults :: Lens.Lens' DescribeBudgetActionsForAccount (Prelude.Maybe Prelude.Natural)
describeBudgetActionsForAccount_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeBudgetActionsForAccount
-> f DescribeBudgetActionsForAccount
describeBudgetActionsForAccount_maxResults = (DescribeBudgetActionsForAccount -> Maybe Natural)
-> (DescribeBudgetActionsForAccount
    -> Maybe Natural -> DescribeBudgetActionsForAccount)
-> Lens
     DescribeBudgetActionsForAccount
     DescribeBudgetActionsForAccount
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBudgetActionsForAccount' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeBudgetActionsForAccount' :: DescribeBudgetActionsForAccount -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeBudgetActionsForAccount
s@DescribeBudgetActionsForAccount' {} Maybe Natural
a -> DescribeBudgetActionsForAccount
s {$sel:maxResults:DescribeBudgetActionsForAccount' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeBudgetActionsForAccount)

-- | Undocumented member.
describeBudgetActionsForAccount_accountId :: Lens.Lens' DescribeBudgetActionsForAccount Prelude.Text
describeBudgetActionsForAccount_accountId :: (Text -> f Text)
-> DescribeBudgetActionsForAccount
-> f DescribeBudgetActionsForAccount
describeBudgetActionsForAccount_accountId = (DescribeBudgetActionsForAccount -> Text)
-> (DescribeBudgetActionsForAccount
    -> Text -> DescribeBudgetActionsForAccount)
-> Lens
     DescribeBudgetActionsForAccount
     DescribeBudgetActionsForAccount
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBudgetActionsForAccount' {Text
accountId :: Text
$sel:accountId:DescribeBudgetActionsForAccount' :: DescribeBudgetActionsForAccount -> Text
accountId} -> Text
accountId) (\s :: DescribeBudgetActionsForAccount
s@DescribeBudgetActionsForAccount' {} Text
a -> DescribeBudgetActionsForAccount
s {$sel:accountId:DescribeBudgetActionsForAccount' :: Text
accountId = Text
a} :: DescribeBudgetActionsForAccount)

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

instance
  Prelude.Hashable
    DescribeBudgetActionsForAccount

instance
  Prelude.NFData
    DescribeBudgetActionsForAccount

instance
  Core.ToHeaders
    DescribeBudgetActionsForAccount
  where
  toHeaders :: DescribeBudgetActionsForAccount -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> DescribeBudgetActionsForAccount -> 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
"AWSBudgetServiceGateway.DescribeBudgetActionsForAccount" ::
                          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 DescribeBudgetActionsForAccount where
  toJSON :: DescribeBudgetActionsForAccount -> Value
toJSON DescribeBudgetActionsForAccount' {Maybe Natural
Maybe Text
Text
accountId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:accountId:DescribeBudgetActionsForAccount' :: DescribeBudgetActionsForAccount -> Text
$sel:maxResults:DescribeBudgetActionsForAccount' :: DescribeBudgetActionsForAccount -> Maybe Natural
$sel:nextToken:DescribeBudgetActionsForAccount' :: DescribeBudgetActionsForAccount -> 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
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"AccountId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
accountId)
          ]
      )

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

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

-- | /See:/ 'newDescribeBudgetActionsForAccountResponse' smart constructor.
data DescribeBudgetActionsForAccountResponse = DescribeBudgetActionsForAccountResponse'
  { DescribeBudgetActionsForAccountResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeBudgetActionsForAccountResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of the budget action resources information.
    DescribeBudgetActionsForAccountResponse -> [Action]
actions :: [Action]
  }
  deriving (DescribeBudgetActionsForAccountResponse
-> DescribeBudgetActionsForAccountResponse -> Bool
(DescribeBudgetActionsForAccountResponse
 -> DescribeBudgetActionsForAccountResponse -> Bool)
-> (DescribeBudgetActionsForAccountResponse
    -> DescribeBudgetActionsForAccountResponse -> Bool)
-> Eq DescribeBudgetActionsForAccountResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeBudgetActionsForAccountResponse
-> DescribeBudgetActionsForAccountResponse -> Bool
$c/= :: DescribeBudgetActionsForAccountResponse
-> DescribeBudgetActionsForAccountResponse -> Bool
== :: DescribeBudgetActionsForAccountResponse
-> DescribeBudgetActionsForAccountResponse -> Bool
$c== :: DescribeBudgetActionsForAccountResponse
-> DescribeBudgetActionsForAccountResponse -> Bool
Prelude.Eq, Int -> DescribeBudgetActionsForAccountResponse -> ShowS
[DescribeBudgetActionsForAccountResponse] -> ShowS
DescribeBudgetActionsForAccountResponse -> String
(Int -> DescribeBudgetActionsForAccountResponse -> ShowS)
-> (DescribeBudgetActionsForAccountResponse -> String)
-> ([DescribeBudgetActionsForAccountResponse] -> ShowS)
-> Show DescribeBudgetActionsForAccountResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeBudgetActionsForAccountResponse] -> ShowS
$cshowList :: [DescribeBudgetActionsForAccountResponse] -> ShowS
show :: DescribeBudgetActionsForAccountResponse -> String
$cshow :: DescribeBudgetActionsForAccountResponse -> String
showsPrec :: Int -> DescribeBudgetActionsForAccountResponse -> ShowS
$cshowsPrec :: Int -> DescribeBudgetActionsForAccountResponse -> ShowS
Prelude.Show, (forall x.
 DescribeBudgetActionsForAccountResponse
 -> Rep DescribeBudgetActionsForAccountResponse x)
-> (forall x.
    Rep DescribeBudgetActionsForAccountResponse x
    -> DescribeBudgetActionsForAccountResponse)
-> Generic DescribeBudgetActionsForAccountResponse
forall x.
Rep DescribeBudgetActionsForAccountResponse x
-> DescribeBudgetActionsForAccountResponse
forall x.
DescribeBudgetActionsForAccountResponse
-> Rep DescribeBudgetActionsForAccountResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeBudgetActionsForAccountResponse x
-> DescribeBudgetActionsForAccountResponse
$cfrom :: forall x.
DescribeBudgetActionsForAccountResponse
-> Rep DescribeBudgetActionsForAccountResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeBudgetActionsForAccountResponse' 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', 'describeBudgetActionsForAccountResponse_nextToken' - Undocumented member.
--
-- 'httpStatus', 'describeBudgetActionsForAccountResponse_httpStatus' - The response's http status code.
--
-- 'actions', 'describeBudgetActionsForAccountResponse_actions' - A list of the budget action resources information.
newDescribeBudgetActionsForAccountResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeBudgetActionsForAccountResponse
newDescribeBudgetActionsForAccountResponse :: Int -> DescribeBudgetActionsForAccountResponse
newDescribeBudgetActionsForAccountResponse
  Int
pHttpStatus_ =
    DescribeBudgetActionsForAccountResponse' :: Maybe Text
-> Int -> [Action] -> DescribeBudgetActionsForAccountResponse
DescribeBudgetActionsForAccountResponse'
      { $sel:nextToken:DescribeBudgetActionsForAccountResponse' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeBudgetActionsForAccountResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:actions:DescribeBudgetActionsForAccountResponse' :: [Action]
actions = [Action]
forall a. Monoid a => a
Prelude.mempty
      }

-- | Undocumented member.
describeBudgetActionsForAccountResponse_nextToken :: Lens.Lens' DescribeBudgetActionsForAccountResponse (Prelude.Maybe Prelude.Text)
describeBudgetActionsForAccountResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeBudgetActionsForAccountResponse
-> f DescribeBudgetActionsForAccountResponse
describeBudgetActionsForAccountResponse_nextToken = (DescribeBudgetActionsForAccountResponse -> Maybe Text)
-> (DescribeBudgetActionsForAccountResponse
    -> Maybe Text -> DescribeBudgetActionsForAccountResponse)
-> Lens' DescribeBudgetActionsForAccountResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBudgetActionsForAccountResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeBudgetActionsForAccountResponse' :: DescribeBudgetActionsForAccountResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeBudgetActionsForAccountResponse
s@DescribeBudgetActionsForAccountResponse' {} Maybe Text
a -> DescribeBudgetActionsForAccountResponse
s {$sel:nextToken:DescribeBudgetActionsForAccountResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeBudgetActionsForAccountResponse)

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

-- | A list of the budget action resources information.
describeBudgetActionsForAccountResponse_actions :: Lens.Lens' DescribeBudgetActionsForAccountResponse [Action]
describeBudgetActionsForAccountResponse_actions :: ([Action] -> f [Action])
-> DescribeBudgetActionsForAccountResponse
-> f DescribeBudgetActionsForAccountResponse
describeBudgetActionsForAccountResponse_actions = (DescribeBudgetActionsForAccountResponse -> [Action])
-> (DescribeBudgetActionsForAccountResponse
    -> [Action] -> DescribeBudgetActionsForAccountResponse)
-> Lens' DescribeBudgetActionsForAccountResponse [Action]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBudgetActionsForAccountResponse' {[Action]
actions :: [Action]
$sel:actions:DescribeBudgetActionsForAccountResponse' :: DescribeBudgetActionsForAccountResponse -> [Action]
actions} -> [Action]
actions) (\s :: DescribeBudgetActionsForAccountResponse
s@DescribeBudgetActionsForAccountResponse' {} [Action]
a -> DescribeBudgetActionsForAccountResponse
s {$sel:actions:DescribeBudgetActionsForAccountResponse' :: [Action]
actions = [Action]
a} :: DescribeBudgetActionsForAccountResponse) (([Action] -> f [Action])
 -> DescribeBudgetActionsForAccountResponse
 -> f DescribeBudgetActionsForAccountResponse)
-> (([Action] -> f [Action]) -> [Action] -> f [Action])
-> ([Action] -> f [Action])
-> DescribeBudgetActionsForAccountResponse
-> f DescribeBudgetActionsForAccountResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Action] -> f [Action]) -> [Action] -> f [Action]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    DescribeBudgetActionsForAccountResponse