module Stratosphere.QuickSight.Dashboard.ConditionalFormattingColorProperty (
        module Exports, ConditionalFormattingColorProperty(..),
        mkConditionalFormattingColorProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QuickSight.Dashboard.ConditionalFormattingGradientColorProperty as Exports
import {-# SOURCE #-} Stratosphere.QuickSight.Dashboard.ConditionalFormattingSolidColorProperty as Exports
import Stratosphere.ResourceProperties
data ConditionalFormattingColorProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dashboard-conditionalformattingcolor.html>
    ConditionalFormattingColorProperty {ConditionalFormattingColorProperty -> ()
haddock_workaround_ :: (),
                                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dashboard-conditionalformattingcolor.html#cfn-quicksight-dashboard-conditionalformattingcolor-gradient>
                                        ConditionalFormattingColorProperty
-> Maybe ConditionalFormattingGradientColorProperty
gradient :: (Prelude.Maybe ConditionalFormattingGradientColorProperty),
                                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dashboard-conditionalformattingcolor.html#cfn-quicksight-dashboard-conditionalformattingcolor-solid>
                                        ConditionalFormattingColorProperty
-> Maybe ConditionalFormattingSolidColorProperty
solid :: (Prelude.Maybe ConditionalFormattingSolidColorProperty)}
  deriving stock (ConditionalFormattingColorProperty
-> ConditionalFormattingColorProperty -> Bool
(ConditionalFormattingColorProperty
 -> ConditionalFormattingColorProperty -> Bool)
-> (ConditionalFormattingColorProperty
    -> ConditionalFormattingColorProperty -> Bool)
-> Eq ConditionalFormattingColorProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConditionalFormattingColorProperty
-> ConditionalFormattingColorProperty -> Bool
== :: ConditionalFormattingColorProperty
-> ConditionalFormattingColorProperty -> Bool
$c/= :: ConditionalFormattingColorProperty
-> ConditionalFormattingColorProperty -> Bool
/= :: ConditionalFormattingColorProperty
-> ConditionalFormattingColorProperty -> Bool
Prelude.Eq, Int -> ConditionalFormattingColorProperty -> ShowS
[ConditionalFormattingColorProperty] -> ShowS
ConditionalFormattingColorProperty -> String
(Int -> ConditionalFormattingColorProperty -> ShowS)
-> (ConditionalFormattingColorProperty -> String)
-> ([ConditionalFormattingColorProperty] -> ShowS)
-> Show ConditionalFormattingColorProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConditionalFormattingColorProperty -> ShowS
showsPrec :: Int -> ConditionalFormattingColorProperty -> ShowS
$cshow :: ConditionalFormattingColorProperty -> String
show :: ConditionalFormattingColorProperty -> String
$cshowList :: [ConditionalFormattingColorProperty] -> ShowS
showList :: [ConditionalFormattingColorProperty] -> ShowS
Prelude.Show)
mkConditionalFormattingColorProperty ::
  ConditionalFormattingColorProperty
mkConditionalFormattingColorProperty :: ConditionalFormattingColorProperty
mkConditionalFormattingColorProperty
  = ConditionalFormattingColorProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), gradient :: Maybe ConditionalFormattingGradientColorProperty
gradient = Maybe ConditionalFormattingGradientColorProperty
forall a. Maybe a
Prelude.Nothing,
       solid :: Maybe ConditionalFormattingSolidColorProperty
solid = Maybe ConditionalFormattingSolidColorProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConditionalFormattingColorProperty where
  toResourceProperties :: ConditionalFormattingColorProperty -> ResourceProperties
toResourceProperties ConditionalFormattingColorProperty {Maybe ConditionalFormattingSolidColorProperty
Maybe ConditionalFormattingGradientColorProperty
()
haddock_workaround_ :: ConditionalFormattingColorProperty -> ()
gradient :: ConditionalFormattingColorProperty
-> Maybe ConditionalFormattingGradientColorProperty
solid :: ConditionalFormattingColorProperty
-> Maybe ConditionalFormattingSolidColorProperty
haddock_workaround_ :: ()
gradient :: Maybe ConditionalFormattingGradientColorProperty
solid :: Maybe ConditionalFormattingSolidColorProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Dashboard.ConditionalFormattingColor",
         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 -> ConditionalFormattingGradientColorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Gradient" (ConditionalFormattingGradientColorProperty -> (Key, Value))
-> Maybe ConditionalFormattingGradientColorProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConditionalFormattingGradientColorProperty
gradient,
                            Key -> ConditionalFormattingSolidColorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Solid" (ConditionalFormattingSolidColorProperty -> (Key, Value))
-> Maybe ConditionalFormattingSolidColorProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConditionalFormattingSolidColorProperty
solid])}
instance JSON.ToJSON ConditionalFormattingColorProperty where
  toJSON :: ConditionalFormattingColorProperty -> Value
