{-# 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.PercentageDisplayFormatConfiguration
-- 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.PercentageDisplayFormatConfiguration 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
import Amazonka.QuickSight.Types.DecimalPlacesConfiguration
import Amazonka.QuickSight.Types.NegativeValueConfiguration
import Amazonka.QuickSight.Types.NullValueFormatConfiguration
import Amazonka.QuickSight.Types.NumericSeparatorConfiguration

-- | The options that determine the percentage display format configuration.
--
-- /See:/ 'newPercentageDisplayFormatConfiguration' smart constructor.
data PercentageDisplayFormatConfiguration = PercentageDisplayFormatConfiguration'
  { -- | The option that determines the decimal places configuration.
    PercentageDisplayFormatConfiguration
-> Maybe DecimalPlacesConfiguration
decimalPlacesConfiguration :: Prelude.Maybe DecimalPlacesConfiguration,
    -- | The options that determine the negative value configuration.
    PercentageDisplayFormatConfiguration
-> Maybe NegativeValueConfiguration
negativeValueConfiguration :: Prelude.Maybe NegativeValueConfiguration,
    -- | The options that determine the null value format configuration.
    PercentageDisplayFormatConfiguration
-> Maybe NullValueFormatConfiguration
nullValueFormatConfiguration :: Prelude.Maybe NullValueFormatConfiguration,
    -- | Determines the prefix value of the percentage format.
    PercentageDisplayFormatConfiguration -> Maybe (Sensitive Text)
prefix :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The options that determine the numeric separator configuration.
    PercentageDisplayFormatConfiguration
-> Maybe NumericSeparatorConfiguration
separatorConfiguration :: Prelude.Maybe NumericSeparatorConfiguration,
    -- | Determines the suffix value of the percentage format.
    PercentageDisplayFormatConfiguration -> Maybe (Sensitive Text)
suffix :: Prelude.Maybe (Data.Sensitive Prelude.Text)
  }
  deriving (PercentageDisplayFormatConfiguration
-> PercentageDisplayFormatConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PercentageDisplayFormatConfiguration
-> PercentageDisplayFormatConfiguration -> Bool
$c/= :: PercentageDisplayFormatConfiguration
-> PercentageDisplayFormatConfiguration -> Bool
== :: PercentageDisplayFormatConfiguration
-> PercentageDisplayFormatConfiguration -> Bool
$c== :: PercentageDisplayFormatConfiguration
-> PercentageDisplayFormatConfiguration -> Bool
Prelude.Eq, Int -> PercentageDisplayFormatConfiguration -> ShowS
[PercentageDisplayFormatConfiguration] -> ShowS
PercentageDisplayFormatConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PercentageDisplayFormatConfiguration] -> ShowS
$cshowList :: [PercentageDisplayFormatConfiguration] -> ShowS
show :: PercentageDisplayFormatConfiguration -> String
$cshow :: PercentageDisplayFormatConfiguration -> String
showsPrec :: Int -> PercentageDisplayFormatConfiguration -> ShowS
$cshowsPrec :: Int -> PercentageDisplayFormatConfiguration -> ShowS
Prelude.Show, forall x.
Rep PercentageDisplayFormatConfiguration x
-> PercentageDisplayFormatConfiguration
forall x.
PercentageDisplayFormatConfiguration
-> Rep PercentageDisplayFormatConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PercentageDisplayFormatConfiguration x
-> PercentageDisplayFormatConfiguration
$cfrom :: forall x.
PercentageDisplayFormatConfiguration
-> Rep PercentageDisplayFormatConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'PercentageDisplayFormatConfiguration' 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:
--
-- 'decimalPlacesConfiguration', 'percentageDisplayFormatConfiguration_decimalPlacesConfiguration' - The option that determines the decimal places configuration.
--
-- 'negativeValueConfiguration', 'percentageDisplayFormatConfiguration_negativeValueConfiguration' - The options that determine the negative value configuration.
--
-- 'nullValueFormatConfiguration', 'percentageDisplayFormatConfiguration_nullValueFormatConfiguration' - The options that determine the null value format configuration.
--
-- 'prefix', 'percentageDisplayFormatConfiguration_prefix' - Determines the prefix value of the percentage format.
--
-- 'separatorConfiguration', 'percentageDisplayFormatConfiguration_separatorConfiguration' - The options that determine the numeric separator configuration.
--
-- 'suffix', 'percentageDisplayFormatConfiguration_suffix' - Determines the suffix value of the percentage format.
newPercentageDisplayFormatConfiguration ::
  PercentageDisplayFormatConfiguration
newPercentageDisplayFormatConfiguration :: PercentageDisplayFormatConfiguration
newPercentageDisplayFormatConfiguration =
  PercentageDisplayFormatConfiguration'
    { $sel:decimalPlacesConfiguration:PercentageDisplayFormatConfiguration' :: Maybe DecimalPlacesConfiguration
decimalPlacesConfiguration =
        forall a. Maybe a
Prelude.Nothing,
      $sel:negativeValueConfiguration:PercentageDisplayFormatConfiguration' :: Maybe NegativeValueConfiguration
negativeValueConfiguration =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nullValueFormatConfiguration:PercentageDisplayFormatConfiguration' :: Maybe NullValueFormatConfiguration
nullValueFormatConfiguration =
        forall a. Maybe a
Prelude.Nothing,
      $sel:prefix:PercentageDisplayFormatConfiguration' :: Maybe (Sensitive Text)
prefix = forall a. Maybe a
Prelude.Nothing,
      $sel:separatorConfiguration:PercentageDisplayFormatConfiguration' :: Maybe NumericSeparatorConfiguration
separatorConfiguration =
        forall a. Maybe a
Prelude.Nothing,
      $sel:suffix:PercentageDisplayFormatConfiguration' :: Maybe (Sensitive Text)
suffix = forall a. Maybe a
Prelude.Nothing
    }

-- | The option that determines the decimal places configuration.
percentageDisplayFormatConfiguration_decimalPlacesConfiguration :: Lens.Lens' PercentageDisplayFormatConfiguration (Prelude.Maybe DecimalPlacesConfiguration)
percentageDisplayFormatConfiguration_decimalPlacesConfiguration :: Lens'
  PercentageDisplayFormatConfiguration
  (Maybe DecimalPlacesConfiguration)
percentageDisplayFormatConfiguration_decimalPlacesConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PercentageDisplayFormatConfiguration' {Maybe DecimalPlacesConfiguration
decimalPlacesConfiguration :: Maybe DecimalPlacesConfiguration
$sel:decimalPlacesConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe DecimalPlacesConfiguration
decimalPlacesConfiguration} -> Maybe DecimalPlacesConfiguration
decimalPlacesConfiguration) (\s :: PercentageDisplayFormatConfiguration
s@PercentageDisplayFormatConfiguration' {} Maybe DecimalPlacesConfiguration
a -> PercentageDisplayFormatConfiguration
s {$sel:decimalPlacesConfiguration:PercentageDisplayFormatConfiguration' :: Maybe DecimalPlacesConfiguration
decimalPlacesConfiguration = Maybe DecimalPlacesConfiguration
a} :: PercentageDisplayFormatConfiguration)

