module Stratosphere.SecurityHub.SecurityControl (
        module Exports, SecurityControl(..), mkSecurityControl
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SecurityHub.SecurityControl.ParameterConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SecurityControl
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-securitycontrol.html>
    SecurityControl {SecurityControl -> ()
haddock_workaround_ :: (),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-securitycontrol.html#cfn-securityhub-securitycontrol-lastupdatereason>
                     SecurityControl -> Maybe (Value Text)
lastUpdateReason :: (Prelude.Maybe (Value Prelude.Text)),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-securitycontrol.html#cfn-securityhub-securitycontrol-parameters>
                     SecurityControl -> Map Text ParameterConfigurationProperty
parameters :: (Prelude.Map Prelude.Text ParameterConfigurationProperty),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-securitycontrol.html#cfn-securityhub-securitycontrol-securitycontrolarn>
                     SecurityControl -> Maybe (Value Text)
securityControlArn :: (Prelude.Maybe (Value Prelude.Text)),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-securitycontrol.html#cfn-securityhub-securitycontrol-securitycontrolid>
                     SecurityControl -> Maybe (Value Text)
securityControlId :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (SecurityControl -> SecurityControl -> Bool
(SecurityControl -> SecurityControl -> Bool)
-> (SecurityControl -> SecurityControl -> Bool)
-> Eq SecurityControl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SecurityControl -> SecurityControl -> Bool
== :: SecurityControl -> SecurityControl -> Bool
$c/= :: SecurityControl -> SecurityControl -> Bool
/= :: SecurityControl -> SecurityControl -> Bool
Prelude.Eq, Int -> SecurityControl -> ShowS
[SecurityControl] -> ShowS
SecurityControl -> String
(Int -> SecurityControl -> ShowS)
-> (SecurityControl -> String)
-> ([SecurityControl] -> ShowS)
-> Show SecurityControl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SecurityControl -> ShowS
showsPrec :: Int -> SecurityControl -> ShowS
$cshow :: SecurityControl -> String
show :: SecurityControl -> String
$cshowList :: [SecurityControl] -> ShowS
showList :: [SecurityControl] -> ShowS
Prelude.Show)
mkSecurityControl ::
  Prelude.Map Prelude.Text ParameterConfigurationProperty
  -> SecurityControl
mkSecurityControl :: Map Text ParameterConfigurationProperty -> SecurityControl
mkSecurityControl Map Text ParameterConfigurationProperty
parameters
  = SecurityControl
      {haddock_workaround_ :: ()
haddock_workaround_ = (), parameters :: Map Text ParameterConfigurationProperty
parameters = Map Text ParameterConfigurationProperty
parameters,
       lastUpdateReason :: Maybe (Value Text)
lastUpdateReason = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       securityControlArn :: Maybe (Value Text)
securityControlArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       securityControlId :: Maybe (Value Text)
securityControlId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SecurityControl where
  toResourceProperties :: SecurityControl -> ResourceProperties
toResourceProperties SecurityControl {Maybe (Value Text)
()
Map Text ParameterConfigurationProperty
haddock_workaround_ :: SecurityControl -> ()
lastUpdateReason :: SecurityControl -> Maybe (Value Text)
parameters :: SecurityControl -> Map Text ParameterConfigurationProperty
securityControlArn :: SecurityControl -> Maybe (Value Text)
securityControlId :: SecurityControl -> Maybe (Value Text)
haddock_workaround_ :: ()
lastUpdateReason :: Maybe (Value Text)
parameters :: Map Text ParameterConfigurationProperty
securityControlArn :: Maybe (Value Text)
securityControlId :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SecurityHub::SecurityControl",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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
"Parameters" Key -> Map Text ParameterConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Map Text ParameterConfigurationProperty
parameters]
                           ([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
"LastUpdateReason" (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)
lastUpdateReason,
                               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
"SecurityControlArn" (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)
securityControlArn,
                               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
"SecurityControlId" (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)
securityControlId]))}
instance JSON.ToJSON SecurityControl where
  toJSON :: SecurityControl -> Value
toJSON SecurityControl {Maybe (Value Text)
()
Map Text ParameterConfigurationProperty
haddock_workaround_ :: SecurityControl -> ()
lastUpdateReason :: SecurityControl -> Maybe (Value Text)
parameters :: SecurityControl -> Map Text ParameterConfigurationProperty
securityControlArn :: SecurityControl -> Maybe (Value Text)
securityControlId :: SecurityControl -> Maybe (Value Text)
haddock_workaround_ :: ()
lastUpdateReason :: Maybe (Value Text)
parameters :: Map Text ParameterConfigurationProperty
securityControlArn :: Maybe (Value Text)
securityControlId :: Maybe (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
"Parameters" Key -> Map Text ParameterConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Map Text ParameterConfigurationProperty
parameters]
              ([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
"LastUpdateReason" (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)
lastUpdateReason,
                  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
"SecurityControlArn" (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)
securityControlArn,
                  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
"SecurityControlId" (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)
securityControlId])))
instance Property "LastUpdateReason" SecurityControl where
  type PropertyType "LastUpdateReason" SecurityControl = Value Prelude.Text
  set :: PropertyType "LastUpdateReason" SecurityControl
