module Stratosphere.QuickSight.Dashboard.KPISortConfigurationProperty (
        module Exports, KPISortConfigurationProperty(..),
        mkKPISortConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Dashboard.FieldSortOptionsProperty as Exports
import Stratosphere.ResourceProperties
data KPISortConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dashboard-kpisortconfiguration.html>
    KPISortConfigurationProperty {KPISortConfigurationProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dashboard-kpisortconfiguration.html#cfn-quicksight-dashboard-kpisortconfiguration-trendgroupsort>
                                  KPISortConfigurationProperty -> Maybe [FieldSortOptionsProperty]
trendGroupSort :: (Prelude.Maybe [FieldSortOptionsProperty])}
  deriving stock (KPISortConfigurationProperty
-> KPISortConfigurationProperty -> Bool
(KPISortConfigurationProperty
 -> KPISortConfigurationProperty -> Bool)
-> (KPISortConfigurationProperty
    -> KPISortConfigurationProperty -> Bool)
-> Eq KPISortConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: KPISortConfigurationProperty
-> KPISortConfigurationProperty -> Bool
== :: KPISortConfigurationProperty
-> KPISortConfigurationProperty -> Bool
$c/= :: KPISortConfigurationProperty
-> KPISortConfigurationProperty -> Bool
/= :: KPISortConfigurationProperty
-> KPISortConfigurationProperty -> Bool
Prelude.Eq, Int -> KPISortConfigurationProperty -> ShowS
[KPISortConfigurationProperty] -> ShowS
KPISortConfigurationProperty -> String
(Int -> KPISortConfigurationProperty -> ShowS)
-> (KPISortConfigurationProperty -> String)
-> ([KPISortConfigurationProperty] -> ShowS)
-> Show KPISortConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> KPISortConfigurationProperty -> ShowS
showsPrec :: Int -> KPISortConfigurationProperty -> ShowS
$cshow :: KPISortConfigurationProperty -> String
show :: KPISortConfigurationProperty -> String
$cshowList :: [KPISortConfigurationProperty] -> ShowS
showList :: [KPISortConfigurationProperty] -> ShowS
Prelude.Show)
mkKPISortConfigurationProperty :: KPISortConfigurationProperty
mkKPISortConfigurationProperty :: KPISortConfigurationProperty
mkKPISortConfigurationProperty
  = KPISortConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), trendGroupSort :: Maybe [FieldSortOptionsProperty]
trendGroupSort = Maybe [FieldSortOptionsProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties KPISortConfigurationProperty where
  toResourceProperties :: KPISortConfigurationProperty -> ResourceProperties
toResourceProperties KPISortConfigurationProperty {Maybe [FieldSortOptionsProperty]
()
haddock_workaround_ :: KPISortConfigurationProperty -> ()
trendGroupSort :: KPISortConfigurationProperty -> Maybe [FieldSortOptionsProperty]
haddock_workaround_ :: ()
trendGroupSort :: Maybe [FieldSortOptionsProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Dashboard.KPISortConfiguration",
         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 -> [FieldSortOptionsProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TrendGroupSort" ([FieldSortOptionsProperty] -> (Key, Value))
-> Maybe [FieldSortOptionsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FieldSortOptionsProperty]
trendGroupSort])}
instance JSON.ToJSON KPISortConfigurationProperty where
  toJSON :: KPISortConfigurationProperty -> Value
toJSON KPISortConfigurationProperty {Maybe [FieldSortOptionsProperty]
()
haddock_workaround_ :: KPISortConfigurationProperty -> ()
trendGroupSort :: KPISortConfigurationProperty -> Maybe [FieldSortOptionsProperty]
haddock_workaround_ :: ()
trendGroupSort :: Maybe [FieldSortOptionsProperty]
..}
    = [(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 -> [FieldSortOptionsProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TrendGroupSort" ([FieldSortOptionsProperty] -> (Key, Value))
-> Maybe [FieldSortOptionsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FieldSortOptionsProperty]
trendGroupSort]))
instance Property "TrendGroupSort" KPISortConfigurationProperty where
  type PropertyType "TrendGroupSort" KPISortConfigurationProperty = [FieldSortOptionsProperty]
  set :: PropertyType "TrendGroupSort" KPISortConfigurationProperty
-> KPISortConfigurationProperty -> KPISortConfigurationProperty
set PropertyType "TrendGroupSort" KPISortConfigurationProperty
newValue KPISortConfigurationProperty {Maybe [FieldSortOptionsProperty]
()
haddock_workaround_ :: KPISortConfigurationProperty -> ()
trendGroupSort :: KPISortConfigurationProperty -> Maybe [FieldSortOptionsProperty]
haddock_workaround_ :: ()
trendGroupSort :: Maybe [FieldSortOptionsProperty]
..}
    = KPISortConfigurationProperty
        {trendGroupSort :: Maybe [FieldSortOptionsProperty]
trendGroupSort = [FieldSortOptionsProperty] -> Maybe [FieldSortOptionsProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [FieldSortOptionsProperty]
PropertyType "TrendGroupSort" KPISortConfigurationProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}