module Stratosphere.IoTAnalytics.Dataset.FilterProperty (
        module Exports, FilterProperty(..), mkFilterProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoTAnalytics.Dataset.DeltaTimeProperty as Exports
import Stratosphere.ResourceProperties
data FilterProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-filter.html>
    FilterProperty {FilterProperty -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-filter.html#cfn-iotanalytics-dataset-filter-deltatime>
                    FilterProperty -> Maybe DeltaTimeProperty
deltaTime :: (Prelude.Maybe DeltaTimeProperty)}
  deriving stock (FilterProperty -> FilterProperty -> Bool
(FilterProperty -> FilterProperty -> Bool)
-> (FilterProperty -> FilterProperty -> Bool) -> Eq FilterProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FilterProperty -> FilterProperty -> Bool
== :: FilterProperty -> FilterProperty -> Bool
$c/= :: FilterProperty -> FilterProperty -> Bool
/= :: FilterProperty -> FilterProperty -> Bool
Prelude.Eq, Int -> FilterProperty -> ShowS
[FilterProperty] -> ShowS
FilterProperty -> String
(Int -> FilterProperty -> ShowS)
-> (FilterProperty -> String)
-> ([FilterProperty] -> ShowS)
-> Show FilterProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FilterProperty -> ShowS
showsPrec :: Int -> FilterProperty -> ShowS
$cshow :: FilterProperty -> String
show :: FilterProperty -> String
$cshowList :: [FilterProperty] -> ShowS
showList :: [FilterProperty] -> ShowS
Prelude.Show)
mkFilterProperty :: FilterProperty
mkFilterProperty :: FilterProperty
mkFilterProperty
  = FilterProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), deltaTime :: Maybe DeltaTimeProperty
deltaTime = Maybe DeltaTimeProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FilterProperty where
  toResourceProperties :: FilterProperty -> ResourceProperties
toResourceProperties FilterProperty {Maybe DeltaTimeProperty
()
haddock_workaround_ :: FilterProperty -> ()
deltaTime :: FilterProperty -> Maybe DeltaTimeProperty
haddock_workaround_ :: ()
deltaTime :: Maybe DeltaTimeProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoTAnalytics::Dataset.Filter",
         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 -> DeltaTimeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeltaTime" (DeltaTimeProperty -> (Key, Value))
-> Maybe DeltaTimeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeltaTimeProperty
deltaTime])}
instance JSON.ToJSON FilterProperty where
  toJSON :: FilterProperty -> Value
toJSON FilterProperty {Maybe DeltaTimeProperty
()
haddock_workaround_ :: FilterProperty -> ()
deltaTime :: FilterProperty -> Maybe DeltaTimeProperty
haddock_workaround_ :: ()
deltaTime :: Maybe DeltaTimeProperty
..}
    = [(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 -> DeltaTimeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DeltaTime" (DeltaTimeProperty -> (Key, Value))
-> Maybe DeltaTimeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeltaTimeProperty
deltaTime]))
instance Property "DeltaTime" FilterProperty where
  type PropertyType "DeltaTime" FilterProperty = DeltaTimeProperty
  set :: PropertyType "DeltaTime" FilterProperty
-> FilterProperty -> FilterProperty
set PropertyType "DeltaTime" FilterProperty
newValue FilterProperty {Maybe DeltaTimeProperty
()
haddock_workaround_ :: FilterProperty -> ()
deltaTime :: FilterProperty -> Maybe DeltaTimeProperty
haddock_workaround_ :: ()
deltaTime :: Maybe DeltaTimeProperty
..}
    = FilterProperty {deltaTime :: Maybe DeltaTimeProperty
deltaTime = DeltaTimeProperty -> Maybe DeltaTimeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DeltaTime" FilterProperty
DeltaTimeProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}