module Stratosphere.SecurityHub.AutomationRuleV2.AutomationRulesActionV2Property (
        module Exports, AutomationRulesActionV2Property(..),
        mkAutomationRulesActionV2Property
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SecurityHub.AutomationRuleV2.AutomationRulesFindingFieldsUpdateV2Property as Exports
import {-# SOURCE #-} Stratosphere.SecurityHub.AutomationRuleV2.ExternalIntegrationConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AutomationRulesActionV2Property
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrulev2-automationrulesactionv2.html>
    AutomationRulesActionV2Property {AutomationRulesActionV2Property -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrulev2-automationrulesactionv2.html#cfn-securityhub-automationrulev2-automationrulesactionv2-externalintegrationconfiguration>
                                     AutomationRulesActionV2Property
-> Maybe ExternalIntegrationConfigurationProperty
externalIntegrationConfiguration :: (Prelude.Maybe ExternalIntegrationConfigurationProperty),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrulev2-automationrulesactionv2.html#cfn-securityhub-automationrulev2-automationrulesactionv2-findingfieldsupdate>
                                     AutomationRulesActionV2Property
-> Maybe AutomationRulesFindingFieldsUpdateV2Property
findingFieldsUpdate :: (Prelude.Maybe AutomationRulesFindingFieldsUpdateV2Property),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-securityhub-automationrulev2-automationrulesactionv2.html#cfn-securityhub-automationrulev2-automationrulesactionv2-type>
                                     AutomationRulesActionV2Property -> Value Text
type' :: (Value Prelude.Text)}
  deriving stock (AutomationRulesActionV2Property
-> AutomationRulesActionV2Property -> Bool
(AutomationRulesActionV2Property
 -> AutomationRulesActionV2Property -> Bool)
-> (AutomationRulesActionV2Property
    -> AutomationRulesActionV2Property -> Bool)
-> Eq AutomationRulesActionV2Property
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AutomationRulesActionV2Property
-> AutomationRulesActionV2Property -> Bool
== :: AutomationRulesActionV2Property
-> AutomationRulesActionV2Property -> Bool
$c/= :: AutomationRulesActionV2Property
-> AutomationRulesActionV2Property -> Bool
/= :: AutomationRulesActionV2Property
-> AutomationRulesActionV2Property -> Bool
Prelude.Eq, Int -> AutomationRulesActionV2Property -> ShowS
[AutomationRulesActionV2Property] -> ShowS
AutomationRulesActionV2Property -> String
(Int -> AutomationRulesActionV2Property -> ShowS)
-> (AutomationRulesActionV2Property -> String)
-> ([AutomationRulesActionV2Property] -> ShowS)
-> Show AutomationRulesActionV2Property
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AutomationRulesActionV2Property -> ShowS
showsPrec :: Int -> AutomationRulesActionV2Property -> ShowS
$cshow :: AutomationRulesActionV2Property -> String
show :: AutomationRulesActionV2Property -> String
$cshowList :: [AutomationRulesActionV2Property] -> ShowS
showList :: [AutomationRulesActionV2Property] -> ShowS
Prelude.Show)
mkAutomationRulesActionV2Property ::
  Value Prelude.Text -> AutomationRulesActionV2Property
mkAutomationRulesActionV2Property :: Value Text -> AutomationRulesActionV2Property
mkAutomationRulesActionV2Property Value Text
type'
  = AutomationRulesActionV2Property
      {haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Value Text
type' = Value Text
type',
       externalIntegrationConfiguration :: Maybe ExternalIntegrationConfigurationProperty
externalIntegrationConfiguration = Maybe ExternalIntegrationConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       findingFieldsUpdate :: Maybe AutomationRulesFindingFieldsUpdateV2Property
findingFieldsUpdate = Maybe AutomationRulesFindingFieldsUpdateV2Property
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AutomationRulesActionV2Property where
  toResourceProperties :: AutomationRulesActionV2Property -> ResourceProperties
toResourceProperties AutomationRulesActionV2Property {Maybe AutomationRulesFindingFieldsUpdateV2Property
Maybe ExternalIntegrationConfigurationProperty
()
Value Text
haddock_workaround_ :: AutomationRulesActionV2Property -> ()
externalIntegrationConfiguration :: AutomationRulesActionV2Property
-> Maybe ExternalIntegrationConfigurationProperty
findingFieldsUpdate :: AutomationRulesActionV2Property
-> Maybe AutomationRulesFindingFieldsUpdateV2Property
type' :: AutomationRulesActionV2Property -> Value Text
haddock_workaround_ :: ()
externalIntegrationConfiguration :: Maybe ExternalIntegrationConfigurationProperty
findingFieldsUpdate :: Maybe AutomationRulesFindingFieldsUpdateV2Property
type' :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SecurityHub::AutomationRuleV2.AutomationRulesActionV2",
         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
"Type" 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
type']
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> ExternalIntegrationConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ExternalIntegrationConfiguration"
                                 (ExternalIntegrationConfigurationProperty -> (Key, Value))
-> Maybe ExternalIntegrationConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExternalIntegrationConfigurationProperty
externalIntegrationConfiguration,
                               Key -> AutomationRulesFindingFieldsUpdateV2Property -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FindingFieldsUpdate" (AutomationRulesFindingFieldsUpdateV2Property -> (Key, Value))
-> Maybe AutomationRulesFindingFieldsUpdateV2Property
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutomationRulesFindingFieldsUpdateV2Property
findingFieldsUpdate]))}
instance JSON.ToJSON AutomationRulesActionV2Property where
  toJSON :: AutomationRulesActionV2Property -> Value
toJSON AutomationRulesActionV2Property {Maybe AutomationRulesFindingFieldsUpdateV2Property
Maybe ExternalIntegrationConfigurationProperty
()
Value Text
haddock_workaround_ :: AutomationRulesActionV2Property -> ()
externalIntegrationConfiguration :: AutomationRulesActionV2Property
-> Maybe ExternalIntegrationConfigurationProperty
findingFieldsUpdate :: AutomationRulesActionV2Property
-> Maybe AutomationRulesFindingFieldsUpdateV2Property
type' :: AutomationRulesActionV2Property -> Value Text
haddock_workaround_ :: ()
externalIntegrationConfiguration :: Maybe ExternalIntegrationConfigurationProperty
findingFieldsUpdate :: Maybe AutomationRulesFindingFieldsUpdateV2Property
type' :: 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
"Type" 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
type']
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> ExternalIntegrationConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ExternalIntegrationConfiguration"
                    (ExternalIntegrationConfigurationProperty -> (Key, Value))
-> Maybe ExternalIntegrationConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExternalIntegrationConfigurationProperty
externalIntegrationConfiguration,
                  Key -> AutomationRulesFindingFieldsUpdateV2Property -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FindingFieldsUpdate" (AutomationRulesFindingFieldsUpdateV2Property -> (Key, Value))
-> Maybe AutomationRulesFindingFieldsUpdateV2Property
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutomationRulesFindingFieldsUpdateV2Property
findingFieldsUpdate])))
instance Property "ExternalIntegrationConfiguration" AutomationRulesActionV2Property where
  type PropertyType "ExternalIntegrationConfiguration" AutomationRulesActionV2Property = ExternalIntegrationConfigurationProperty
  set :: PropertyType
  "ExternalIntegrationConfiguration" AutomationRulesActionV2Property
