{-# 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.OrganizationCustomRuleMetadata where
import Amazonka.Config.Types.MaximumExecutionFrequency
import Amazonka.Config.Types.OrganizationConfigRuleTriggerType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OrganizationCustomRuleMetadata = OrganizationCustomRuleMetadata'
{
OrganizationCustomRuleMetadata -> Maybe Text
inputParameters :: Prelude.Maybe Prelude.Text,
OrganizationCustomRuleMetadata -> Maybe Text
resourceIdScope :: Prelude.Maybe Prelude.Text,
OrganizationCustomRuleMetadata -> Maybe Text
tagValueScope :: Prelude.Maybe Prelude.Text,
OrganizationCustomRuleMetadata -> Maybe MaximumExecutionFrequency
maximumExecutionFrequency :: Prelude.Maybe MaximumExecutionFrequency,
OrganizationCustomRuleMetadata -> Maybe Text
tagKeyScope :: Prelude.Maybe Prelude.Text,
OrganizationCustomRuleMetadata -> Maybe [Text]
resourceTypesScope :: Prelude.Maybe [Prelude.Text],
OrganizationCustomRuleMetadata -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
OrganizationCustomRuleMetadata -> Text
lambdaFunctionArn :: Prelude.Text,
OrganizationCustomRuleMetadata
-> [OrganizationConfigRuleTriggerType]
organizationConfigRuleTriggerTypes :: [OrganizationConfigRuleTriggerType]
}
deriving (OrganizationCustomRuleMetadata
-> OrganizationCustomRuleMetadata -> Bool
(OrganizationCustomRuleMetadata
-> OrganizationCustomRuleMetadata -> Bool)
-> (OrganizationCustomRuleMetadata
-> OrganizationCustomRuleMetadata -> Bool)
-> Eq OrganizationCustomRuleMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrganizationCustomRuleMetadata
-> OrganizationCustomRuleMetadata -> Bool
$c/= :: OrganizationCustomRuleMetadata
-> OrganizationCustomRuleMetadata -> Bool
== :: OrganizationCustomRuleMetadata
-> OrganizationCustomRuleMetadata -> Bool
$c== :: OrganizationCustomRuleMetadata
-> OrganizationCustomRuleMetadata -> Bool
Prelude.Eq, ReadPrec [OrganizationCustomRuleMetadata]
ReadPrec OrganizationCustomRuleMetadata
Int -> ReadS OrganizationCustomRuleMetadata
ReadS [OrganizationCustomRuleMetadata]
(Int -> ReadS OrganizationCustomRuleMetadata)
-> ReadS [OrganizationCustomRuleMetadata]
-> ReadPrec OrganizationCustomRuleMetadata
-> ReadPrec [OrganizationCustomRuleMetadata]
-> Read OrganizationCustomRuleMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OrganizationCustomRuleMetadata]
$creadListPrec :: ReadPrec [OrganizationCustomRuleMetadata]
readPrec :: ReadPrec OrganizationCustomRuleMetadata
$creadPrec :: ReadPrec OrganizationCustomRuleMetadata
readList :: ReadS [OrganizationCustomRuleMetadata]
$creadList :: ReadS [OrganizationCustomRuleMetadata]
readsPrec :: Int -> ReadS OrganizationCustomRuleMetadata
$creadsPrec :: Int -> ReadS OrganizationCustomRuleMetadata
Prelude.Read, Int -> OrganizationCustomRuleMetadata -> ShowS
[OrganizationCustomRuleMetadata] -> ShowS
OrganizationCustomRuleMetadata -> String
(Int -> OrganizationCustomRuleMetadata -> ShowS)
-> (OrganizationCustomRuleMetadata -> String)
-> ([OrganizationCustomRuleMetadata] -> ShowS)
-> Show OrganizationCustomRuleMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrganizationCustomRuleMetadata] -> ShowS
$cshowList :: [OrganizationCustomRuleMetadata] -> ShowS
show :: OrganizationCustomRuleMetadata -> String
$cshow :: OrganizationCustomRuleMetadata -> String
showsPrec :: Int -> OrganizationCustomRuleMetadata -> ShowS
$cshowsPrec :: Int -> OrganizationCustomRuleMetadata -> ShowS
Prelude.Show, (forall x.
OrganizationCustomRuleMetadata
-> Rep OrganizationCustomRuleMetadata x)
-> (forall x.
Rep OrganizationCustomRuleMetadata x
-> OrganizationCustomRuleMetadata)
-> Generic OrganizationCustomRuleMetadata
forall x.
Rep OrganizationCustomRuleMetadata x
-> OrganizationCustomRuleMetadata
forall x.
OrganizationCustomRuleMetadata
-> Rep OrganizationCustomRuleMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep OrganizationCustomRuleMetadata x
-> OrganizationCustomRuleMetadata
$cfrom :: forall x.
OrganizationCustomRuleMetadata
-> Rep OrganizationCustomRuleMetadata x
Prelude.Generic)
newOrganizationCustomRuleMetadata ::
Prelude.Text ->
OrganizationCustomRuleMetadata
newOrganizationCustomRuleMetadata :: Text -> OrganizationCustomRuleMetadata
newOrganizationCustomRuleMetadata Text
pLambdaFunctionArn_ =
OrganizationCustomRuleMetadata' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe MaximumExecutionFrequency
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata
OrganizationCustomRuleMetadata'
{ $sel:inputParameters:OrganizationCustomRuleMetadata' :: Maybe Text
inputParameters =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceIdScope:OrganizationCustomRuleMetadata' :: Maybe Text
resourceIdScope = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tagValueScope:OrganizationCustomRuleMetadata' :: Maybe Text
tagValueScope = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maximumExecutionFrequency:OrganizationCustomRuleMetadata' :: Maybe MaximumExecutionFrequency
maximumExecutionFrequency = Maybe MaximumExecutionFrequency
forall a. Maybe a
Prelude.Nothing,
$sel:tagKeyScope:OrganizationCustomRuleMetadata' :: Maybe Text
tagKeyScope = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceTypesScope:OrganizationCustomRuleMetadata' :: Maybe [Text]
resourceTypesScope = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:description:OrganizationCustomRuleMetadata' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lambdaFunctionArn:OrganizationCustomRuleMetadata' :: Text
lambdaFunctionArn = Text
pLambdaFunctionArn_,
$sel:organizationConfigRuleTriggerTypes:OrganizationCustomRuleMetadata' :: [OrganizationConfigRuleTriggerType]
organizationConfigRuleTriggerTypes =
[OrganizationConfigRuleTriggerType]
forall a. Monoid a => a
Prelude.mempty
}
organizationCustomRuleMetadata_inputParameters :: Lens.Lens' OrganizationCustomRuleMetadata (Prelude.Maybe Prelude.Text)
organizationCustomRuleMetadata_inputParameters :: (Maybe Text -> f (Maybe Text))
-> OrganizationCustomRuleMetadata
-> f OrganizationCustomRuleMetadata
organizationCustomRuleMetadata_inputParameters = (OrganizationCustomRuleMetadata -> Maybe Text)
-> (OrganizationCustomRuleMetadata
-> Maybe Text -> OrganizationCustomRuleMetadata)
-> Lens
OrganizationCustomRuleMetadata
OrganizationCustomRuleMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationCustomRuleMetadata' {Maybe Text
inputParameters :: Maybe Text
$sel:inputParameters:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Maybe Text
inputParameters} -> Maybe Text
inputParameters) (\s :: OrganizationCustomRuleMetadata
s@OrganizationCustomRuleMetadata' {} Maybe Text
a -> OrganizationCustomRuleMetadata
s {$sel:inputParameters:OrganizationCustomRuleMetadata' :: Maybe Text
inputParameters = Maybe Text
a} :: OrganizationCustomRuleMetadata)
organizationCustomRuleMetadata_resourceIdScope :: Lens.Lens' OrganizationCustomRuleMetadata (Prelude.Maybe Prelude.Text)
organizationCustomRuleMetadata_resourceIdScope :: (Maybe Text -> f (Maybe Text))
-> OrganizationCustomRuleMetadata
-> f OrganizationCustomRuleMetadata
organizationCustomRuleMetadata_resourceIdScope = (OrganizationCustomRuleMetadata -> Maybe Text)
-> (OrganizationCustomRuleMetadata
-> Maybe Text -> OrganizationCustomRuleMetadata)
-> Lens
OrganizationCustomRuleMetadata
OrganizationCustomRuleMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationCustomRuleMetadata' {Maybe Text
resourceIdScope :: Maybe Text
$sel:resourceIdScope:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Maybe Text
resourceIdScope} -> Maybe Text
resourceIdScope) (\s :: OrganizationCustomRuleMetadata
s@OrganizationCustomRuleMetadata' {} Maybe Text
a -> OrganizationCustomRuleMetadata
s {$sel:resourceIdScope:OrganizationCustomRuleMetadata' :: Maybe Text
resourceIdScope = Maybe Text
a} :: OrganizationCustomRuleMetadata)
organizationCustomRuleMetadata_tagValueScope :: Lens.Lens' OrganizationCustomRuleMetadata (Prelude.Maybe Prelude.Text)
organizationCustomRuleMetadata_tagValueScope :: (Maybe Text -> f (Maybe Text))
-> OrganizationCustomRuleMetadata
-> f OrganizationCustomRuleMetadata
organizationCustomRuleMetadata_tagValueScope = (OrganizationCustomRuleMetadata -> Maybe Text)
-> (OrganizationCustomRuleMetadata
-> Maybe Text -> OrganizationCustomRuleMetadata)
-> Lens
OrganizationCustomRuleMetadata
OrganizationCustomRuleMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationCustomRuleMetadata' {Maybe Text
tagValueScope :: Maybe Text
$sel:tagValueScope:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Maybe Text
tagValueScope} -> Maybe Text
tagValueScope) (\s :: OrganizationCustomRuleMetadata
s@OrganizationCustomRuleMetadata' {} Maybe Text
a -> OrganizationCustomRuleMetadata
s {$sel:tagValueScope:OrganizationCustomRuleMetadata' :: Maybe Text
tagValueScope = Maybe Text
a} :: OrganizationCustomRuleMetadata)
organizationCustomRuleMetadata_maximumExecutionFrequency :: Lens.Lens' OrganizationCustomRuleMetadata (Prelude.Maybe MaximumExecutionFrequency)
organizationCustomRuleMetadata_maximumExecutionFrequency :: (Maybe MaximumExecutionFrequency
-> f (Maybe MaximumExecutionFrequency))
-> OrganizationCustomRuleMetadata
-> f OrganizationCustomRuleMetadata
organizationCustomRuleMetadata_maximumExecutionFrequency = (OrganizationCustomRuleMetadata -> Maybe MaximumExecutionFrequency)
-> (OrganizationCustomRuleMetadata
-> Maybe MaximumExecutionFrequency
-> OrganizationCustomRuleMetadata)
-> Lens
OrganizationCustomRuleMetadata
OrganizationCustomRuleMetadata
(Maybe MaximumExecutionFrequency)
(Maybe MaximumExecutionFrequency)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationCustomRuleMetadata' {Maybe MaximumExecutionFrequency
maximumExecutionFrequency :: Maybe MaximumExecutionFrequency
$sel:maximumExecutionFrequency:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Maybe MaximumExecutionFrequency
maximumExecutionFrequency} -> Maybe MaximumExecutionFrequency
maximumExecutionFrequency) (\s :: OrganizationCustomRuleMetadata
s@OrganizationCustomRuleMetadata' {} Maybe MaximumExecutionFrequency
a -> OrganizationCustomRuleMetadata
s {$sel:maximumExecutionFrequency:OrganizationCustomRuleMetadata' :: Maybe MaximumExecutionFrequency
maximumExecutionFrequency = Maybe MaximumExecutionFrequency
a} :: OrganizationCustomRuleMetadata)
organizationCustomRuleMetadata_tagKeyScope :: Lens.Lens' OrganizationCustomRuleMetadata (Prelude.Maybe Prelude.Text)
organizationCustomRuleMetadata_tagKeyScope :: (Maybe Text -> f (Maybe Text))
-> OrganizationCustomRuleMetadata
-> f OrganizationCustomRuleMetadata
organizationCustomRuleMetadata_tagKeyScope = (OrganizationCustomRuleMetadata -> Maybe Text)
-> (OrganizationCustomRuleMetadata
-> Maybe Text -> OrganizationCustomRuleMetadata)
-> Lens
OrganizationCustomRuleMetadata
OrganizationCustomRuleMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationCustomRuleMetadata' {Maybe Text
tagKeyScope :: Maybe Text
$sel:tagKeyScope:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Maybe Text
tagKeyScope} -> Maybe Text
tagKeyScope) (\s :: OrganizationCustomRuleMetadata
s@OrganizationCustomRuleMetadata' {} Maybe Text
a -> OrganizationCustomRuleMetadata
s {$sel:tagKeyScope:OrganizationCustomRuleMetadata' :: Maybe Text
tagKeyScope = Maybe Text
a} :: OrganizationCustomRuleMetadata)
organizationCustomRuleMetadata_resourceTypesScope :: Lens.Lens' OrganizationCustomRuleMetadata (Prelude.Maybe [Prelude.Text])
organizationCustomRuleMetadata_resourceTypesScope :: (Maybe [Text] -> f (Maybe [Text]))
-> OrganizationCustomRuleMetadata
-> f OrganizationCustomRuleMetadata
organizationCustomRuleMetadata_resourceTypesScope = (OrganizationCustomRuleMetadata -> Maybe [Text])
-> (OrganizationCustomRuleMetadata
-> Maybe [Text] -> OrganizationCustomRuleMetadata)
-> Lens
OrganizationCustomRuleMetadata
OrganizationCustomRuleMetadata
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationCustomRuleMetadata' {Maybe [Text]
resourceTypesScope :: Maybe [Text]
$sel:resourceTypesScope:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Maybe [Text]
resourceTypesScope} -> Maybe [Text]
resourceTypesScope) (\s :: OrganizationCustomRuleMetadata
s@OrganizationCustomRuleMetadata' {} Maybe [Text]
a -> OrganizationCustomRuleMetadata
s {$sel:resourceTypesScope:OrganizationCustomRuleMetadata' :: Maybe [Text]
resourceTypesScope = Maybe [Text]
a} :: OrganizationCustomRuleMetadata) ((Maybe [Text] -> f (Maybe [Text]))
-> OrganizationCustomRuleMetadata
-> f OrganizationCustomRuleMetadata)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> OrganizationCustomRuleMetadata
-> f OrganizationCustomRuleMetadata
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
organizationCustomRuleMetadata_description :: Lens.Lens' OrganizationCustomRuleMetadata (Prelude.Maybe Prelude.Text)
organizationCustomRuleMetadata_description :: (Maybe Text -> f (Maybe Text))
-> OrganizationCustomRuleMetadata
-> f OrganizationCustomRuleMetadata
organizationCustomRuleMetadata_description = (OrganizationCustomRuleMetadata -> Maybe Text)
-> (OrganizationCustomRuleMetadata
-> Maybe Text -> OrganizationCustomRuleMetadata)
-> Lens
OrganizationCustomRuleMetadata
OrganizationCustomRuleMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationCustomRuleMetadata' {Maybe Text
description :: Maybe Text
$sel:description:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Maybe Text
description} -> Maybe Text
description) (\s :: OrganizationCustomRuleMetadata
s@OrganizationCustomRuleMetadata' {} Maybe Text
a -> OrganizationCustomRuleMetadata
s {$sel:description:OrganizationCustomRuleMetadata' :: Maybe Text
description = Maybe Text
a} :: OrganizationCustomRuleMetadata)
organizationCustomRuleMetadata_lambdaFunctionArn :: Lens.Lens' OrganizationCustomRuleMetadata Prelude.Text
organizationCustomRuleMetadata_lambdaFunctionArn :: (Text -> f Text)
-> OrganizationCustomRuleMetadata
-> f OrganizationCustomRuleMetadata
organizationCustomRuleMetadata_lambdaFunctionArn = (OrganizationCustomRuleMetadata -> Text)
-> (OrganizationCustomRuleMetadata
-> Text -> OrganizationCustomRuleMetadata)
-> Lens
OrganizationCustomRuleMetadata
OrganizationCustomRuleMetadata
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationCustomRuleMetadata' {Text
lambdaFunctionArn :: Text
$sel:lambdaFunctionArn:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Text
lambdaFunctionArn} -> Text
lambdaFunctionArn) (\s :: OrganizationCustomRuleMetadata
s@OrganizationCustomRuleMetadata' {} Text
a -> OrganizationCustomRuleMetadata
s {$sel:lambdaFunctionArn:OrganizationCustomRuleMetadata' :: Text
lambdaFunctionArn = Text
a} :: OrganizationCustomRuleMetadata)
organizationCustomRuleMetadata_organizationConfigRuleTriggerTypes :: Lens.Lens' OrganizationCustomRuleMetadata [OrganizationConfigRuleTriggerType]
organizationCustomRuleMetadata_organizationConfigRuleTriggerTypes :: ([OrganizationConfigRuleTriggerType]
-> f [OrganizationConfigRuleTriggerType])
-> OrganizationCustomRuleMetadata
-> f OrganizationCustomRuleMetadata
organizationCustomRuleMetadata_organizationConfigRuleTriggerTypes = (OrganizationCustomRuleMetadata
-> [OrganizationConfigRuleTriggerType])
-> (OrganizationCustomRuleMetadata
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
-> Lens
OrganizationCustomRuleMetadata
OrganizationCustomRuleMetadata
[OrganizationConfigRuleTriggerType]
[OrganizationConfigRuleTriggerType]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationCustomRuleMetadata' {[OrganizationConfigRuleTriggerType]
organizationConfigRuleTriggerTypes :: [OrganizationConfigRuleTriggerType]
$sel:organizationConfigRuleTriggerTypes:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata
-> [OrganizationConfigRuleTriggerType]
organizationConfigRuleTriggerTypes} -> [OrganizationConfigRuleTriggerType]
organizationConfigRuleTriggerTypes) (\s :: OrganizationCustomRuleMetadata
s@OrganizationCustomRuleMetadata' {} [OrganizationConfigRuleTriggerType]
a -> OrganizationCustomRuleMetadata
s {$sel:organizationConfigRuleTriggerTypes:OrganizationCustomRuleMetadata' :: [OrganizationConfigRuleTriggerType]
organizationConfigRuleTriggerTypes = [OrganizationConfigRuleTriggerType]
a} :: OrganizationCustomRuleMetadata) (([OrganizationConfigRuleTriggerType]
-> f [OrganizationConfigRuleTriggerType])
-> OrganizationCustomRuleMetadata
-> f OrganizationCustomRuleMetadata)
-> (([OrganizationConfigRuleTriggerType]
-> f [OrganizationConfigRuleTriggerType])
-> [OrganizationConfigRuleTriggerType]
-> f [OrganizationConfigRuleTriggerType])
-> ([OrganizationConfigRuleTriggerType]
-> f [OrganizationConfigRuleTriggerType])
-> OrganizationCustomRuleMetadata
-> f OrganizationCustomRuleMetadata
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([OrganizationConfigRuleTriggerType]
-> f [OrganizationConfigRuleTriggerType])
-> [OrganizationConfigRuleTriggerType]
-> f [OrganizationConfigRuleTriggerType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON OrganizationCustomRuleMetadata where
parseJSON :: Value -> Parser OrganizationCustomRuleMetadata
parseJSON =
String
-> (Object -> Parser OrganizationCustomRuleMetadata)
-> Value
-> Parser OrganizationCustomRuleMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"OrganizationCustomRuleMetadata"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe MaximumExecutionFrequency
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata
OrganizationCustomRuleMetadata'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe MaximumExecutionFrequency
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe MaximumExecutionFrequency
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
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
"InputParameters")
Parser
(Maybe Text
-> Maybe Text
-> Maybe MaximumExecutionFrequency
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe MaximumExecutionFrequency
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
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
"ResourceIdScope")
Parser
(Maybe Text
-> Maybe MaximumExecutionFrequency
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe MaximumExecutionFrequency
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
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
"TagValueScope")
Parser
(Maybe MaximumExecutionFrequency
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
-> Parser (Maybe MaximumExecutionFrequency)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MaximumExecutionFrequency)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaximumExecutionFrequency")
Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
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
"TagKeyScope")
Parser
(Maybe [Text]
-> Maybe Text
-> Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ResourceTypesScope"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
-> Parser (Maybe Text)
-> Parser
(Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
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
"Description")
Parser
(Text
-> [OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
-> Parser Text
-> Parser
([OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
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
"LambdaFunctionArn")
Parser
([OrganizationConfigRuleTriggerType]
-> OrganizationCustomRuleMetadata)
-> Parser [OrganizationConfigRuleTriggerType]
-> Parser OrganizationCustomRuleMetadata
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe [OrganizationConfigRuleTriggerType])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OrganizationConfigRuleTriggerTypes"
Parser (Maybe [OrganizationConfigRuleTriggerType])
-> [OrganizationConfigRuleTriggerType]
-> Parser [OrganizationConfigRuleTriggerType]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [OrganizationConfigRuleTriggerType]
forall a. Monoid a => a
Prelude.mempty
)
)
instance
Prelude.Hashable
OrganizationCustomRuleMetadata
instance
Prelude.NFData
OrganizationCustomRuleMetadata
instance Core.ToJSON OrganizationCustomRuleMetadata where
toJSON :: OrganizationCustomRuleMetadata -> Value
toJSON OrganizationCustomRuleMetadata' {[OrganizationConfigRuleTriggerType]
Maybe [Text]
Maybe Text
Maybe MaximumExecutionFrequency
Text
organizationConfigRuleTriggerTypes :: [OrganizationConfigRuleTriggerType]
lambdaFunctionArn :: Text
description :: Maybe Text
resourceTypesScope :: Maybe [Text]
tagKeyScope :: Maybe Text
maximumExecutionFrequency :: Maybe MaximumExecutionFrequency
tagValueScope :: Maybe Text
resourceIdScope :: Maybe Text
inputParameters :: Maybe Text
$sel:organizationConfigRuleTriggerTypes:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata
-> [OrganizationConfigRuleTriggerType]
$sel:lambdaFunctionArn:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Text
$sel:description:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Maybe Text
$sel:resourceTypesScope:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Maybe [Text]
$sel:tagKeyScope:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Maybe Text
$sel:maximumExecutionFrequency:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Maybe MaximumExecutionFrequency
$sel:tagValueScope:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Maybe Text
$sel:resourceIdScope:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Maybe Text
$sel:inputParameters:OrganizationCustomRuleMetadata' :: OrganizationCustomRuleMetadata -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"InputParameters" 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
inputParameters,
(Text
"ResourceIdScope" 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
resourceIdScope,
(Text
"TagValueScope" 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
tagValueScope,
(Text
"MaximumExecutionFrequency" Text -> MaximumExecutionFrequency -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MaximumExecutionFrequency -> Pair)
-> Maybe MaximumExecutionFrequency -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MaximumExecutionFrequency
maximumExecutionFrequency,
(Text
"TagKeyScope" 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
tagKeyScope,
(Text
"ResourceTypesScope" 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]
resourceTypesScope,
(Text
"Description" 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
description,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"LambdaFunctionArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
lambdaFunctionArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"OrganizationConfigRuleTriggerTypes"
Text -> [OrganizationConfigRuleTriggerType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [OrganizationConfigRuleTriggerType]
organizationConfigRuleTriggerTypes
)
]
)