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