-> AutomationRulesActionV2Property
-> AutomationRulesActionV2Property
set PropertyType
  "ExternalIntegrationConfiguration" AutomationRulesActionV2Property
newValue AutomationRulesActionV2Property {Maybe AutomationRulesFindingFieldsUpdateV2Property
Maybe ExternalIntegrationConfigurationProperty
()
Value Text
haddock_workaround_ :: AutomationRulesActionV2Property -> ()
externalIntegrationConfiguration :: AutomationRulesActionV2Property
-> Maybe ExternalIntegrationConfigurationProperty
findingFieldsUpdate :: AutomationRulesActionV2Property
-> Maybe AutomationRulesFindingFieldsUpdateV2Property
type' :: AutomationRulesActionV2Property -> Value Text
haddock_workaround_ :: ()
externalIntegrationConfiguration :: Maybe ExternalIntegrationConfigurationProperty
findingFieldsUpdate :: Maybe AutomationRulesFindingFieldsUpdateV2Property
type' :: Value Text
..}
    = AutomationRulesActionV2Property
        {externalIntegrationConfiguration :: Maybe ExternalIntegrationConfigurationProperty
externalIntegrationConfiguration = ExternalIntegrationConfigurationProperty
-> Maybe ExternalIntegrationConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ExternalIntegrationConfiguration" AutomationRulesActionV2Property
ExternalIntegrationConfigurationProperty
newValue, Maybe AutomationRulesFindingFieldsUpdateV2Property
()
Value Text
haddock_workaround_ :: ()
findingFieldsUpdate :: Maybe AutomationRulesFindingFieldsUpdateV2Property
type' :: Value Text
haddock_workaround_ :: ()
findingFieldsUpdate :: Maybe AutomationRulesFindingFieldsUpdateV2Property
type' :: Value Text
..}
instance Property "FindingFieldsUpdate" AutomationRulesActionV2Property where
  type PropertyType "FindingFieldsUpdate" AutomationRulesActionV2Property = AutomationRulesFindingFieldsUpdateV2Property
  set :: PropertyType "FindingFieldsUpdate" AutomationRulesActionV2Property
