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