{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.QuickSight.Types.UIColorPalette
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.QuickSight.Types.UIColorPalette where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | The theme colors that apply to UI and to charts, excluding data colors.
-- The colors description is a hexadecimal color code that consists of six
-- alphanumerical characters, prefixed with @#@, for example #37BFF5. For
-- more information, see
-- <https://docs.aws.amazon.com/quicksight/latest/user/themes-in-quicksight.html Using Themes in Amazon QuickSight>
-- in the /Amazon QuickSight User Guide./
--
-- /See:/ 'newUIColorPalette' smart constructor.
data UIColorPalette = UIColorPalette'
  { -- | This color is that applies to selected states and buttons.
    UIColorPalette -> Maybe Text
accent :: Prelude.Maybe Prelude.Text,
    -- | The foreground color that applies to any text or other elements that
    -- appear over the accent color.
    UIColorPalette -> Maybe Text
accentForeground :: Prelude.Maybe Prelude.Text,
    -- | The color that applies to error messages.
    UIColorPalette -> Maybe Text
danger :: Prelude.Maybe Prelude.Text,
    -- | The foreground color that applies to any text or other elements that
    -- appear over the error color.
    UIColorPalette -> Maybe Text
dangerForeground :: Prelude.Maybe Prelude.Text,
    -- | The color that applies to the names of fields that are identified as
    -- dimensions.
    UIColorPalette -> Maybe Text
dimension :: Prelude.Maybe Prelude.Text,
    -- | The foreground color that applies to any text or other elements that
    -- appear over the dimension color.
    UIColorPalette -> Maybe Text
dimensionForeground :: Prelude.Maybe Prelude.Text,
    -- | The color that applies to the names of fields that are identified as
    -- measures.
    UIColorPalette -> Maybe Text
measure :: Prelude.Maybe Prelude.Text,
    -- | The foreground color that applies to any text or other elements that
    -- appear over the measure color.
    UIColorPalette -> Maybe Text
measureForeground :: Prelude.Maybe Prelude.Text,
    -- | The background color that applies to visuals and other high emphasis UI.
    UIColorPalette -> Maybe Text
primaryBackground :: Prelude.Maybe Prelude.Text,
    -- | The color of text and other foreground elements that appear over the
    -- primary background regions, such as grid lines, borders, table banding,
    -- icons, and so on.
    UIColorPalette -> Maybe Text
primaryForeground :: Prelude.Maybe Prelude.Text,
    -- | The background color that applies to the sheet background and sheet
    -- controls.
    UIColorPalette -> Maybe Text
secondaryBackground :: Prelude.Maybe Prelude.Text,
    -- | The foreground color that applies to any sheet title, sheet control
    -- text, or UI that appears over the secondary background.
    UIColorPalette -> Maybe Text
secondaryForeground :: Prelude.Maybe Prelude.Text,
    -- | The color that applies to success messages, for example the check mark
    -- for a successful download.
    UIColorPalette -> Maybe Text
success :: Prelude.Maybe Prelude.Text,
    -- | The foreground color that applies to any text or other elements that
    -- appear over the success color.
    UIColorPalette -> Maybe Text
successForeground :: Prelude.Maybe Prelude.Text,
    -- | This color that applies to warning and informational messages.
    UIColorPalette -> Maybe Text
warning :: Prelude.Maybe Prelude.Text,
    -- | The foreground color that applies to any text or other elements that
    -- appear over the warning color.
    UIColorPalette -> Maybe Text
warningForeground :: Prelude.Maybe Prelude.Text
  }
  deriving (UIColorPalette -> UIColorPalette -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UIColorPalette -> UIColorPalette -> Bool
$c/= :: UIColorPalette -> UIColorPalette -> Bool
== :: UIColorPalette -> UIColorPalette -> Bool
$c== :: UIColorPalette -> UIColorPalette -> Bool
Prelude.Eq, ReadPrec [UIColorPalette]
ReadPrec UIColorPalette
Int -> ReadS UIColorPalette
ReadS [UIColorPalette]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UIColorPalette]
$creadListPrec :: ReadPrec [UIColorPalette]
readPrec :: ReadPrec UIColorPalette
$creadPrec :: ReadPrec UIColorPalette
readList :: ReadS [UIColorPalette]
$creadList :: ReadS [UIColorPalette]
readsPrec :: Int -> ReadS UIColorPalette
$creadsPrec :: Int -> ReadS UIColorPalette
Prelude.Read, Int -> UIColorPalette -> ShowS
[UIColorPalette] -> ShowS
UIColorPalette -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UIColorPalette] -> ShowS
$cshowList :: [UIColorPalette] -> ShowS
show :: UIColorPalette -> String
$cshow :: UIColorPalette -> String
showsPrec :: Int -> UIColorPalette -> ShowS
$cshowsPrec :: Int -> UIColorPalette -> ShowS
Prelude.Show, forall x. Rep UIColorPalette x -> UIColorPalette
forall x. UIColorPalette -> Rep UIColorPalette x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UIColorPalette x -> UIColorPalette
$cfrom :: forall x. UIColorPalette -> Rep UIColorPalette x
Prelude.Generic)

