module Stratosphere.SecurityHub.ConfigurationPolicy.SecurityHubPolicyProperty (
        module Exports, SecurityHubPolicyProperty(..),
        mkSecurityHubPolicyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SecurityHub.ConfigurationPolicy.SecurityControlsConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SecurityHubPolicyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-configurationpolicy-securityhubpolicy.html>
    SecurityHubPolicyProperty {SecurityHubPolicyProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-configurationpolicy-securityhubpolicy.html#cfn-securityhub-configurationpolicy-securityhubpolicy-enabledstandardidentifiers>
                               SecurityHubPolicyProperty -> Maybe (ValueList Text)
enabledStandardIdentifiers :: (Prelude.Maybe (ValueList Prelude.Text)),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-configurationpolicy-securityhubpolicy.html#cfn-securityhub-configurationpolicy-securityhubpolicy-securitycontrolsconfiguration>
                               SecurityHubPolicyProperty
-> Maybe SecurityControlsConfigurationProperty
securityControlsConfiguration :: (Prelude.Maybe SecurityControlsConfigurationProperty),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-configurationpolicy-securityhubpolicy.html#cfn-securityhub-configurationpolicy-securityhubpolicy-serviceenabled>
                               SecurityHubPolicyProperty -> Maybe (Value Bool)
serviceEnabled :: (Prelude.Maybe (Value Prelude.Bool))}
  deriving stock (SecurityHubPolicyProperty -> SecurityHubPolicyProperty -> Bool
(SecurityHubPolicyProperty -> SecurityHubPolicyProperty -> Bool)
-> (SecurityHubPolicyProperty -> SecurityHubPolicyProperty -> Bool)
-> Eq SecurityHubPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SecurityHubPolicyProperty -> SecurityHubPolicyProperty -> Bool
== :: SecurityHubPolicyProperty -> SecurityHubPolicyProperty -> Bool
$c/= :: SecurityHubPolicyProperty -> SecurityHubPolicyProperty -> Bool
/= :: SecurityHubPolicyProperty -> SecurityHubPolicyProperty -> Bool
Prelude.Eq, Int -> SecurityHubPolicyProperty -> ShowS
[SecurityHubPolicyProperty] -> ShowS
SecurityHubPolicyProperty -> String
(Int -> SecurityHubPolicyProperty -> ShowS)
-> (SecurityHubPolicyProperty -> String)
-> ([SecurityHubPolicyProperty] -> ShowS)
-> Show SecurityHubPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SecurityHubPolicyProperty -> ShowS
showsPrec :: Int -> SecurityHubPolicyProperty -> ShowS
$cshow :: SecurityHubPolicyProperty -> String
show :: SecurityHubPolicyProperty -> String
$cshowList :: [SecurityHubPolicyProperty] -> ShowS
showList :: [SecurityHubPolicyProperty] -> ShowS
Prelude.Show)
mkSecurityHubPolicyProperty :: SecurityHubPolicyProperty
mkSecurityHubPolicyProperty :: SecurityHubPolicyProperty
mkSecurityHubPolicyProperty
  = SecurityHubPolicyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       enabledStandardIdentifiers :: Maybe (ValueList Text)
enabledStandardIdentifiers = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       securityControlsConfiguration :: Maybe SecurityControlsConfigurationProperty
securityControlsConfiguration = Maybe SecurityControlsConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       serviceEnabled :: Maybe (Value Bool)
serviceEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SecurityHubPolicyProperty where
  toResourceProperties :: SecurityHubPolicyProperty -> ResourceProperties
toResourceProperties SecurityHubPolicyProperty {Maybe (ValueList Text)
Maybe (Value Bool)
Maybe SecurityControlsConfigurationProperty
()
haddock_workaround_ :: SecurityHubPolicyProperty -> ()
enabledStandardIdentifiers :: SecurityHubPolicyProperty -> Maybe (ValueList Text)
securityControlsConfiguration :: SecurityHubPolicyProperty
-> Maybe SecurityControlsConfigurationProperty
serviceEnabled :: SecurityHubPolicyProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabledStandardIdentifiers :: Maybe (ValueList Text)
securityControlsConfiguration :: Maybe SecurityControlsConfigurationProperty
serviceEnabled :: Maybe (Value Bool)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SecurityHub::ConfigurationPolicy.SecurityHubPolicy",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> ValueList 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
"EnabledStandardIdentifiers"
                              (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
enabledStandardIdentifiers,
                            Key -> SecurityControlsConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SecurityControlsConfiguration"
                              (SecurityControlsConfigurationProperty -> (Key, Value))
-> Maybe SecurityControlsConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SecurityControlsConfigurationProperty
securityControlsConfiguration,
                            Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ServiceEnabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
serviceEnabled])}
instance JSON.ToJSON SecurityHubPolicyProperty where
  toJSON :: SecurityHubPolicyProperty -> Value
toJSON SecurityHubPolicyProperty {Maybe (ValueList Text)
Maybe (Value Bool)
Maybe SecurityControlsConfigurationProperty
()
haddock_workaround_ :: SecurityHubPolicyProperty -> ()
enabledStandardIdentifiers :: SecurityHubPolicyProperty -> Maybe (ValueList Text)
securityControlsConfiguration :: SecurityHubPolicyProperty
-> Maybe SecurityControlsConfigurationProperty
serviceEnabled :: SecurityHubPolicyProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabledStandardIdentifiers :: Maybe (ValueList Text)
securityControlsConfiguration :: Maybe SecurityControlsConfigurationProperty
serviceEnabled :: Maybe (Value Bool)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> ValueList 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
"EnabledStandardIdentifiers"
                 (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
enabledStandardIdentifiers,
               Key -> SecurityControlsConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SecurityControlsConfiguration"
                 (SecurityControlsConfigurationProperty -> (Key, Value))
-> Maybe SecurityControlsConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SecurityControlsConfigurationProperty
securityControlsConfiguration,
               Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ServiceEnabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
serviceEnabled]))
instance Property "EnabledStandardIdentifiers" SecurityHubPolicyProperty where
  type PropertyType "EnabledStandardIdentifiers" SecurityHubPolicyProperty = ValueList Prelude.Text
  set :: PropertyType "EnabledStandardIdentifiers" SecurityHubPolicyProperty
