{-# 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.OrganizationManagedRuleMetadata where
import Amazonka.Config.Types.MaximumExecutionFrequency
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OrganizationManagedRuleMetadata = OrganizationManagedRuleMetadata'
{
OrganizationManagedRuleMetadata -> Maybe Text
inputParameters :: Prelude.Maybe Prelude.Text,
OrganizationManagedRuleMetadata -> Maybe Text
resourceIdScope :: Prelude.Maybe Prelude.Text,
OrganizationManagedRuleMetadata -> Maybe Text
tagValueScope :: Prelude.Maybe Prelude.Text,
OrganizationManagedRuleMetadata -> Maybe MaximumExecutionFrequency
maximumExecutionFrequency :: Prelude.Maybe MaximumExecutionFrequency,
OrganizationManagedRuleMetadata -> Maybe Text
tagKeyScope :: Prelude.Maybe Prelude.Text,
OrganizationManagedRuleMetadata -> Maybe [Text]
resourceTypesScope :: Prelude.Maybe [Prelude.Text],
OrganizationManagedRuleMetadata -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
OrganizationManagedRuleMetadata -> Text
ruleIdentifier :: Prelude.Text
}
deriving (OrganizationManagedRuleMetadata
-> OrganizationManagedRuleMetadata -> Bool
(OrganizationManagedRuleMetadata
-> OrganizationManagedRuleMetadata -> Bool)
-> (OrganizationManagedRuleMetadata
-> OrganizationManagedRuleMetadata -> Bool)
-> Eq OrganizationManagedRuleMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrganizationManagedRuleMetadata
-> OrganizationManagedRuleMetadata -> Bool
$c/= :: OrganizationManagedRuleMetadata
-> OrganizationManagedRuleMetadata -> Bool
== :: OrganizationManagedRuleMetadata
-> OrganizationManagedRuleMetadata -> Bool
$c== :: OrganizationManagedRuleMetadata
-> OrganizationManagedRuleMetadata -> Bool
Prelude.Eq, ReadPrec [OrganizationManagedRuleMetadata]
ReadPrec OrganizationManagedRuleMetadata
Int -> ReadS OrganizationManagedRuleMetadata
ReadS [OrganizationManagedRuleMetadata]
(Int -> ReadS OrganizationManagedRuleMetadata)
-> ReadS [OrganizationManagedRuleMetadata]
-> ReadPrec OrganizationManagedRuleMetadata
-> ReadPrec [OrganizationManagedRuleMetadata]
-> Read OrganizationManagedRuleMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OrganizationManagedRuleMetadata]
$creadListPrec :: ReadPrec [OrganizationManagedRuleMetadata]
readPrec :: ReadPrec OrganizationManagedRuleMetadata
$creadPrec :: ReadPrec OrganizationManagedRuleMetadata
readList :: ReadS [OrganizationManagedRuleMetadata]
$creadList :: ReadS [OrganizationManagedRuleMetadata]
readsPrec :: Int -> ReadS OrganizationManagedRuleMetadata
$creadsPrec :: Int -> ReadS OrganizationManagedRuleMetadata
Prelude.Read, Int -> OrganizationManagedRuleMetadata -> ShowS
[OrganizationManagedRuleMetadata] -> ShowS
OrganizationManagedRuleMetadata -> String
(Int -> OrganizationManagedRuleMetadata -> ShowS)
-> (OrganizationManagedRuleMetadata -> String)
-> ([OrganizationManagedRuleMetadata] -> ShowS)
-> Show OrganizationManagedRuleMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrganizationManagedRuleMetadata] -> ShowS
$cshowList :: [OrganizationManagedRuleMetadata] -> ShowS
show :: OrganizationManagedRuleMetadata -> String
$cshow :: OrganizationManagedRuleMetadata -> String
showsPrec :: Int -> OrganizationManagedRuleMetadata -> ShowS
$cshowsPrec :: Int -> OrganizationManagedRuleMetadata -> ShowS
Prelude.Show, (forall x.
OrganizationManagedRuleMetadata
-> Rep OrganizationManagedRuleMetadata x)
-> (forall x.
Rep OrganizationManagedRuleMetadata x
-> OrganizationManagedRuleMetadata)
-> Generic OrganizationManagedRuleMetadata
forall x.
Rep OrganizationManagedRuleMetadata x
-> OrganizationManagedRuleMetadata
forall x.
OrganizationManagedRuleMetadata
-> Rep OrganizationManagedRuleMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep OrganizationManagedRuleMetadata x
-> OrganizationManagedRuleMetadata
$cfrom :: forall x.
OrganizationManagedRuleMetadata
-> Rep OrganizationManagedRuleMetadata x
Prelude.Generic)
newOrganizationManagedRuleMetadata ::
Prelude.Text ->
OrganizationManagedRuleMetadata
newOrganizationManagedRuleMetadata :: Text -> OrganizationManagedRuleMetadata
newOrganizationManagedRuleMetadata Text
pRuleIdentifier_ =
OrganizationManagedRuleMetadata' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe MaximumExecutionFrequency
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> OrganizationManagedRuleMetadata
OrganizationManagedRuleMetadata'
{ $sel:inputParameters:OrganizationManagedRuleMetadata' :: Maybe Text
inputParameters =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceIdScope:OrganizationManagedRuleMetadata' :: Maybe Text
resourceIdScope = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tagValueScope:OrganizationManagedRuleMetadata' :: Maybe Text
tagValueScope = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maximumExecutionFrequency:OrganizationManagedRuleMetadata' :: Maybe MaximumExecutionFrequency
maximumExecutionFrequency =
Maybe MaximumExecutionFrequency
forall a. Maybe a
Prelude.Nothing,
$sel:tagKeyScope:OrganizationManagedRuleMetadata' :: Maybe Text
tagKeyScope = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceTypesScope:OrganizationManagedRuleMetadata' :: Maybe [Text]
resourceTypesScope = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:description:OrganizationManagedRuleMetadata' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ruleIdentifier:OrganizationManagedRuleMetadata' :: Text
ruleIdentifier = Text
pRuleIdentifier_
}
organizationManagedRuleMetadata_inputParameters :: Lens.Lens' OrganizationManagedRuleMetadata (Prelude.Maybe Prelude.Text)
organizationManagedRuleMetadata_inputParameters :: (Maybe Text -> f (Maybe Text))
-> OrganizationManagedRuleMetadata
-> f OrganizationManagedRuleMetadata
organizationManagedRuleMetadata_inputParameters = (OrganizationManagedRuleMetadata -> Maybe Text)
-> (OrganizationManagedRuleMetadata
-> Maybe Text -> OrganizationManagedRuleMetadata)
-> Lens
OrganizationManagedRuleMetadata
OrganizationManagedRuleMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationManagedRuleMetadata' {Maybe Text
inputParameters :: Maybe Text
$sel:inputParameters:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> Maybe Text
inputParameters} -> Maybe Text
inputParameters) (\s :: OrganizationManagedRuleMetadata
s@OrganizationManagedRuleMetadata' {} Maybe Text
a -> OrganizationManagedRuleMetadata
s {$sel:inputParameters:OrganizationManagedRuleMetadata' :: Maybe Text
inputParameters = Maybe Text
a} :: OrganizationManagedRuleMetadata)
organizationManagedRuleMetadata_resourceIdScope :: Lens.Lens' OrganizationManagedRuleMetadata (Prelude.Maybe Prelude.Text)
organizationManagedRuleMetadata_resourceIdScope :: (Maybe Text -> f (Maybe Text))
-> OrganizationManagedRuleMetadata
-> f OrganizationManagedRuleMetadata
organizationManagedRuleMetadata_resourceIdScope = (OrganizationManagedRuleMetadata -> Maybe Text)
-> (OrganizationManagedRuleMetadata
-> Maybe Text -> OrganizationManagedRuleMetadata)
-> Lens
OrganizationManagedRuleMetadata
OrganizationManagedRuleMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationManagedRuleMetadata' {Maybe Text
resourceIdScope :: Maybe Text
$sel:resourceIdScope:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> Maybe Text
resourceIdScope} -> Maybe Text
resourceIdScope) (\s :: OrganizationManagedRuleMetadata
s@OrganizationManagedRuleMetadata' {} Maybe Text
a -> OrganizationManagedRuleMetadata
s {$sel:resourceIdScope:OrganizationManagedRuleMetadata' :: Maybe Text
resourceIdScope = Maybe Text
a} :: OrganizationManagedRuleMetadata)
organizationManagedRuleMetadata_tagValueScope :: Lens.Lens' OrganizationManagedRuleMetadata (Prelude.Maybe Prelude.Text)
organizationManagedRuleMetadata_tagValueScope :: (Maybe Text -> f (Maybe Text))
-> OrganizationManagedRuleMetadata
-> f OrganizationManagedRuleMetadata
organizationManagedRuleMetadata_tagValueScope = (OrganizationManagedRuleMetadata -> Maybe Text)
-> (OrganizationManagedRuleMetadata
-> Maybe Text -> OrganizationManagedRuleMetadata)
-> Lens
OrganizationManagedRuleMetadata
OrganizationManagedRuleMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationManagedRuleMetadata' {Maybe Text
tagValueScope :: Maybe Text
$sel:tagValueScope:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> Maybe Text
tagValueScope} -> Maybe Text
tagValueScope) (\s :: OrganizationManagedRuleMetadata
s@OrganizationManagedRuleMetadata' {} Maybe Text
a -> OrganizationManagedRuleMetadata
s {$sel:tagValueScope:OrganizationManagedRuleMetadata' :: Maybe Text
tagValueScope = Maybe Text
a} :: OrganizationManagedRuleMetadata)
organizationManagedRuleMetadata_maximumExecutionFrequency :: Lens.Lens' OrganizationManagedRuleMetadata (Prelude.Maybe MaximumExecutionFrequency)
organizationManagedRuleMetadata_maximumExecutionFrequency :: (Maybe MaximumExecutionFrequency
-> f (Maybe MaximumExecutionFrequency))
-> OrganizationManagedRuleMetadata
-> f OrganizationManagedRuleMetadata
organizationManagedRuleMetadata_maximumExecutionFrequency = (OrganizationManagedRuleMetadata
-> Maybe MaximumExecutionFrequency)
-> (OrganizationManagedRuleMetadata
-> Maybe MaximumExecutionFrequency
-> OrganizationManagedRuleMetadata)
-> Lens
OrganizationManagedRuleMetadata
OrganizationManagedRuleMetadata
(Maybe MaximumExecutionFrequency)
(Maybe MaximumExecutionFrequency)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationManagedRuleMetadata' {Maybe MaximumExecutionFrequency
maximumExecutionFrequency :: Maybe MaximumExecutionFrequency
$sel:maximumExecutionFrequency:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> Maybe MaximumExecutionFrequency
maximumExecutionFrequency} -> Maybe MaximumExecutionFrequency
maximumExecutionFrequency) (\s :: OrganizationManagedRuleMetadata
s@OrganizationManagedRuleMetadata' {} Maybe MaximumExecutionFrequency
a -> OrganizationManagedRuleMetadata
s {$sel:maximumExecutionFrequency:OrganizationManagedRuleMetadata' :: Maybe MaximumExecutionFrequency
maximumExecutionFrequency = Maybe MaximumExecutionFrequency
a} :: OrganizationManagedRuleMetadata)
organizationManagedRuleMetadata_tagKeyScope :: Lens.Lens' OrganizationManagedRuleMetadata (Prelude.Maybe Prelude.Text)
organizationManagedRuleMetadata_tagKeyScope :: (Maybe Text -> f (Maybe Text))
-> OrganizationManagedRuleMetadata
-> f OrganizationManagedRuleMetadata
organizationManagedRuleMetadata_tagKeyScope = (OrganizationManagedRuleMetadata -> Maybe Text)
-> (OrganizationManagedRuleMetadata
-> Maybe Text -> OrganizationManagedRuleMetadata)
-> Lens
OrganizationManagedRuleMetadata
OrganizationManagedRuleMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationManagedRuleMetadata' {Maybe Text
tagKeyScope :: Maybe Text
$sel:tagKeyScope:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> Maybe Text
tagKeyScope} -> Maybe Text
tagKeyScope) (\s :: OrganizationManagedRuleMetadata
s@OrganizationManagedRuleMetadata' {} Maybe Text
a -> OrganizationManagedRuleMetadata
s {$sel:tagKeyScope:OrganizationManagedRuleMetadata' :: Maybe Text
tagKeyScope = Maybe Text
a} :: OrganizationManagedRuleMetadata)
organizationManagedRuleMetadata_resourceTypesScope :: Lens.Lens' OrganizationManagedRuleMetadata (Prelude.Maybe [Prelude.Text])
organizationManagedRuleMetadata_resourceTypesScope :: (Maybe [Text] -> f (Maybe [Text]))
-> OrganizationManagedRuleMetadata
-> f OrganizationManagedRuleMetadata
organizationManagedRuleMetadata_resourceTypesScope = (OrganizationManagedRuleMetadata -> Maybe [Text])
-> (OrganizationManagedRuleMetadata
-> Maybe [Text] -> OrganizationManagedRuleMetadata)
-> Lens
OrganizationManagedRuleMetadata
OrganizationManagedRuleMetadata
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationManagedRuleMetadata' {Maybe [Text]
resourceTypesScope :: Maybe [Text]
$sel:resourceTypesScope:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> Maybe [Text]
resourceTypesScope} -> Maybe [Text]
resourceTypesScope) (\s :: OrganizationManagedRuleMetadata
s@OrganizationManagedRuleMetadata' {} Maybe [Text]
a -> OrganizationManagedRuleMetadata
s {$sel:resourceTypesScope:OrganizationManagedRuleMetadata' :: Maybe [Text]
resourceTypesScope = Maybe [Text]
a} :: OrganizationManagedRuleMetadata) ((Maybe [Text] -> f (Maybe [Text]))
-> OrganizationManagedRuleMetadata
-> f OrganizationManagedRuleMetadata)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> OrganizationManagedRuleMetadata
-> f OrganizationManagedRuleMetadata
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
organizationManagedRuleMetadata_description :: Lens.Lens' OrganizationManagedRuleMetadata (Prelude.Maybe Prelude.Text)
organizationManagedRuleMetadata_description :: (Maybe Text -> f (Maybe Text))
-> OrganizationManagedRuleMetadata
-> f OrganizationManagedRuleMetadata
organizationManagedRuleMetadata_description = (OrganizationManagedRuleMetadata -> Maybe Text)
-> (OrganizationManagedRuleMetadata
-> Maybe Text -> OrganizationManagedRuleMetadata)
-> Lens
OrganizationManagedRuleMetadata
OrganizationManagedRuleMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationManagedRuleMetadata' {Maybe Text
description :: Maybe Text
$sel:description:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> Maybe Text
description} -> Maybe Text
description) (\s :: OrganizationManagedRuleMetadata
s@OrganizationManagedRuleMetadata' {} Maybe Text
a -> OrganizationManagedRuleMetadata
s {$sel:description:OrganizationManagedRuleMetadata' :: Maybe Text
description = Maybe Text
a} :: OrganizationManagedRuleMetadata)
organizationManagedRuleMetadata_ruleIdentifier :: Lens.Lens' OrganizationManagedRuleMetadata Prelude.Text
organizationManagedRuleMetadata_ruleIdentifier :: (Text -> f Text)
-> OrganizationManagedRuleMetadata
-> f OrganizationManagedRuleMetadata
organizationManagedRuleMetadata_ruleIdentifier = (OrganizationManagedRuleMetadata -> Text)
-> (OrganizationManagedRuleMetadata
-> Text -> OrganizationManagedRuleMetadata)
-> Lens
OrganizationManagedRuleMetadata
OrganizationManagedRuleMetadata
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationManagedRuleMetadata' {Text
ruleIdentifier :: Text
$sel:ruleIdentifier:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> Text
ruleIdentifier} -> Text
ruleIdentifier) (\s :: OrganizationManagedRuleMetadata
s@OrganizationManagedRuleMetadata' {} Text
a -> OrganizationManagedRuleMetadata
s {$sel:ruleIdentifier:OrganizationManagedRuleMetadata' :: Text
ruleIdentifier = Text
a} :: OrganizationManagedRuleMetadata)
instance
Core.FromJSON
OrganizationManagedRuleMetadata
where
parseJSON :: Value -> Parser OrganizationManagedRuleMetadata
parseJSON =
String
-> (Object -> Parser OrganizationManagedRuleMetadata)
-> Value
-> Parser OrganizationManagedRuleMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"OrganizationManagedRuleMetadata"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe MaximumExecutionFrequency
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> OrganizationManagedRuleMetadata
OrganizationManagedRuleMetadata'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe MaximumExecutionFrequency
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> OrganizationManagedRuleMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe MaximumExecutionFrequency
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> OrganizationManagedRuleMetadata)
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
-> OrganizationManagedRuleMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe MaximumExecutionFrequency
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> OrganizationManagedRuleMetadata)
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
-> OrganizationManagedRuleMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe MaximumExecutionFrequency
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> OrganizationManagedRuleMetadata)
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
-> OrganizationManagedRuleMetadata)
-> Parser (Maybe MaximumExecutionFrequency)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> OrganizationManagedRuleMetadata)
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
-> OrganizationManagedRuleMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Text -> Text -> OrganizationManagedRuleMetadata)
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 -> OrganizationManagedRuleMetadata)
-> Parser (Maybe [Text])
-> Parser (Maybe Text -> Text -> OrganizationManagedRuleMetadata)
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 -> OrganizationManagedRuleMetadata)
-> Parser (Maybe Text)
-> Parser (Text -> OrganizationManagedRuleMetadata)
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 -> OrganizationManagedRuleMetadata)
-> Parser Text -> Parser OrganizationManagedRuleMetadata
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
"RuleIdentifier")
)
instance
Prelude.Hashable
OrganizationManagedRuleMetadata
instance
Prelude.NFData
OrganizationManagedRuleMetadata
instance Core.ToJSON OrganizationManagedRuleMetadata where
toJSON :: OrganizationManagedRuleMetadata -> Value
toJSON OrganizationManagedRuleMetadata' {Maybe [Text]
Maybe Text
Maybe MaximumExecutionFrequency
Text
ruleIdentifier :: Text
description :: Maybe Text
resourceTypesScope :: Maybe [Text]
tagKeyScope :: Maybe Text
maximumExecutionFrequency :: Maybe MaximumExecutionFrequency
tagValueScope :: Maybe Text
resourceIdScope :: Maybe Text
inputParameters :: Maybe Text
$sel:ruleIdentifier:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> Text
$sel:description:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> Maybe Text
$sel:resourceTypesScope:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> Maybe [Text]
$sel:tagKeyScope:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> Maybe Text
$sel:maximumExecutionFrequency:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> Maybe MaximumExecutionFrequency
$sel:tagValueScope:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> Maybe Text
$sel:resourceIdScope:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> Maybe Text
$sel:inputParameters:OrganizationManagedRuleMetadata' :: OrganizationManagedRuleMetadata -> 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
"RuleIdentifier" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
ruleIdentifier)
]
)