-- | The options that determine the negative value configuration.
percentageDisplayFormatConfiguration_negativeValueConfiguration :: Lens.Lens' PercentageDisplayFormatConfiguration (Prelude.Maybe NegativeValueConfiguration)
percentageDisplayFormatConfiguration_negativeValueConfiguration :: Lens'
  PercentageDisplayFormatConfiguration
  (Maybe NegativeValueConfiguration)
percentageDisplayFormatConfiguration_negativeValueConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PercentageDisplayFormatConfiguration' {Maybe NegativeValueConfiguration
negativeValueConfiguration :: Maybe NegativeValueConfiguration
$sel:negativeValueConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe NegativeValueConfiguration
negativeValueConfiguration} -> Maybe NegativeValueConfiguration
negativeValueConfiguration) (\s :: PercentageDisplayFormatConfiguration
s@PercentageDisplayFormatConfiguration' {} Maybe NegativeValueConfiguration
a -> PercentageDisplayFormatConfiguration
s {$sel:negativeValueConfiguration:PercentageDisplayFormatConfiguration' :: Maybe NegativeValueConfiguration
negativeValueConfiguration = Maybe NegativeValueConfiguration
a} :: PercentageDisplayFormatConfiguration)

-- | The options that determine the null value format configuration.
percentageDisplayFormatConfiguration_nullValueFormatConfiguration :: Lens.Lens' PercentageDisplayFormatConfiguration (Prelude.Maybe NullValueFormatConfiguration)
percentageDisplayFormatConfiguration_nullValueFormatConfiguration :: Lens'
  PercentageDisplayFormatConfiguration
  (Maybe NullValueFormatConfiguration)
percentageDisplayFormatConfiguration_nullValueFormatConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PercentageDisplayFormatConfiguration' {Maybe NullValueFormatConfiguration
nullValueFormatConfiguration :: Maybe NullValueFormatConfiguration
$sel:nullValueFormatConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe NullValueFormatConfiguration
nullValueFormatConfiguration} -> Maybe NullValueFormatConfiguration
nullValueFormatConfiguration) (\s :: PercentageDisplayFormatConfiguration
s@PercentageDisplayFormatConfiguration' {} Maybe NullValueFormatConfiguration
a -> PercentageDisplayFormatConfiguration
s {$sel:nullValueFormatConfiguration:PercentageDisplayFormatConfiguration' :: Maybe NullValueFormatConfiguration
nullValueFormatConfiguration = Maybe NullValueFormatConfiguration
a} :: PercentageDisplayFormatConfiguration)