-> AutomationRulesActionV2Property
-> AutomationRulesActionV2Property
set PropertyType "FindingFieldsUpdate" AutomationRulesActionV2Property
newValue AutomationRulesActionV2Property {Maybe AutomationRulesFindingFieldsUpdateV2Property
Maybe ExternalIntegrationConfigurationProperty
()
Value Text
haddock_workaround_ :: AutomationRulesActionV2Property -> ()
externalIntegrationConfiguration :: AutomationRulesActionV2Property
-> Maybe ExternalIntegrationConfigurationProperty
findingFieldsUpdate :: AutomationRulesActionV2Property
-> Maybe AutomationRulesFindingFieldsUpdateV2Property
type' :: AutomationRulesActionV2Property -> Value Text
haddock_workaround_ :: ()
externalIntegrationConfiguration :: Maybe ExternalIntegrationConfigurationProperty
findingFieldsUpdate :: Maybe AutomationRulesFindingFieldsUpdateV2Property
type' :: Value Text
..}
    = AutomationRulesActionV2Property
        {findingFieldsUpdate :: Maybe AutomationRulesFindingFieldsUpdateV2Property
findingFieldsUpdate = AutomationRulesFindingFieldsUpdateV2Property
-> Maybe AutomationRulesFindingFieldsUpdateV2Property
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FindingFieldsUpdate" AutomationRulesActionV2Property
AutomationRulesFindingFieldsUpdateV2Property
newValue, Maybe ExternalIntegrationConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
externalIntegrationConfiguration :: Maybe ExternalIntegrationConfigurationProperty
type' :: Value Text
haddock_workaround_ :: ()
externalIntegrationConfiguration :: Maybe ExternalIntegrationConfigurationProperty
type' :: Value Text
..}
instance Property "Type" AutomationRulesActionV2Property where
  type PropertyType "Type" AutomationRulesActionV2Property = Value Prelude.Text
  set :: PropertyType "Type" AutomationRulesActionV2Property
-> AutomationRulesActionV2Property
-> AutomationRulesActionV2Property
set PropertyType "Type" AutomationRulesActionV2Property
newValue AutomationRulesActionV2Property {Maybe AutomationRulesFindingFieldsUpdateV2Property
Maybe ExternalIntegrationConfigurationProperty
()
Value Text
haddock_workaround_ :: AutomationRulesActionV2Property -> ()
externalIntegrationConfiguration :: AutomationRulesActionV2Property
-> Maybe ExternalIntegrationConfigurationProperty
findingFieldsUpdate :: AutomationRulesActionV2Property
-> Maybe AutomationRulesFindingFieldsUpdateV2Property
type' :: AutomationRulesActionV2Property -> Value Text
haddock_workaround_ :: ()
externalIntegrationConfiguration :: Maybe ExternalIntegrationConfigurationProperty
findingFieldsUpdate :: Maybe AutomationRulesFindingFieldsUpdateV2Property
type' :: Value Text
..}
    = AutomationRulesActionV2Property {type' :: Value Text
type' = PropertyType "Type" AutomationRulesActionV2Property
Value Text
newValue, Maybe AutomationRulesFindingFieldsUpdateV2Property
Maybe ExternalIntegrationConfigurationProperty
()
haddock_workaround_ :: ()
externalIntegrationConfiguration :: Maybe ExternalIntegrationConfigurationProperty
findingFieldsUpdate :: Maybe AutomationRulesFindingFieldsUpdateV2Property
haddock_workaround_ :: ()
externalIntegrationConfiguration :: Maybe ExternalIntegrationConfigurationProperty
findingFieldsUpdate :: Maybe AutomationRulesFindingFieldsUpdateV2Property
..}