module Stratosphere.QuickSight.Template.ConditionalFormattingSolidColorProperty (
        ConditionalFormattingSolidColorProperty(..),
        mkConditionalFormattingSolidColorProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConditionalFormattingSolidColorProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-conditionalformattingsolidcolor.html>
    ConditionalFormattingSolidColorProperty {ConditionalFormattingSolidColorProperty -> ()
haddock_workaround_ :: (),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-conditionalformattingsolidcolor.html#cfn-quicksight-template-conditionalformattingsolidcolor-color>
                                             ConditionalFormattingSolidColorProperty -> Maybe (Value Text)
color :: (Prelude.Maybe (Value Prelude.Text)),
                                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-template-conditionalformattingsolidcolor.html#cfn-quicksight-template-conditionalformattingsolidcolor-expression>
                                             ConditionalFormattingSolidColorProperty -> Value Text
expression :: (Value Prelude.Text)}
  deriving stock (ConditionalFormattingSolidColorProperty
-> ConditionalFormattingSolidColorProperty -> Bool
(ConditionalFormattingSolidColorProperty
 -> ConditionalFormattingSolidColorProperty -> Bool)
-> (ConditionalFormattingSolidColorProperty
    -> ConditionalFormattingSolidColorProperty -> Bool)
-> Eq ConditionalFormattingSolidColorProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConditionalFormattingSolidColorProperty
-> ConditionalFormattingSolidColorProperty -> Bool
== :: ConditionalFormattingSolidColorProperty
-> ConditionalFormattingSolidColorProperty -> Bool
$c/= :: ConditionalFormattingSolidColorProperty
-> ConditionalFormattingSolidColorProperty -> Bool
/= :: ConditionalFormattingSolidColorProperty
-> ConditionalFormattingSolidColorProperty -> Bool
Prelude.Eq, Int -> ConditionalFormattingSolidColorProperty -> ShowS
[ConditionalFormattingSolidColorProperty] -> ShowS
ConditionalFormattingSolidColorProperty -> String
(Int -> ConditionalFormattingSolidColorProperty -> ShowS)
-> (ConditionalFormattingSolidColorProperty -> String)
-> ([ConditionalFormattingSolidColorProperty] -> ShowS)
-> Show ConditionalFormattingSolidColorProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConditionalFormattingSolidColorProperty -> ShowS
showsPrec :: Int -> ConditionalFormattingSolidColorProperty -> ShowS
$cshow :: ConditionalFormattingSolidColorProperty -> String
show :: ConditionalFormattingSolidColorProperty -> String
$cshowList :: [ConditionalFormattingSolidColorProperty] -> ShowS
showList :: [ConditionalFormattingSolidColorProperty] -> ShowS
Prelude.Show)
mkConditionalFormattingSolidColorProperty ::
  Value Prelude.Text -> ConditionalFormattingSolidColorProperty
mkConditionalFormattingSolidColorProperty :: Value Text -> ConditionalFormattingSolidColorProperty
mkConditionalFormattingSolidColorProperty Value Text
expression
  = ConditionalFormattingSolidColorProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), expression :: Value Text
expression = Value Text
expression,
       color :: Maybe (Value Text)
color = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConditionalFormattingSolidColorProperty where
  toResourceProperties :: ConditionalFormattingSolidColorProperty -> ResourceProperties
toResourceProperties ConditionalFormattingSolidColorProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConditionalFormattingSolidColorProperty -> ()
color :: ConditionalFormattingSolidColorProperty -> Maybe (Value Text)
expression :: ConditionalFormattingSolidColorProperty -> Value Text
haddock_workaround_ :: ()
color :: Maybe (Value Text)
expression :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Template.ConditionalFormattingSolidColor",
         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
"Expression" 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
expression]
                           ([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
"Color" (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)
color]))}
instance JSON.ToJSON ConditionalFormattingSolidColorProperty where
  toJSON :: ConditionalFormattingSolidColorProperty -> Value
toJSON ConditionalFormattingSolidColorProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConditionalFormattingSolidColorProperty -> ()
color :: ConditionalFormattingSolidColorProperty -> Maybe (Value Text)
expression :: ConditionalFormattingSolidColorProperty -> Value Text
haddock_workaround_ :: ()
color :: Maybe (Value Text)
expression :: 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
"Expression" 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
expression]
              ([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
"Color" (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)
color])))
instance Property "Color" ConditionalFormattingSolidColorProperty where
  type PropertyType "Color" ConditionalFormattingSolidColorProperty = Value Prelude.Text
  set :: PropertyType "Color" ConditionalFormattingSolidColorProperty
-> ConditionalFormattingSolidColorProperty
-> ConditionalFormattingSolidColorProperty
set PropertyType "Color" ConditionalFormattingSolidColorProperty
newValue ConditionalFormattingSolidColorProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConditionalFormattingSolidColorProperty -> ()
color :: ConditionalFormattingSolidColorProperty -> Maybe (Value Text)
expression :: ConditionalFormattingSolidColorProperty -> Value Text
haddock_workaround_ :: ()
color :: Maybe (Value Text)
expression :: Value Text
..}
    = ConditionalFormattingSolidColorProperty
        {color :: Maybe (Value Text)
color = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Color" ConditionalFormattingSolidColorProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
expression :: Value Text
haddock_workaround_ :: ()
expression :: Value Text
..}
instance Property "Expression" ConditionalFormattingSolidColorProperty where
  type PropertyType "Expression" ConditionalFormattingSolidColorProperty = Value Prelude.Text
  set :: PropertyType "Expression" ConditionalFormattingSolidColorProperty
-> ConditionalFormattingSolidColorProperty
-> ConditionalFormattingSolidColorProperty
set PropertyType "Expression" ConditionalFormattingSolidColorProperty
newValue ConditionalFormattingSolidColorProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConditionalFormattingSolidColorProperty -> ()
color :: ConditionalFormattingSolidColorProperty -> Maybe (Value Text)
expression :: ConditionalFormattingSolidColorProperty -> Value Text
haddock_workaround_ :: ()
color :: Maybe (Value Text)
expression :: Value Text
..}
    = ConditionalFormattingSolidColorProperty
        {expression :: Value Text
expression = PropertyType "Expression" ConditionalFormattingSolidColorProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
color :: Maybe (Value Text)
haddock_workaround_ :: ()
color :: Maybe (Value Text)
..}