-- |
-- Create a value of 'UIColorPalette' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'accent', 'uIColorPalette_accent' - This color is that applies to selected states and buttons.
--
-- 'accentForeground', 'uIColorPalette_accentForeground' - The foreground color that applies to any text or other elements that
-- appear over the accent color.
--
-- 'danger', 'uIColorPalette_danger' - The color that applies to error messages.
--
-- 'dangerForeground', 'uIColorPalette_dangerForeground' - The foreground color that applies to any text or other elements that
-- appear over the error color.
--
-- 'dimension', 'uIColorPalette_dimension' - The color that applies to the names of fields that are identified as
-- dimensions.
--
-- 'dimensionForeground', 'uIColorPalette_dimensionForeground' - The foreground color that applies to any text or other elements that
-- appear over the dimension color.
--
-- 'measure', 'uIColorPalette_measure' - The color that applies to the names of fields that are identified as
-- measures.
--
-- 'measureForeground', 'uIColorPalette_measureForeground' - The foreground color that applies to any text or other elements that
-- appear over the measure color.
--
-- 'primaryBackground', 'uIColorPalette_primaryBackground' - The background color that applies to visuals and other high emphasis UI.
--
-- 'primaryForeground', 'uIColorPalette_primaryForeground' - The color of text and other foreground elements that appear over the
-- primary background regions, such as grid lines, borders, table banding,
-- icons, and so on.
--
-- 'secondaryBackground', 'uIColorPalette_secondaryBackground' - The background color that applies to the sheet background and sheet
-- controls.
--
-- 'secondaryForeground', 'uIColorPalette_secondaryForeground' - The foreground color that applies to any sheet title, sheet control
-- text, or UI that appears over the secondary background.
--
-- 'success', 'uIColorPalette_success' - The color that applies to success messages, for example the check mark
-- for a successful download.
--
-- 'successForeground', 'uIColorPalette_successForeground' - The foreground color that applies to any text or other elements that
-- appear over the success color.
--
-- 'warning', 'uIColorPalette_warning' - This color that applies to warning and informational messages.
--
-- 'warningForeground', 'uIColorPalette_warningForeground' - The foreground color that applies to any text or other elements that
-- appear over the warning color.
newUIColorPalette ::
  UIColorPalette
newUIColorPalette :: UIColorPalette
newUIColorPalette =
  UIColorPalette'
    { $sel:accent:UIColorPalette' :: Maybe Text
accent = forall a. Maybe a
Prelude.Nothing,
      $sel:accentForeground:UIColorPalette' :: Maybe Text
accentForeground = forall a. Maybe a
Prelude.Nothing,
      $sel:danger:UIColorPalette' :: Maybe Text
danger = forall a. Maybe a
Prelude.Nothing,
      $sel:dangerForeground:UIColorPalette' :: Maybe Text
dangerForeground = forall a. Maybe a
Prelude.Nothing,
      $sel:dimension:UIColorPalette' :: Maybe Text
dimension = forall a. Maybe a
Prelude.Nothing,
      $sel:dimensionForeground:UIColorPalette' :: Maybe Text
dimensionForeground = forall a. Maybe a
Prelude.Nothing,
      $sel:measure:UIColorPalette' :: Maybe Text
measure = forall a. Maybe a
Prelude.Nothing,
      $sel:measureForeground:UIColorPalette' :: Maybe Text
measureForeground = forall a. Maybe a
Prelude.Nothing,
      $sel:primaryBackground:UIColorPalette' :: Maybe Text
primaryBackground = forall a. Maybe a
Prelude.Nothing,
      $sel:primaryForeground:UIColorPalette' :: Maybe Text
primaryForeground = forall a. Maybe a
Prelude.Nothing,
      $sel:secondaryBackground:UIColorPalette' :: Maybe Text
secondaryBackground = forall a. Maybe a
Prelude.Nothing,
      $sel:secondaryForeground:UIColorPalette' :: Maybe Text
secondaryForeground = forall a. Maybe a
Prelude.Nothing,
      $sel:success:UIColorPalette' :: Maybe Text
success = forall a. Maybe a
Prelude.Nothing,
      $sel:successForeground:UIColorPalette' :: Maybe Text
successForeground = forall a. Maybe a
Prelude.Nothing,
      $sel:warning:UIColorPalette' :: Maybe Text
warning = forall a. Maybe a
Prelude.Nothing,
      $sel:warningForeground:UIColorPalette' :: Maybe Text
warningForeground = forall a. Maybe a
Prelude.Nothing
    }

