module Stratosphere.QuickSight.Template.WordCloudSortConfigurationProperty (
        module Exports, WordCloudSortConfigurationProperty(..),
        mkWordCloudSortConfigurationProperty
    ) 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 WordCloudSortConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-wordcloudsortconfiguration.html>
    WordCloudSortConfigurationProperty {WordCloudSortConfigurationProperty -> ()
haddock_workaround_ :: (),
                                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-wordcloudsortconfiguration.html#cfn-quicksight-template-wordcloudsortconfiguration-categoryitemslimit>
                                        WordCloudSortConfigurationProperty
-> Maybe ItemsLimitConfigurationProperty
categoryItemsLimit :: (Prelude.Maybe ItemsLimitConfigurationProperty),
                                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-wordcloudsortconfiguration.html#cfn-quicksight-template-wordcloudsortconfiguration-categorysort>
                                        WordCloudSortConfigurationProperty
-> Maybe [FieldSortOptionsProperty]
categorySort :: (Prelude.Maybe [FieldSortOptionsProperty])}
  deriving stock (WordCloudSortConfigurationProperty
-> WordCloudSortConfigurationProperty -> Bool
(WordCloudSortConfigurationProperty
 -> WordCloudSortConfigurationProperty -> Bool)
-> (WordCloudSortConfigurationProperty
    -> WordCloudSortConfigurationProperty -> Bool)
-> Eq WordCloudSortConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WordCloudSortConfigurationProperty
-> WordCloudSortConfigurationProperty -> Bool
== :: WordCloudSortConfigurationProperty
-> WordCloudSortConfigurationProperty -> Bool
$c/= :: WordCloudSortConfigurationProperty
-> WordCloudSortConfigurationProperty -> Bool
/= :: WordCloudSortConfigurationProperty
-> WordCloudSortConfigurationProperty -> Bool
Prelude.Eq, Int -> WordCloudSortConfigurationProperty -> ShowS
[WordCloudSortConfigurationProperty] -> ShowS
WordCloudSortConfigurationProperty -> String
(Int -> WordCloudSortConfigurationProperty -> ShowS)
-> (WordCloudSortConfigurationProperty -> String)
-> ([WordCloudSortConfigurationProperty] -> ShowS)
-> Show WordCloudSortConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WordCloudSortConfigurationProperty -> ShowS
showsPrec :: Int -> WordCloudSortConfigurationProperty -> ShowS
$cshow :: WordCloudSortConfigurationProperty -> String
show :: WordCloudSortConfigurationProperty -> String
$cshowList :: [WordCloudSortConfigurationProperty] -> ShowS
showList :: [WordCloudSortConfigurationProperty] -> ShowS
Prelude.Show)
mkWordCloudSortConfigurationProperty ::
  WordCloudSortConfigurationProperty
mkWordCloudSortConfigurationProperty :: WordCloudSortConfigurationProperty
mkWordCloudSortConfigurationProperty
  = WordCloudSortConfigurationProperty
      {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 WordCloudSortConfigurationProperty where
  toResourceProperties :: WordCloudSortConfigurationProperty -> ResourceProperties
toResourceProperties WordCloudSortConfigurationProperty {Maybe [FieldSortOptionsProperty]
Maybe ItemsLimitConfigurationProperty
()
haddock_workaround_ :: WordCloudSortConfigurationProperty -> ()
categoryItemsLimit :: WordCloudSortConfigurationProperty
-> Maybe ItemsLimitConfigurationProperty
categorySort :: WordCloudSortConfigurationProperty
-> Maybe [FieldSortOptionsProperty]
haddock_workaround_ :: ()
categoryItemsLimit :: Maybe ItemsLimitConfigurationProperty
categorySort :: Maybe [FieldSortOptionsProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Template.WordCloudSortConfiguration",
         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 WordCloudSortConfigurationProperty where
  toJSON :: WordCloudSortConfigurationProperty -> Value
toJSON WordCloudSortConfigurationProperty {Maybe [FieldSortOptionsProperty]
Maybe ItemsLimitConfigurationProperty
()
haddock_workaround_ :: WordCloudSortConfigurationProperty -> ()
categoryItemsLimit :: WordCloudSortConfigurationProperty
-> Maybe ItemsLimitConfigurationProperty
categorySort :: WordCloudSortConfigurationProperty
-> 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" WordCloudSortConfigurationProperty where
  type PropertyType "CategoryItemsLimit" WordCloudSortConfigurationProperty = ItemsLimitConfigurationProperty
  set :: PropertyType
  "CategoryItemsLimit" WordCloudSortConfigurationProperty
-> WordCloudSortConfigurationProperty
-> WordCloudSortConfigurationProperty
set PropertyType
  "CategoryItemsLimit" WordCloudSortConfigurationProperty
newValue WordCloudSortConfigurationProperty {Maybe [FieldSortOptionsProperty]
Maybe ItemsLimitConfigurationProperty
()
haddock_workaround_ :: WordCloudSortConfigurationProperty -> ()
categoryItemsLimit :: WordCloudSortConfigurationProperty
-> Maybe ItemsLimitConfigurationProperty
categorySort :: WordCloudSortConfigurationProperty
-> Maybe [FieldSortOptionsProperty]
haddock_workaround_ :: ()
categoryItemsLimit :: Maybe ItemsLimitConfigurationProperty
categorySort :: Maybe [FieldSortOptionsProperty]
..}
    = WordCloudSortConfigurationProperty
        {categoryItemsLimit :: Maybe ItemsLimitConfigurationProperty
categoryItemsLimit = ItemsLimitConfigurationProperty
-> Maybe ItemsLimitConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CategoryItemsLimit" WordCloudSortConfigurationProperty
ItemsLimitConfigurationProperty
newValue, Maybe [FieldSortOptionsProperty]
()
haddock_workaround_ :: ()
categorySort :: Maybe [FieldSortOptionsProperty]
haddock_workaround_ :: ()
categorySort :: Maybe [FieldSortOptionsProperty]
..}
instance Property "CategorySort" WordCloudSortConfigurationProperty where
  type PropertyType "CategorySort" WordCloudSortConfigurationProperty = [FieldSortOptionsProperty]
  set :: PropertyType "CategorySort" WordCloudSortConfigurationProperty
-> WordCloudSortConfigurationProperty
-> WordCloudSortConfigurationProperty
set PropertyType "CategorySort" WordCloudSortConfigurationProperty
newValue WordCloudSortConfigurationProperty {Maybe [FieldSortOptionsProperty]
Maybe ItemsLimitConfigurationProperty
()
haddock_workaround_ :: WordCloudSortConfigurationProperty -> ()
categoryItemsLimit :: WordCloudSortConfigurationProperty
-> Maybe ItemsLimitConfigurationProperty
categorySort :: WordCloudSortConfigurationProperty
-> Maybe [FieldSortOptionsProperty]
haddock_workaround_ :: ()
categoryItemsLimit :: Maybe ItemsLimitConfigurationProperty
categorySort :: Maybe [FieldSortOptionsProperty]
..}
    = WordCloudSortConfigurationProperty
        {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" WordCloudSortConfigurationProperty
newValue, Maybe ItemsLimitConfigurationProperty
()
haddock_workaround_ :: ()
categoryItemsLimit :: Maybe ItemsLimitConfigurationProperty
haddock_workaround_ :: ()
categoryItemsLimit :: Maybe ItemsLimitConfigurationProperty
..}