module Stratosphere.QuickSight.Analysis.AggregationSortConfigurationProperty (
        module Exports, AggregationSortConfigurationProperty(..),
        mkAggregationSortConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Analysis.AggregationFunctionProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.Analysis.ColumnIdentifierProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AggregationSortConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-aggregationsortconfiguration.html>
    AggregationSortConfigurationProperty {AggregationSortConfigurationProperty -> ()
haddock_workaround_ :: (),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-aggregationsortconfiguration.html#cfn-quicksight-analysis-aggregationsortconfiguration-aggregationfunction>
                                          AggregationSortConfigurationProperty
-> Maybe AggregationFunctionProperty
aggregationFunction :: (Prelude.Maybe AggregationFunctionProperty),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-aggregationsortconfiguration.html#cfn-quicksight-analysis-aggregationsortconfiguration-column>
                                          AggregationSortConfigurationProperty -> ColumnIdentifierProperty
column :: ColumnIdentifierProperty,
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-aggregationsortconfiguration.html#cfn-quicksight-analysis-aggregationsortconfiguration-sortdirection>
                                          AggregationSortConfigurationProperty -> Value Text
sortDirection :: (Value Prelude.Text)}
  deriving stock (AggregationSortConfigurationProperty
-> AggregationSortConfigurationProperty -> Bool
(AggregationSortConfigurationProperty
 -> AggregationSortConfigurationProperty -> Bool)
-> (AggregationSortConfigurationProperty
    -> AggregationSortConfigurationProperty -> Bool)
-> Eq AggregationSortConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AggregationSortConfigurationProperty
-> AggregationSortConfigurationProperty -> Bool
== :: AggregationSortConfigurationProperty
-> AggregationSortConfigurationProperty -> Bool
$c/= :: AggregationSortConfigurationProperty
-> AggregationSortConfigurationProperty -> Bool
/= :: AggregationSortConfigurationProperty
-> AggregationSortConfigurationProperty -> Bool
Prelude.Eq, Int -> AggregationSortConfigurationProperty -> ShowS
[AggregationSortConfigurationProperty] -> ShowS
AggregationSortConfigurationProperty -> String
(Int -> AggregationSortConfigurationProperty -> ShowS)
-> (AggregationSortConfigurationProperty -> String)
-> ([AggregationSortConfigurationProperty] -> ShowS)
-> Show AggregationSortConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AggregationSortConfigurationProperty -> ShowS
showsPrec :: Int -> AggregationSortConfigurationProperty -> ShowS
$cshow :: AggregationSortConfigurationProperty -> String
show :: AggregationSortConfigurationProperty -> String
$cshowList :: [AggregationSortConfigurationProperty] -> ShowS
showList :: [AggregationSortConfigurationProperty] -> ShowS
Prelude.Show)
mkAggregationSortConfigurationProperty ::
  ColumnIdentifierProperty
  -> Value Prelude.Text -> AggregationSortConfigurationProperty
mkAggregationSortConfigurationProperty :: ColumnIdentifierProperty
-> Value Text -> AggregationSortConfigurationProperty
mkAggregationSortConfigurationProperty ColumnIdentifierProperty
column Value Text
sortDirection
  = AggregationSortConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), column :: ColumnIdentifierProperty
column = ColumnIdentifierProperty
column,
       sortDirection :: Value Text
sortDirection = Value Text
sortDirection,
       aggregationFunction :: Maybe AggregationFunctionProperty
aggregationFunction = Maybe AggregationFunctionProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AggregationSortConfigurationProperty where
  toResourceProperties :: AggregationSortConfigurationProperty -> ResourceProperties
toResourceProperties AggregationSortConfigurationProperty {Maybe AggregationFunctionProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: AggregationSortConfigurationProperty -> ()
aggregationFunction :: AggregationSortConfigurationProperty
-> Maybe AggregationFunctionProperty
column :: AggregationSortConfigurationProperty -> ColumnIdentifierProperty
sortDirection :: AggregationSortConfigurationProperty -> Value Text
haddock_workaround_ :: ()
aggregationFunction :: Maybe AggregationFunctionProperty
column :: ColumnIdentifierProperty
sortDirection :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Analysis.AggregationSortConfiguration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Column" Key -> ColumnIdentifierProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ColumnIdentifierProperty
column, Key
"SortDirection" 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..= Value Text
sortDirection]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> AggregationFunctionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AggregationFunction"
                                 (AggregationFunctionProperty -> (Key, Value))
-> Maybe AggregationFunctionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AggregationFunctionProperty
aggregationFunction]))}
instance JSON.ToJSON AggregationSortConfigurationProperty where
  toJSON :: AggregationSortConfigurationProperty -> Value