-- | This color is that applies to selected states and buttons.
uIColorPalette_accent :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_accent :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_accent = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
accent :: Maybe Text
$sel:accent:UIColorPalette' :: UIColorPalette -> Maybe Text
accent} -> Maybe Text
accent) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:accent:UIColorPalette' :: Maybe Text
accent = Maybe Text
a} :: UIColorPalette)

-- | The foreground color that applies to any text or other elements that
-- appear over the accent color.
uIColorPalette_accentForeground :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_accentForeground :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_accentForeground = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
accentForeground :: Maybe Text
$sel:accentForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
accentForeground} -> Maybe Text
accentForeground) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:accentForeground:UIColorPalette' :: Maybe Text
accentForeground = Maybe Text
a} :: UIColorPalette)

-- | The color that applies to error messages.
uIColorPalette_danger :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_danger :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_danger = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
danger :: Maybe Text
$sel:danger:UIColorPalette' :: UIColorPalette -> Maybe Text
danger} -> Maybe Text
danger) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:danger:UIColorPalette' :: Maybe Text
danger = Maybe Text
a} :: UIColorPalette)

-- | The foreground color that applies to any text or other elements that
-- appear over the error color.
uIColorPalette_dangerForeground :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_dangerForeground :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_dangerForeground = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
dangerForeground :: Maybe Text
$sel:dangerForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
dangerForeground} -> Maybe Text
dangerForeground) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:dangerForeground:UIColorPalette' :: Maybe Text
dangerForeground = Maybe Text
a} :: UIColorPalette)

-- | The color that applies to the names of fields that are identified as
-- dimensions.
uIColorPalette_dimension :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_dimension :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_dimension = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
dimension :: Maybe Text
$sel:dimension:UIColorPalette' :: UIColorPalette -> Maybe Text
dimension} -> Maybe Text
dimension) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:dimension:UIColorPalette' :: Maybe Text
dimension = Maybe Text
a} :: UIColorPalette)

-- | The foreground color that applies to any text or other elements that
-- appear over the dimension color.
uIColorPalette_dimensionForeground :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_dimensionForeground :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_dimensionForeground = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
dimensionForeground :: Maybe Text
$sel:dimensionForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
dimensionForeground} -> Maybe Text
dimensionForeground) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:dimensionForeground:UIColorPalette' :: Maybe Text
dimensionForeground = Maybe Text
a} :: UIColorPalette)

-- | The color that applies to the names of fields that are identified as
-- measures.
uIColorPalette_measure :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_measure :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_measure = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
measure :: Maybe Text
$sel:measure:UIColorPalette' :: UIColorPalette -> Maybe Text
measure} -> Maybe Text
measure) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:measure:UIColorPalette' :: Maybe Text
measure = Maybe Text
a} :: UIColorPalette)

-- | The foreground color that applies to any text or other elements that
-- appear over the measure color.
uIColorPalette_measureForeground :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_measureForeground :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_measureForeground = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
measureForeground :: Maybe Text
$sel:measureForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
measureForeground} -> Maybe Text
measureForeground) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:measureForeground:UIColorPalette' :: Maybe Text
measureForeground = Maybe Text
a} :: UIColorPalette)

