{-# 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.ExecuteBudgetAction
-- 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)
--
-- Executes a budget action.
module Amazonka.Budgets.ExecuteBudgetAction
  ( -- * Creating a Request
    ExecuteBudgetAction (..),
    newExecuteBudgetAction,

    -- * Request Lenses
    executeBudgetAction_accountId,
    executeBudgetAction_budgetName,
    executeBudgetAction_actionId,
    executeBudgetAction_executionType,

    -- * Destructuring the Response
    ExecuteBudgetActionResponse (..),
    newExecuteBudgetActionResponse,

    -- * Response Lenses
    executeBudgetActionResponse_httpStatus,
    executeBudgetActionResponse_accountId,
    executeBudgetActionResponse_budgetName,
    executeBudgetActionResponse_actionId,
    executeBudgetActionResponse_executionType,
  )
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:/ 'newExecuteBudgetAction' smart constructor.
data ExecuteBudgetAction = ExecuteBudgetAction'
  { ExecuteBudgetAction -> Text
accountId :: Prelude.Text,
    ExecuteBudgetAction -> Text
budgetName :: Prelude.Text,
    -- | A system-generated universally unique identifier (UUID) for the action.
    ExecuteBudgetAction -> Text
actionId :: Prelude.Text,
    -- | The type of execution.
    ExecuteBudgetAction -> ExecutionType
executionType :: ExecutionType
  }
  deriving (ExecuteBudgetAction -> ExecuteBudgetAction -> Bool
(ExecuteBudgetAction -> ExecuteBudgetAction -> Bool)
-> (ExecuteBudgetAction -> ExecuteBudgetAction -> Bool)
-> Eq ExecuteBudgetAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecuteBudgetAction -> ExecuteBudgetAction -> Bool
$c/= :: ExecuteBudgetAction -> ExecuteBudgetAction -> Bool
== :: ExecuteBudgetAction -> ExecuteBudgetAction -> Bool
$c== :: ExecuteBudgetAction -> ExecuteBudgetAction -> Bool
Prelude.Eq, ReadPrec [ExecuteBudgetAction]
ReadPrec ExecuteBudgetAction
Int -> ReadS ExecuteBudgetAction
ReadS [ExecuteBudgetAction]
(Int -> ReadS ExecuteBudgetAction)
-> ReadS [ExecuteBudgetAction]
-> ReadPrec ExecuteBudgetAction
-> ReadPrec [ExecuteBudgetAction]
-> Read ExecuteBudgetAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExecuteBudgetAction]
$creadListPrec :: ReadPrec [ExecuteBudgetAction]
readPrec :: ReadPrec ExecuteBudgetAction
$creadPrec :: ReadPrec ExecuteBudgetAction
readList :: ReadS [ExecuteBudgetAction]
$creadList :: ReadS [ExecuteBudgetAction]
readsPrec :: Int -> ReadS ExecuteBudgetAction
$creadsPrec :: Int -> ReadS ExecuteBudgetAction
Prelude.Read, Int -> ExecuteBudgetAction -> ShowS
[ExecuteBudgetAction] -> ShowS
ExecuteBudgetAction -> String
(Int -> ExecuteBudgetAction -> ShowS)
-> (ExecuteBudgetAction -> String)
-> ([ExecuteBudgetAction] -> ShowS)
-> Show ExecuteBudgetAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecuteBudgetAction] -> ShowS
$cshowList :: [ExecuteBudgetAction] -> ShowS
show :: ExecuteBudgetAction -> String
$cshow :: ExecuteBudgetAction -> String
showsPrec :: Int -> ExecuteBudgetAction -> ShowS
$cshowsPrec :: Int -> ExecuteBudgetAction -> ShowS
Prelude.Show, (forall x. ExecuteBudgetAction -> Rep ExecuteBudgetAction x)
-> (forall x. Rep ExecuteBudgetAction x -> ExecuteBudgetAction)
-> Generic ExecuteBudgetAction
forall x. Rep ExecuteBudgetAction x -> ExecuteBudgetAction
forall x. ExecuteBudgetAction -> Rep ExecuteBudgetAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExecuteBudgetAction x -> ExecuteBudgetAction
$cfrom :: forall x. ExecuteBudgetAction -> Rep ExecuteBudgetAction x
Prelude.Generic)