-- | Determines the prefix value of the percentage format.
percentageDisplayFormatConfiguration_prefix :: Lens.Lens' PercentageDisplayFormatConfiguration (Prelude.Maybe Prelude.Text)
percentageDisplayFormatConfiguration_prefix :: Lens' PercentageDisplayFormatConfiguration (Maybe Text)
percentageDisplayFormatConfiguration_prefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PercentageDisplayFormatConfiguration' {Maybe (Sensitive Text)
prefix :: Maybe (Sensitive Text)
$sel:prefix:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration -> Maybe (Sensitive Text)
prefix} -> Maybe (Sensitive Text)
prefix) (\s :: PercentageDisplayFormatConfiguration
s@PercentageDisplayFormatConfiguration' {} Maybe (Sensitive Text)
a -> PercentageDisplayFormatConfiguration
s {$sel:prefix:PercentageDisplayFormatConfiguration' :: Maybe (Sensitive Text)
prefix = Maybe (Sensitive Text)
a} :: PercentageDisplayFormatConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The options that determine the numeric separator configuration.
percentageDisplayFormatConfiguration_separatorConfiguration :: Lens.Lens' PercentageDisplayFormatConfiguration (Prelude.Maybe NumericSeparatorConfiguration)
percentageDisplayFormatConfiguration_separatorConfiguration :: Lens'
  PercentageDisplayFormatConfiguration
  (Maybe NumericSeparatorConfiguration)
percentageDisplayFormatConfiguration_separatorConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PercentageDisplayFormatConfiguration' {Maybe NumericSeparatorConfiguration
separatorConfiguration :: Maybe NumericSeparatorConfiguration
$sel:separatorConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe NumericSeparatorConfiguration
separatorConfiguration} -> Maybe NumericSeparatorConfiguration
separatorConfiguration) (\s :: PercentageDisplayFormatConfiguration
s@PercentageDisplayFormatConfiguration' {} Maybe NumericSeparatorConfiguration
a -> PercentageDisplayFormatConfiguration
s {$sel:separatorConfiguration:PercentageDisplayFormatConfiguration' :: Maybe NumericSeparatorConfiguration
separatorConfiguration = Maybe NumericSeparatorConfiguration
a} :: PercentageDisplayFormatConfiguration)

-- | Determines the suffix value of the percentage format.
percentageDisplayFormatConfiguration_suffix :: Lens.Lens' PercentageDisplayFormatConfiguration (Prelude.Maybe Prelude.Text)
percentageDisplayFormatConfiguration_suffix :: Lens' PercentageDisplayFormatConfiguration (Maybe Text)
percentageDisplayFormatConfiguration_suffix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PercentageDisplayFormatConfiguration' {Maybe (Sensitive Text)
suffix :: Maybe (Sensitive Text)
$sel:suffix:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration -> Maybe (Sensitive Text)
suffix} -> Maybe (Sensitive Text)
suffix) (\s :: PercentageDisplayFormatConfiguration
s@PercentageDisplayFormatConfiguration' {} Maybe (Sensitive Text)
a -> PercentageDisplayFormatConfiguration
s {$sel:suffix:PercentageDisplayFormatConfiguration' :: Maybe (Sensitive Text)
suffix = Maybe (Sensitive Text)
a} :: PercentageDisplayFormatConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

instance
  Data.FromJSON
    PercentageDisplayFormatConfiguration
  where
  parseJSON :: Value -> Parser PercentageDisplayFormatConfiguration
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"PercentageDisplayFormatConfiguration"
      ( \Object
x ->
          Maybe DecimalPlacesConfiguration
-> Maybe NegativeValueConfiguration
-> Maybe NullValueFormatConfiguration
-> Maybe (Sensitive Text)
-> Maybe NumericSeparatorConfiguration
-> Maybe (Sensitive Text)
-> PercentageDisplayFormatConfiguration
PercentageDisplayFormatConfiguration'
            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
"DecimalPlacesConfiguration")
            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
"NegativeValueConfiguration")
            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
"NullValueFormatConfiguration")
            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
"Prefix")
            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
"SeparatorConfiguration")
            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
"Suffix")
      )

instance
  Prelude.Hashable
    PercentageDisplayFormatConfiguration
  where
  hashWithSalt :: Int -> PercentageDisplayFormatConfiguration -> Int
hashWithSalt
    Int
