module Stratosphere.Config.ConfigRule.SourceDetailProperty (
        SourceDetailProperty(..), mkSourceDetailProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SourceDetailProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configrule-sourcedetail.html>
    SourceDetailProperty {SourceDetailProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configrule-sourcedetail.html#cfn-config-configrule-sourcedetail-eventsource>
                          SourceDetailProperty -> Value Text
eventSource :: (Value Prelude.Text),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configrule-sourcedetail.html#cfn-config-configrule-sourcedetail-maximumexecutionfrequency>
                          SourceDetailProperty -> Maybe (Value Text)
maximumExecutionFrequency :: (Prelude.Maybe (Value Prelude.Text)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-config-configrule-sourcedetail.html#cfn-config-configrule-sourcedetail-messagetype>
                          SourceDetailProperty -> Value Text
messageType :: (Value Prelude.Text)}
  deriving stock (SourceDetailProperty -> SourceDetailProperty -> Bool
(SourceDetailProperty -> SourceDetailProperty -> Bool)
-> (SourceDetailProperty -> SourceDetailProperty -> Bool)
-> Eq SourceDetailProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SourceDetailProperty -> SourceDetailProperty -> Bool
== :: SourceDetailProperty -> SourceDetailProperty -> Bool
$c/= :: SourceDetailProperty -> SourceDetailProperty -> Bool
/= :: SourceDetailProperty -> SourceDetailProperty -> Bool
Prelude.Eq, Int -> SourceDetailProperty -> ShowS
[SourceDetailProperty] -> ShowS
SourceDetailProperty -> String
(Int -> SourceDetailProperty -> ShowS)
-> (SourceDetailProperty -> String)
-> ([SourceDetailProperty] -> ShowS)
-> Show SourceDetailProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SourceDetailProperty -> ShowS
showsPrec :: Int -> SourceDetailProperty -> ShowS
$cshow :: SourceDetailProperty -> String
show :: SourceDetailProperty -> String
$cshowList :: [SourceDetailProperty] -> ShowS
showList :: [SourceDetailProperty] -> ShowS
Prelude.Show)
mkSourceDetailProperty ::
  Value Prelude.Text -> Value Prelude.Text -> SourceDetailProperty
mkSourceDetailProperty :: Value Text -> Value Text -> SourceDetailProperty
mkSourceDetailProperty Value Text
eventSource Value Text
messageType
  = SourceDetailProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), eventSource :: Value Text
eventSource = Value Text
eventSource,
       messageType :: Value Text
messageType = Value Text
messageType,
       maximumExecutionFrequency :: Maybe (Value Text)
maximumExecutionFrequency = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SourceDetailProperty where
  toResourceProperties :: SourceDetailProperty -> ResourceProperties
toResourceProperties SourceDetailProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SourceDetailProperty -> ()
eventSource :: SourceDetailProperty -> Value Text
maximumExecutionFrequency :: SourceDetailProperty -> Maybe (Value Text)
messageType :: SourceDetailProperty -> Value Text
haddock_workaround_ :: ()
eventSource :: Value Text
maximumExecutionFrequency :: Maybe (Value Text)
messageType :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Config::ConfigRule.SourceDetail",
         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
"EventSource" 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
eventSource,
                            Key
"MessageType" 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
messageType]
                           ([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
"MaximumExecutionFrequency"
                                 (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)
maximumExecutionFrequency]))}
instance JSON.ToJSON SourceDetailProperty where
  toJSON :: SourceDetailProperty -> Value
toJSON SourceDetailProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SourceDetailProperty -> ()
eventSource :: SourceDetailProperty -> Value Text
maximumExecutionFrequency :: SourceDetailProperty -> Maybe (Value Text)
messageType :: SourceDetailProperty -> Value Text
haddock_workaround_ :: ()
eventSource :: Value Text
maximumExecutionFrequency :: Maybe (Value Text)
messageType :: 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
"EventSource" 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
eventSource,
               Key
"MessageType" 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
messageType]
              ([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
"MaximumExecutionFrequency"
                    (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)
maximumExecutionFrequency])))
instance Property "EventSource" SourceDetailProperty where
  type PropertyType "EventSource" SourceDetailProperty = Value Prelude.Text
  set :: PropertyType "EventSource" SourceDetailProperty
-> SourceDetailProperty -> SourceDetailProperty
set PropertyType "EventSource" SourceDetailProperty
newValue SourceDetailProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SourceDetailProperty -> ()
eventSource :: SourceDetailProperty -> Value Text
maximumExecutionFrequency :: SourceDetailProperty -> Maybe (Value Text)
messageType :: SourceDetailProperty -> Value Text
haddock_workaround_ :: ()
eventSource :: Value Text
maximumExecutionFrequency :: Maybe (Value Text)
messageType :: Value Text
..}
    = SourceDetailProperty {eventSource :: Value Text
eventSource = PropertyType "EventSource" SourceDetailProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
maximumExecutionFrequency :: Maybe (Value Text)
messageType :: Value Text
haddock_workaround_ :: ()
maximumExecutionFrequency :: Maybe (Value Text)
messageType :: Value Text
..}
instance Property "MaximumExecutionFrequency" SourceDetailProperty where
  type PropertyType "MaximumExecutionFrequency" SourceDetailProperty = Value Prelude.Text
  set :: PropertyType "MaximumExecutionFrequency" SourceDetailProperty
-> SourceDetailProperty -> SourceDetailProperty
set PropertyType "MaximumExecutionFrequency" SourceDetailProperty
newValue SourceDetailProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SourceDetailProperty -> ()
eventSource :: SourceDetailProperty -> Value Text
maximumExecutionFrequency :: SourceDetailProperty -> Maybe (Value Text)
messageType :: SourceDetailProperty -> Value Text
haddock_workaround_ :: ()
eventSource :: Value Text
maximumExecutionFrequency :: Maybe (Value Text)
messageType :: Value Text
..}
    = SourceDetailProperty
        {maximumExecutionFrequency :: Maybe (Value Text)
maximumExecutionFrequency = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaximumExecutionFrequency" SourceDetailProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
eventSource :: Value Text
messageType :: Value Text
haddock_workaround_ :: ()
eventSource :: Value Text
messageType :: Value Text
..}
instance Property "MessageType" SourceDetailProperty where
  type PropertyType "MessageType" SourceDetailProperty = Value Prelude.Text
  set :: PropertyType "MessageType" SourceDetailProperty
-> SourceDetailProperty -> SourceDetailProperty
set PropertyType "MessageType" SourceDetailProperty
newValue SourceDetailProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SourceDetailProperty -> ()
eventSource :: SourceDetailProperty -> Value Text
maximumExecutionFrequency :: SourceDetailProperty -> Maybe (Value Text)
messageType :: SourceDetailProperty -> Value Text
haddock_workaround_ :: ()
eventSource :: Value Text
maximumExecutionFrequency :: Maybe (Value Text)
messageType :: Value Text
..}
    = SourceDetailProperty {messageType :: Value Text
messageType = PropertyType "MessageType" SourceDetailProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
eventSource :: Value Text
maximumExecutionFrequency :: Maybe (Value Text)
haddock_workaround_ :: ()
eventSource :: Value Text
maximumExecutionFrequency :: Maybe (Value Text)
..}