module Stratosphere.DynamoDB.GlobalTable.PointInTimeRecoverySpecificationProperty (
        PointInTimeRecoverySpecificationProperty(..),
        mkPointInTimeRecoverySpecificationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PointInTimeRecoverySpecificationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-pointintimerecoveryspecification.html>
    PointInTimeRecoverySpecificationProperty {PointInTimeRecoverySpecificationProperty -> ()
haddock_workaround_ :: (),
                                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-pointintimerecoveryspecification.html#cfn-dynamodb-globaltable-pointintimerecoveryspecification-pointintimerecoveryenabled>
                                              PointInTimeRecoverySpecificationProperty -> Maybe (Value Bool)
pointInTimeRecoveryEnabled :: (Prelude.Maybe (Value Prelude.Bool)),
                                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-pointintimerecoveryspecification.html#cfn-dynamodb-globaltable-pointintimerecoveryspecification-recoveryperiodindays>
                                              PointInTimeRecoverySpecificationProperty -> Maybe (Value Integer)
recoveryPeriodInDays :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (PointInTimeRecoverySpecificationProperty
-> PointInTimeRecoverySpecificationProperty -> Bool
(PointInTimeRecoverySpecificationProperty
 -> PointInTimeRecoverySpecificationProperty -> Bool)
-> (PointInTimeRecoverySpecificationProperty
    -> PointInTimeRecoverySpecificationProperty -> Bool)
-> Eq PointInTimeRecoverySpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PointInTimeRecoverySpecificationProperty
-> PointInTimeRecoverySpecificationProperty -> Bool
== :: PointInTimeRecoverySpecificationProperty
-> PointInTimeRecoverySpecificationProperty -> Bool
$c/= :: PointInTimeRecoverySpecificationProperty
-> PointInTimeRecoverySpecificationProperty -> Bool
/= :: PointInTimeRecoverySpecificationProperty
-> PointInTimeRecoverySpecificationProperty -> Bool
Prelude.Eq, Int -> PointInTimeRecoverySpecificationProperty -> ShowS
[PointInTimeRecoverySpecificationProperty] -> ShowS
PointInTimeRecoverySpecificationProperty -> String
(Int -> PointInTimeRecoverySpecificationProperty -> ShowS)
-> (PointInTimeRecoverySpecificationProperty -> String)
-> ([PointInTimeRecoverySpecificationProperty] -> ShowS)
-> Show PointInTimeRecoverySpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PointInTimeRecoverySpecificationProperty -> ShowS
showsPrec :: Int -> PointInTimeRecoverySpecificationProperty -> ShowS
$cshow :: PointInTimeRecoverySpecificationProperty -> String
show :: PointInTimeRecoverySpecificationProperty -> String
$cshowList :: [PointInTimeRecoverySpecificationProperty] -> ShowS
showList :: [PointInTimeRecoverySpecificationProperty] -> ShowS
Prelude.Show)
mkPointInTimeRecoverySpecificationProperty ::
  PointInTimeRecoverySpecificationProperty
mkPointInTimeRecoverySpecificationProperty :: PointInTimeRecoverySpecificationProperty
mkPointInTimeRecoverySpecificationProperty
  = PointInTimeRecoverySpecificationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       pointInTimeRecoveryEnabled :: Maybe (Value Bool)
pointInTimeRecoveryEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       recoveryPeriodInDays :: Maybe (Value Integer)
recoveryPeriodInDays = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PointInTimeRecoverySpecificationProperty where
  toResourceProperties :: PointInTimeRecoverySpecificationProperty -> ResourceProperties
toResourceProperties PointInTimeRecoverySpecificationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: PointInTimeRecoverySpecificationProperty -> ()
pointInTimeRecoveryEnabled :: PointInTimeRecoverySpecificationProperty -> Maybe (Value Bool)
recoveryPeriodInDays :: PointInTimeRecoverySpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
pointInTimeRecoveryEnabled :: Maybe (Value Bool)
recoveryPeriodInDays :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DynamoDB::GlobalTable.PointInTimeRecoverySpecification",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PointInTimeRecoveryEnabled"
                              (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
pointInTimeRecoveryEnabled,
                            Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RecoveryPeriodInDays"
                              (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
recoveryPeriodInDays])}
instance JSON.ToJSON PointInTimeRecoverySpecificationProperty where
  toJSON :: PointInTimeRecoverySpecificationProperty -> Value
toJSON PointInTimeRecoverySpecificationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: PointInTimeRecoverySpecificationProperty -> ()
pointInTimeRecoveryEnabled :: PointInTimeRecoverySpecificationProperty -> Maybe (Value Bool)
recoveryPeriodInDays :: PointInTimeRecoverySpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
pointInTimeRecoveryEnabled :: Maybe (Value Bool)
recoveryPeriodInDays :: Maybe (Value Integer)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PointInTimeRecoveryEnabled"
                 (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
pointInTimeRecoveryEnabled,
               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RecoveryPeriodInDays"
                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
recoveryPeriodInDays]))
instance Property "PointInTimeRecoveryEnabled" PointInTimeRecoverySpecificationProperty where
  type PropertyType "PointInTimeRecoveryEnabled" PointInTimeRecoverySpecificationProperty = Value Prelude.Bool
  set :: PropertyType
  "PointInTimeRecoveryEnabled"
  PointInTimeRecoverySpecificationProperty
