{-# 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.DateTimeValueWhenUnsetConfiguration 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 DateTimeValueWhenUnsetConfiguration = DateTimeValueWhenUnsetConfiguration'
{
DateTimeValueWhenUnsetConfiguration -> Maybe (Sensitive POSIX)
customValue :: Prelude.Maybe (Data.Sensitive Data.POSIX),
DateTimeValueWhenUnsetConfiguration -> Maybe ValueWhenUnsetOption
valueWhenUnsetOption :: Prelude.Maybe ValueWhenUnsetOption
}
deriving (DateTimeValueWhenUnsetConfiguration
-> DateTimeValueWhenUnsetConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DateTimeValueWhenUnsetConfiguration
-> DateTimeValueWhenUnsetConfiguration -> Bool
$c/= :: DateTimeValueWhenUnsetConfiguration
-> DateTimeValueWhenUnsetConfiguration -> Bool
== :: DateTimeValueWhenUnsetConfiguration
-> DateTimeValueWhenUnsetConfiguration -> Bool
$c== :: DateTimeValueWhenUnsetConfiguration
-> DateTimeValueWhenUnsetConfiguration -> Bool
Prelude.Eq, Int -> DateTimeValueWhenUnsetConfiguration -> ShowS
[DateTimeValueWhenUnsetConfiguration] -> ShowS
DateTimeValueWhenUnsetConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DateTimeValueWhenUnsetConfiguration] -> ShowS
$cshowList :: [DateTimeValueWhenUnsetConfiguration] -> ShowS
show :: DateTimeValueWhenUnsetConfiguration -> String
$cshow :: DateTimeValueWhenUnsetConfiguration -> String
showsPrec :: Int -> DateTimeValueWhenUnsetConfiguration -> ShowS
$cshowsPrec :: Int -> DateTimeValueWhenUnsetConfiguration -> ShowS
Prelude.Show, forall x.
Rep DateTimeValueWhenUnsetConfiguration x
-> DateTimeValueWhenUnsetConfiguration
forall x.
DateTimeValueWhenUnsetConfiguration
-> Rep DateTimeValueWhenUnsetConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DateTimeValueWhenUnsetConfiguration x
-> DateTimeValueWhenUnsetConfiguration
$cfrom :: forall x.
DateTimeValueWhenUnsetConfiguration
-> Rep DateTimeValueWhenUnsetConfiguration x
Prelude.Generic)
newDateTimeValueWhenUnsetConfiguration ::
DateTimeValueWhenUnsetConfiguration
newDateTimeValueWhenUnsetConfiguration :: DateTimeValueWhenUnsetConfiguration
newDateTimeValueWhenUnsetConfiguration =
DateTimeValueWhenUnsetConfiguration'
{ $sel:customValue:DateTimeValueWhenUnsetConfiguration' :: Maybe (Sensitive POSIX)
customValue =
forall a. Maybe a
Prelude.Nothing,
$sel:valueWhenUnsetOption:DateTimeValueWhenUnsetConfiguration' :: Maybe ValueWhenUnsetOption
valueWhenUnsetOption = forall a. Maybe a
Prelude.Nothing
}
dateTimeValueWhenUnsetConfiguration_customValue :: Lens.Lens' DateTimeValueWhenUnsetConfiguration (Prelude.Maybe Prelude.UTCTime)
dateTimeValueWhenUnsetConfiguration_customValue :: Lens' DateTimeValueWhenUnsetConfiguration (Maybe UTCTime)
dateTimeValueWhenUnsetConfiguration_customValue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DateTimeValueWhenUnsetConfiguration' {Maybe (Sensitive POSIX)
customValue :: Maybe (Sensitive POSIX)
$sel:customValue:DateTimeValueWhenUnsetConfiguration' :: DateTimeValueWhenUnsetConfiguration -> Maybe (Sensitive POSIX)
customValue} -> Maybe (Sensitive POSIX)
customValue) (\s :: DateTimeValueWhenUnsetConfiguration
s@DateTimeValueWhenUnsetConfiguration' {} Maybe (Sensitive POSIX)
a -> DateTimeValueWhenUnsetConfiguration
s {$sel:customValue:DateTimeValueWhenUnsetConfiguration' :: Maybe (Sensitive POSIX)
customValue = Maybe (Sensitive POSIX)
a} :: DateTimeValueWhenUnsetConfiguration) 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 forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time)
dateTimeValueWhenUnsetConfiguration_valueWhenUnsetOption :: Lens.Lens' DateTimeValueWhenUnsetConfiguration (Prelude.Maybe ValueWhenUnsetOption)
dateTimeValueWhenUnsetConfiguration_valueWhenUnsetOption :: Lens'
DateTimeValueWhenUnsetConfiguration (Maybe ValueWhenUnsetOption)
dateTimeValueWhenUnsetConfiguration_valueWhenUnsetOption = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DateTimeValueWhenUnsetConfiguration' {Maybe ValueWhenUnsetOption
valueWhenUnsetOption :: Maybe ValueWhenUnsetOption
$sel:valueWhenUnsetOption:DateTimeValueWhenUnsetConfiguration' :: DateTimeValueWhenUnsetConfiguration -> Maybe ValueWhenUnsetOption
valueWhenUnsetOption} -> Maybe ValueWhenUnsetOption
valueWhenUnsetOption) (\s :: DateTimeValueWhenUnsetConfiguration
s@DateTimeValueWhenUnsetConfiguration' {} Maybe ValueWhenUnsetOption
a -> DateTimeValueWhenUnsetConfiguration
s {$sel:valueWhenUnsetOption:DateTimeValueWhenUnsetConfiguration' :: Maybe ValueWhenUnsetOption
valueWhenUnsetOption = Maybe ValueWhenUnsetOption
a} :: DateTimeValueWhenUnsetConfiguration)
instance
Data.FromJSON
DateTimeValueWhenUnsetConfiguration
where
parseJSON :: Value -> Parser DateTimeValueWhenUnsetConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DateTimeValueWhenUnsetConfiguration"
( \Object
x ->
Maybe (Sensitive POSIX)
-> Maybe ValueWhenUnsetOption
-> DateTimeValueWhenUnsetConfiguration
DateTimeValueWhenUnsetConfiguration'
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
DateTimeValueWhenUnsetConfiguration
where
hashWithSalt :: Int -> DateTimeValueWhenUnsetConfiguration -> Int
hashWithSalt
Int
_salt
DateTimeValueWhenUnsetConfiguration' {Maybe (Sensitive POSIX)
Maybe ValueWhenUnsetOption
valueWhenUnsetOption :: Maybe ValueWhenUnsetOption
customValue :: Maybe (Sensitive POSIX)
$sel:valueWhenUnsetOption:DateTimeValueWhenUnsetConfiguration' :: DateTimeValueWhenUnsetConfiguration -> Maybe ValueWhenUnsetOption
$sel:customValue:DateTimeValueWhenUnsetConfiguration' :: DateTimeValueWhenUnsetConfiguration -> Maybe (Sensitive POSIX)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive POSIX)
customValue
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ValueWhenUnsetOption
valueWhenUnsetOption
instance
Prelude.NFData
DateTimeValueWhenUnsetConfiguration
where
rnf :: DateTimeValueWhenUnsetConfiguration -> ()
rnf DateTimeValueWhenUnsetConfiguration' {Maybe (Sensitive POSIX)
Maybe ValueWhenUnsetOption
valueWhenUnsetOption :: Maybe ValueWhenUnsetOption
customValue :: Maybe (Sensitive POSIX)
$sel:valueWhenUnsetOption:DateTimeValueWhenUnsetConfiguration' :: DateTimeValueWhenUnsetConfiguration -> Maybe ValueWhenUnsetOption
$sel:customValue:DateTimeValueWhenUnsetConfiguration' :: DateTimeValueWhenUnsetConfiguration -> Maybe (Sensitive POSIX)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive POSIX)
customValue
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ValueWhenUnsetOption
valueWhenUnsetOption
instance
Data.ToJSON
DateTimeValueWhenUnsetConfiguration
where
toJSON :: DateTimeValueWhenUnsetConfiguration -> Value
toJSON DateTimeValueWhenUnsetConfiguration' {Maybe (Sensitive POSIX)
Maybe ValueWhenUnsetOption
valueWhenUnsetOption :: Maybe ValueWhenUnsetOption
customValue :: Maybe (Sensitive POSIX)
$sel:valueWhenUnsetOption:DateTimeValueWhenUnsetConfiguration' :: DateTimeValueWhenUnsetConfiguration -> Maybe ValueWhenUnsetOption
$sel:customValue:DateTimeValueWhenUnsetConfiguration' :: DateTimeValueWhenUnsetConfiguration -> Maybe (Sensitive POSIX)
..} =
[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 POSIX)
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
]
)