-- |
-- Create a value of 'ExecuteBudgetAction' 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:
--
-- 'accountId', 'executeBudgetAction_accountId' - Undocumented member.
--
-- 'budgetName', 'executeBudgetAction_budgetName' - Undocumented member.
--
-- 'actionId', 'executeBudgetAction_actionId' - A system-generated universally unique identifier (UUID) for the action.
--
-- 'executionType', 'executeBudgetAction_executionType' - The type of execution.
newExecuteBudgetAction ::
  -- | 'accountId'
  Prelude.Text ->
  -- | 'budgetName'
  Prelude.Text ->
  -- | 'actionId'
  Prelude.Text ->
  -- | 'executionType'
  ExecutionType ->
  ExecuteBudgetAction
newExecuteBudgetAction :: Text -> Text -> Text -> ExecutionType -> ExecuteBudgetAction
newExecuteBudgetAction
  Text
pAccountId_
  Text
pBudgetName_
  Text
pActionId_
  ExecutionType
pExecutionType_ =
    ExecuteBudgetAction' :: Text -> Text -> Text -> ExecutionType -> ExecuteBudgetAction
ExecuteBudgetAction'
      { $sel:accountId:ExecuteBudgetAction' :: Text
accountId = Text
pAccountId_,
        $sel:budgetName:ExecuteBudgetAction' :: Text
budgetName = Text
pBudgetName_,
        $sel:actionId:ExecuteBudgetAction' :: Text
actionId = Text
pActionId_,
        $sel:executionType:ExecuteBudgetAction' :: ExecutionType
executionType = ExecutionType
pExecutionType_
      }

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

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

-- | A system-generated universally unique identifier (UUID) for the action.
executeBudgetAction_actionId :: Lens.Lens' ExecuteBudgetAction Prelude.Text
executeBudgetAction_actionId :: (Text -> f Text) -> ExecuteBudgetAction -> f ExecuteBudgetAction
executeBudgetAction_actionId = (ExecuteBudgetAction -> Text)
-> (ExecuteBudgetAction -> Text -> ExecuteBudgetAction)
-> Lens ExecuteBudgetAction ExecuteBudgetAction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecuteBudgetAction' {Text
actionId :: Text
$sel:actionId:ExecuteBudgetAction' :: ExecuteBudgetAction -> Text
actionId} -> Text
actionId) (\s :: ExecuteBudgetAction
s@ExecuteBudgetAction' {} Text
a -> ExecuteBudgetAction
s {$sel:actionId:ExecuteBudgetAction' :: Text
actionId = Text
a} :: ExecuteBudgetAction)

-- | The type of execution.
executeBudgetAction_executionType :: Lens.Lens' ExecuteBudgetAction ExecutionType
executeBudgetAction_executionType :: (ExecutionType -> f ExecutionType)
-> ExecuteBudgetAction -> f ExecuteBudgetAction
executeBudgetAction_executionType = (ExecuteBudgetAction -> ExecutionType)
-> (ExecuteBudgetAction -> ExecutionType -> ExecuteBudgetAction)
-> Lens
     ExecuteBudgetAction ExecuteBudgetAction ExecutionType ExecutionType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecuteBudgetAction' {ExecutionType
executionType :: ExecutionType
$sel:executionType:ExecuteBudgetAction' :: ExecuteBudgetAction -> ExecutionType
executionType} -> ExecutionType
executionType) (\s :: ExecuteBudgetAction
s@ExecuteBudgetAction' {} ExecutionType
a -> ExecuteBudgetAction
s {$sel:executionType:ExecuteBudgetAction' :: ExecutionType
executionType = ExecutionType
a} :: ExecuteBudgetAction)