-> SecurityHubPolicyProperty -> SecurityHubPolicyProperty
set PropertyType "EnabledStandardIdentifiers" SecurityHubPolicyProperty
newValue SecurityHubPolicyProperty {Maybe (ValueList Text)
Maybe (Value Bool)
Maybe SecurityControlsConfigurationProperty
()
haddock_workaround_ :: SecurityHubPolicyProperty -> ()
enabledStandardIdentifiers :: SecurityHubPolicyProperty -> Maybe (ValueList Text)
securityControlsConfiguration :: SecurityHubPolicyProperty
-> Maybe SecurityControlsConfigurationProperty
serviceEnabled :: SecurityHubPolicyProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabledStandardIdentifiers :: Maybe (ValueList Text)
securityControlsConfiguration :: Maybe SecurityControlsConfigurationProperty
serviceEnabled :: Maybe (Value Bool)
..}
    = SecurityHubPolicyProperty
        {enabledStandardIdentifiers :: Maybe (ValueList Text)
enabledStandardIdentifiers = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EnabledStandardIdentifiers" SecurityHubPolicyProperty
ValueList Text
newValue, Maybe (Value Bool)
Maybe SecurityControlsConfigurationProperty
()
haddock_workaround_ :: ()
securityControlsConfiguration :: Maybe SecurityControlsConfigurationProperty
serviceEnabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
securityControlsConfiguration :: Maybe SecurityControlsConfigurationProperty
serviceEnabled :: Maybe (Value Bool)
..}
instance Property "SecurityControlsConfiguration" SecurityHubPolicyProperty where
  type PropertyType "SecurityControlsConfiguration" SecurityHubPolicyProperty = SecurityControlsConfigurationProperty
  set :: PropertyType
  "SecurityControlsConfiguration" SecurityHubPolicyProperty
-> SecurityHubPolicyProperty -> SecurityHubPolicyProperty
set PropertyType
  "SecurityControlsConfiguration" SecurityHubPolicyProperty
newValue SecurityHubPolicyProperty {Maybe (ValueList Text)
Maybe (Value Bool)
Maybe SecurityControlsConfigurationProperty
()
haddock_workaround_ :: SecurityHubPolicyProperty -> ()
enabledStandardIdentifiers :: SecurityHubPolicyProperty -> Maybe (ValueList Text)
securityControlsConfiguration :: SecurityHubPolicyProperty
-> Maybe SecurityControlsConfigurationProperty
serviceEnabled :: SecurityHubPolicyProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabledStandardIdentifiers :: Maybe (ValueList Text)
securityControlsConfiguration :: Maybe SecurityControlsConfigurationProperty
serviceEnabled :: Maybe (Value Bool)
..}
    = SecurityHubPolicyProperty
        {securityControlsConfiguration :: Maybe SecurityControlsConfigurationProperty
securityControlsConfiguration = SecurityControlsConfigurationProperty
-> Maybe SecurityControlsConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "SecurityControlsConfiguration" SecurityHubPolicyProperty
SecurityControlsConfigurationProperty
newValue, Maybe (ValueList Text)
Maybe (Value Bool)
()
haddock_workaround_ :: ()
enabledStandardIdentifiers :: Maybe (ValueList Text)
serviceEnabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
enabledStandardIdentifiers :: Maybe (ValueList Text)
serviceEnabled :: Maybe (Value Bool)
..}
instance Property "ServiceEnabled" SecurityHubPolicyProperty where
  type PropertyType "ServiceEnabled" SecurityHubPolicyProperty = Value Prelude.Bool
  set :: PropertyType "ServiceEnabled" SecurityHubPolicyProperty
-> SecurityHubPolicyProperty -> SecurityHubPolicyProperty
set PropertyType "ServiceEnabled" SecurityHubPolicyProperty
newValue SecurityHubPolicyProperty {Maybe (ValueList Text)
Maybe (Value Bool)
Maybe SecurityControlsConfigurationProperty
()
haddock_workaround_ :: SecurityHubPolicyProperty -> ()
enabledStandardIdentifiers :: SecurityHubPolicyProperty -> Maybe (ValueList Text)
securityControlsConfiguration :: SecurityHubPolicyProperty
-> Maybe SecurityControlsConfigurationProperty
serviceEnabled :: SecurityHubPolicyProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
enabledStandardIdentifiers :: Maybe (ValueList Text)
securityControlsConfiguration :: Maybe SecurityControlsConfigurationProperty
serviceEnabled :: Maybe (Value Bool)
..}
    = SecurityHubPolicyProperty
        {serviceEnabled :: Maybe (Value Bool)
serviceEnabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ServiceEnabled" SecurityHubPolicyProperty
Value Bool
newValue, Maybe (ValueList Text)
Maybe SecurityControlsConfigurationProperty
()
haddock_workaround_ :: ()
enabledStandardIdentifiers :: Maybe (ValueList Text)
securityControlsConfiguration :: Maybe SecurityControlsConfigurationProperty
haddock_workaround_ :: ()
enabledStandardIdentifiers :: Maybe (ValueList Text)
securityControlsConfiguration :: Maybe SecurityControlsConfigurationProperty
..}