_salt
    PercentageDisplayFormatConfiguration' {Maybe (Sensitive Text)
Maybe DecimalPlacesConfiguration
Maybe NegativeValueConfiguration
Maybe NullValueFormatConfiguration
Maybe NumericSeparatorConfiguration
suffix :: Maybe (Sensitive Text)
separatorConfiguration :: Maybe NumericSeparatorConfiguration
prefix :: Maybe (Sensitive Text)
nullValueFormatConfiguration :: Maybe NullValueFormatConfiguration
negativeValueConfiguration :: Maybe NegativeValueConfiguration
decimalPlacesConfiguration :: Maybe DecimalPlacesConfiguration
$sel:suffix:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration -> Maybe (Sensitive Text)
$sel:separatorConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe NumericSeparatorConfiguration
$sel:prefix:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration -> Maybe (Sensitive Text)
$sel:nullValueFormatConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe NullValueFormatConfiguration
$sel:negativeValueConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe NegativeValueConfiguration
$sel:decimalPlacesConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe DecimalPlacesConfiguration
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DecimalPlacesConfiguration
decimalPlacesConfiguration
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NegativeValueConfiguration
negativeValueConfiguration
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NullValueFormatConfiguration
nullValueFormatConfiguration
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
prefix
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NumericSeparatorConfiguration
separatorConfiguration
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
suffix

instance
  Prelude.NFData
    PercentageDisplayFormatConfiguration
  where
  rnf :: PercentageDisplayFormatConfiguration -> ()
rnf PercentageDisplayFormatConfiguration' {Maybe (Sensitive Text)
Maybe DecimalPlacesConfiguration
Maybe NegativeValueConfiguration
Maybe NullValueFormatConfiguration
Maybe NumericSeparatorConfiguration
suffix :: Maybe (Sensitive Text)
separatorConfiguration :: Maybe NumericSeparatorConfiguration
prefix :: Maybe (Sensitive Text)
nullValueFormatConfiguration :: Maybe NullValueFormatConfiguration
negativeValueConfiguration :: Maybe NegativeValueConfiguration
decimalPlacesConfiguration :: Maybe DecimalPlacesConfiguration
$sel:suffix:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration -> Maybe (Sensitive Text)
$sel:separatorConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe NumericSeparatorConfiguration
$sel:prefix:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration -> Maybe (Sensitive Text)
$sel:nullValueFormatConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe NullValueFormatConfiguration
$sel:negativeValueConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe NegativeValueConfiguration
$sel:decimalPlacesConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe DecimalPlacesConfiguration
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe DecimalPlacesConfiguration
decimalPlacesConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NegativeValueConfiguration
negativeValueConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NullValueFormatConfiguration
nullValueFormatConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
prefix
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NumericSeparatorConfiguration
separatorConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
suffix

instance
  Data.ToJSON
    PercentageDisplayFormatConfiguration
  where
  toJSON :: PercentageDisplayFormatConfiguration -> Value
toJSON PercentageDisplayFormatConfiguration' {Maybe (Sensitive Text)
Maybe DecimalPlacesConfiguration
Maybe NegativeValueConfiguration
Maybe NullValueFormatConfiguration
Maybe NumericSeparatorConfiguration
suffix :: Maybe (Sensitive Text)
separatorConfiguration :: Maybe NumericSeparatorConfiguration
prefix :: Maybe (Sensitive Text)
nullValueFormatConfiguration :: Maybe NullValueFormatConfiguration
negativeValueConfiguration :: Maybe NegativeValueConfiguration
decimalPlacesConfiguration :: Maybe DecimalPlacesConfiguration
$sel:suffix:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration -> Maybe (Sensitive Text)
$sel:separatorConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe NumericSeparatorConfiguration
$sel:prefix:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration -> Maybe (Sensitive Text)
$sel:nullValueFormatConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe NullValueFormatConfiguration
$sel:negativeValueConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe NegativeValueConfiguration
$sel:decimalPlacesConfiguration:PercentageDisplayFormatConfiguration' :: PercentageDisplayFormatConfiguration
-> Maybe DecimalPlacesConfiguration
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"DecimalPlacesConfiguration" 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 DecimalPlacesConfiguration
decimalPlacesConfiguration,
            (Key
"NegativeValueConfiguration" 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 NegativeValueConfiguration
negativeValueConfiguration,
            (Key
"NullValueFormatConfiguration" 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 NullValueFormatConfiguration
nullValueFormatConfiguration,
            (Key
"Prefix" 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 (Sensitive Text)
prefix,
            (Key
"SeparatorConfiguration" 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 NumericSeparatorConfiguration
separatorConfiguration,
            (Key
"Suffix" 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 (Sensitive Text)
suffix
          ]
      )