instance Core.AWSRequest ExecuteBudgetAction where
  type
    AWSResponse ExecuteBudgetAction =
      ExecuteBudgetActionResponse
  request :: ExecuteBudgetAction -> Request ExecuteBudgetAction
request = Service -> ExecuteBudgetAction -> Request ExecuteBudgetAction
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ExecuteBudgetAction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ExecuteBudgetAction)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ExecuteBudgetAction))
-> Logger
-> Service
-> Proxy ExecuteBudgetAction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ExecuteBudgetAction)))
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 ->
          Int
-> Text
-> Text
-> Text
-> ExecutionType
-> ExecuteBudgetActionResponse
ExecuteBudgetActionResponse'
            (Int
 -> Text
 -> Text
 -> Text
 -> ExecutionType
 -> ExecuteBudgetActionResponse)
-> Either String Int
-> Either
     String
     (Text
      -> Text -> Text -> ExecutionType -> ExecuteBudgetActionResponse)
forall (f :: * -> *) a b. Functor 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
  (Text
   -> Text -> Text -> ExecutionType -> ExecuteBudgetActionResponse)
-> Either String Text
-> Either
     String
     (Text -> Text -> ExecutionType -> ExecuteBudgetActionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"AccountId")
            Either
  String
  (Text -> Text -> ExecutionType -> ExecuteBudgetActionResponse)
-> Either String Text
-> Either
     String (Text -> ExecutionType -> ExecuteBudgetActionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"BudgetName")
            Either
  String (Text -> ExecutionType -> ExecuteBudgetActionResponse)
-> Either String Text
-> Either String (ExecutionType -> ExecuteBudgetActionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ActionId")
            Either String (ExecutionType -> ExecuteBudgetActionResponse)
-> Either String ExecutionType
-> Either String ExecuteBudgetActionResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String ExecutionType
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ExecutionType")
      )

instance Prelude.Hashable ExecuteBudgetAction

instance Prelude.NFData ExecuteBudgetAction

instance Core.ToHeaders ExecuteBudgetAction where
  toHeaders :: ExecuteBudgetAction -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ExecuteBudgetAction -> 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.ExecuteBudgetAction" ::
                          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 ExecuteBudgetAction where
  toJSON :: ExecuteBudgetAction -> Value
toJSON ExecuteBudgetAction' {Text
ExecutionType
executionType :: ExecutionType
actionId :: Text
budgetName :: Text
accountId :: Text
$sel:executionType:ExecuteBudgetAction' :: ExecuteBudgetAction -> ExecutionType
$sel:actionId:ExecuteBudgetAction' :: ExecuteBudgetAction -> Text
$sel:budgetName:ExecuteBudgetAction' :: ExecuteBudgetAction -> Text
$sel:accountId:ExecuteBudgetAction' :: ExecuteBudgetAction -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ 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),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"BudgetName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
budgetName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ActionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
actionId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ExecutionType" Text -> ExecutionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ExecutionType
executionType)
          ]
      )

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

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