toJSON ConditionalFormattingColorProperty {Maybe ConditionalFormattingSolidColorProperty
Maybe ConditionalFormattingGradientColorProperty
()
haddock_workaround_ :: ConditionalFormattingColorProperty -> ()
gradient :: ConditionalFormattingColorProperty
-> Maybe ConditionalFormattingGradientColorProperty
solid :: ConditionalFormattingColorProperty
-> Maybe ConditionalFormattingSolidColorProperty
haddock_workaround_ :: ()
gradient :: Maybe ConditionalFormattingGradientColorProperty
solid :: Maybe ConditionalFormattingSolidColorProperty
..}
    = [(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 -> ConditionalFormattingGradientColorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Gradient" (ConditionalFormattingGradientColorProperty -> (Key, Value))
-> Maybe ConditionalFormattingGradientColorProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConditionalFormattingGradientColorProperty
gradient,
               Key -> ConditionalFormattingSolidColorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Solid" (ConditionalFormattingSolidColorProperty -> (Key, Value))
-> Maybe ConditionalFormattingSolidColorProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConditionalFormattingSolidColorProperty
solid]))
instance Property "Gradient" ConditionalFormattingColorProperty where
  type PropertyType "Gradient" ConditionalFormattingColorProperty = ConditionalFormattingGradientColorProperty
  set :: PropertyType "Gradient" ConditionalFormattingColorProperty
-> ConditionalFormattingColorProperty
-> ConditionalFormattingColorProperty
set PropertyType "Gradient" ConditionalFormattingColorProperty
newValue ConditionalFormattingColorProperty {Maybe ConditionalFormattingSolidColorProperty
Maybe ConditionalFormattingGradientColorProperty
()
haddock_workaround_ :: ConditionalFormattingColorProperty -> ()
gradient :: ConditionalFormattingColorProperty
-> Maybe ConditionalFormattingGradientColorProperty
solid :: ConditionalFormattingColorProperty
-> Maybe ConditionalFormattingSolidColorProperty
haddock_workaround_ :: ()
gradient :: Maybe ConditionalFormattingGradientColorProperty
solid :: Maybe ConditionalFormattingSolidColorProperty
..}
    = ConditionalFormattingColorProperty
        {gradient :: Maybe ConditionalFormattingGradientColorProperty
gradient = ConditionalFormattingGradientColorProperty
-> Maybe ConditionalFormattingGradientColorProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Gradient" ConditionalFormattingColorProperty
ConditionalFormattingGradientColorProperty
newValue, Maybe ConditionalFormattingSolidColorProperty
()
haddock_workaround_ :: ()
solid :: Maybe ConditionalFormattingSolidColorProperty
haddock_workaround_ :: ()
solid :: Maybe ConditionalFormattingSolidColorProperty
..}
instance Property "Solid" ConditionalFormattingColorProperty where
  type PropertyType "Solid" ConditionalFormattingColorProperty = ConditionalFormattingSolidColorProperty
  set :: PropertyType "Solid" ConditionalFormattingColorProperty
-> ConditionalFormattingColorProperty
-> ConditionalFormattingColorProperty
set PropertyType "Solid" ConditionalFormattingColorProperty
newValue ConditionalFormattingColorProperty {Maybe ConditionalFormattingSolidColorProperty
Maybe ConditionalFormattingGradientColorProperty
()
haddock_workaround_ :: ConditionalFormattingColorProperty -> ()
gradient :: ConditionalFormattingColorProperty
-> Maybe ConditionalFormattingGradientColorProperty
solid :: ConditionalFormattingColorProperty
-> Maybe ConditionalFormattingSolidColorProperty
haddock_workaround_ :: ()
gradient :: Maybe ConditionalFormattingGradientColorProperty
solid :: Maybe ConditionalFormattingSolidColorProperty
..}
    = ConditionalFormattingColorProperty
        {solid :: Maybe ConditionalFormattingSolidColorProperty
solid = ConditionalFormattingSolidColorProperty
-> Maybe ConditionalFormattingSolidColorProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Solid" ConditionalFormattingColorProperty
ConditionalFormattingSolidColorProperty
newValue, Maybe ConditionalFormattingGradientColorProperty
()
haddock_workaround_ :: ()
gradient :: Maybe ConditionalFormattingGradientColorProperty
haddock_workaround_ :: ()
gradient :: Maybe ConditionalFormattingGradientColorProperty
..}