module Stratosphere.QuickSight.Topic.TopicRelativeDateFilterProperty (
        module Exports, TopicRelativeDateFilterProperty(..),
        mkTopicRelativeDateFilterProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Topic.TopicSingularFilterConstantProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TopicRelativeDateFilterProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-topic-topicrelativedatefilter.html>
    TopicRelativeDateFilterProperty {TopicRelativeDateFilterProperty -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-topic-topicrelativedatefilter.html#cfn-quicksight-topic-topicrelativedatefilter-constant>
                                     TopicRelativeDateFilterProperty
-> Maybe TopicSingularFilterConstantProperty
constant :: (Prelude.Maybe TopicSingularFilterConstantProperty),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-topic-topicrelativedatefilter.html#cfn-quicksight-topic-topicrelativedatefilter-relativedatefilterfunction>
                                     TopicRelativeDateFilterProperty -> Maybe (Value Text)
relativeDateFilterFunction :: (Prelude.Maybe (Value Prelude.Text)),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-topic-topicrelativedatefilter.html#cfn-quicksight-topic-topicrelativedatefilter-timegranularity>
                                     TopicRelativeDateFilterProperty -> Maybe (Value Text)
timeGranularity :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (TopicRelativeDateFilterProperty
-> TopicRelativeDateFilterProperty -> Bool
(TopicRelativeDateFilterProperty
 -> TopicRelativeDateFilterProperty -> Bool)
-> (TopicRelativeDateFilterProperty
    -> TopicRelativeDateFilterProperty -> Bool)
-> Eq TopicRelativeDateFilterProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TopicRelativeDateFilterProperty
-> TopicRelativeDateFilterProperty -> Bool
== :: TopicRelativeDateFilterProperty
-> TopicRelativeDateFilterProperty -> Bool
$c/= :: TopicRelativeDateFilterProperty
-> TopicRelativeDateFilterProperty -> Bool
/= :: TopicRelativeDateFilterProperty
-> TopicRelativeDateFilterProperty -> Bool
Prelude.Eq, Int -> TopicRelativeDateFilterProperty -> ShowS
[TopicRelativeDateFilterProperty] -> ShowS
TopicRelativeDateFilterProperty -> String
(Int -> TopicRelativeDateFilterProperty -> ShowS)
-> (TopicRelativeDateFilterProperty -> String)
-> ([TopicRelativeDateFilterProperty] -> ShowS)
-> Show TopicRelativeDateFilterProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TopicRelativeDateFilterProperty -> ShowS
showsPrec :: Int -> TopicRelativeDateFilterProperty -> ShowS
$cshow :: TopicRelativeDateFilterProperty -> String
show :: TopicRelativeDateFilterProperty -> String
$cshowList :: [TopicRelativeDateFilterProperty] -> ShowS
showList :: [TopicRelativeDateFilterProperty] -> ShowS
Prelude.Show)
mkTopicRelativeDateFilterProperty ::
  TopicRelativeDateFilterProperty
mkTopicRelativeDateFilterProperty :: TopicRelativeDateFilterProperty
mkTopicRelativeDateFilterProperty
  = TopicRelativeDateFilterProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), constant :: Maybe TopicSingularFilterConstantProperty
constant = Maybe TopicSingularFilterConstantProperty
forall a. Maybe a
Prelude.Nothing,
       relativeDateFilterFunction :: Maybe (Value Text)
relativeDateFilterFunction = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       timeGranularity :: Maybe (Value Text)
timeGranularity = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TopicRelativeDateFilterProperty where
  toResourceProperties :: TopicRelativeDateFilterProperty -> ResourceProperties
toResourceProperties TopicRelativeDateFilterProperty {Maybe (Value Text)
Maybe TopicSingularFilterConstantProperty
()
haddock_workaround_ :: TopicRelativeDateFilterProperty -> ()
constant :: TopicRelativeDateFilterProperty
-> Maybe TopicSingularFilterConstantProperty
relativeDateFilterFunction :: TopicRelativeDateFilterProperty -> Maybe (Value Text)
timeGranularity :: TopicRelativeDateFilterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
constant :: Maybe TopicSingularFilterConstantProperty
relativeDateFilterFunction :: Maybe (Value Text)
timeGranularity :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Topic.TopicRelativeDateFilter",
         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 -> TopicSingularFilterConstantProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Constant" (TopicSingularFilterConstantProperty -> (Key, Value))
-> Maybe TopicSingularFilterConstantProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TopicSingularFilterConstantProperty
constant,
                            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
"RelativeDateFilterFunction"
                              (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)
relativeDateFilterFunction,
                            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
"TimeGranularity" (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)
timeGranularity])}
instance JSON.ToJSON TopicRelativeDateFilterProperty where
  toJSON :: TopicRelativeDateFilterProperty -> Value
