module Stratosphere.QuickSight.Analysis.ColorScaleProperty (
        module Exports, ColorScaleProperty(..), mkColorScaleProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Analysis.DataColorProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ColorScaleProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-colorscale.html>
    ColorScaleProperty {ColorScaleProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-colorscale.html#cfn-quicksight-analysis-colorscale-colorfilltype>
                        ColorScaleProperty -> Value Text
colorFillType :: (Value Prelude.Text),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-colorscale.html#cfn-quicksight-analysis-colorscale-colors>
                        ColorScaleProperty -> [DataColorProperty]
colors :: [DataColorProperty],
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-analysis-colorscale.html#cfn-quicksight-analysis-colorscale-nullvaluecolor>
                        ColorScaleProperty -> Maybe DataColorProperty
nullValueColor :: (Prelude.Maybe DataColorProperty)}
  deriving stock (ColorScaleProperty -> ColorScaleProperty -> Bool
(ColorScaleProperty -> ColorScaleProperty -> Bool)
-> (ColorScaleProperty -> ColorScaleProperty -> Bool)
-> Eq ColorScaleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ColorScaleProperty -> ColorScaleProperty -> Bool
== :: ColorScaleProperty -> ColorScaleProperty -> Bool
$c/= :: ColorScaleProperty -> ColorScaleProperty -> Bool
/= :: ColorScaleProperty -> ColorScaleProperty -> Bool
Prelude.Eq, Int -> ColorScaleProperty -> ShowS
[ColorScaleProperty] -> ShowS
ColorScaleProperty -> String
(Int -> ColorScaleProperty -> ShowS)
-> (ColorScaleProperty -> String)
-> ([ColorScaleProperty] -> ShowS)
-> Show ColorScaleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ColorScaleProperty -> ShowS
showsPrec :: Int -> ColorScaleProperty -> ShowS
$cshow :: ColorScaleProperty -> String
show :: ColorScaleProperty -> String
$cshowList :: [ColorScaleProperty] -> ShowS
showList :: [ColorScaleProperty] -> ShowS
Prelude.Show)
mkColorScaleProperty ::
  Value Prelude.Text -> [DataColorProperty] -> ColorScaleProperty
mkColorScaleProperty :: Value Text -> [DataColorProperty] -> ColorScaleProperty
mkColorScaleProperty Value Text
colorFillType [DataColorProperty]
colors
  = ColorScaleProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), colorFillType :: Value Text
colorFillType = Value Text
colorFillType,
       colors :: [DataColorProperty]
colors = [DataColorProperty]
colors, nullValueColor :: Maybe DataColorProperty
nullValueColor = Maybe DataColorProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ColorScaleProperty where
  toResourceProperties :: ColorScaleProperty -> ResourceProperties
toResourceProperties ColorScaleProperty {[DataColorProperty]
Maybe DataColorProperty
()
Value Text
haddock_workaround_ :: ColorScaleProperty -> ()
colorFillType :: ColorScaleProperty -> Value Text
colors :: ColorScaleProperty -> [DataColorProperty]
nullValueColor :: ColorScaleProperty -> Maybe DataColorProperty
haddock_workaround_ :: ()
colorFillType :: Value Text
colors :: [DataColorProperty]
nullValueColor :: Maybe DataColorProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Analysis.ColorScale",
         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
"ColorFillType" 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
colorFillType, Key
"Colors" Key -> [DataColorProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [DataColorProperty]
colors]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> DataColorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NullValueColor" (DataColorProperty -> (Key, Value))
-> Maybe DataColorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataColorProperty
nullValueColor]))}
instance JSON.ToJSON ColorScaleProperty where
  toJSON :: ColorScaleProperty -> Value
toJSON ColorScaleProperty {[DataColorProperty]
Maybe DataColorProperty
()
Value Text
haddock_workaround_ :: ColorScaleProperty -> ()
colorFillType :: ColorScaleProperty -> Value Text
colors :: ColorScaleProperty -> [DataColorProperty]
nullValueColor :: ColorScaleProperty -> Maybe DataColorProperty
haddock_workaround_ :: ()
colorFillType :: Value Text
colors :: [DataColorProperty]
nullValueColor :: Maybe DataColorProperty
..}
    = [(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
"ColorFillType" 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
colorFillType, Key
"Colors" Key -> [DataColorProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [DataColorProperty]
colors]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> DataColorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NullValueColor" (DataColorProperty -> (Key, Value))
-> Maybe DataColorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataColorProperty
nullValueColor])))
instance Property "ColorFillType" ColorScaleProperty where
  type PropertyType "ColorFillType" ColorScaleProperty = Value Prelude.Text
  set :: PropertyType "ColorFillType" ColorScaleProperty
