module Stratosphere.QuickSight.Analysis.UniqueValuesComputationProperty (
        module Exports, UniqueValuesComputationProperty(..),
        mkUniqueValuesComputationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Analysis.DimensionFieldProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data UniqueValuesComputationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-uniquevaluescomputation.html>
    UniqueValuesComputationProperty {UniqueValuesComputationProperty -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-uniquevaluescomputation.html#cfn-quicksight-analysis-uniquevaluescomputation-category>
                                     UniqueValuesComputationProperty -> Maybe DimensionFieldProperty
category :: (Prelude.Maybe DimensionFieldProperty),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-uniquevaluescomputation.html#cfn-quicksight-analysis-uniquevaluescomputation-computationid>
                                     UniqueValuesComputationProperty -> Value Text
computationId :: (Value Prelude.Text),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-uniquevaluescomputation.html#cfn-quicksight-analysis-uniquevaluescomputation-name>
                                     UniqueValuesComputationProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (UniqueValuesComputationProperty
-> UniqueValuesComputationProperty -> Bool
(UniqueValuesComputationProperty
 -> UniqueValuesComputationProperty -> Bool)
-> (UniqueValuesComputationProperty
    -> UniqueValuesComputationProperty -> Bool)
-> Eq UniqueValuesComputationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UniqueValuesComputationProperty
-> UniqueValuesComputationProperty -> Bool
== :: UniqueValuesComputationProperty
-> UniqueValuesComputationProperty -> Bool
$c/= :: UniqueValuesComputationProperty
-> UniqueValuesComputationProperty -> Bool
/= :: UniqueValuesComputationProperty
-> UniqueValuesComputationProperty -> Bool
Prelude.Eq, Int -> UniqueValuesComputationProperty -> ShowS
[UniqueValuesComputationProperty] -> ShowS
UniqueValuesComputationProperty -> String
(Int -> UniqueValuesComputationProperty -> ShowS)
-> (UniqueValuesComputationProperty -> String)
-> ([UniqueValuesComputationProperty] -> ShowS)
-> Show UniqueValuesComputationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UniqueValuesComputationProperty -> ShowS
showsPrec :: Int -> UniqueValuesComputationProperty -> ShowS
$cshow :: UniqueValuesComputationProperty -> String
show :: UniqueValuesComputationProperty -> String
$cshowList :: [UniqueValuesComputationProperty] -> ShowS
showList :: [UniqueValuesComputationProperty] -> ShowS
Prelude.Show)
mkUniqueValuesComputationProperty ::
  Value Prelude.Text -> UniqueValuesComputationProperty
mkUniqueValuesComputationProperty :: Value Text -> UniqueValuesComputationProperty
mkUniqueValuesComputationProperty Value Text
computationId
  = UniqueValuesComputationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), computationId :: Value Text
computationId = Value Text
computationId,
       category :: Maybe DimensionFieldProperty
category = Maybe DimensionFieldProperty
forall a. Maybe a
Prelude.Nothing, name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties UniqueValuesComputationProperty where
  toResourceProperties :: UniqueValuesComputationProperty -> ResourceProperties
toResourceProperties UniqueValuesComputationProperty {Maybe (Value Text)
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: UniqueValuesComputationProperty -> ()
category :: UniqueValuesComputationProperty -> Maybe DimensionFieldProperty
computationId :: UniqueValuesComputationProperty -> Value Text
name :: UniqueValuesComputationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
category :: Maybe DimensionFieldProperty
computationId :: Value Text
name :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Analysis.UniqueValuesComputation",
         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
"ComputationId" 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
computationId]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> DimensionFieldProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Category" (DimensionFieldProperty -> (Key, Value))
-> Maybe DimensionFieldProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DimensionFieldProperty
category,
                               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
"Name" (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)
name]))}
instance JSON.ToJSON UniqueValuesComputationProperty where
  toJSON :: UniqueValuesComputationProperty -> Value