-- | The background color that applies to visuals and other high emphasis UI.
uIColorPalette_primaryBackground :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_primaryBackground :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_primaryBackground = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
primaryBackground :: Maybe Text
$sel:primaryBackground:UIColorPalette' :: UIColorPalette -> Maybe Text
primaryBackground} -> Maybe Text
primaryBackground) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:primaryBackground:UIColorPalette' :: Maybe Text
primaryBackground = Maybe Text
a} :: UIColorPalette)

-- | The color of text and other foreground elements that appear over the
-- primary background regions, such as grid lines, borders, table banding,
-- icons, and so on.
uIColorPalette_primaryForeground :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_primaryForeground :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_primaryForeground = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
primaryForeground :: Maybe Text
$sel:primaryForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
primaryForeground} -> Maybe Text
primaryForeground) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:primaryForeground:UIColorPalette' :: Maybe Text
primaryForeground = Maybe Text
a} :: UIColorPalette)

-- | The background color that applies to the sheet background and sheet
-- controls.
uIColorPalette_secondaryBackground :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_secondaryBackground :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_secondaryBackground = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
secondaryBackground :: Maybe Text
$sel:secondaryBackground:UIColorPalette' :: UIColorPalette -> Maybe Text
secondaryBackground} -> Maybe Text
secondaryBackground) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:secondaryBackground:UIColorPalette' :: Maybe Text
secondaryBackground = Maybe Text
a} :: UIColorPalette)

-- | The foreground color that applies to any sheet title, sheet control
-- text, or UI that appears over the secondary background.
uIColorPalette_secondaryForeground :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_secondaryForeground :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_secondaryForeground = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
secondaryForeground :: Maybe Text
$sel:secondaryForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
secondaryForeground} -> Maybe Text
secondaryForeground) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:secondaryForeground:UIColorPalette' :: Maybe Text
secondaryForeground = Maybe Text
a} :: UIColorPalette)

-- | The color that applies to success messages, for example the check mark
-- for a successful download.
uIColorPalette_success :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_success :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_success = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
success :: Maybe Text
$sel:success:UIColorPalette' :: UIColorPalette -> Maybe Text
success} -> Maybe Text
success) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:success:UIColorPalette' :: Maybe Text
success = Maybe Text
a} :: UIColorPalette)

-- | The foreground color that applies to any text or other elements that
-- appear over the success color.
uIColorPalette_successForeground :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_successForeground :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_successForeground = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
successForeground :: Maybe Text
$sel:successForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
successForeground} -> Maybe Text
successForeground) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:successForeground:UIColorPalette' :: Maybe Text
successForeground = Maybe Text
a} :: UIColorPalette)

-- | This color that applies to warning and informational messages.
uIColorPalette_warning :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_warning :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_warning = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
warning :: Maybe Text
$sel:warning:UIColorPalette' :: UIColorPalette -> Maybe Text
warning} -> Maybe Text
warning) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:warning:UIColorPalette' :: Maybe Text
warning = Maybe Text
a} :: UIColorPalette)

-- | The foreground color that applies to any text or other elements that
-- appear over the warning color.
uIColorPalette_warningForeground :: Lens.Lens' UIColorPalette (Prelude.Maybe Prelude.Text)
uIColorPalette_warningForeground :: Lens' UIColorPalette (Maybe Text)
uIColorPalette_warningForeground = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UIColorPalette' {Maybe Text
warningForeground :: Maybe Text
$sel:warningForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
warningForeground} -> Maybe Text
warningForeground) (\s :: UIColorPalette
s@UIColorPalette' {} Maybe Text
a -> UIColorPalette
s {$sel:warningForeground:UIColorPalette' :: Maybe Text
warningForeground = Maybe Text
a} :: UIColorPalette)

instance Data.FromJSON UIColorPalette where
  parseJSON :: Value -> Parser UIColorPalette
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"UIColorPalette"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> UIColorPalette
UIColorPalette'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Accent")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"AccentForeground")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Danger")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DangerForeground")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Dimension")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DimensionForeground")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Measure")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MeasureForeground")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PrimaryBackground")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PrimaryForeground")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SecondaryBackground")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SecondaryForeground")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Success")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SuccessForeground")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Warning")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"WarningForeground")
      )

instance Prelude.Hashable UIColorPalette where
  hashWithSalt :: Int -> UIColorPalette -> Int
