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