module Stratosphere.InspectorV2.CisScanConfiguration (
        module Exports, CisScanConfiguration(..), mkCisScanConfiguration
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.InspectorV2.CisScanConfiguration.CisTargetsProperty as Exports
import {-# SOURCE #-} Stratosphere.InspectorV2.CisScanConfiguration.ScheduleProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CisScanConfiguration
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspectorv2-cisscanconfiguration.html>
    CisScanConfiguration {CisScanConfiguration -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspectorv2-cisscanconfiguration.html#cfn-inspectorv2-cisscanconfiguration-scanname>
                          CisScanConfiguration -> Value Text
scanName :: (Value Prelude.Text),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspectorv2-cisscanconfiguration.html#cfn-inspectorv2-cisscanconfiguration-schedule>
                          CisScanConfiguration -> ScheduleProperty
schedule :: ScheduleProperty,
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspectorv2-cisscanconfiguration.html#cfn-inspectorv2-cisscanconfiguration-securitylevel>
                          CisScanConfiguration -> Value Text
securityLevel :: (Value Prelude.Text),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspectorv2-cisscanconfiguration.html#cfn-inspectorv2-cisscanconfiguration-tags>
                          CisScanConfiguration -> Maybe (Map Text (Value Text))
tags :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text))),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-inspectorv2-cisscanconfiguration.html#cfn-inspectorv2-cisscanconfiguration-targets>
                          CisScanConfiguration -> CisTargetsProperty
targets :: CisTargetsProperty}
  deriving stock (CisScanConfiguration -> CisScanConfiguration -> Bool
(CisScanConfiguration -> CisScanConfiguration -> Bool)
-> (CisScanConfiguration -> CisScanConfiguration -> Bool)
-> Eq CisScanConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CisScanConfiguration -> CisScanConfiguration -> Bool
== :: CisScanConfiguration -> CisScanConfiguration -> Bool
$c/= :: CisScanConfiguration -> CisScanConfiguration -> Bool
/= :: CisScanConfiguration -> CisScanConfiguration -> Bool
Prelude.Eq, Int -> CisScanConfiguration -> ShowS
[CisScanConfiguration] -> ShowS
CisScanConfiguration -> String
(Int -> CisScanConfiguration -> ShowS)
-> (CisScanConfiguration -> String)
-> ([CisScanConfiguration] -> ShowS)
-> Show CisScanConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CisScanConfiguration -> ShowS
showsPrec :: Int -> CisScanConfiguration -> ShowS
$cshow :: CisScanConfiguration -> String
show :: CisScanConfiguration -> String
$cshowList :: [CisScanConfiguration] -> ShowS
showList :: [CisScanConfiguration] -> ShowS
Prelude.Show)
mkCisScanConfiguration ::
  Value Prelude.Text
  -> ScheduleProperty
     -> Value Prelude.Text -> CisTargetsProperty -> CisScanConfiguration
