module Stratosphere.SecurityHub.ConfigurationPolicy (
module Exports, ConfigurationPolicy(..), mkConfigurationPolicy
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SecurityHub.ConfigurationPolicy.PolicyProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConfigurationPolicy
=
ConfigurationPolicy {ConfigurationPolicy -> ()
haddock_workaround_ :: (),
ConfigurationPolicy -> PolicyProperty
configurationPolicy :: PolicyProperty,
ConfigurationPolicy -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
ConfigurationPolicy -> Value Text
name :: (Value Prelude.Text),
ConfigurationPolicy -> Maybe (Map Text (Value Text))
tags :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
deriving stock (ConfigurationPolicy -> ConfigurationPolicy -> Bool
(ConfigurationPolicy -> ConfigurationPolicy -> Bool)
-> (ConfigurationPolicy -> ConfigurationPolicy -> Bool)
-> Eq ConfigurationPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConfigurationPolicy -> ConfigurationPolicy -> Bool
== :: ConfigurationPolicy -> ConfigurationPolicy -> Bool
$c/= :: ConfigurationPolicy -> ConfigurationPolicy -> Bool
/= :: ConfigurationPolicy -> ConfigurationPolicy -> Bool
Prelude.Eq, Int -> ConfigurationPolicy -> ShowS
[ConfigurationPolicy] -> ShowS
ConfigurationPolicy -> String
(Int -> ConfigurationPolicy -> ShowS)
-> (ConfigurationPolicy -> String)
-> ([ConfigurationPolicy] -> ShowS)
-> Show ConfigurationPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConfigurationPolicy -> ShowS
showsPrec :: Int -> ConfigurationPolicy -> ShowS
$cshow :: ConfigurationPolicy -> String
show :: ConfigurationPolicy -> String
$cshowList :: [ConfigurationPolicy] -> ShowS
showList :: [ConfigurationPolicy] -> ShowS
Prelude.Show)
mkConfigurationPolicy ::
PolicyProperty -> Value Prelude.Text -> ConfigurationPolicy
mkConfigurationPolicy :: PolicyProperty -> Value Text -> ConfigurationPolicy
mkConfigurationPolicy PolicyProperty
configurationPolicy Value Text
name
= ConfigurationPolicy
{haddock_workaround_ :: ()
haddock_workaround_ = (),
configurationPolicy :: PolicyProperty
configurationPolicy = PolicyProperty
configurationPolicy, name :: Value Text
name = Value Text
name,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe (Map Text (Value Text))
tags = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConfigurationPolicy where
toResourceProperties :: ConfigurationPolicy -> ResourceProperties
toResourceProperties ConfigurationPolicy {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
PolicyProperty
haddock_workaround_ :: ConfigurationPolicy -> ()
configurationPolicy :: ConfigurationPolicy -> PolicyProperty
description :: ConfigurationPolicy -> Maybe (Value Text)
name :: ConfigurationPolicy -> Value Text
tags :: ConfigurationPolicy -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
configurationPolicy :: PolicyProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SecurityHub::ConfigurationPolicy",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ConfigurationPolicy" Key -> PolicyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= PolicyProperty
configurationPolicy,
Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
Key -> Map Text (Value Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags]))}
instance JSON.ToJSON ConfigurationPolicy where
toJSON :: ConfigurationPolicy -> Value
toJSON ConfigurationPolicy {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
PolicyProperty
haddock_workaround_ :: ConfigurationPolicy -> ()
configurationPolicy :: ConfigurationPolicy -> PolicyProperty
description :: ConfigurationPolicy -> Maybe (Value Text)
name :: ConfigurationPolicy -> Value Text
tags :: ConfigurationPolicy -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
configurationPolicy :: PolicyProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"ConfigurationPolicy" Key -> PolicyProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= PolicyProperty
configurationPolicy,
Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
Key -> Map Text (Value Text) -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags])))
instance Property "ConfigurationPolicy" ConfigurationPolicy where
type PropertyType "ConfigurationPolicy" ConfigurationPolicy = PolicyProperty
set :: PropertyType "ConfigurationPolicy" ConfigurationPolicy
-> ConfigurationPolicy -> ConfigurationPolicy
set PropertyType "ConfigurationPolicy" ConfigurationPolicy
newValue ConfigurationPolicy {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
PolicyProperty
haddock_workaround_ :: ConfigurationPolicy -> ()
configurationPolicy :: ConfigurationPolicy -> PolicyProperty
description :: ConfigurationPolicy -> Maybe (Value Text)
name :: ConfigurationPolicy -> Value Text
tags :: ConfigurationPolicy -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
configurationPolicy :: PolicyProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
= ConfigurationPolicy {configurationPolicy :: PolicyProperty
configurationPolicy = PropertyType "ConfigurationPolicy" ConfigurationPolicy
PolicyProperty
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
instance Property "Description" ConfigurationPolicy where
type PropertyType "Description" ConfigurationPolicy = Value Prelude.Text
set :: PropertyType "Description" ConfigurationPolicy
-> ConfigurationPolicy -> ConfigurationPolicy
set PropertyType "Description" ConfigurationPolicy
newValue ConfigurationPolicy {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
PolicyProperty
haddock_workaround_ :: ConfigurationPolicy -> ()
configurationPolicy :: ConfigurationPolicy -> PolicyProperty
description :: ConfigurationPolicy -> Maybe (Value Text)
name :: ConfigurationPolicy -> Value Text
tags :: ConfigurationPolicy -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
configurationPolicy :: PolicyProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
= ConfigurationPolicy {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" ConfigurationPolicy
Value Text
newValue, Maybe (Map Text (Value Text))
()
Value Text
PolicyProperty
haddock_workaround_ :: ()
configurationPolicy :: PolicyProperty
name :: Value Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
configurationPolicy :: PolicyProperty
name :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
instance Property "Name" ConfigurationPolicy where
type PropertyType "Name" ConfigurationPolicy = Value Prelude.Text
set :: PropertyType "Name" ConfigurationPolicy
-> ConfigurationPolicy -> ConfigurationPolicy
set PropertyType "Name" ConfigurationPolicy
newValue ConfigurationPolicy {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
PolicyProperty
haddock_workaround_ :: ConfigurationPolicy -> ()
configurationPolicy :: ConfigurationPolicy -> PolicyProperty
description :: ConfigurationPolicy -> Maybe (Value Text)
name :: ConfigurationPolicy -> Value Text
tags :: ConfigurationPolicy -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
configurationPolicy :: PolicyProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
= ConfigurationPolicy {name :: Value Text
name = PropertyType "Name" ConfigurationPolicy
Value Text
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
PolicyProperty
haddock_workaround_ :: ()
configurationPolicy :: PolicyProperty
description :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
configurationPolicy :: PolicyProperty
description :: Maybe (Value Text)
tags :: Maybe (Map Text (Value Text))
..}
instance Property "Tags" ConfigurationPolicy where
type PropertyType "Tags" ConfigurationPolicy = Prelude.Map Prelude.Text (Value Prelude.Text)
set :: PropertyType "Tags" ConfigurationPolicy
-> ConfigurationPolicy -> ConfigurationPolicy
set PropertyType "Tags" ConfigurationPolicy
newValue ConfigurationPolicy {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
PolicyProperty
haddock_workaround_ :: ConfigurationPolicy -> ()
configurationPolicy :: ConfigurationPolicy -> PolicyProperty
description :: ConfigurationPolicy -> Maybe (Value Text)
name :: ConfigurationPolicy -> Value Text
tags :: ConfigurationPolicy -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
configurationPolicy :: PolicyProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
= ConfigurationPolicy {tags :: Maybe (Map Text (Value Text))
tags = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "Tags" ConfigurationPolicy
newValue, Maybe (Value Text)
()
Value Text
PolicyProperty
haddock_workaround_ :: ()
configurationPolicy :: PolicyProperty
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
configurationPolicy :: PolicyProperty
description :: Maybe (Value Text)
name :: Value Text
..}