toJSON TopicRelativeDateFilterProperty {Maybe (Value Text)
Maybe TopicSingularFilterConstantProperty
()
haddock_workaround_ :: TopicRelativeDateFilterProperty -> ()
constant :: TopicRelativeDateFilterProperty
-> Maybe TopicSingularFilterConstantProperty
relativeDateFilterFunction :: TopicRelativeDateFilterProperty -> Maybe (Value Text)
timeGranularity :: TopicRelativeDateFilterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
constant :: Maybe TopicSingularFilterConstantProperty
relativeDateFilterFunction :: Maybe (Value Text)
timeGranularity :: 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 -> TopicSingularFilterConstantProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Constant" (TopicSingularFilterConstantProperty -> (Key, Value))
-> Maybe TopicSingularFilterConstantProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TopicSingularFilterConstantProperty
constant,
               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
"RelativeDateFilterFunction"
                 (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)
relativeDateFilterFunction,
               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
"TimeGranularity" (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)
timeGranularity]))
instance Property "Constant" TopicRelativeDateFilterProperty where
  type PropertyType "Constant" TopicRelativeDateFilterProperty = TopicSingularFilterConstantProperty
  set :: PropertyType "Constant" TopicRelativeDateFilterProperty
-> TopicRelativeDateFilterProperty
-> TopicRelativeDateFilterProperty
set PropertyType "Constant" TopicRelativeDateFilterProperty
newValue TopicRelativeDateFilterProperty {Maybe (Value Text)
Maybe TopicSingularFilterConstantProperty
()
haddock_workaround_ :: TopicRelativeDateFilterProperty -> ()
constant :: TopicRelativeDateFilterProperty
-> Maybe TopicSingularFilterConstantProperty
relativeDateFilterFunction :: TopicRelativeDateFilterProperty -> Maybe (Value Text)
timeGranularity :: TopicRelativeDateFilterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
constant :: Maybe TopicSingularFilterConstantProperty
relativeDateFilterFunction :: Maybe (Value Text)
timeGranularity :: Maybe (Value Text)
..}
    = TopicRelativeDateFilterProperty
        {constant :: Maybe TopicSingularFilterConstantProperty
constant = TopicSingularFilterConstantProperty
-> Maybe TopicSingularFilterConstantProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Constant" TopicRelativeDateFilterProperty
TopicSingularFilterConstantProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
relativeDateFilterFunction :: Maybe (Value Text)
timeGranularity :: Maybe (Value Text)
haddock_workaround_ :: ()
relativeDateFilterFunction :: Maybe (Value Text)
timeGranularity :: Maybe (Value Text)
..}
instance Property "RelativeDateFilterFunction" TopicRelativeDateFilterProperty where
  type PropertyType "RelativeDateFilterFunction" TopicRelativeDateFilterProperty = Value Prelude.Text
  set :: PropertyType
  "RelativeDateFilterFunction" TopicRelativeDateFilterProperty
-> TopicRelativeDateFilterProperty
-> TopicRelativeDateFilterProperty
set PropertyType
  "RelativeDateFilterFunction" TopicRelativeDateFilterProperty
newValue TopicRelativeDateFilterProperty {Maybe (Value Text)
Maybe TopicSingularFilterConstantProperty
()
haddock_workaround_ :: TopicRelativeDateFilterProperty -> ()
constant :: TopicRelativeDateFilterProperty
-> Maybe TopicSingularFilterConstantProperty
relativeDateFilterFunction :: TopicRelativeDateFilterProperty -> Maybe (Value Text)
timeGranularity :: TopicRelativeDateFilterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
constant :: Maybe TopicSingularFilterConstantProperty
relativeDateFilterFunction :: Maybe (Value Text)
timeGranularity :: Maybe (Value Text)
..}
    = TopicRelativeDateFilterProperty
        {relativeDateFilterFunction :: Maybe (Value Text)
relativeDateFilterFunction = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "RelativeDateFilterFunction" TopicRelativeDateFilterProperty
Value Text
newValue, Maybe (Value Text)
Maybe TopicSingularFilterConstantProperty
()
haddock_workaround_ :: ()
constant :: Maybe TopicSingularFilterConstantProperty
timeGranularity :: Maybe (Value Text)
haddock_workaround_ :: ()
constant :: Maybe TopicSingularFilterConstantProperty
timeGranularity :: Maybe (Value Text)
..}
instance Property "TimeGranularity" TopicRelativeDateFilterProperty where
  type PropertyType "TimeGranularity" TopicRelativeDateFilterProperty = Value Prelude.Text
  set :: PropertyType "TimeGranularity" TopicRelativeDateFilterProperty
-> TopicRelativeDateFilterProperty
-> TopicRelativeDateFilterProperty
set PropertyType "TimeGranularity" TopicRelativeDateFilterProperty
newValue TopicRelativeDateFilterProperty {Maybe (Value Text)
Maybe TopicSingularFilterConstantProperty
()
haddock_workaround_ :: TopicRelativeDateFilterProperty -> ()
constant :: TopicRelativeDateFilterProperty
-> Maybe TopicSingularFilterConstantProperty
relativeDateFilterFunction :: TopicRelativeDateFilterProperty -> Maybe (Value Text)
timeGranularity :: TopicRelativeDateFilterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
constant :: Maybe TopicSingularFilterConstantProperty
relativeDateFilterFunction :: Maybe (Value Text)
timeGranularity :: Maybe (Value Text)
..}
    = TopicRelativeDateFilterProperty
        {timeGranularity :: Maybe (Value Text)
timeGranularity = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TimeGranularity" TopicRelativeDateFilterProperty
Value Text
newValue, Maybe (Value Text)
Maybe TopicSingularFilterConstantProperty
()
haddock_workaround_ :: ()
constant :: Maybe TopicSingularFilterConstantProperty
relativeDateFilterFunction :: Maybe (Value Text)
haddock_workaround_ :: ()
constant :: Maybe TopicSingularFilterConstantProperty
relativeDateFilterFunction :: Maybe (Value Text)
..}