mkCisScanConfiguration :: Value Text
-> ScheduleProperty
-> Value Text
-> CisTargetsProperty
-> CisScanConfiguration
mkCisScanConfiguration Value Text
scanName ScheduleProperty
schedule Value Text
securityLevel CisTargetsProperty
targets
  = CisScanConfiguration
      {haddock_workaround_ :: ()
haddock_workaround_ = (), scanName :: Value Text
scanName = Value Text
scanName,
       schedule :: ScheduleProperty
schedule = ScheduleProperty
schedule, securityLevel :: Value Text
securityLevel = Value Text
securityLevel,
       targets :: CisTargetsProperty
targets = CisTargetsProperty
targets, tags :: Maybe (Map Text (Value Text))
tags = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CisScanConfiguration where
  toResourceProperties :: CisScanConfiguration -> ResourceProperties
toResourceProperties CisScanConfiguration {Maybe (Map Text (Value Text))
()
Value Text
CisTargetsProperty
ScheduleProperty
haddock_workaround_ :: CisScanConfiguration -> ()
scanName :: CisScanConfiguration -> Value Text
schedule :: CisScanConfiguration -> ScheduleProperty
securityLevel :: CisScanConfiguration -> Value Text
tags :: CisScanConfiguration -> Maybe (Map Text (Value Text))
targets :: CisScanConfiguration -> CisTargetsProperty
haddock_workaround_ :: ()
scanName :: Value Text
schedule :: ScheduleProperty
securityLevel :: Value Text
tags :: Maybe (Map Text (Value Text))
targets :: CisTargetsProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::InspectorV2::CisScanConfiguration",
         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
"ScanName" 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
scanName, Key
"Schedule" Key -> ScheduleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ScheduleProperty
schedule,
                            Key
"SecurityLevel" 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
securityLevel, Key
"Targets" Key -> CisTargetsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= CisTargetsProperty
targets]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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 CisScanConfiguration where
  toJSON :: CisScanConfiguration -> Value
toJSON CisScanConfiguration {Maybe (Map Text (Value Text))
()
Value Text
CisTargetsProperty
ScheduleProperty
haddock_workaround_ :: CisScanConfiguration -> ()
scanName :: CisScanConfiguration -> Value Text
schedule :: CisScanConfiguration -> ScheduleProperty
securityLevel :: CisScanConfiguration -> Value Text
tags :: CisScanConfiguration -> Maybe (Map Text (Value Text))
targets :: CisScanConfiguration -> CisTargetsProperty
haddock_workaround_ :: ()
scanName :: Value Text
schedule :: ScheduleProperty
securityLevel :: Value Text
tags :: Maybe (Map Text (Value Text))
targets :: CisTargetsProperty
..}
    = [(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
"ScanName" 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
scanName, Key
"Schedule" Key -> ScheduleProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ScheduleProperty
schedule,
               Key
"SecurityLevel" 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
securityLevel, Key
"Targets" Key -> CisTargetsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= CisTargetsProperty
targets]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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 "ScanName" CisScanConfiguration where
  type PropertyType "ScanName" CisScanConfiguration = Value Prelude.Text
  set :: PropertyType "ScanName" CisScanConfiguration
-> CisScanConfiguration -> CisScanConfiguration
set PropertyType "ScanName" CisScanConfiguration
newValue CisScanConfiguration {Maybe (Map Text (Value Text))
()
Value Text
CisTargetsProperty
ScheduleProperty
haddock_workaround_ :: CisScanConfiguration -> ()
scanName :: CisScanConfiguration -> Value Text
schedule :: CisScanConfiguration -> ScheduleProperty
securityLevel :: CisScanConfiguration -> Value Text
tags :: CisScanConfiguration -> Maybe (Map Text (Value Text))
targets :: CisScanConfiguration -> CisTargetsProperty
haddock_workaround_ :: ()
scanName :: Value Text
schedule :: ScheduleProperty
securityLevel :: Value Text
tags :: Maybe (Map Text (Value Text))
targets :: CisTargetsProperty
..}
    = CisScanConfiguration {scanName :: Value Text
scanName = PropertyType "ScanName" CisScanConfiguration
Value Text
newValue, Maybe (Map Text (Value Text))
()
Value Text
CisTargetsProperty
ScheduleProperty
haddock_workaround_ :: ()
schedule :: ScheduleProperty
securityLevel :: Value Text
tags :: Maybe (Map Text (Value Text))
targets :: CisTargetsProperty
haddock_workaround_ :: ()
schedule :: ScheduleProperty
securityLevel :: Value Text
tags :: Maybe (Map Text (Value Text))
targets :: CisTargetsProperty
..}
instance Property "Schedule" CisScanConfiguration where
  type PropertyType "Schedule" CisScanConfiguration = ScheduleProperty
  set :: PropertyType "Schedule" CisScanConfiguration
-> CisScanConfiguration -> CisScanConfiguration
set PropertyType "Schedule" CisScanConfiguration
newValue CisScanConfiguration {Maybe (Map Text (Value Text))
()
Value Text
CisTargetsProperty
ScheduleProperty
haddock_workaround_ :: CisScanConfiguration -> ()
scanName :: CisScanConfiguration -> Value Text
schedule :: CisScanConfiguration -> ScheduleProperty
securityLevel :: CisScanConfiguration -> Value Text
tags :: CisScanConfiguration -> Maybe (Map Text (Value Text))
targets :: CisScanConfiguration -> CisTargetsProperty
haddock_workaround_ :: ()
scanName :: Value Text
schedule :: ScheduleProperty
securityLevel :: Value Text
tags :: Maybe (Map Text (Value Text))
targets :: CisTargetsProperty
..}
    = CisScanConfiguration {schedule :: ScheduleProperty
schedule = PropertyType "Schedule" CisScanConfiguration
ScheduleProperty
newValue, Maybe (Map Text (Value Text))
()
Value Text
CisTargetsProperty
haddock_workaround_ :: ()
scanName :: Value Text
securityLevel :: Value Text
tags :: Maybe (Map Text (Value Text))
targets :: CisTargetsProperty
haddock_workaround_ :: ()
scanName :: Value Text
securityLevel :: Value Text
tags :: Maybe (Map Text (Value Text))
targets :: CisTargetsProperty
..}
instance Property "SecurityLevel" CisScanConfiguration where
  type PropertyType "SecurityLevel" CisScanConfiguration = Value Prelude.Text
  set :: PropertyType "SecurityLevel" CisScanConfiguration
-> CisScanConfiguration -> CisScanConfiguration
set PropertyType "SecurityLevel" CisScanConfiguration
newValue CisScanConfiguration {Maybe (Map Text (Value Text))
()
Value Text
CisTargetsProperty
ScheduleProperty
haddock_workaround_ :: CisScanConfiguration -> ()
scanName :: CisScanConfiguration -> Value Text
schedule :: CisScanConfiguration -> ScheduleProperty
securityLevel :: CisScanConfiguration -> Value Text
tags :: CisScanConfiguration -> Maybe (Map Text (Value Text))
targets :: CisScanConfiguration -> CisTargetsProperty
haddock_workaround_ :: ()
scanName :: Value Text
schedule :: ScheduleProperty
securityLevel :: Value Text
tags :: Maybe (Map Text (Value Text))
targets :: CisTargetsProperty
..}
    = CisScanConfiguration {securityLevel :: Value Text
securityLevel = PropertyType "SecurityLevel" CisScanConfiguration
Value Text
newValue, Maybe (Map Text (Value Text))
()
Value Text
CisTargetsProperty
ScheduleProperty
haddock_workaround_ :: ()
scanName :: Value Text
schedule :: ScheduleProperty
tags :: Maybe (Map Text (Value Text))
targets :: CisTargetsProperty
haddock_workaround_ :: ()
scanName :: Value Text
schedule :: ScheduleProperty
tags :: Maybe (Map Text (Value Text))
targets :: CisTargetsProperty
..}
instance Property "Tags" CisScanConfiguration where
  type PropertyType "Tags" CisScanConfiguration = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "Tags" CisScanConfiguration
-> CisScanConfiguration -> CisScanConfiguration
set PropertyType "Tags" CisScanConfiguration
newValue CisScanConfiguration {Maybe (Map Text (Value Text))
()
Value Text
CisTargetsProperty
ScheduleProperty
haddock_workaround_ :: CisScanConfiguration -> ()
scanName :: CisScanConfiguration -> Value Text
schedule :: CisScanConfiguration -> ScheduleProperty
securityLevel :: CisScanConfiguration -> Value Text
tags :: CisScanConfiguration -> Maybe (Map Text (Value Text))
targets :: CisScanConfiguration -> CisTargetsProperty
haddock_workaround_ :: ()
scanName :: Value Text
schedule :: ScheduleProperty
securityLevel :: Value Text
tags :: Maybe (Map Text (Value Text))
targets :: CisTargetsProperty
..}
    = CisScanConfiguration {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" CisScanConfiguration
newValue, ()
Value Text
CisTargetsProperty
ScheduleProperty
haddock_workaround_ :: ()
scanName :: Value Text
schedule :: ScheduleProperty
securityLevel :: Value Text
targets :: CisTargetsProperty
haddock_workaround_ :: ()
scanName :: Value Text
schedule :: ScheduleProperty
securityLevel :: Value Text
targets :: CisTargetsProperty
..}
instance Property "Targets" CisScanConfiguration where
  type PropertyType "Targets" CisScanConfiguration = CisTargetsProperty
  set :: PropertyType "Targets" CisScanConfiguration
-> CisScanConfiguration -> CisScanConfiguration
set PropertyType "Targets" CisScanConfiguration
newValue CisScanConfiguration {Maybe (Map Text (Value Text))
()
Value Text
CisTargetsProperty
ScheduleProperty
haddock_workaround_ :: CisScanConfiguration -> ()
scanName :: CisScanConfiguration -> Value Text
schedule :: CisScanConfiguration -> ScheduleProperty
securityLevel :: CisScanConfiguration -> Value Text
tags :: CisScanConfiguration -> Maybe (Map Text (Value Text))
targets :: CisScanConfiguration -> CisTargetsProperty
haddock_workaround_ :: ()
scanName :: Value Text
schedule :: ScheduleProperty
securityLevel :: Value Text
tags :: Maybe (Map Text (Value Text))
targets :: CisTargetsProperty
..}
    = CisScanConfiguration {targets :: CisTargetsProperty
targets = PropertyType "Targets" CisScanConfiguration
CisTargetsProperty
newValue, Maybe (Map Text (Value Text))
()
Value Text
ScheduleProperty
haddock_workaround_ :: ()
scanName :: Value Text
schedule :: ScheduleProperty
securityLevel :: Value Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
scanName :: Value Text
schedule :: ScheduleProperty
securityLevel :: Value Text
tags :: Maybe (Map Text (Value Text))
..}