-> ColorScaleProperty -> ColorScaleProperty
set PropertyType "ColorFillType" ColorScaleProperty
newValue ColorScaleProperty {[DataColorProperty]
Maybe DataColorProperty
()
Value Text
haddock_workaround_ :: ColorScaleProperty -> ()
colorFillType :: ColorScaleProperty -> Value Text
colors :: ColorScaleProperty -> [DataColorProperty]
nullValueColor :: ColorScaleProperty -> Maybe DataColorProperty
haddock_workaround_ :: ()
colorFillType :: Value Text
colors :: [DataColorProperty]
nullValueColor :: Maybe DataColorProperty
..}
    = ColorScaleProperty {colorFillType :: Value Text
colorFillType = PropertyType "ColorFillType" ColorScaleProperty
Value Text
newValue, [DataColorProperty]
Maybe DataColorProperty
()
haddock_workaround_ :: ()
colors :: [DataColorProperty]
nullValueColor :: Maybe DataColorProperty
haddock_workaround_ :: ()
colors :: [DataColorProperty]
nullValueColor :: Maybe DataColorProperty
..}
instance Property "Colors" ColorScaleProperty where
  type PropertyType "Colors" ColorScaleProperty = [DataColorProperty]
  set :: PropertyType "Colors" ColorScaleProperty
-> ColorScaleProperty -> ColorScaleProperty
set PropertyType "Colors" ColorScaleProperty
newValue ColorScaleProperty {[DataColorProperty]
Maybe DataColorProperty
()
Value Text
haddock_workaround_ :: ColorScaleProperty -> ()
colorFillType :: ColorScaleProperty -> Value Text
colors :: ColorScaleProperty -> [DataColorProperty]
nullValueColor :: ColorScaleProperty -> Maybe DataColorProperty
haddock_workaround_ :: ()
colorFillType :: Value Text
colors :: [DataColorProperty]
nullValueColor :: Maybe DataColorProperty
..}
    = ColorScaleProperty {colors :: [DataColorProperty]
colors = [DataColorProperty]
PropertyType "Colors" ColorScaleProperty
newValue, Maybe DataColorProperty
()
Value Text
haddock_workaround_ :: ()
colorFillType :: Value Text
nullValueColor :: Maybe DataColorProperty
haddock_workaround_ :: ()
colorFillType :: Value Text
nullValueColor :: Maybe DataColorProperty
..}
instance Property "NullValueColor" ColorScaleProperty where
  type PropertyType "NullValueColor" ColorScaleProperty = DataColorProperty
  set :: PropertyType "NullValueColor" ColorScaleProperty
-> ColorScaleProperty -> ColorScaleProperty
set PropertyType "NullValueColor" ColorScaleProperty
newValue ColorScaleProperty {[DataColorProperty]
Maybe DataColorProperty
()
Value Text
haddock_workaround_ :: ColorScaleProperty -> ()
colorFillType :: ColorScaleProperty -> Value Text
colors :: ColorScaleProperty -> [DataColorProperty]
nullValueColor :: ColorScaleProperty -> Maybe DataColorProperty
haddock_workaround_ :: ()
colorFillType :: Value Text
colors :: [DataColorProperty]
nullValueColor :: Maybe DataColorProperty
..}
    = ColorScaleProperty {nullValueColor :: Maybe DataColorProperty
nullValueColor = DataColorProperty -> Maybe DataColorProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NullValueColor" ColorScaleProperty
DataColorProperty
newValue, [DataColorProperty]
()
Value Text
haddock_workaround_ :: ()
colorFillType :: Value Text
colors :: [DataColorProperty]
haddock_workaround_ :: ()
colorFillType :: Value Text
colors :: [DataColorProperty]
..}