module Stratosphere.QuickSight.Topic.NamedEntityDefinitionMetricProperty (
        NamedEntityDefinitionMetricProperty(..),
        mkNamedEntityDefinitionMetricProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data NamedEntityDefinitionMetricProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-topic-namedentitydefinitionmetric.html>
    NamedEntityDefinitionMetricProperty {NamedEntityDefinitionMetricProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-topic-namedentitydefinitionmetric.html#cfn-quicksight-topic-namedentitydefinitionmetric-aggregation>
                                         NamedEntityDefinitionMetricProperty -> Maybe (Value Text)
aggregation :: (Prelude.Maybe (Value Prelude.Text)),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-topic-namedentitydefinitionmetric.html#cfn-quicksight-topic-namedentitydefinitionmetric-aggregationfunctionparameters>
                                         NamedEntityDefinitionMetricProperty
-> Maybe (Map Text (Value Text))
aggregationFunctionParameters :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
  deriving stock (NamedEntityDefinitionMetricProperty
-> NamedEntityDefinitionMetricProperty -> Bool
(NamedEntityDefinitionMetricProperty
 -> NamedEntityDefinitionMetricProperty -> Bool)
-> (NamedEntityDefinitionMetricProperty
    -> NamedEntityDefinitionMetricProperty -> Bool)
-> Eq NamedEntityDefinitionMetricProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NamedEntityDefinitionMetricProperty
-> NamedEntityDefinitionMetricProperty -> Bool
== :: NamedEntityDefinitionMetricProperty
-> NamedEntityDefinitionMetricProperty -> Bool
$c/= :: NamedEntityDefinitionMetricProperty
-> NamedEntityDefinitionMetricProperty -> Bool
/= :: NamedEntityDefinitionMetricProperty
-> NamedEntityDefinitionMetricProperty -> Bool
Prelude.Eq, Int -> NamedEntityDefinitionMetricProperty -> ShowS
[NamedEntityDefinitionMetricProperty] -> ShowS
NamedEntityDefinitionMetricProperty -> String
(Int -> NamedEntityDefinitionMetricProperty -> ShowS)
-> (NamedEntityDefinitionMetricProperty -> String)
-> ([NamedEntityDefinitionMetricProperty] -> ShowS)
-> Show NamedEntityDefinitionMetricProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NamedEntityDefinitionMetricProperty -> ShowS
showsPrec :: Int -> NamedEntityDefinitionMetricProperty -> ShowS
$cshow :: NamedEntityDefinitionMetricProperty -> String
show :: NamedEntityDefinitionMetricProperty -> String
$cshowList :: [NamedEntityDefinitionMetricProperty] -> ShowS
showList :: [NamedEntityDefinitionMetricProperty] -> ShowS
Prelude.Show)
mkNamedEntityDefinitionMetricProperty ::
  NamedEntityDefinitionMetricProperty
mkNamedEntityDefinitionMetricProperty :: NamedEntityDefinitionMetricProperty
mkNamedEntityDefinitionMetricProperty
  = NamedEntityDefinitionMetricProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), aggregation :: Maybe (Value Text)
aggregation = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       aggregationFunctionParameters :: Maybe (Map Text (Value Text))
aggregationFunctionParameters = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties NamedEntityDefinitionMetricProperty where
  toResourceProperties :: NamedEntityDefinitionMetricProperty -> ResourceProperties
toResourceProperties NamedEntityDefinitionMetricProperty {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: NamedEntityDefinitionMetricProperty -> ()
aggregation :: NamedEntityDefinitionMetricProperty -> Maybe (Value Text)
aggregationFunctionParameters :: NamedEntityDefinitionMetricProperty
-> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
aggregation :: Maybe (Value Text)
aggregationFunctionParameters :: Maybe (Map Text (Value Text))
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Topic.NamedEntityDefinitionMetric",
         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
"Aggregation" (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)
aggregation,
                            Key -> Map Text (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
"AggregationFunctionParameters"
                              (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
aggregationFunctionParameters])}
instance JSON.ToJSON NamedEntityDefinitionMetricProperty where
  toJSON :: NamedEntityDefinitionMetricProperty -> Value
toJSON NamedEntityDefinitionMetricProperty {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: NamedEntityDefinitionMetricProperty -> ()
aggregation :: NamedEntityDefinitionMetricProperty -> Maybe (Value Text)
aggregationFunctionParameters :: NamedEntityDefinitionMetricProperty
-> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
aggregation :: Maybe (Value Text)
aggregationFunctionParameters :: Maybe (Map Text (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
"Aggregation" (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)
aggregation,
               Key -> Map Text (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
"AggregationFunctionParameters"
                 (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
aggregationFunctionParameters]))
instance Property "Aggregation" NamedEntityDefinitionMetricProperty where
  type PropertyType "Aggregation" NamedEntityDefinitionMetricProperty = Value Prelude.Text
  set :: PropertyType "Aggregation" NamedEntityDefinitionMetricProperty
-> NamedEntityDefinitionMetricProperty
-> NamedEntityDefinitionMetricProperty
set PropertyType "Aggregation" NamedEntityDefinitionMetricProperty
newValue NamedEntityDefinitionMetricProperty {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: NamedEntityDefinitionMetricProperty -> ()
aggregation :: NamedEntityDefinitionMetricProperty -> Maybe (Value Text)
aggregationFunctionParameters :: NamedEntityDefinitionMetricProperty
-> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
aggregation :: Maybe (Value Text)
aggregationFunctionParameters :: Maybe (Map Text (Value Text))
..}
    = NamedEntityDefinitionMetricProperty
        {aggregation :: Maybe (Value Text)
aggregation = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Aggregation" NamedEntityDefinitionMetricProperty
Value Text
newValue, Maybe (Map Text (Value Text))
()
haddock_workaround_ :: ()
aggregationFunctionParameters :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
aggregationFunctionParameters :: Maybe (Map Text (Value Text))
..}
instance Property "AggregationFunctionParameters" NamedEntityDefinitionMetricProperty where
  type PropertyType "AggregationFunctionParameters" NamedEntityDefinitionMetricProperty = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType
  "AggregationFunctionParameters" NamedEntityDefinitionMetricProperty
-> NamedEntityDefinitionMetricProperty
-> NamedEntityDefinitionMetricProperty
set PropertyType
  "AggregationFunctionParameters" NamedEntityDefinitionMetricProperty
newValue NamedEntityDefinitionMetricProperty {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: NamedEntityDefinitionMetricProperty -> ()
aggregation :: NamedEntityDefinitionMetricProperty -> Maybe (Value Text)
aggregationFunctionParameters :: NamedEntityDefinitionMetricProperty
-> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
aggregation :: Maybe (Value Text)
aggregationFunctionParameters :: Maybe (Map Text (Value Text))
..}
    = NamedEntityDefinitionMetricProperty
        {aggregationFunctionParameters :: Maybe (Map Text (Value Text))
aggregationFunctionParameters = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType
  "AggregationFunctionParameters" NamedEntityDefinitionMetricProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
aggregation :: Maybe (Value Text)
haddock_workaround_ :: ()
aggregation :: Maybe (Value Text)
..}