-- | /See:/ 'newExecuteBudgetActionResponse' smart constructor.
data ExecuteBudgetActionResponse = ExecuteBudgetActionResponse'
  { -- | The response's http status code.
    ExecuteBudgetActionResponse -> Int
httpStatus :: Prelude.Int,
    ExecuteBudgetActionResponse -> Text
accountId :: Prelude.Text,
    ExecuteBudgetActionResponse -> Text
budgetName :: Prelude.Text,
    -- | A system-generated universally unique identifier (UUID) for the action.
    ExecuteBudgetActionResponse -> Text
actionId :: Prelude.Text,
    -- | The type of execution.
    ExecuteBudgetActionResponse -> ExecutionType
executionType :: ExecutionType
  }
  deriving (ExecuteBudgetActionResponse -> ExecuteBudgetActionResponse -> Bool
(ExecuteBudgetActionResponse
 -> ExecuteBudgetActionResponse -> Bool)
-> (ExecuteBudgetActionResponse
    -> ExecuteBudgetActionResponse -> Bool)
-> Eq ExecuteBudgetActionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecuteBudgetActionResponse -> ExecuteBudgetActionResponse -> Bool
$c/= :: ExecuteBudgetActionResponse -> ExecuteBudgetActionResponse -> Bool
== :: ExecuteBudgetActionResponse -> ExecuteBudgetActionResponse -> Bool
$c== :: ExecuteBudgetActionResponse -> ExecuteBudgetActionResponse -> Bool
Prelude.Eq, ReadPrec [ExecuteBudgetActionResponse]
ReadPrec ExecuteBudgetActionResponse
Int -> ReadS ExecuteBudgetActionResponse
ReadS [ExecuteBudgetActionResponse]
(Int -> ReadS ExecuteBudgetActionResponse)
-> ReadS [ExecuteBudgetActionResponse]
-> ReadPrec ExecuteBudgetActionResponse
-> ReadPrec [ExecuteBudgetActionResponse]
-> Read ExecuteBudgetActionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExecuteBudgetActionResponse]
$creadListPrec :: ReadPrec [ExecuteBudgetActionResponse]
readPrec :: ReadPrec ExecuteBudgetActionResponse
$creadPrec :: ReadPrec ExecuteBudgetActionResponse
readList :: ReadS [ExecuteBudgetActionResponse]
$creadList :: ReadS [ExecuteBudgetActionResponse]
readsPrec :: Int -> ReadS ExecuteBudgetActionResponse
$creadsPrec :: Int -> ReadS ExecuteBudgetActionResponse
Prelude.Read, Int -> ExecuteBudgetActionResponse -> ShowS
[ExecuteBudgetActionResponse] -> ShowS
ExecuteBudgetActionResponse -> String
(Int -> ExecuteBudgetActionResponse -> ShowS)
-> (ExecuteBudgetActionResponse -> String)
-> ([ExecuteBudgetActionResponse] -> ShowS)
-> Show ExecuteBudgetActionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecuteBudgetActionResponse] -> ShowS
$cshowList :: [ExecuteBudgetActionResponse] -> ShowS
show :: ExecuteBudgetActionResponse -> String
$cshow :: ExecuteBudgetActionResponse -> String
showsPrec :: Int -> ExecuteBudgetActionResponse -> ShowS
$cshowsPrec :: Int -> ExecuteBudgetActionResponse -> ShowS
Prelude.Show, (forall x.
 ExecuteBudgetActionResponse -> Rep ExecuteBudgetActionResponse x)
-> (forall x.
    Rep ExecuteBudgetActionResponse x -> ExecuteBudgetActionResponse)
-> Generic ExecuteBudgetActionResponse
forall x.
Rep ExecuteBudgetActionResponse x -> ExecuteBudgetActionResponse
forall x.
ExecuteBudgetActionResponse -> Rep ExecuteBudgetActionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExecuteBudgetActionResponse x -> ExecuteBudgetActionResponse
$cfrom :: forall x.
ExecuteBudgetActionResponse -> Rep ExecuteBudgetActionResponse x
Prelude.Generic)

-- |
-- Create a value of 'ExecuteBudgetActionResponse' 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:
--
-- 'httpStatus', 'executeBudgetActionResponse_httpStatus' - The response's http status code.
--
-- 'accountId', 'executeBudgetActionResponse_accountId' - Undocumented member.
--
-- 'budgetName', 'executeBudgetActionResponse_budgetName' - Undocumented member.
--
-- 'actionId', 'executeBudgetActionResponse_actionId' - A system-generated universally unique identifier (UUID) for the action.
--
-- 'executionType', 'executeBudgetActionResponse_executionType' - The type of execution.
newExecuteBudgetActionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'accountId'
  Prelude.Text ->
  -- | 'budgetName'
  Prelude.Text ->
  -- | 'actionId'
  Prelude.Text ->
  -- | 'executionType'
  ExecutionType ->
  ExecuteBudgetActionResponse