toJSON UniqueValuesComputationProperty {Maybe (Value Text)
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: UniqueValuesComputationProperty -> ()
category :: UniqueValuesComputationProperty -> Maybe DimensionFieldProperty
computationId :: UniqueValuesComputationProperty -> Value Text
name :: UniqueValuesComputationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
category :: Maybe DimensionFieldProperty
computationId :: Value Text
name :: Maybe (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
"ComputationId" 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
computationId]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> DimensionFieldProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Category" (DimensionFieldProperty -> (Key, Value))
-> Maybe DimensionFieldProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DimensionFieldProperty
category,
                  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
"Name" (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)
name])))
instance Property "Category" UniqueValuesComputationProperty where
  type PropertyType "Category" UniqueValuesComputationProperty = DimensionFieldProperty
  set :: PropertyType "Category" UniqueValuesComputationProperty
-> UniqueValuesComputationProperty
-> UniqueValuesComputationProperty
set PropertyType "Category" UniqueValuesComputationProperty
newValue UniqueValuesComputationProperty {Maybe (Value Text)
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: UniqueValuesComputationProperty -> ()
category :: UniqueValuesComputationProperty -> Maybe DimensionFieldProperty
computationId :: UniqueValuesComputationProperty -> Value Text
name :: UniqueValuesComputationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
category :: Maybe DimensionFieldProperty
computationId :: Value Text
name :: Maybe (Value Text)
..}
    = UniqueValuesComputationProperty
        {category :: Maybe DimensionFieldProperty
category = DimensionFieldProperty -> Maybe DimensionFieldProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Category" UniqueValuesComputationProperty
DimensionFieldProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
haddock_workaround_ :: ()
computationId :: Value Text
name :: Maybe (Value Text)
..}
instance Property "ComputationId" UniqueValuesComputationProperty where
  type PropertyType "ComputationId" UniqueValuesComputationProperty = Value Prelude.Text
  set :: PropertyType "ComputationId" UniqueValuesComputationProperty
-> UniqueValuesComputationProperty
-> UniqueValuesComputationProperty
set PropertyType "ComputationId" UniqueValuesComputationProperty
newValue UniqueValuesComputationProperty {Maybe (Value Text)
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: UniqueValuesComputationProperty -> ()
category :: UniqueValuesComputationProperty -> Maybe DimensionFieldProperty
computationId :: UniqueValuesComputationProperty -> Value Text
name :: UniqueValuesComputationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
category :: Maybe DimensionFieldProperty
computationId :: Value Text
name :: Maybe (Value Text)
..}
    = UniqueValuesComputationProperty {computationId :: Value Text
computationId = PropertyType "ComputationId" UniqueValuesComputationProperty
Value Text
newValue, Maybe (Value Text)
Maybe DimensionFieldProperty
()
haddock_workaround_ :: ()
category :: Maybe DimensionFieldProperty
name :: Maybe (Value Text)
haddock_workaround_ :: ()
category :: Maybe DimensionFieldProperty
name :: Maybe (Value Text)
..}
instance Property "Name" UniqueValuesComputationProperty where
  type PropertyType "Name" UniqueValuesComputationProperty = Value Prelude.Text
  set :: PropertyType "Name" UniqueValuesComputationProperty
-> UniqueValuesComputationProperty
-> UniqueValuesComputationProperty
set PropertyType "Name" UniqueValuesComputationProperty
newValue UniqueValuesComputationProperty {Maybe (Value Text)
Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: UniqueValuesComputationProperty -> ()
category :: UniqueValuesComputationProperty -> Maybe DimensionFieldProperty
computationId :: UniqueValuesComputationProperty -> Value Text
name :: UniqueValuesComputationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
category :: Maybe DimensionFieldProperty
computationId :: Value Text
name :: Maybe (Value Text)
..}
    = UniqueValuesComputationProperty
        {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" UniqueValuesComputationProperty
Value Text
newValue, Maybe DimensionFieldProperty
()
Value Text
haddock_workaround_ :: ()
category :: Maybe DimensionFieldProperty
computationId :: Value Text
haddock_workaround_ :: ()
category :: Maybe DimensionFieldProperty
computationId :: Value Text
..}