-> PointInTimeRecoverySpecificationProperty
-> PointInTimeRecoverySpecificationProperty
set PropertyType
  "PointInTimeRecoveryEnabled"
  PointInTimeRecoverySpecificationProperty
newValue PointInTimeRecoverySpecificationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: PointInTimeRecoverySpecificationProperty -> ()
pointInTimeRecoveryEnabled :: PointInTimeRecoverySpecificationProperty -> Maybe (Value Bool)
recoveryPeriodInDays :: PointInTimeRecoverySpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
pointInTimeRecoveryEnabled :: Maybe (Value Bool)
recoveryPeriodInDays :: Maybe (Value Integer)
..}
    = PointInTimeRecoverySpecificationProperty
        {pointInTimeRecoveryEnabled :: Maybe (Value Bool)
pointInTimeRecoveryEnabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "PointInTimeRecoveryEnabled"
  PointInTimeRecoverySpecificationProperty
Value Bool
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
recoveryPeriodInDays :: Maybe (Value Integer)
haddock_workaround_ :: ()
recoveryPeriodInDays :: Maybe (Value Integer)
..}
instance Property "RecoveryPeriodInDays" PointInTimeRecoverySpecificationProperty where
  type PropertyType "RecoveryPeriodInDays" PointInTimeRecoverySpecificationProperty = Value Prelude.Integer
  set :: PropertyType
  "RecoveryPeriodInDays" PointInTimeRecoverySpecificationProperty
-> PointInTimeRecoverySpecificationProperty
-> PointInTimeRecoverySpecificationProperty
set PropertyType
  "RecoveryPeriodInDays" PointInTimeRecoverySpecificationProperty
newValue PointInTimeRecoverySpecificationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: PointInTimeRecoverySpecificationProperty -> ()
pointInTimeRecoveryEnabled :: PointInTimeRecoverySpecificationProperty -> Maybe (Value Bool)
recoveryPeriodInDays :: PointInTimeRecoverySpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
pointInTimeRecoveryEnabled :: Maybe (Value Bool)
recoveryPeriodInDays :: Maybe (Value Integer)
..}
    = PointInTimeRecoverySpecificationProperty
        {recoveryPeriodInDays :: Maybe (Value Integer)
recoveryPeriodInDays = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "RecoveryPeriodInDays" PointInTimeRecoverySpecificationProperty
Value Integer
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
pointInTimeRecoveryEnabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
pointInTimeRecoveryEnabled :: Maybe (Value Bool)
..}