toJSON AggregationSortConfigurationProperty {Maybe AggregationFunctionProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: AggregationSortConfigurationProperty -> ()
aggregationFunction :: AggregationSortConfigurationProperty
-> Maybe AggregationFunctionProperty
column :: AggregationSortConfigurationProperty -> ColumnIdentifierProperty
sortDirection :: AggregationSortConfigurationProperty -> Value Text
haddock_workaround_ :: ()
aggregationFunction :: Maybe AggregationFunctionProperty
column :: ColumnIdentifierProperty
sortDirection :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Column" Key -> ColumnIdentifierProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ColumnIdentifierProperty
column, Key
"SortDirection" 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..= Value Text
sortDirection]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> AggregationFunctionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AggregationFunction"
                    (AggregationFunctionProperty -> (Key, Value))
-> Maybe AggregationFunctionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AggregationFunctionProperty
aggregationFunction])))
instance Property "AggregationFunction" AggregationSortConfigurationProperty where
  type PropertyType "AggregationFunction" AggregationSortConfigurationProperty = AggregationFunctionProperty
  set :: PropertyType
  "AggregationFunction" AggregationSortConfigurationProperty
-> AggregationSortConfigurationProperty
-> AggregationSortConfigurationProperty
set PropertyType
  "AggregationFunction" AggregationSortConfigurationProperty
newValue AggregationSortConfigurationProperty {Maybe AggregationFunctionProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: AggregationSortConfigurationProperty -> ()
aggregationFunction :: AggregationSortConfigurationProperty
-> Maybe AggregationFunctionProperty
column :: AggregationSortConfigurationProperty -> ColumnIdentifierProperty
sortDirection :: AggregationSortConfigurationProperty -> Value Text
haddock_workaround_ :: ()
aggregationFunction :: Maybe AggregationFunctionProperty
column :: ColumnIdentifierProperty
sortDirection :: Value Text
..}
    = AggregationSortConfigurationProperty
        {aggregationFunction :: Maybe AggregationFunctionProperty
aggregationFunction = AggregationFunctionProperty -> Maybe AggregationFunctionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "AggregationFunction" AggregationSortConfigurationProperty
AggregationFunctionProperty
newValue, ()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
sortDirection :: Value Text
haddock_workaround_ :: ()
column :: ColumnIdentifierProperty
sortDirection :: Value Text
..}
instance Property "Column" AggregationSortConfigurationProperty where
  type PropertyType "Column" AggregationSortConfigurationProperty = ColumnIdentifierProperty
  set :: PropertyType "Column" AggregationSortConfigurationProperty
-> AggregationSortConfigurationProperty
-> AggregationSortConfigurationProperty
set PropertyType "Column" AggregationSortConfigurationProperty
newValue AggregationSortConfigurationProperty {Maybe AggregationFunctionProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: AggregationSortConfigurationProperty -> ()
aggregationFunction :: AggregationSortConfigurationProperty
-> Maybe AggregationFunctionProperty
column :: AggregationSortConfigurationProperty -> ColumnIdentifierProperty
sortDirection :: AggregationSortConfigurationProperty -> Value Text
haddock_workaround_ :: ()
aggregationFunction :: Maybe AggregationFunctionProperty
column :: ColumnIdentifierProperty
sortDirection :: Value Text
..}
    = AggregationSortConfigurationProperty {column :: ColumnIdentifierProperty
column = PropertyType "Column" AggregationSortConfigurationProperty
ColumnIdentifierProperty
newValue, Maybe AggregationFunctionProperty
()
Value Text
haddock_workaround_ :: ()
aggregationFunction :: Maybe AggregationFunctionProperty
sortDirection :: Value Text
haddock_workaround_ :: ()
aggregationFunction :: Maybe AggregationFunctionProperty
sortDirection :: Value Text
..}
instance Property "SortDirection" AggregationSortConfigurationProperty where
  type PropertyType "SortDirection" AggregationSortConfigurationProperty = Value Prelude.Text
  set :: PropertyType "SortDirection" AggregationSortConfigurationProperty
-> AggregationSortConfigurationProperty
-> AggregationSortConfigurationProperty
set PropertyType "SortDirection" AggregationSortConfigurationProperty
newValue AggregationSortConfigurationProperty {Maybe AggregationFunctionProperty
()
Value Text
ColumnIdentifierProperty
haddock_workaround_ :: AggregationSortConfigurationProperty -> ()
aggregationFunction :: AggregationSortConfigurationProperty
-> Maybe AggregationFunctionProperty
column :: AggregationSortConfigurationProperty -> ColumnIdentifierProperty
sortDirection :: AggregationSortConfigurationProperty -> Value Text
haddock_workaround_ :: ()
aggregationFunction :: Maybe AggregationFunctionProperty
column :: ColumnIdentifierProperty
sortDirection :: Value Text
..}
    = AggregationSortConfigurationProperty
        {sortDirection :: Value Text
sortDirection = PropertyType "SortDirection" AggregationSortConfigurationProperty
Value Text
newValue, Maybe AggregationFunctionProperty
()
ColumnIdentifierProperty
haddock_workaround_ :: ()
aggregationFunction :: Maybe AggregationFunctionProperty
column :: ColumnIdentifierProperty
haddock_workaround_ :: ()
aggregationFunction :: Maybe AggregationFunctionProperty
column :: ColumnIdentifierProperty
..}