{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Budgets.Types.ActionHistoryDetails where
import Amazonka.Budgets.Types.Action
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ActionHistoryDetails = ActionHistoryDetails'
{ ActionHistoryDetails -> Text
message :: Prelude.Text,
ActionHistoryDetails -> Action
action :: Action
}
deriving (ActionHistoryDetails -> ActionHistoryDetails -> Bool
(ActionHistoryDetails -> ActionHistoryDetails -> Bool)
-> (ActionHistoryDetails -> ActionHistoryDetails -> Bool)
-> Eq ActionHistoryDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActionHistoryDetails -> ActionHistoryDetails -> Bool
$c/= :: ActionHistoryDetails -> ActionHistoryDetails -> Bool
== :: ActionHistoryDetails -> ActionHistoryDetails -> Bool
$c== :: ActionHistoryDetails -> ActionHistoryDetails -> Bool
Prelude.Eq, Int -> ActionHistoryDetails -> ShowS
[ActionHistoryDetails] -> ShowS
ActionHistoryDetails -> String
(Int -> ActionHistoryDetails -> ShowS)
-> (ActionHistoryDetails -> String)
-> ([ActionHistoryDetails] -> ShowS)
-> Show ActionHistoryDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActionHistoryDetails] -> ShowS
$cshowList :: [ActionHistoryDetails] -> ShowS
show :: ActionHistoryDetails -> String
$cshow :: ActionHistoryDetails -> String
showsPrec :: Int -> ActionHistoryDetails -> ShowS
$cshowsPrec :: Int -> ActionHistoryDetails -> ShowS
Prelude.Show, (forall x. ActionHistoryDetails -> Rep ActionHistoryDetails x)
-> (forall x. Rep ActionHistoryDetails x -> ActionHistoryDetails)
-> Generic ActionHistoryDetails
forall x. Rep ActionHistoryDetails x -> ActionHistoryDetails
forall x. ActionHistoryDetails -> Rep ActionHistoryDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ActionHistoryDetails x -> ActionHistoryDetails
$cfrom :: forall x. ActionHistoryDetails -> Rep ActionHistoryDetails x
Prelude.Generic)
newActionHistoryDetails ::
Prelude.Text ->
Action ->
ActionHistoryDetails
newActionHistoryDetails :: Text -> Action -> ActionHistoryDetails
newActionHistoryDetails Text
pMessage_ Action
pAction_ =
ActionHistoryDetails' :: Text -> Action -> ActionHistoryDetails
ActionHistoryDetails'
{ $sel:message:ActionHistoryDetails' :: Text
message = Text
pMessage_,
$sel:action:ActionHistoryDetails' :: Action
action = Action
pAction_
}
actionHistoryDetails_message :: Lens.Lens' ActionHistoryDetails Prelude.Text
actionHistoryDetails_message :: (Text -> f Text) -> ActionHistoryDetails -> f ActionHistoryDetails
actionHistoryDetails_message = (ActionHistoryDetails -> Text)
-> (ActionHistoryDetails -> Text -> ActionHistoryDetails)
-> Lens ActionHistoryDetails ActionHistoryDetails Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionHistoryDetails' {Text
message :: Text
$sel:message:ActionHistoryDetails' :: ActionHistoryDetails -> Text
message} -> Text
message) (\s :: ActionHistoryDetails
s@ActionHistoryDetails' {} Text
a -> ActionHistoryDetails
s {$sel:message:ActionHistoryDetails' :: Text
message = Text
a} :: ActionHistoryDetails)
actionHistoryDetails_action :: Lens.Lens' ActionHistoryDetails Action
actionHistoryDetails_action :: (Action -> f Action)
-> ActionHistoryDetails -> f ActionHistoryDetails
actionHistoryDetails_action = (ActionHistoryDetails -> Action)
-> (ActionHistoryDetails -> Action -> ActionHistoryDetails)
-> Lens ActionHistoryDetails ActionHistoryDetails Action Action
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionHistoryDetails' {Action
action :: Action
$sel:action:ActionHistoryDetails' :: ActionHistoryDetails -> Action
action} -> Action
action) (\s :: ActionHistoryDetails
s@ActionHistoryDetails' {} Action
a -> ActionHistoryDetails
s {$sel:action:ActionHistoryDetails' :: Action
action = Action
a} :: ActionHistoryDetails)
instance Core.FromJSON ActionHistoryDetails where
parseJSON :: Value -> Parser ActionHistoryDetails
parseJSON =
String
-> (Object -> Parser ActionHistoryDetails)
-> Value
-> Parser ActionHistoryDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ActionHistoryDetails"
( \Object
x ->
Text -> Action -> ActionHistoryDetails
ActionHistoryDetails'
(Text -> Action -> ActionHistoryDetails)
-> Parser Text -> Parser (Action -> ActionHistoryDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Message")
Parser (Action -> ActionHistoryDetails)
-> Parser Action -> Parser ActionHistoryDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Action
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Action")
)
instance Prelude.Hashable ActionHistoryDetails
instance Prelude.NFData ActionHistoryDetails