{-# 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.SSMIncidents.Types.AutomationExecution where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AutomationExecution = AutomationExecution'
{
AutomationExecution -> Maybe Text
ssmExecutionArn :: Prelude.Maybe Prelude.Text
}
deriving (AutomationExecution -> AutomationExecution -> Bool
(AutomationExecution -> AutomationExecution -> Bool)
-> (AutomationExecution -> AutomationExecution -> Bool)
-> Eq AutomationExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutomationExecution -> AutomationExecution -> Bool
$c/= :: AutomationExecution -> AutomationExecution -> Bool
== :: AutomationExecution -> AutomationExecution -> Bool
$c== :: AutomationExecution -> AutomationExecution -> Bool
Prelude.Eq, ReadPrec [AutomationExecution]
ReadPrec AutomationExecution
Int -> ReadS AutomationExecution
ReadS [AutomationExecution]
(Int -> ReadS AutomationExecution)
-> ReadS [AutomationExecution]
-> ReadPrec AutomationExecution
-> ReadPrec [AutomationExecution]
-> Read AutomationExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AutomationExecution]
$creadListPrec :: ReadPrec [AutomationExecution]
readPrec :: ReadPrec AutomationExecution
$creadPrec :: ReadPrec AutomationExecution
readList :: ReadS [AutomationExecution]
$creadList :: ReadS [AutomationExecution]
readsPrec :: Int -> ReadS AutomationExecution
$creadsPrec :: Int -> ReadS AutomationExecution
Prelude.Read, Int -> AutomationExecution -> ShowS
[AutomationExecution] -> ShowS
AutomationExecution -> String
(Int -> AutomationExecution -> ShowS)
-> (AutomationExecution -> String)
-> ([AutomationExecution] -> ShowS)
-> Show AutomationExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutomationExecution] -> ShowS
$cshowList :: [AutomationExecution] -> ShowS
show :: AutomationExecution -> String
$cshow :: AutomationExecution -> String
showsPrec :: Int -> AutomationExecution -> ShowS
$cshowsPrec :: Int -> AutomationExecution -> ShowS
Prelude.Show, (forall x. AutomationExecution -> Rep AutomationExecution x)
-> (forall x. Rep AutomationExecution x -> AutomationExecution)
-> Generic AutomationExecution
forall x. Rep AutomationExecution x -> AutomationExecution
forall x. AutomationExecution -> Rep AutomationExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AutomationExecution x -> AutomationExecution
$cfrom :: forall x. AutomationExecution -> Rep AutomationExecution x
Prelude.Generic)
newAutomationExecution ::
AutomationExecution
newAutomationExecution :: AutomationExecution
newAutomationExecution =
AutomationExecution' :: Maybe Text -> AutomationExecution
AutomationExecution'
{ $sel:ssmExecutionArn:AutomationExecution' :: Maybe Text
ssmExecutionArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
automationExecution_ssmExecutionArn :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_ssmExecutionArn :: (Maybe Text -> f (Maybe Text))
-> AutomationExecution -> f AutomationExecution
automationExecution_ssmExecutionArn = (AutomationExecution -> Maybe Text)
-> (AutomationExecution -> Maybe Text -> AutomationExecution)
-> Lens
AutomationExecution AutomationExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutomationExecution' {Maybe Text
ssmExecutionArn :: Maybe Text
$sel:ssmExecutionArn:AutomationExecution' :: AutomationExecution -> Maybe Text
ssmExecutionArn} -> Maybe Text
ssmExecutionArn) (\s :: AutomationExecution
s@AutomationExecution' {} Maybe Text
a -> AutomationExecution
s {$sel:ssmExecutionArn:AutomationExecution' :: Maybe Text
ssmExecutionArn = Maybe Text
a} :: AutomationExecution)
instance Core.FromJSON AutomationExecution where
parseJSON :: Value -> Parser AutomationExecution
parseJSON =
String
-> (Object -> Parser AutomationExecution)
-> Value
-> Parser AutomationExecution
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AutomationExecution"
( \Object
x ->
Maybe Text -> AutomationExecution
AutomationExecution'
(Maybe Text -> AutomationExecution)
-> Parser (Maybe Text) -> Parser AutomationExecution
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ssmExecutionArn")
)
instance Prelude.Hashable AutomationExecution
instance Prelude.NFData AutomationExecution