{-# 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.SSM.Types.MaintenanceWindowTaskInvocationParameters 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
import Amazonka.SSM.Types.MaintenanceWindowAutomationParameters
import Amazonka.SSM.Types.MaintenanceWindowLambdaParameters
import Amazonka.SSM.Types.MaintenanceWindowRunCommandParameters
import Amazonka.SSM.Types.MaintenanceWindowStepFunctionsParameters
data MaintenanceWindowTaskInvocationParameters = MaintenanceWindowTaskInvocationParameters'
{
MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowAutomationParameters
automation :: Prelude.Maybe MaintenanceWindowAutomationParameters,
MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowLambdaParameters
lambda :: Prelude.Maybe MaintenanceWindowLambdaParameters,
MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowRunCommandParameters
runCommand :: Prelude.Maybe MaintenanceWindowRunCommandParameters,
MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowStepFunctionsParameters
stepFunctions :: Prelude.Maybe MaintenanceWindowStepFunctionsParameters
}
deriving (MaintenanceWindowTaskInvocationParameters
-> MaintenanceWindowTaskInvocationParameters -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MaintenanceWindowTaskInvocationParameters
-> MaintenanceWindowTaskInvocationParameters -> Bool
$c/= :: MaintenanceWindowTaskInvocationParameters
-> MaintenanceWindowTaskInvocationParameters -> Bool
== :: MaintenanceWindowTaskInvocationParameters
-> MaintenanceWindowTaskInvocationParameters -> Bool
$c== :: MaintenanceWindowTaskInvocationParameters
-> MaintenanceWindowTaskInvocationParameters -> Bool
Prelude.Eq, Int -> MaintenanceWindowTaskInvocationParameters -> ShowS
[MaintenanceWindowTaskInvocationParameters] -> ShowS
MaintenanceWindowTaskInvocationParameters -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MaintenanceWindowTaskInvocationParameters] -> ShowS
$cshowList :: [MaintenanceWindowTaskInvocationParameters] -> ShowS
show :: MaintenanceWindowTaskInvocationParameters -> String
$cshow :: MaintenanceWindowTaskInvocationParameters -> String
showsPrec :: Int -> MaintenanceWindowTaskInvocationParameters -> ShowS
$cshowsPrec :: Int -> MaintenanceWindowTaskInvocationParameters -> ShowS
Prelude.Show, forall x.
Rep MaintenanceWindowTaskInvocationParameters x
-> MaintenanceWindowTaskInvocationParameters
forall x.
MaintenanceWindowTaskInvocationParameters
-> Rep MaintenanceWindowTaskInvocationParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MaintenanceWindowTaskInvocationParameters x
-> MaintenanceWindowTaskInvocationParameters
$cfrom :: forall x.
MaintenanceWindowTaskInvocationParameters
-> Rep MaintenanceWindowTaskInvocationParameters x
Prelude.Generic)
newMaintenanceWindowTaskInvocationParameters ::
MaintenanceWindowTaskInvocationParameters
newMaintenanceWindowTaskInvocationParameters :: MaintenanceWindowTaskInvocationParameters
newMaintenanceWindowTaskInvocationParameters =
MaintenanceWindowTaskInvocationParameters'
{ $sel:automation:MaintenanceWindowTaskInvocationParameters' :: Maybe MaintenanceWindowAutomationParameters
automation =
forall a. Maybe a
Prelude.Nothing,
$sel:lambda:MaintenanceWindowTaskInvocationParameters' :: Maybe MaintenanceWindowLambdaParameters
lambda = forall a. Maybe a
Prelude.Nothing,
$sel:runCommand:MaintenanceWindowTaskInvocationParameters' :: Maybe MaintenanceWindowRunCommandParameters
runCommand = forall a. Maybe a
Prelude.Nothing,
$sel:stepFunctions:MaintenanceWindowTaskInvocationParameters' :: Maybe MaintenanceWindowStepFunctionsParameters
stepFunctions = forall a. Maybe a
Prelude.Nothing
}
maintenanceWindowTaskInvocationParameters_automation :: Lens.Lens' MaintenanceWindowTaskInvocationParameters (Prelude.Maybe MaintenanceWindowAutomationParameters)
maintenanceWindowTaskInvocationParameters_automation :: Lens'
MaintenanceWindowTaskInvocationParameters
(Maybe MaintenanceWindowAutomationParameters)
maintenanceWindowTaskInvocationParameters_automation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTaskInvocationParameters' {Maybe MaintenanceWindowAutomationParameters
automation :: Maybe MaintenanceWindowAutomationParameters
$sel:automation:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowAutomationParameters
automation} -> Maybe MaintenanceWindowAutomationParameters
automation) (\s :: MaintenanceWindowTaskInvocationParameters
s@MaintenanceWindowTaskInvocationParameters' {} Maybe MaintenanceWindowAutomationParameters
a -> MaintenanceWindowTaskInvocationParameters
s {$sel:automation:MaintenanceWindowTaskInvocationParameters' :: Maybe MaintenanceWindowAutomationParameters
automation = Maybe MaintenanceWindowAutomationParameters
a} :: MaintenanceWindowTaskInvocationParameters)
maintenanceWindowTaskInvocationParameters_lambda :: Lens.Lens' MaintenanceWindowTaskInvocationParameters (Prelude.Maybe MaintenanceWindowLambdaParameters)
maintenanceWindowTaskInvocationParameters_lambda :: Lens'
MaintenanceWindowTaskInvocationParameters
(Maybe MaintenanceWindowLambdaParameters)
maintenanceWindowTaskInvocationParameters_lambda = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTaskInvocationParameters' {Maybe MaintenanceWindowLambdaParameters
lambda :: Maybe MaintenanceWindowLambdaParameters
$sel:lambda:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowLambdaParameters
lambda} -> Maybe MaintenanceWindowLambdaParameters
lambda) (\s :: MaintenanceWindowTaskInvocationParameters
s@MaintenanceWindowTaskInvocationParameters' {} Maybe MaintenanceWindowLambdaParameters
a -> MaintenanceWindowTaskInvocationParameters
s {$sel:lambda:MaintenanceWindowTaskInvocationParameters' :: Maybe MaintenanceWindowLambdaParameters
lambda = Maybe MaintenanceWindowLambdaParameters
a} :: MaintenanceWindowTaskInvocationParameters)
maintenanceWindowTaskInvocationParameters_runCommand :: Lens.Lens' MaintenanceWindowTaskInvocationParameters (Prelude.Maybe MaintenanceWindowRunCommandParameters)
maintenanceWindowTaskInvocationParameters_runCommand :: Lens'
MaintenanceWindowTaskInvocationParameters
(Maybe MaintenanceWindowRunCommandParameters)
maintenanceWindowTaskInvocationParameters_runCommand = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTaskInvocationParameters' {Maybe MaintenanceWindowRunCommandParameters
runCommand :: Maybe MaintenanceWindowRunCommandParameters
$sel:runCommand:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowRunCommandParameters
runCommand} -> Maybe MaintenanceWindowRunCommandParameters
runCommand) (\s :: MaintenanceWindowTaskInvocationParameters
s@MaintenanceWindowTaskInvocationParameters' {} Maybe MaintenanceWindowRunCommandParameters
a -> MaintenanceWindowTaskInvocationParameters
s {$sel:runCommand:MaintenanceWindowTaskInvocationParameters' :: Maybe MaintenanceWindowRunCommandParameters
runCommand = Maybe MaintenanceWindowRunCommandParameters
a} :: MaintenanceWindowTaskInvocationParameters)
maintenanceWindowTaskInvocationParameters_stepFunctions :: Lens.Lens' MaintenanceWindowTaskInvocationParameters (Prelude.Maybe MaintenanceWindowStepFunctionsParameters)
maintenanceWindowTaskInvocationParameters_stepFunctions :: Lens'
MaintenanceWindowTaskInvocationParameters
(Maybe MaintenanceWindowStepFunctionsParameters)
maintenanceWindowTaskInvocationParameters_stepFunctions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTaskInvocationParameters' {Maybe MaintenanceWindowStepFunctionsParameters
stepFunctions :: Maybe MaintenanceWindowStepFunctionsParameters
$sel:stepFunctions:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowStepFunctionsParameters
stepFunctions} -> Maybe MaintenanceWindowStepFunctionsParameters
stepFunctions) (\s :: MaintenanceWindowTaskInvocationParameters
s@MaintenanceWindowTaskInvocationParameters' {} Maybe MaintenanceWindowStepFunctionsParameters
a -> MaintenanceWindowTaskInvocationParameters
s {$sel:stepFunctions:MaintenanceWindowTaskInvocationParameters' :: Maybe MaintenanceWindowStepFunctionsParameters
stepFunctions = Maybe MaintenanceWindowStepFunctionsParameters
a} :: MaintenanceWindowTaskInvocationParameters)
instance
Data.FromJSON
MaintenanceWindowTaskInvocationParameters
where
parseJSON :: Value -> Parser MaintenanceWindowTaskInvocationParameters
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MaintenanceWindowTaskInvocationParameters"
( \Object
x ->
Maybe MaintenanceWindowAutomationParameters
-> Maybe MaintenanceWindowLambdaParameters
-> Maybe MaintenanceWindowRunCommandParameters
-> Maybe MaintenanceWindowStepFunctionsParameters
-> MaintenanceWindowTaskInvocationParameters
MaintenanceWindowTaskInvocationParameters'
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
"Automation")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Lambda")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RunCommand")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StepFunctions")
)
instance
Prelude.Hashable
MaintenanceWindowTaskInvocationParameters
where
hashWithSalt :: Int -> MaintenanceWindowTaskInvocationParameters -> Int
hashWithSalt
Int
_salt
MaintenanceWindowTaskInvocationParameters' {Maybe MaintenanceWindowAutomationParameters
Maybe MaintenanceWindowLambdaParameters
Maybe MaintenanceWindowStepFunctionsParameters
Maybe MaintenanceWindowRunCommandParameters
stepFunctions :: Maybe MaintenanceWindowStepFunctionsParameters
runCommand :: Maybe MaintenanceWindowRunCommandParameters
lambda :: Maybe MaintenanceWindowLambdaParameters
automation :: Maybe MaintenanceWindowAutomationParameters
$sel:stepFunctions:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowStepFunctionsParameters
$sel:runCommand:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowRunCommandParameters
$sel:lambda:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowLambdaParameters
$sel:automation:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowAutomationParameters
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MaintenanceWindowAutomationParameters
automation
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MaintenanceWindowLambdaParameters
lambda
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MaintenanceWindowRunCommandParameters
runCommand
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MaintenanceWindowStepFunctionsParameters
stepFunctions
instance
Prelude.NFData
MaintenanceWindowTaskInvocationParameters
where
rnf :: MaintenanceWindowTaskInvocationParameters -> ()
rnf MaintenanceWindowTaskInvocationParameters' {Maybe MaintenanceWindowAutomationParameters
Maybe MaintenanceWindowLambdaParameters
Maybe MaintenanceWindowStepFunctionsParameters
Maybe MaintenanceWindowRunCommandParameters
stepFunctions :: Maybe MaintenanceWindowStepFunctionsParameters
runCommand :: Maybe MaintenanceWindowRunCommandParameters
lambda :: Maybe MaintenanceWindowLambdaParameters
automation :: Maybe MaintenanceWindowAutomationParameters
$sel:stepFunctions:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowStepFunctionsParameters
$sel:runCommand:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowRunCommandParameters
$sel:lambda:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowLambdaParameters
$sel:automation:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowAutomationParameters
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe MaintenanceWindowAutomationParameters
automation
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MaintenanceWindowLambdaParameters
lambda
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MaintenanceWindowRunCommandParameters
runCommand
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MaintenanceWindowStepFunctionsParameters
stepFunctions
instance
Data.ToJSON
MaintenanceWindowTaskInvocationParameters
where
toJSON :: MaintenanceWindowTaskInvocationParameters -> Value
toJSON MaintenanceWindowTaskInvocationParameters' {Maybe MaintenanceWindowAutomationParameters
Maybe MaintenanceWindowLambdaParameters
Maybe MaintenanceWindowStepFunctionsParameters
Maybe MaintenanceWindowRunCommandParameters
stepFunctions :: Maybe MaintenanceWindowStepFunctionsParameters
runCommand :: Maybe MaintenanceWindowRunCommandParameters
lambda :: Maybe MaintenanceWindowLambdaParameters
automation :: Maybe MaintenanceWindowAutomationParameters
$sel:stepFunctions:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowStepFunctionsParameters
$sel:runCommand:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowRunCommandParameters
$sel:lambda:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowLambdaParameters
$sel:automation:MaintenanceWindowTaskInvocationParameters' :: MaintenanceWindowTaskInvocationParameters
-> Maybe MaintenanceWindowAutomationParameters
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Automation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MaintenanceWindowAutomationParameters
automation,
(Key
"Lambda" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MaintenanceWindowLambdaParameters
lambda,
(Key
"RunCommand" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MaintenanceWindowRunCommandParameters
runCommand,
(Key
"StepFunctions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MaintenanceWindowStepFunctionsParameters
stepFunctions
]
)