module Stratosphere.SecurityHub.FindingAggregator (
        FindingAggregator(..), mkFindingAggregator
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FindingAggregator
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-findingaggregator.html>
    FindingAggregator {FindingAggregator -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-findingaggregator.html#cfn-securityhub-findingaggregator-regionlinkingmode>
                       FindingAggregator -> Value Text
regionLinkingMode :: (Value Prelude.Text),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-findingaggregator.html#cfn-securityhub-findingaggregator-regions>
                       FindingAggregator -> Maybe (ValueList Text)
regions :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (FindingAggregator -> FindingAggregator -> Bool
(FindingAggregator -> FindingAggregator -> Bool)
-> (FindingAggregator -> FindingAggregator -> Bool)
-> Eq FindingAggregator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FindingAggregator -> FindingAggregator -> Bool
== :: FindingAggregator -> FindingAggregator -> Bool
$c/= :: FindingAggregator -> FindingAggregator -> Bool
/= :: FindingAggregator -> FindingAggregator -> Bool
Prelude.Eq, Int -> FindingAggregator -> ShowS
[FindingAggregator] -> ShowS
FindingAggregator -> String
(Int -> FindingAggregator -> ShowS)
-> (FindingAggregator -> String)
-> ([FindingAggregator] -> ShowS)
-> Show FindingAggregator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FindingAggregator -> ShowS
showsPrec :: Int -> FindingAggregator -> ShowS
$cshow :: FindingAggregator -> String
show :: FindingAggregator -> String
$cshowList :: [FindingAggregator] -> ShowS
showList :: [FindingAggregator] -> ShowS
Prelude.Show)
mkFindingAggregator :: Value Prelude.Text -> FindingAggregator
mkFindingAggregator :: Value Text -> FindingAggregator
mkFindingAggregator Value Text
regionLinkingMode
  = FindingAggregator
      {haddock_workaround_ :: ()
haddock_workaround_ = (), regionLinkingMode :: Value Text
regionLinkingMode = Value Text
regionLinkingMode,
       regions :: Maybe (ValueList Text)
regions = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FindingAggregator where
  toResourceProperties :: FindingAggregator -> ResourceProperties
toResourceProperties FindingAggregator {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: FindingAggregator -> ()
regionLinkingMode :: FindingAggregator -> Value Text
regions :: FindingAggregator -> Maybe (ValueList Text)
haddock_workaround_ :: ()
regionLinkingMode :: Value Text
regions :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SecurityHub::FindingAggregator",
         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
"RegionLinkingMode" 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
regionLinkingMode]
                           ([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
"Regions" (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)
regions]))}
instance JSON.ToJSON FindingAggregator where
  toJSON :: FindingAggregator -> Value
toJSON FindingAggregator {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: FindingAggregator -> ()
regionLinkingMode :: FindingAggregator -> Value Text
regions :: FindingAggregator -> Maybe (ValueList Text)
haddock_workaround_ :: ()
regionLinkingMode :: Value Text
regions :: Maybe (ValueList 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
"RegionLinkingMode" 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
regionLinkingMode]
              ([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
"Regions" (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)
regions])))
instance Property "RegionLinkingMode" FindingAggregator where
  type PropertyType "RegionLinkingMode" FindingAggregator = Value Prelude.Text
  set :: PropertyType "RegionLinkingMode" FindingAggregator
-> FindingAggregator -> FindingAggregator
set PropertyType "RegionLinkingMode" FindingAggregator
newValue FindingAggregator {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: FindingAggregator -> ()
regionLinkingMode :: FindingAggregator -> Value Text
regions :: FindingAggregator -> Maybe (ValueList Text)
haddock_workaround_ :: ()
regionLinkingMode :: Value Text
regions :: Maybe (ValueList Text)
..}
    = FindingAggregator {regionLinkingMode :: Value Text
regionLinkingMode = PropertyType "RegionLinkingMode" FindingAggregator
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
regions :: Maybe (ValueList Text)
haddock_workaround_ :: ()
regions :: Maybe (ValueList Text)
..}
instance Property "Regions" FindingAggregator where
  type PropertyType "Regions" FindingAggregator = ValueList Prelude.Text
  set :: PropertyType "Regions" FindingAggregator
-> FindingAggregator -> FindingAggregator
set PropertyType "Regions" FindingAggregator
newValue FindingAggregator {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: FindingAggregator -> ()
regionLinkingMode :: FindingAggregator -> Value Text
regions :: FindingAggregator -> Maybe (ValueList Text)
haddock_workaround_ :: ()
regionLinkingMode :: Value Text
regions :: Maybe (ValueList Text)
..}
    = FindingAggregator {regions :: Maybe (ValueList Text)
regions = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Regions" FindingAggregator
ValueList Text
newValue, ()
Value Text
haddock_workaround_ :: ()
regionLinkingMode :: Value Text
haddock_workaround_ :: ()
regionLinkingMode :: Value Text
..}