{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data AutomationExecution = AutomationExecution'
{
AutomationExecution -> Maybe Text
ssmExecutionArn :: Prelude.Maybe Prelude.Text
}
deriving (AutomationExecution -> AutomationExecution -> Bool
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]
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
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. 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'
{ $sel:ssmExecutionArn:AutomationExecution' :: Maybe Text
ssmExecutionArn =
forall a. Maybe a
Prelude.Nothing
}
automationExecution_ssmExecutionArn :: Lens.Lens' AutomationExecution (Prelude.Maybe Prelude.Text)
automationExecution_ssmExecutionArn :: Lens' AutomationExecution (Maybe Text)
automationExecution_ssmExecutionArn = 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 Data.FromJSON AutomationExecution where
parseJSON :: Value -> Parser AutomationExecution
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AutomationExecution"
( \Object
x ->
Maybe Text -> AutomationExecution
AutomationExecution'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ssmExecutionArn")
)
instance Prelude.Hashable AutomationExecution where
hashWithSalt :: Int -> AutomationExecution -> Int
hashWithSalt Int
_salt AutomationExecution' {Maybe Text
ssmExecutionArn :: Maybe Text
$sel:ssmExecutionArn:AutomationExecution' :: AutomationExecution -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ssmExecutionArn
instance Prelude.NFData AutomationExecution where
rnf :: AutomationExecution -> ()
rnf AutomationExecution' {Maybe Text
ssmExecutionArn :: Maybe Text
$sel:ssmExecutionArn:AutomationExecution' :: AutomationExecution -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ssmExecutionArn