{-# 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 #-}
module Amazonka.QuickSight.Types.DecimalValueWhenUnsetConfiguration 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.ValueWhenUnsetOption
data DecimalValueWhenUnsetConfiguration = DecimalValueWhenUnsetConfiguration'
{
DecimalValueWhenUnsetConfiguration -> Maybe (Sensitive Double)
customValue :: Prelude.Maybe (Data.Sensitive Prelude.Double),
DecimalValueWhenUnsetConfiguration -> Maybe ValueWhenUnsetOption
valueWhenUnsetOption :: Prelude.Maybe ValueWhenUnsetOption
}
deriving (DecimalValueWhenUnsetConfiguration
-> DecimalValueWhenUnsetConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DecimalValueWhenUnsetConfiguration
-> DecimalValueWhenUnsetConfiguration -> Bool
$c/= :: DecimalValueWhenUnsetConfiguration
-> DecimalValueWhenUnsetConfiguration -> Bool
== :: DecimalValueWhenUnsetConfiguration
-> DecimalValueWhenUnsetConfiguration -> Bool
$c== :: DecimalValueWhenUnsetConfiguration
-> DecimalValueWhenUnsetConfiguration -> Bool
Prelude.Eq, Int -> DecimalValueWhenUnsetConfiguration -> ShowS
[DecimalValueWhenUnsetConfiguration] -> ShowS
DecimalValueWhenUnsetConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DecimalValueWhenUnsetConfiguration] -> ShowS
$cshowList :: [DecimalValueWhenUnsetConfiguration] -> ShowS
show :: DecimalValueWhenUnsetConfiguration -> String
$cshow :: DecimalValueWhenUnsetConfiguration -> String
showsPrec :: Int -> DecimalValueWhenUnsetConfiguration -> ShowS
$cshowsPrec :: Int -> DecimalValueWhenUnsetConfiguration -> ShowS
Prelude.Show, forall x.
Rep DecimalValueWhenUnsetConfiguration x
-> DecimalValueWhenUnsetConfiguration
forall x.
DecimalValueWhenUnsetConfiguration
-> Rep DecimalValueWhenUnsetConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DecimalValueWhenUnsetConfiguration x
-> DecimalValueWhenUnsetConfiguration
$cfrom :: forall x.
DecimalValueWhenUnsetConfiguration
-> Rep DecimalValueWhenUnsetConfiguration x
Prelude.Generic)
newDecimalValueWhenUnsetConfiguration ::
DecimalValueWhenUnsetConfiguration
newDecimalValueWhenUnsetConfiguration :: DecimalValueWhenUnsetConfiguration
newDecimalValueWhenUnsetConfiguration =
DecimalValueWhenUnsetConfiguration'
{ $sel:customValue:DecimalValueWhenUnsetConfiguration' :: Maybe (Sensitive Double)
customValue =
forall a. Maybe a
Prelude.Nothing,
$sel:valueWhenUnsetOption:DecimalValueWhenUnsetConfiguration' :: Maybe ValueWhenUnsetOption
valueWhenUnsetOption = forall a. Maybe a
Prelude.Nothing
}
decimalValueWhenUnsetConfiguration_customValue :: Lens.Lens' DecimalValueWhenUnsetConfiguration (Prelude.Maybe Prelude.Double)
decimalValueWhenUnsetConfiguration_customValue :: Lens' DecimalValueWhenUnsetConfiguration (Maybe Double)
decimalValueWhenUnsetConfiguration_customValue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DecimalValueWhenUnsetConfiguration' {Maybe (Sensitive Double)
customValue :: Maybe (Sensitive Double)
$sel:customValue:DecimalValueWhenUnsetConfiguration' :: DecimalValueWhenUnsetConfiguration -> Maybe (Sensitive Double)
customValue} -> Maybe (Sensitive Double)
customValue) (\s :: DecimalValueWhenUnsetConfiguration
s@DecimalValueWhenUnsetConfiguration' {} Maybe (Sensitive Double)
a -> DecimalValueWhenUnsetConfiguration
s {$sel:customValue:DecimalValueWhenUnsetConfiguration' :: Maybe (Sensitive Double)
customValue = Maybe (Sensitive Double)
a} :: DecimalValueWhenUnsetConfiguration) 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
decimalValueWhenUnsetConfiguration_valueWhenUnsetOption :: Lens.Lens' DecimalValueWhenUnsetConfiguration (Prelude.Maybe ValueWhenUnsetOption)
decimalValueWhenUnsetConfiguration_valueWhenUnsetOption :: Lens'
DecimalValueWhenUnsetConfiguration (Maybe ValueWhenUnsetOption)
decimalValueWhenUnsetConfiguration_valueWhenUnsetOption = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DecimalValueWhenUnsetConfiguration' {Maybe ValueWhenUnsetOption
valueWhenUnsetOption :: Maybe ValueWhenUnsetOption
$sel:valueWhenUnsetOption:DecimalValueWhenUnsetConfiguration' :: DecimalValueWhenUnsetConfiguration -> Maybe ValueWhenUnsetOption
valueWhenUnsetOption} -> Maybe ValueWhenUnsetOption
valueWhenUnsetOption) (\s :: DecimalValueWhenUnsetConfiguration
s@DecimalValueWhenUnsetConfiguration' {} Maybe ValueWhenUnsetOption
a -> DecimalValueWhenUnsetConfiguration
s {$sel:valueWhenUnsetOption:DecimalValueWhenUnsetConfiguration' :: Maybe ValueWhenUnsetOption
valueWhenUnsetOption = Maybe ValueWhenUnsetOption
a} :: DecimalValueWhenUnsetConfiguration)
instance
Data.FromJSON
DecimalValueWhenUnsetConfiguration
where
parseJSON :: Value -> Parser DecimalValueWhenUnsetConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DecimalValueWhenUnsetConfiguration"
( \Object
x ->
Maybe (Sensitive Double)
-> Maybe ValueWhenUnsetOption -> DecimalValueWhenUnsetConfiguration
DecimalValueWhenUnsetConfiguration'
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
"CustomValue")
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
"ValueWhenUnsetOption")
)
instance
Prelude.Hashable
DecimalValueWhenUnsetConfiguration
where
hashWithSalt :: Int -> DecimalValueWhenUnsetConfiguration -> Int
hashWithSalt
Int
_salt
DecimalValueWhenUnsetConfiguration' {Maybe (Sensitive Double)
Maybe ValueWhenUnsetOption
valueWhenUnsetOption :: Maybe ValueWhenUnsetOption
customValue :: Maybe (Sensitive Double)
$sel:valueWhenUnsetOption:DecimalValueWhenUnsetConfiguration' :: DecimalValueWhenUnsetConfiguration -> Maybe ValueWhenUnsetOption
$sel:customValue:DecimalValueWhenUnsetConfiguration' :: DecimalValueWhenUnsetConfiguration -> Maybe (Sensitive Double)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Double)
customValue
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ValueWhenUnsetOption
valueWhenUnsetOption
instance
Prelude.NFData
DecimalValueWhenUnsetConfiguration
where
rnf :: DecimalValueWhenUnsetConfiguration -> ()
rnf DecimalValueWhenUnsetConfiguration' {Maybe (Sensitive Double)
Maybe ValueWhenUnsetOption
valueWhenUnsetOption :: Maybe ValueWhenUnsetOption
customValue :: Maybe (Sensitive Double)
$sel:valueWhenUnsetOption:DecimalValueWhenUnsetConfiguration' :: DecimalValueWhenUnsetConfiguration -> Maybe ValueWhenUnsetOption
$sel:customValue:DecimalValueWhenUnsetConfiguration' :: DecimalValueWhenUnsetConfiguration -> Maybe (Sensitive Double)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Double)
customValue
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ValueWhenUnsetOption
valueWhenUnsetOption
instance
Data.ToJSON
DecimalValueWhenUnsetConfiguration
where
toJSON :: DecimalValueWhenUnsetConfiguration -> Value
toJSON DecimalValueWhenUnsetConfiguration' {Maybe (Sensitive Double)
Maybe ValueWhenUnsetOption
valueWhenUnsetOption :: Maybe ValueWhenUnsetOption
customValue :: Maybe (Sensitive Double)
$sel:valueWhenUnsetOption:DecimalValueWhenUnsetConfiguration' :: DecimalValueWhenUnsetConfiguration -> Maybe ValueWhenUnsetOption
$sel:customValue:DecimalValueWhenUnsetConfiguration' :: DecimalValueWhenUnsetConfiguration -> Maybe (Sensitive Double)
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"CustomValue" 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 Double)
customValue,
(Key
"ValueWhenUnsetOption" 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 ValueWhenUnsetOption
valueWhenUnsetOption
]
)