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