module Stratosphere.CloudTrail.EventDataStore.InsightSelectorProperty (
        InsightSelectorProperty(..), mkInsightSelectorProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InsightSelectorProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-eventdatastore-insightselector.html>
    InsightSelectorProperty {InsightSelectorProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-eventdatastore-insightselector.html#cfn-cloudtrail-eventdatastore-insightselector-insighttype>
                             InsightSelectorProperty -> Maybe (Value Text)
insightType :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (InsightSelectorProperty -> InsightSelectorProperty -> Bool
(InsightSelectorProperty -> InsightSelectorProperty -> Bool)
-> (InsightSelectorProperty -> InsightSelectorProperty -> Bool)
-> Eq InsightSelectorProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InsightSelectorProperty -> InsightSelectorProperty -> Bool
== :: InsightSelectorProperty -> InsightSelectorProperty -> Bool
$c/= :: InsightSelectorProperty -> InsightSelectorProperty -> Bool
/= :: InsightSelectorProperty -> InsightSelectorProperty -> Bool
Prelude.Eq, Int -> InsightSelectorProperty -> ShowS
[InsightSelectorProperty] -> ShowS
InsightSelectorProperty -> String
(Int -> InsightSelectorProperty -> ShowS)
-> (InsightSelectorProperty -> String)
-> ([InsightSelectorProperty] -> ShowS)
-> Show InsightSelectorProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InsightSelectorProperty -> ShowS
showsPrec :: Int -> InsightSelectorProperty -> ShowS
$cshow :: InsightSelectorProperty -> String
show :: InsightSelectorProperty -> String
$cshowList :: [InsightSelectorProperty] -> ShowS
showList :: [InsightSelectorProperty] -> ShowS
Prelude.Show)
mkInsightSelectorProperty :: InsightSelectorProperty
mkInsightSelectorProperty :: InsightSelectorProperty
mkInsightSelectorProperty
  = InsightSelectorProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), insightType :: Maybe (Value Text)
insightType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InsightSelectorProperty where
  toResourceProperties :: InsightSelectorProperty -> ResourceProperties
toResourceProperties InsightSelectorProperty {Maybe (Value Text)
()
haddock_workaround_ :: InsightSelectorProperty -> ()
insightType :: InsightSelectorProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
insightType :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CloudTrail::EventDataStore.InsightSelector",
         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
"InsightType" (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)
insightType])}
instance JSON.ToJSON InsightSelectorProperty where
  toJSON :: InsightSelectorProperty -> Value
toJSON InsightSelectorProperty {Maybe (Value Text)
()
haddock_workaround_ :: InsightSelectorProperty -> ()
insightType :: InsightSelectorProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
insightType :: 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
"InsightType" (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)
insightType]))
instance Property "InsightType" InsightSelectorProperty where
  type PropertyType "InsightType" InsightSelectorProperty = Value Prelude.Text
  set :: PropertyType "InsightType" InsightSelectorProperty
-> InsightSelectorProperty -> InsightSelectorProperty
set PropertyType "InsightType" InsightSelectorProperty
newValue InsightSelectorProperty {Maybe (Value Text)
()
haddock_workaround_ :: InsightSelectorProperty -> ()
insightType :: InsightSelectorProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
insightType :: Maybe (Value Text)
..}
    = InsightSelectorProperty {insightType :: Maybe (Value Text)
insightType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InsightType" InsightSelectorProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}