newExecuteBudgetActionResponse :: Int
-> Text
-> Text
-> Text
-> ExecutionType
-> ExecuteBudgetActionResponse
newExecuteBudgetActionResponse
  Int
pHttpStatus_
  Text
pAccountId_
  Text
pBudgetName_
  Text
pActionId_
  ExecutionType
pExecutionType_ =
    ExecuteBudgetActionResponse' :: Int
-> Text
-> Text
-> Text
-> ExecutionType
-> ExecuteBudgetActionResponse
ExecuteBudgetActionResponse'
      { $sel:httpStatus:ExecuteBudgetActionResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:accountId:ExecuteBudgetActionResponse' :: Text
accountId = Text
pAccountId_,
        $sel:budgetName:ExecuteBudgetActionResponse' :: Text
budgetName = Text
pBudgetName_,
        $sel:actionId:ExecuteBudgetActionResponse' :: Text
actionId = Text
pActionId_,
        $sel:executionType:ExecuteBudgetActionResponse' :: ExecutionType
executionType = ExecutionType
pExecutionType_
      }

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

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

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

-- | A system-generated universally unique identifier (UUID) for the action.
executeBudgetActionResponse_actionId :: Lens.Lens' ExecuteBudgetActionResponse Prelude.Text
executeBudgetActionResponse_actionId :: (Text -> f Text)
-> ExecuteBudgetActionResponse -> f ExecuteBudgetActionResponse
executeBudgetActionResponse_actionId = (ExecuteBudgetActionResponse -> Text)
-> (ExecuteBudgetActionResponse
    -> Text -> ExecuteBudgetActionResponse)
-> Lens
     ExecuteBudgetActionResponse ExecuteBudgetActionResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecuteBudgetActionResponse' {Text
actionId :: Text
$sel:actionId:ExecuteBudgetActionResponse' :: ExecuteBudgetActionResponse -> Text
actionId} -> Text
actionId) (\s :: ExecuteBudgetActionResponse
s@ExecuteBudgetActionResponse' {} Text
a -> ExecuteBudgetActionResponse
s {$sel:actionId:ExecuteBudgetActionResponse' :: Text
actionId = Text
a} :: ExecuteBudgetActionResponse)

-- | The type of execution.
executeBudgetActionResponse_executionType :: Lens.Lens' ExecuteBudgetActionResponse ExecutionType
executeBudgetActionResponse_executionType :: (ExecutionType -> f ExecutionType)
-> ExecuteBudgetActionResponse -> f ExecuteBudgetActionResponse
executeBudgetActionResponse_executionType = (ExecuteBudgetActionResponse -> ExecutionType)
-> (ExecuteBudgetActionResponse
    -> ExecutionType -> ExecuteBudgetActionResponse)
-> Lens
     ExecuteBudgetActionResponse
     ExecuteBudgetActionResponse
     ExecutionType
     ExecutionType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecuteBudgetActionResponse' {ExecutionType
executionType :: ExecutionType
$sel:executionType:ExecuteBudgetActionResponse' :: ExecuteBudgetActionResponse -> ExecutionType
executionType} -> ExecutionType
executionType) (\s :: ExecuteBudgetActionResponse
s@ExecuteBudgetActionResponse' {} ExecutionType
a -> ExecuteBudgetActionResponse
s {$sel:executionType:ExecuteBudgetActionResponse' :: ExecutionType
executionType = ExecutionType
a} :: ExecuteBudgetActionResponse)

instance Prelude.NFData ExecuteBudgetActionResponse