-> SecurityControl -> SecurityControl
set PropertyType "LastUpdateReason" SecurityControl
newValue SecurityControl {Maybe (Value Text)
()
Map Text ParameterConfigurationProperty
haddock_workaround_ :: SecurityControl -> ()
lastUpdateReason :: SecurityControl -> Maybe (Value Text)
parameters :: SecurityControl -> Map Text ParameterConfigurationProperty
securityControlArn :: SecurityControl -> Maybe (Value Text)
securityControlId :: SecurityControl -> Maybe (Value Text)
haddock_workaround_ :: ()
lastUpdateReason :: Maybe (Value Text)
parameters :: Map Text ParameterConfigurationProperty
securityControlArn :: Maybe (Value Text)
securityControlId :: Maybe (Value Text)
..}
    = SecurityControl {lastUpdateReason :: Maybe (Value Text)
lastUpdateReason = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LastUpdateReason" SecurityControl
Value Text
newValue, Maybe (Value Text)
()
Map Text ParameterConfigurationProperty
haddock_workaround_ :: ()
parameters :: Map Text ParameterConfigurationProperty
securityControlArn :: Maybe (Value Text)
securityControlId :: Maybe (Value Text)
haddock_workaround_ :: ()
parameters :: Map Text ParameterConfigurationProperty
securityControlArn :: Maybe (Value Text)
securityControlId :: Maybe (Value Text)
..}
instance Property "Parameters" SecurityControl where
  type PropertyType "Parameters" SecurityControl = Prelude.Map Prelude.Text ParameterConfigurationProperty
  set :: PropertyType "Parameters" SecurityControl
-> SecurityControl -> SecurityControl
set PropertyType "Parameters" SecurityControl
newValue SecurityControl {Maybe (Value Text)
()
Map Text ParameterConfigurationProperty
haddock_workaround_ :: SecurityControl -> ()
lastUpdateReason :: SecurityControl -> Maybe (Value Text)
parameters :: SecurityControl -> Map Text ParameterConfigurationProperty
securityControlArn :: SecurityControl -> Maybe (Value Text)
securityControlId :: SecurityControl -> Maybe (Value Text)
haddock_workaround_ :: ()
lastUpdateReason :: Maybe (Value Text)
parameters :: Map Text ParameterConfigurationProperty
securityControlArn :: Maybe (Value Text)
securityControlId :: Maybe (Value Text)
..}
    = SecurityControl {parameters :: Map Text ParameterConfigurationProperty
parameters = Map Text ParameterConfigurationProperty
PropertyType "Parameters" SecurityControl
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
lastUpdateReason :: Maybe (Value Text)
securityControlArn :: Maybe (Value Text)
securityControlId :: Maybe (Value Text)
haddock_workaround_ :: ()
lastUpdateReason :: Maybe (Value Text)
securityControlArn :: Maybe (Value Text)
securityControlId :: Maybe (Value Text)
..}
instance Property "SecurityControlArn" SecurityControl where
  type PropertyType "SecurityControlArn" SecurityControl = Value Prelude.Text
  set :: PropertyType "SecurityControlArn" SecurityControl
-> SecurityControl -> SecurityControl
set PropertyType "SecurityControlArn" SecurityControl
newValue SecurityControl {Maybe (Value Text)
()
Map Text ParameterConfigurationProperty
haddock_workaround_ :: SecurityControl -> ()
lastUpdateReason :: SecurityControl -> Maybe (Value Text)
parameters :: SecurityControl -> Map Text ParameterConfigurationProperty
securityControlArn :: SecurityControl -> Maybe (Value Text)
securityControlId :: SecurityControl -> Maybe (Value Text)
haddock_workaround_ :: ()
lastUpdateReason :: Maybe (Value Text)
parameters :: Map Text ParameterConfigurationProperty
securityControlArn :: Maybe (Value Text)
securityControlId :: Maybe (Value Text)
..}
    = SecurityControl {securityControlArn :: Maybe (Value Text)
securityControlArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SecurityControlArn" SecurityControl
Value Text
newValue, Maybe (Value Text)
()
Map Text ParameterConfigurationProperty
haddock_workaround_ :: ()
lastUpdateReason :: Maybe (Value Text)
parameters :: Map Text ParameterConfigurationProperty
securityControlId :: Maybe (Value Text)
haddock_workaround_ :: ()
lastUpdateReason :: Maybe (Value Text)
parameters :: Map Text ParameterConfigurationProperty
securityControlId :: Maybe (Value Text)
..}
instance Property "SecurityControlId" SecurityControl where
  type PropertyType "SecurityControlId" SecurityControl = Value Prelude.Text
  set :: PropertyType "SecurityControlId" SecurityControl
-> SecurityControl -> SecurityControl
set PropertyType "SecurityControlId" SecurityControl
newValue SecurityControl {Maybe (Value Text)
()
Map Text ParameterConfigurationProperty
haddock_workaround_ :: SecurityControl -> ()
lastUpdateReason :: SecurityControl -> Maybe (Value Text)
parameters :: SecurityControl -> Map Text ParameterConfigurationProperty
securityControlArn :: SecurityControl -> Maybe (Value Text)
securityControlId :: SecurityControl -> Maybe (Value Text)
haddock_workaround_ :: ()
lastUpdateReason :: Maybe (Value Text)
parameters :: Map Text ParameterConfigurationProperty
securityControlArn :: Maybe (Value Text)
securityControlId :: Maybe (Value Text)
..}
    = SecurityControl {securityControlId :: Maybe (Value Text)
securityControlId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SecurityControlId" SecurityControl
Value Text
newValue, Maybe (Value Text)
()
Map Text ParameterConfigurationProperty
haddock_workaround_ :: ()
lastUpdateReason :: Maybe (Value Text)
parameters :: Map Text ParameterConfigurationProperty
securityControlArn :: Maybe (Value Text)
haddock_workaround_ :: ()
lastUpdateReason :: Maybe (Value Text)
parameters :: Map Text ParameterConfigurationProperty
securityControlArn :: Maybe (Value Text)
..}