module Stratosphere.SecurityHub.AutomationRuleV2.ExternalIntegrationConfigurationProperty (
ExternalIntegrationConfigurationProperty(..),
mkExternalIntegrationConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ExternalIntegrationConfigurationProperty
=
ExternalIntegrationConfigurationProperty {ExternalIntegrationConfigurationProperty -> ()
haddock_workaround_ :: (),
ExternalIntegrationConfigurationProperty -> Maybe (Value Text)
connectorArn :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (ExternalIntegrationConfigurationProperty
-> ExternalIntegrationConfigurationProperty -> Bool
(ExternalIntegrationConfigurationProperty
-> ExternalIntegrationConfigurationProperty -> Bool)
-> (ExternalIntegrationConfigurationProperty
-> ExternalIntegrationConfigurationProperty -> Bool)
-> Eq ExternalIntegrationConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ExternalIntegrationConfigurationProperty
-> ExternalIntegrationConfigurationProperty -> Bool
== :: ExternalIntegrationConfigurationProperty
-> ExternalIntegrationConfigurationProperty -> Bool
$c/= :: ExternalIntegrationConfigurationProperty
-> ExternalIntegrationConfigurationProperty -> Bool
/= :: ExternalIntegrationConfigurationProperty
-> ExternalIntegrationConfigurationProperty -> Bool
Prelude.Eq, Int -> ExternalIntegrationConfigurationProperty -> ShowS
[ExternalIntegrationConfigurationProperty] -> ShowS
ExternalIntegrationConfigurationProperty -> String
(Int -> ExternalIntegrationConfigurationProperty -> ShowS)
-> (ExternalIntegrationConfigurationProperty -> String)
-> ([ExternalIntegrationConfigurationProperty] -> ShowS)
-> Show ExternalIntegrationConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ExternalIntegrationConfigurationProperty -> ShowS
showsPrec :: Int -> ExternalIntegrationConfigurationProperty -> ShowS
$cshow :: ExternalIntegrationConfigurationProperty -> String
show :: ExternalIntegrationConfigurationProperty -> String
$cshowList :: [ExternalIntegrationConfigurationProperty] -> ShowS
showList :: [ExternalIntegrationConfigurationProperty] -> ShowS
Prelude.Show)
mkExternalIntegrationConfigurationProperty ::
ExternalIntegrationConfigurationProperty
mkExternalIntegrationConfigurationProperty :: ExternalIntegrationConfigurationProperty
mkExternalIntegrationConfigurationProperty
= ExternalIntegrationConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), connectorArn :: Maybe (Value Text)
connectorArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ExternalIntegrationConfigurationProperty where
toResourceProperties :: ExternalIntegrationConfigurationProperty -> ResourceProperties
toResourceProperties ExternalIntegrationConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: ExternalIntegrationConfigurationProperty -> ()
connectorArn :: ExternalIntegrationConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
connectorArn :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::SecurityHub::AutomationRuleV2.ExternalIntegrationConfiguration",
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 -> 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
"ConnectorArn" (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)
connectorArn])}
instance JSON.ToJSON ExternalIntegrationConfigurationProperty where
toJSON :: ExternalIntegrationConfigurationProperty -> Value
toJSON ExternalIntegrationConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: ExternalIntegrationConfigurationProperty -> ()
connectorArn :: ExternalIntegrationConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
connectorArn :: Maybe (Value Text)
..}
= [(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 -> 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
"ConnectorArn" (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)
connectorArn]))
instance Property "ConnectorArn" ExternalIntegrationConfigurationProperty where
type PropertyType "ConnectorArn" ExternalIntegrationConfigurationProperty = Value Prelude.Text
set :: PropertyType
"ConnectorArn" ExternalIntegrationConfigurationProperty
-> ExternalIntegrationConfigurationProperty
-> ExternalIntegrationConfigurationProperty
set PropertyType
"ConnectorArn" ExternalIntegrationConfigurationProperty
newValue ExternalIntegrationConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: ExternalIntegrationConfigurationProperty -> ()
connectorArn :: ExternalIntegrationConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
connectorArn :: Maybe (Value Text)
..}
= ExternalIntegrationConfigurationProperty
{connectorArn :: Maybe (Value Text)
connectorArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"ConnectorArn" ExternalIntegrationConfigurationProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}