{-# 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.Config.Types.RemediationConfiguration where
import Amazonka.Config.Types.ExecutionControls
import Amazonka.Config.Types.RemediationParameterValue
import Amazonka.Config.Types.RemediationTargetType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RemediationConfiguration = RemediationConfiguration'
{
RemediationConfiguration -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
RemediationConfiguration -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
RemediationConfiguration -> Maybe Bool
automatic :: Prelude.Maybe Prelude.Bool,
RemediationConfiguration -> Maybe Text
createdByService :: Prelude.Maybe Prelude.Text,
RemediationConfiguration -> Maybe Natural
retryAttemptSeconds :: Prelude.Maybe Prelude.Natural,
RemediationConfiguration -> Maybe ExecutionControls
executionControls :: Prelude.Maybe ExecutionControls,
RemediationConfiguration
-> Maybe (HashMap Text RemediationParameterValue)
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text RemediationParameterValue),
RemediationConfiguration -> Maybe Natural
maximumAutomaticAttempts :: Prelude.Maybe Prelude.Natural,
RemediationConfiguration -> Maybe Text
targetVersion :: Prelude.Maybe Prelude.Text,
RemediationConfiguration -> Text
configRuleName :: Prelude.Text,
RemediationConfiguration -> RemediationTargetType
targetType :: RemediationTargetType,
RemediationConfiguration -> Text
targetId :: Prelude.Text
}
deriving (RemediationConfiguration -> RemediationConfiguration -> Bool
(RemediationConfiguration -> RemediationConfiguration -> Bool)
-> (RemediationConfiguration -> RemediationConfiguration -> Bool)
-> Eq RemediationConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemediationConfiguration -> RemediationConfiguration -> Bool
$c/= :: RemediationConfiguration -> RemediationConfiguration -> Bool
== :: RemediationConfiguration -> RemediationConfiguration -> Bool
$c== :: RemediationConfiguration -> RemediationConfiguration -> Bool
Prelude.Eq, ReadPrec [RemediationConfiguration]
ReadPrec RemediationConfiguration
Int -> ReadS RemediationConfiguration
ReadS [RemediationConfiguration]
(Int -> ReadS RemediationConfiguration)
-> ReadS [RemediationConfiguration]
-> ReadPrec RemediationConfiguration
-> ReadPrec [RemediationConfiguration]
-> Read RemediationConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemediationConfiguration]
$creadListPrec :: ReadPrec [RemediationConfiguration]
readPrec :: ReadPrec RemediationConfiguration
$creadPrec :: ReadPrec RemediationConfiguration
readList :: ReadS [RemediationConfiguration]
$creadList :: ReadS [RemediationConfiguration]
readsPrec :: Int -> ReadS RemediationConfiguration
$creadsPrec :: Int -> ReadS RemediationConfiguration
Prelude.Read, Int -> RemediationConfiguration -> ShowS
[RemediationConfiguration] -> ShowS
RemediationConfiguration -> String
(Int -> RemediationConfiguration -> ShowS)
-> (RemediationConfiguration -> String)
-> ([RemediationConfiguration] -> ShowS)
-> Show RemediationConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemediationConfiguration] -> ShowS
$cshowList :: [RemediationConfiguration] -> ShowS
show :: RemediationConfiguration -> String
$cshow :: RemediationConfiguration -> String
showsPrec :: Int -> RemediationConfiguration -> ShowS
$cshowsPrec :: Int -> RemediationConfiguration -> ShowS
Prelude.Show, (forall x.
RemediationConfiguration -> Rep RemediationConfiguration x)
-> (forall x.
Rep RemediationConfiguration x -> RemediationConfiguration)
-> Generic RemediationConfiguration
forall x.
Rep RemediationConfiguration x -> RemediationConfiguration
forall x.
RemediationConfiguration -> Rep RemediationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemediationConfiguration x -> RemediationConfiguration
$cfrom :: forall x.
RemediationConfiguration -> Rep RemediationConfiguration x
Prelude.Generic)
newRemediationConfiguration ::
Prelude.Text ->
RemediationTargetType ->
Prelude.Text ->
RemediationConfiguration
newRemediationConfiguration :: Text -> RemediationTargetType -> Text -> RemediationConfiguration
newRemediationConfiguration
Text
pConfigRuleName_
RemediationTargetType
pTargetType_
Text
pTargetId_ =
RemediationConfiguration' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Natural
-> Maybe ExecutionControls
-> Maybe (HashMap Text RemediationParameterValue)
-> Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration
RemediationConfiguration'
{ $sel:resourceType:RemediationConfiguration' :: Maybe Text
resourceType =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:RemediationConfiguration' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:automatic:RemediationConfiguration' :: Maybe Bool
automatic = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:createdByService:RemediationConfiguration' :: Maybe Text
createdByService = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:retryAttemptSeconds:RemediationConfiguration' :: Maybe Natural
retryAttemptSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:executionControls:RemediationConfiguration' :: Maybe ExecutionControls
executionControls = Maybe ExecutionControls
forall a. Maybe a
Prelude.Nothing,
$sel:parameters:RemediationConfiguration' :: Maybe (HashMap Text RemediationParameterValue)
parameters = Maybe (HashMap Text RemediationParameterValue)
forall a. Maybe a
Prelude.Nothing,
$sel:maximumAutomaticAttempts:RemediationConfiguration' :: Maybe Natural
maximumAutomaticAttempts = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:targetVersion:RemediationConfiguration' :: Maybe Text
targetVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:configRuleName:RemediationConfiguration' :: Text
configRuleName = Text
pConfigRuleName_,
$sel:targetType:RemediationConfiguration' :: RemediationTargetType
targetType = RemediationTargetType
pTargetType_,
$sel:targetId:RemediationConfiguration' :: Text
targetId = Text
pTargetId_
}
remediationConfiguration_resourceType :: Lens.Lens' RemediationConfiguration (Prelude.Maybe Prelude.Text)
remediationConfiguration_resourceType :: (Maybe Text -> f (Maybe Text))
-> RemediationConfiguration -> f RemediationConfiguration
remediationConfiguration_resourceType = (RemediationConfiguration -> Maybe Text)
-> (RemediationConfiguration
-> Maybe Text -> RemediationConfiguration)
-> Lens
RemediationConfiguration
RemediationConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationConfiguration' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:RemediationConfiguration' :: RemediationConfiguration -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: RemediationConfiguration
s@RemediationConfiguration' {} Maybe Text
a -> RemediationConfiguration
s {$sel:resourceType:RemediationConfiguration' :: Maybe Text
resourceType = Maybe Text
a} :: RemediationConfiguration)
remediationConfiguration_arn :: Lens.Lens' RemediationConfiguration (Prelude.Maybe Prelude.Text)
remediationConfiguration_arn :: (Maybe Text -> f (Maybe Text))
-> RemediationConfiguration -> f RemediationConfiguration
remediationConfiguration_arn = (RemediationConfiguration -> Maybe Text)
-> (RemediationConfiguration
-> Maybe Text -> RemediationConfiguration)
-> Lens
RemediationConfiguration
RemediationConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationConfiguration' {Maybe Text
arn :: Maybe Text
$sel:arn:RemediationConfiguration' :: RemediationConfiguration -> Maybe Text
arn} -> Maybe Text
arn) (\s :: RemediationConfiguration
s@RemediationConfiguration' {} Maybe Text
a -> RemediationConfiguration
s {$sel:arn:RemediationConfiguration' :: Maybe Text
arn = Maybe Text
a} :: RemediationConfiguration)
remediationConfiguration_automatic :: Lens.Lens' RemediationConfiguration (Prelude.Maybe Prelude.Bool)
remediationConfiguration_automatic :: (Maybe Bool -> f (Maybe Bool))
-> RemediationConfiguration -> f RemediationConfiguration
remediationConfiguration_automatic = (RemediationConfiguration -> Maybe Bool)
-> (RemediationConfiguration
-> Maybe Bool -> RemediationConfiguration)
-> Lens
RemediationConfiguration
RemediationConfiguration
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationConfiguration' {Maybe Bool
automatic :: Maybe Bool
$sel:automatic:RemediationConfiguration' :: RemediationConfiguration -> Maybe Bool
automatic} -> Maybe Bool
automatic) (\s :: RemediationConfiguration
s@RemediationConfiguration' {} Maybe Bool
a -> RemediationConfiguration
s {$sel:automatic:RemediationConfiguration' :: Maybe Bool
automatic = Maybe Bool
a} :: RemediationConfiguration)
remediationConfiguration_createdByService :: Lens.Lens' RemediationConfiguration (Prelude.Maybe Prelude.Text)
remediationConfiguration_createdByService :: (Maybe Text -> f (Maybe Text))
-> RemediationConfiguration -> f RemediationConfiguration
remediationConfiguration_createdByService = (RemediationConfiguration -> Maybe Text)
-> (RemediationConfiguration
-> Maybe Text -> RemediationConfiguration)
-> Lens
RemediationConfiguration
RemediationConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationConfiguration' {Maybe Text
createdByService :: Maybe Text
$sel:createdByService:RemediationConfiguration' :: RemediationConfiguration -> Maybe Text
createdByService} -> Maybe Text
createdByService) (\s :: RemediationConfiguration
s@RemediationConfiguration' {} Maybe Text
a -> RemediationConfiguration
s {$sel:createdByService:RemediationConfiguration' :: Maybe Text
createdByService = Maybe Text
a} :: RemediationConfiguration)
remediationConfiguration_retryAttemptSeconds :: Lens.Lens' RemediationConfiguration (Prelude.Maybe Prelude.Natural)
remediationConfiguration_retryAttemptSeconds :: (Maybe Natural -> f (Maybe Natural))
-> RemediationConfiguration -> f RemediationConfiguration
remediationConfiguration_retryAttemptSeconds = (RemediationConfiguration -> Maybe Natural)
-> (RemediationConfiguration
-> Maybe Natural -> RemediationConfiguration)
-> Lens
RemediationConfiguration
RemediationConfiguration
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationConfiguration' {Maybe Natural
retryAttemptSeconds :: Maybe Natural
$sel:retryAttemptSeconds:RemediationConfiguration' :: RemediationConfiguration -> Maybe Natural
retryAttemptSeconds} -> Maybe Natural
retryAttemptSeconds) (\s :: RemediationConfiguration
s@RemediationConfiguration' {} Maybe Natural
a -> RemediationConfiguration
s {$sel:retryAttemptSeconds:RemediationConfiguration' :: Maybe Natural
retryAttemptSeconds = Maybe Natural
a} :: RemediationConfiguration)
remediationConfiguration_executionControls :: Lens.Lens' RemediationConfiguration (Prelude.Maybe ExecutionControls)
remediationConfiguration_executionControls :: (Maybe ExecutionControls -> f (Maybe ExecutionControls))
-> RemediationConfiguration -> f RemediationConfiguration
remediationConfiguration_executionControls = (RemediationConfiguration -> Maybe ExecutionControls)
-> (RemediationConfiguration
-> Maybe ExecutionControls -> RemediationConfiguration)
-> Lens
RemediationConfiguration
RemediationConfiguration
(Maybe ExecutionControls)
(Maybe ExecutionControls)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationConfiguration' {Maybe ExecutionControls
executionControls :: Maybe ExecutionControls
$sel:executionControls:RemediationConfiguration' :: RemediationConfiguration -> Maybe ExecutionControls
executionControls} -> Maybe ExecutionControls
executionControls) (\s :: RemediationConfiguration
s@RemediationConfiguration' {} Maybe ExecutionControls
a -> RemediationConfiguration
s {$sel:executionControls:RemediationConfiguration' :: Maybe ExecutionControls
executionControls = Maybe ExecutionControls
a} :: RemediationConfiguration)
remediationConfiguration_parameters :: Lens.Lens' RemediationConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text RemediationParameterValue))
remediationConfiguration_parameters :: (Maybe (HashMap Text RemediationParameterValue)
-> f (Maybe (HashMap Text RemediationParameterValue)))
-> RemediationConfiguration -> f RemediationConfiguration
remediationConfiguration_parameters = (RemediationConfiguration
-> Maybe (HashMap Text RemediationParameterValue))
-> (RemediationConfiguration
-> Maybe (HashMap Text RemediationParameterValue)
-> RemediationConfiguration)
-> Lens
RemediationConfiguration
RemediationConfiguration
(Maybe (HashMap Text RemediationParameterValue))
(Maybe (HashMap Text RemediationParameterValue))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationConfiguration' {Maybe (HashMap Text RemediationParameterValue)
parameters :: Maybe (HashMap Text RemediationParameterValue)
$sel:parameters:RemediationConfiguration' :: RemediationConfiguration
-> Maybe (HashMap Text RemediationParameterValue)
parameters} -> Maybe (HashMap Text RemediationParameterValue)
parameters) (\s :: RemediationConfiguration
s@RemediationConfiguration' {} Maybe (HashMap Text RemediationParameterValue)
a -> RemediationConfiguration
s {$sel:parameters:RemediationConfiguration' :: Maybe (HashMap Text RemediationParameterValue)
parameters = Maybe (HashMap Text RemediationParameterValue)
a} :: RemediationConfiguration) ((Maybe (HashMap Text RemediationParameterValue)
-> f (Maybe (HashMap Text RemediationParameterValue)))
-> RemediationConfiguration -> f RemediationConfiguration)
-> ((Maybe (HashMap Text RemediationParameterValue)
-> f (Maybe (HashMap Text RemediationParameterValue)))
-> Maybe (HashMap Text RemediationParameterValue)
-> f (Maybe (HashMap Text RemediationParameterValue)))
-> (Maybe (HashMap Text RemediationParameterValue)
-> f (Maybe (HashMap Text RemediationParameterValue)))
-> RemediationConfiguration
-> f RemediationConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text RemediationParameterValue)
(HashMap Text RemediationParameterValue)
(HashMap Text RemediationParameterValue)
(HashMap Text RemediationParameterValue)
-> Iso
(Maybe (HashMap Text RemediationParameterValue))
(Maybe (HashMap Text RemediationParameterValue))
(Maybe (HashMap Text RemediationParameterValue))
(Maybe (HashMap Text RemediationParameterValue))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text RemediationParameterValue)
(HashMap Text RemediationParameterValue)
(HashMap Text RemediationParameterValue)
(HashMap Text RemediationParameterValue)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
remediationConfiguration_maximumAutomaticAttempts :: Lens.Lens' RemediationConfiguration (Prelude.Maybe Prelude.Natural)
remediationConfiguration_maximumAutomaticAttempts :: (Maybe Natural -> f (Maybe Natural))
-> RemediationConfiguration -> f RemediationConfiguration
remediationConfiguration_maximumAutomaticAttempts = (RemediationConfiguration -> Maybe Natural)
-> (RemediationConfiguration
-> Maybe Natural -> RemediationConfiguration)
-> Lens
RemediationConfiguration
RemediationConfiguration
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationConfiguration' {Maybe Natural
maximumAutomaticAttempts :: Maybe Natural
$sel:maximumAutomaticAttempts:RemediationConfiguration' :: RemediationConfiguration -> Maybe Natural
maximumAutomaticAttempts} -> Maybe Natural
maximumAutomaticAttempts) (\s :: RemediationConfiguration
s@RemediationConfiguration' {} Maybe Natural
a -> RemediationConfiguration
s {$sel:maximumAutomaticAttempts:RemediationConfiguration' :: Maybe Natural
maximumAutomaticAttempts = Maybe Natural
a} :: RemediationConfiguration)
remediationConfiguration_targetVersion :: Lens.Lens' RemediationConfiguration (Prelude.Maybe Prelude.Text)
remediationConfiguration_targetVersion :: (Maybe Text -> f (Maybe Text))
-> RemediationConfiguration -> f RemediationConfiguration
remediationConfiguration_targetVersion = (RemediationConfiguration -> Maybe Text)
-> (RemediationConfiguration
-> Maybe Text -> RemediationConfiguration)
-> Lens
RemediationConfiguration
RemediationConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationConfiguration' {Maybe Text
targetVersion :: Maybe Text
$sel:targetVersion:RemediationConfiguration' :: RemediationConfiguration -> Maybe Text
targetVersion} -> Maybe Text
targetVersion) (\s :: RemediationConfiguration
s@RemediationConfiguration' {} Maybe Text
a -> RemediationConfiguration
s {$sel:targetVersion:RemediationConfiguration' :: Maybe Text
targetVersion = Maybe Text
a} :: RemediationConfiguration)
remediationConfiguration_configRuleName :: Lens.Lens' RemediationConfiguration Prelude.Text
remediationConfiguration_configRuleName :: (Text -> f Text)
-> RemediationConfiguration -> f RemediationConfiguration
remediationConfiguration_configRuleName = (RemediationConfiguration -> Text)
-> (RemediationConfiguration -> Text -> RemediationConfiguration)
-> Lens RemediationConfiguration RemediationConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationConfiguration' {Text
configRuleName :: Text
$sel:configRuleName:RemediationConfiguration' :: RemediationConfiguration -> Text
configRuleName} -> Text
configRuleName) (\s :: RemediationConfiguration
s@RemediationConfiguration' {} Text
a -> RemediationConfiguration
s {$sel:configRuleName:RemediationConfiguration' :: Text
configRuleName = Text
a} :: RemediationConfiguration)
remediationConfiguration_targetType :: Lens.Lens' RemediationConfiguration RemediationTargetType
remediationConfiguration_targetType :: (RemediationTargetType -> f RemediationTargetType)
-> RemediationConfiguration -> f RemediationConfiguration
remediationConfiguration_targetType = (RemediationConfiguration -> RemediationTargetType)
-> (RemediationConfiguration
-> RemediationTargetType -> RemediationConfiguration)
-> Lens
RemediationConfiguration
RemediationConfiguration
RemediationTargetType
RemediationTargetType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationConfiguration' {RemediationTargetType
targetType :: RemediationTargetType
$sel:targetType:RemediationConfiguration' :: RemediationConfiguration -> RemediationTargetType
targetType} -> RemediationTargetType
targetType) (\s :: RemediationConfiguration
s@RemediationConfiguration' {} RemediationTargetType
a -> RemediationConfiguration
s {$sel:targetType:RemediationConfiguration' :: RemediationTargetType
targetType = RemediationTargetType
a} :: RemediationConfiguration)
remediationConfiguration_targetId :: Lens.Lens' RemediationConfiguration Prelude.Text
remediationConfiguration_targetId :: (Text -> f Text)
-> RemediationConfiguration -> f RemediationConfiguration
remediationConfiguration_targetId = (RemediationConfiguration -> Text)
-> (RemediationConfiguration -> Text -> RemediationConfiguration)
-> Lens RemediationConfiguration RemediationConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemediationConfiguration' {Text
targetId :: Text
$sel:targetId:RemediationConfiguration' :: RemediationConfiguration -> Text
targetId} -> Text
targetId) (\s :: RemediationConfiguration
s@RemediationConfiguration' {} Text
a -> RemediationConfiguration
s {$sel:targetId:RemediationConfiguration' :: Text
targetId = Text
a} :: RemediationConfiguration)
instance Core.FromJSON RemediationConfiguration where
parseJSON :: Value -> Parser RemediationConfiguration
parseJSON =
String
-> (Object -> Parser RemediationConfiguration)
-> Value
-> Parser RemediationConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RemediationConfiguration"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Natural
-> Maybe ExecutionControls
-> Maybe (HashMap Text RemediationParameterValue)
-> Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration
RemediationConfiguration'
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Natural
-> Maybe ExecutionControls
-> Maybe (HashMap Text RemediationParameterValue)
-> Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Natural
-> Maybe ExecutionControls
-> Maybe (HashMap Text RemediationParameterValue)
-> Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
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
"ResourceType")
Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Natural
-> Maybe ExecutionControls
-> Maybe (HashMap Text RemediationParameterValue)
-> Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Natural
-> Maybe ExecutionControls
-> Maybe (HashMap Text RemediationParameterValue)
-> Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
forall (f :: * -> *) a b. Applicative f => 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
"Arn")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe Natural
-> Maybe ExecutionControls
-> Maybe (HashMap Text RemediationParameterValue)
-> Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Natural
-> Maybe ExecutionControls
-> Maybe (HashMap Text RemediationParameterValue)
-> Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Automatic")
Parser
(Maybe Text
-> Maybe Natural
-> Maybe ExecutionControls
-> Maybe (HashMap Text RemediationParameterValue)
-> Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
-> Parser (Maybe Text)
-> Parser
(Maybe Natural
-> Maybe ExecutionControls
-> Maybe (HashMap Text RemediationParameterValue)
-> Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
forall (f :: * -> *) a b. Applicative f => 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
"CreatedByService")
Parser
(Maybe Natural
-> Maybe ExecutionControls
-> Maybe (HashMap Text RemediationParameterValue)
-> Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
-> Parser (Maybe Natural)
-> Parser
(Maybe ExecutionControls
-> Maybe (HashMap Text RemediationParameterValue)
-> Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RetryAttemptSeconds")
Parser
(Maybe ExecutionControls
-> Maybe (HashMap Text RemediationParameterValue)
-> Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
-> Parser (Maybe ExecutionControls)
-> Parser
(Maybe (HashMap Text RemediationParameterValue)
-> Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ExecutionControls)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExecutionControls")
Parser
(Maybe (HashMap Text RemediationParameterValue)
-> Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
-> Parser (Maybe (HashMap Text RemediationParameterValue))
-> Parser
(Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser (Maybe (Maybe (HashMap Text RemediationParameterValue)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Parameters" Parser (Maybe (Maybe (HashMap Text RemediationParameterValue)))
-> Maybe (HashMap Text RemediationParameterValue)
-> Parser (Maybe (HashMap Text RemediationParameterValue))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text RemediationParameterValue)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Natural
-> Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
-> Parser (Maybe Natural)
-> Parser
(Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaximumAutomaticAttempts")
Parser
(Maybe Text
-> Text
-> RemediationTargetType
-> Text
-> RemediationConfiguration)
-> Parser (Maybe Text)
-> Parser
(Text -> RemediationTargetType -> Text -> RemediationConfiguration)
forall (f :: * -> *) a b. Applicative f => 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
"TargetVersion")
Parser
(Text -> RemediationTargetType -> Text -> RemediationConfiguration)
-> Parser Text
-> Parser
(RemediationTargetType -> Text -> RemediationConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ConfigRuleName")
Parser (RemediationTargetType -> Text -> RemediationConfiguration)
-> Parser RemediationTargetType
-> Parser (Text -> RemediationConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser RemediationTargetType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"TargetType")
Parser (Text -> RemediationConfiguration)
-> Parser Text -> Parser RemediationConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"TargetId")
)
instance Prelude.Hashable RemediationConfiguration
instance Prelude.NFData RemediationConfiguration
instance Core.ToJSON RemediationConfiguration where
toJSON :: RemediationConfiguration -> Value
toJSON RemediationConfiguration' {Maybe Bool
Maybe Natural
Maybe Text
Maybe (HashMap Text RemediationParameterValue)
Maybe ExecutionControls
Text
RemediationTargetType
targetId :: Text
targetType :: RemediationTargetType
configRuleName :: Text
targetVersion :: Maybe Text
maximumAutomaticAttempts :: Maybe Natural
parameters :: Maybe (HashMap Text RemediationParameterValue)
executionControls :: Maybe ExecutionControls
retryAttemptSeconds :: Maybe Natural
createdByService :: Maybe Text
automatic :: Maybe Bool
arn :: Maybe Text
resourceType :: Maybe Text
$sel:targetId:RemediationConfiguration' :: RemediationConfiguration -> Text
$sel:targetType:RemediationConfiguration' :: RemediationConfiguration -> RemediationTargetType
$sel:configRuleName:RemediationConfiguration' :: RemediationConfiguration -> Text
$sel:targetVersion:RemediationConfiguration' :: RemediationConfiguration -> Maybe Text
$sel:maximumAutomaticAttempts:RemediationConfiguration' :: RemediationConfiguration -> Maybe Natural
$sel:parameters:RemediationConfiguration' :: RemediationConfiguration
-> Maybe (HashMap Text RemediationParameterValue)
$sel:executionControls:RemediationConfiguration' :: RemediationConfiguration -> Maybe ExecutionControls
$sel:retryAttemptSeconds:RemediationConfiguration' :: RemediationConfiguration -> Maybe Natural
$sel:createdByService:RemediationConfiguration' :: RemediationConfiguration -> Maybe Text
$sel:automatic:RemediationConfiguration' :: RemediationConfiguration -> Maybe Bool
$sel:arn:RemediationConfiguration' :: RemediationConfiguration -> Maybe Text
$sel:resourceType:RemediationConfiguration' :: RemediationConfiguration -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ResourceType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
resourceType,
(Text
"Arn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
arn,
(Text
"Automatic" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
automatic,
(Text
"CreatedByService" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
createdByService,
(Text
"RetryAttemptSeconds" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
retryAttemptSeconds,
(Text
"ExecutionControls" Text -> ExecutionControls -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ExecutionControls -> Pair)
-> Maybe ExecutionControls -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExecutionControls
executionControls,
(Text
"Parameters" Text -> HashMap Text RemediationParameterValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text RemediationParameterValue -> Pair)
-> Maybe (HashMap Text RemediationParameterValue) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text RemediationParameterValue)
parameters,
(Text
"MaximumAutomaticAttempts" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maximumAutomaticAttempts,
(Text
"TargetVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
targetVersion,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ConfigRuleName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
configRuleName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TargetType" Text -> RemediationTargetType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= RemediationTargetType
targetType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TargetId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
targetId)
]
)