hashWithSalt Int
_salt UIColorPalette' {Maybe Text
warningForeground :: Maybe Text
warning :: Maybe Text
successForeground :: Maybe Text
success :: Maybe Text
secondaryForeground :: Maybe Text
secondaryBackground :: Maybe Text
primaryForeground :: Maybe Text
primaryBackground :: Maybe Text
measureForeground :: Maybe Text
measure :: Maybe Text
dimensionForeground :: Maybe Text
dimension :: Maybe Text
dangerForeground :: Maybe Text
danger :: Maybe Text
accentForeground :: Maybe Text
accent :: Maybe Text
$sel:warningForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:warning:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:successForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:success:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:secondaryForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:secondaryBackground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:primaryForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:primaryBackground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:measureForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:measure:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:dimensionForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:dimension:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:dangerForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:danger:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:accentForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:accent:UIColorPalette' :: UIColorPalette -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
accent
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
accentForeground
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
danger
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dangerForeground
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dimension
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dimensionForeground
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
measure
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
measureForeground
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
primaryBackground
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
primaryForeground
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
secondaryBackground
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
secondaryForeground
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
success
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
successForeground
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
warning
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
warningForeground

instance Prelude.NFData UIColorPalette where
  rnf :: UIColorPalette -> ()
rnf UIColorPalette' {Maybe Text
warningForeground :: Maybe Text
warning :: Maybe Text
successForeground :: Maybe Text
success :: Maybe Text
secondaryForeground :: Maybe Text
secondaryBackground :: Maybe Text
primaryForeground :: Maybe Text
primaryBackground :: Maybe Text
measureForeground :: Maybe Text
measure :: Maybe Text
dimensionForeground :: Maybe Text
dimension :: Maybe Text
dangerForeground :: Maybe Text
danger :: Maybe Text
accentForeground :: Maybe Text
accent :: Maybe Text
$sel:warningForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:warning:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:successForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:success:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:secondaryForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:secondaryBackground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:primaryForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:primaryBackground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:measureForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:measure:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:dimensionForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:dimension:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:dangerForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:danger:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:accentForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:accent:UIColorPalette' :: UIColorPalette -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
accent
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
accentForeground
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
danger
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dangerForeground
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dimension
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dimensionForeground
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
measure
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
measureForeground
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
primaryBackground
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
primaryForeground
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
secondaryBackground
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
secondaryForeground
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
success
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
successForeground
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
warning
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
warningForeground

instance Data.ToJSON UIColorPalette where
  toJSON :: UIColorPalette -> Value
toJSON UIColorPalette' {Maybe Text
warningForeground :: Maybe Text
warning :: Maybe Text
successForeground :: Maybe Text
success :: Maybe Text
secondaryForeground :: Maybe Text
secondaryBackground :: Maybe Text
primaryForeground :: Maybe Text
primaryBackground :: Maybe Text
measureForeground :: Maybe Text
measure :: Maybe Text
dimensionForeground :: Maybe Text
dimension :: Maybe Text
dangerForeground :: Maybe Text
danger :: Maybe Text
accentForeground :: Maybe Text
accent :: Maybe Text
$sel:warningForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:warning:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:successForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:success:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:secondaryForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:secondaryBackground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:primaryForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:primaryBackground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:measureForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:measure:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:dimensionForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:dimension:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:dangerForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:danger:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:accentForeground:UIColorPalette' :: UIColorPalette -> Maybe Text
$sel:accent:UIColorPalette' :: UIColorPalette -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Accent" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
accent,
            (Key
"AccentForeground" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
accentForeground,
            (Key
"Danger" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
danger,
            (Key
"DangerForeground" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
dangerForeground,
            (Key
"Dimension" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
dimension,
            (Key
"DimensionForeground" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
dimensionForeground,
            (Key
"Measure" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
measure,
            (Key
"MeasureForeground" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
measureForeground,
            (Key
"PrimaryBackground" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
primaryBackground,
            (Key
"PrimaryForeground" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
primaryForeground,
            (Key
"SecondaryBackground" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
secondaryBackground,
            (Key
"SecondaryForeground" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
secondaryForeground,
            (Key
"Success" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
success,
            (Key
"SuccessForeground" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
successForeground,
            (Key
"Warning" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
warning,
            (Key
"WarningForeground" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
warningForeground
          ]
      )