module Stratosphere.QuickSight.Analysis.AttributeAggregationFunctionProperty (
        AttributeAggregationFunctionProperty(..),
        mkAttributeAggregationFunctionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AttributeAggregationFunctionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-attributeaggregationfunction.html>
    AttributeAggregationFunctionProperty {AttributeAggregationFunctionProperty -> ()
haddock_workaround_ :: (),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-attributeaggregationfunction.html#cfn-quicksight-analysis-attributeaggregationfunction-simpleattributeaggregation>
                                          AttributeAggregationFunctionProperty -> Maybe (Value Text)
simpleAttributeAggregation :: (Prelude.Maybe (Value Prelude.Text)),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-attributeaggregationfunction.html#cfn-quicksight-analysis-attributeaggregationfunction-valueformultiplevalues>
                                          AttributeAggregationFunctionProperty -> Maybe (Value Text)
valueForMultipleValues :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (AttributeAggregationFunctionProperty
-> AttributeAggregationFunctionProperty -> Bool
(AttributeAggregationFunctionProperty
 -> AttributeAggregationFunctionProperty -> Bool)
-> (AttributeAggregationFunctionProperty
    -> AttributeAggregationFunctionProperty -> Bool)
-> Eq AttributeAggregationFunctionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AttributeAggregationFunctionProperty
-> AttributeAggregationFunctionProperty -> Bool
== :: AttributeAggregationFunctionProperty
-> AttributeAggregationFunctionProperty -> Bool
$c/= :: AttributeAggregationFunctionProperty
-> AttributeAggregationFunctionProperty -> Bool
/= :: AttributeAggregationFunctionProperty
-> AttributeAggregationFunctionProperty -> Bool
Prelude.Eq, Int -> AttributeAggregationFunctionProperty -> ShowS
[AttributeAggregationFunctionProperty] -> ShowS
AttributeAggregationFunctionProperty -> String
(Int -> AttributeAggregationFunctionProperty -> ShowS)
-> (AttributeAggregationFunctionProperty -> String)
-> ([AttributeAggregationFunctionProperty] -> ShowS)
-> Show AttributeAggregationFunctionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AttributeAggregationFunctionProperty -> ShowS
showsPrec :: Int -> AttributeAggregationFunctionProperty -> ShowS
$cshow :: AttributeAggregationFunctionProperty -> String
show :: AttributeAggregationFunctionProperty -> String
$cshowList :: [AttributeAggregationFunctionProperty] -> ShowS
showList :: [AttributeAggregationFunctionProperty] -> ShowS
Prelude.Show)
mkAttributeAggregationFunctionProperty ::
  AttributeAggregationFunctionProperty
mkAttributeAggregationFunctionProperty :: AttributeAggregationFunctionProperty
mkAttributeAggregationFunctionProperty
  = AttributeAggregationFunctionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       simpleAttributeAggregation :: Maybe (Value Text)
simpleAttributeAggregation = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       valueForMultipleValues :: Maybe (Value Text)
valueForMultipleValues = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AttributeAggregationFunctionProperty where
  toResourceProperties :: AttributeAggregationFunctionProperty -> ResourceProperties
toResourceProperties AttributeAggregationFunctionProperty {Maybe (Value Text)
()
haddock_workaround_ :: AttributeAggregationFunctionProperty -> ()
simpleAttributeAggregation :: AttributeAggregationFunctionProperty -> Maybe (Value Text)
valueForMultipleValues :: AttributeAggregationFunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
simpleAttributeAggregation :: Maybe (Value Text)
valueForMultipleValues :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Analysis.AttributeAggregationFunction",
         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 -> 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
"SimpleAttributeAggregation"
                              (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)
simpleAttributeAggregation,
                            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
"ValueForMultipleValues"
                              (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)
valueForMultipleValues])}
instance JSON.ToJSON AttributeAggregationFunctionProperty where
  toJSON :: AttributeAggregationFunctionProperty -> Value
toJSON AttributeAggregationFunctionProperty {Maybe (Value Text)
()
haddock_workaround_ :: AttributeAggregationFunctionProperty -> ()
simpleAttributeAggregation :: AttributeAggregationFunctionProperty -> Maybe (Value Text)
valueForMultipleValues :: AttributeAggregationFunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
simpleAttributeAggregation :: Maybe (Value Text)
valueForMultipleValues :: 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 -> 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
"SimpleAttributeAggregation"
                 (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)
simpleAttributeAggregation,
               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
"ValueForMultipleValues"
                 (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)
valueForMultipleValues]))
instance Property "SimpleAttributeAggregation" AttributeAggregationFunctionProperty where
  type PropertyType "SimpleAttributeAggregation" AttributeAggregationFunctionProperty = Value Prelude.Text
  set :: PropertyType
  "SimpleAttributeAggregation" AttributeAggregationFunctionProperty
-> AttributeAggregationFunctionProperty
-> AttributeAggregationFunctionProperty
set PropertyType
  "SimpleAttributeAggregation" AttributeAggregationFunctionProperty
newValue AttributeAggregationFunctionProperty {Maybe (Value Text)
()
haddock_workaround_ :: AttributeAggregationFunctionProperty -> ()
simpleAttributeAggregation :: AttributeAggregationFunctionProperty -> Maybe (Value Text)
valueForMultipleValues :: AttributeAggregationFunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
simpleAttributeAggregation :: Maybe (Value Text)
valueForMultipleValues :: Maybe (Value Text)
..}
    = AttributeAggregationFunctionProperty
        {simpleAttributeAggregation :: Maybe (Value Text)
simpleAttributeAggregation = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "SimpleAttributeAggregation" AttributeAggregationFunctionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
valueForMultipleValues :: Maybe (Value Text)
haddock_workaround_ :: ()
valueForMultipleValues :: Maybe (Value Text)
..}
instance Property "ValueForMultipleValues" AttributeAggregationFunctionProperty where
  type PropertyType "ValueForMultipleValues" AttributeAggregationFunctionProperty = Value Prelude.Text
  set :: PropertyType
  "ValueForMultipleValues" AttributeAggregationFunctionProperty
-> AttributeAggregationFunctionProperty
-> AttributeAggregationFunctionProperty
set PropertyType
  "ValueForMultipleValues" AttributeAggregationFunctionProperty
newValue AttributeAggregationFunctionProperty {Maybe (Value Text)
()
haddock_workaround_ :: AttributeAggregationFunctionProperty -> ()
simpleAttributeAggregation :: AttributeAggregationFunctionProperty -> Maybe (Value Text)
valueForMultipleValues :: AttributeAggregationFunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
simpleAttributeAggregation :: Maybe (Value Text)
valueForMultipleValues :: Maybe (Value Text)
..}
    = AttributeAggregationFunctionProperty
        {valueForMultipleValues :: Maybe (Value Text)
valueForMultipleValues = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ValueForMultipleValues" AttributeAggregationFunctionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
simpleAttributeAggregation :: Maybe (Value Text)
haddock_workaround_ :: ()
simpleAttributeAggregation :: Maybe (Value Text)
..}