{-# 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.DynamoDB.Types.PointInTimeRecoverySpecification where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DynamoDB.Types.AttributeValue
import Amazonka.DynamoDB.Types.WriteRequest
import qualified Amazonka.Prelude as Prelude
data PointInTimeRecoverySpecification = PointInTimeRecoverySpecification'
{
PointInTimeRecoverySpecification -> Bool
pointInTimeRecoveryEnabled :: Prelude.Bool
}
deriving (PointInTimeRecoverySpecification
-> PointInTimeRecoverySpecification -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PointInTimeRecoverySpecification
-> PointInTimeRecoverySpecification -> Bool
$c/= :: PointInTimeRecoverySpecification
-> PointInTimeRecoverySpecification -> Bool
== :: PointInTimeRecoverySpecification
-> PointInTimeRecoverySpecification -> Bool
$c== :: PointInTimeRecoverySpecification
-> PointInTimeRecoverySpecification -> Bool
Prelude.Eq, ReadPrec [PointInTimeRecoverySpecification]
ReadPrec PointInTimeRecoverySpecification
Int -> ReadS PointInTimeRecoverySpecification
ReadS [PointInTimeRecoverySpecification]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PointInTimeRecoverySpecification]
$creadListPrec :: ReadPrec [PointInTimeRecoverySpecification]
readPrec :: ReadPrec PointInTimeRecoverySpecification
$creadPrec :: ReadPrec PointInTimeRecoverySpecification
readList :: ReadS [PointInTimeRecoverySpecification]
$creadList :: ReadS [PointInTimeRecoverySpecification]
readsPrec :: Int -> ReadS PointInTimeRecoverySpecification
$creadsPrec :: Int -> ReadS PointInTimeRecoverySpecification
Prelude.Read, Int -> PointInTimeRecoverySpecification -> ShowS
[PointInTimeRecoverySpecification] -> ShowS
PointInTimeRecoverySpecification -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PointInTimeRecoverySpecification] -> ShowS
$cshowList :: [PointInTimeRecoverySpecification] -> ShowS
show :: PointInTimeRecoverySpecification -> String
$cshow :: PointInTimeRecoverySpecification -> String
showsPrec :: Int -> PointInTimeRecoverySpecification -> ShowS
$cshowsPrec :: Int -> PointInTimeRecoverySpecification -> ShowS
Prelude.Show, forall x.
Rep PointInTimeRecoverySpecification x
-> PointInTimeRecoverySpecification
forall x.
PointInTimeRecoverySpecification
-> Rep PointInTimeRecoverySpecification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PointInTimeRecoverySpecification x
-> PointInTimeRecoverySpecification
$cfrom :: forall x.
PointInTimeRecoverySpecification
-> Rep PointInTimeRecoverySpecification x
Prelude.Generic)
newPointInTimeRecoverySpecification ::
Prelude.Bool ->
PointInTimeRecoverySpecification
newPointInTimeRecoverySpecification :: Bool -> PointInTimeRecoverySpecification
newPointInTimeRecoverySpecification
Bool
pPointInTimeRecoveryEnabled_ =
PointInTimeRecoverySpecification'
{ $sel:pointInTimeRecoveryEnabled:PointInTimeRecoverySpecification' :: Bool
pointInTimeRecoveryEnabled =
Bool
pPointInTimeRecoveryEnabled_
}
pointInTimeRecoverySpecification_pointInTimeRecoveryEnabled :: Lens.Lens' PointInTimeRecoverySpecification Prelude.Bool
pointInTimeRecoverySpecification_pointInTimeRecoveryEnabled :: Lens' PointInTimeRecoverySpecification Bool
pointInTimeRecoverySpecification_pointInTimeRecoveryEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PointInTimeRecoverySpecification' {Bool
pointInTimeRecoveryEnabled :: Bool
$sel:pointInTimeRecoveryEnabled:PointInTimeRecoverySpecification' :: PointInTimeRecoverySpecification -> Bool
pointInTimeRecoveryEnabled} -> Bool
pointInTimeRecoveryEnabled) (\s :: PointInTimeRecoverySpecification
s@PointInTimeRecoverySpecification' {} Bool
a -> PointInTimeRecoverySpecification
s {$sel:pointInTimeRecoveryEnabled:PointInTimeRecoverySpecification' :: Bool
pointInTimeRecoveryEnabled = Bool
a} :: PointInTimeRecoverySpecification)
instance
Prelude.Hashable
PointInTimeRecoverySpecification
where
hashWithSalt :: Int -> PointInTimeRecoverySpecification -> Int
hashWithSalt
Int
_salt
PointInTimeRecoverySpecification' {Bool
pointInTimeRecoveryEnabled :: Bool
$sel:pointInTimeRecoveryEnabled:PointInTimeRecoverySpecification' :: PointInTimeRecoverySpecification -> Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
pointInTimeRecoveryEnabled
instance
Prelude.NFData
PointInTimeRecoverySpecification
where
rnf :: PointInTimeRecoverySpecification -> ()
rnf PointInTimeRecoverySpecification' {Bool
pointInTimeRecoveryEnabled :: Bool
$sel:pointInTimeRecoveryEnabled:PointInTimeRecoverySpecification' :: PointInTimeRecoverySpecification -> Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Bool
pointInTimeRecoveryEnabled
instance Data.ToJSON PointInTimeRecoverySpecification where
toJSON :: PointInTimeRecoverySpecification -> Value
toJSON PointInTimeRecoverySpecification' {Bool
pointInTimeRecoveryEnabled :: Bool
$sel:pointInTimeRecoveryEnabled:PointInTimeRecoverySpecification' :: PointInTimeRecoverySpecification -> Bool
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"PointInTimeRecoveryEnabled"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Bool
pointInTimeRecoveryEnabled
)
]
)