module Stratosphere.S3Tables.Table.SnapshotManagementProperty (
SnapshotManagementProperty(..), mkSnapshotManagementProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SnapshotManagementProperty
=
SnapshotManagementProperty {SnapshotManagementProperty -> ()
haddock_workaround_ :: (),
SnapshotManagementProperty -> Maybe (Value Integer)
maxSnapshotAgeHours :: (Prelude.Maybe (Value Prelude.Integer)),
SnapshotManagementProperty -> Maybe (Value Integer)
minSnapshotsToKeep :: (Prelude.Maybe (Value Prelude.Integer)),
SnapshotManagementProperty -> Maybe (Value Text)
status :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (SnapshotManagementProperty -> SnapshotManagementProperty -> Bool
(SnapshotManagementProperty -> SnapshotManagementProperty -> Bool)
-> (SnapshotManagementProperty
-> SnapshotManagementProperty -> Bool)
-> Eq SnapshotManagementProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SnapshotManagementProperty -> SnapshotManagementProperty -> Bool
== :: SnapshotManagementProperty -> SnapshotManagementProperty -> Bool
$c/= :: SnapshotManagementProperty -> SnapshotManagementProperty -> Bool
/= :: SnapshotManagementProperty -> SnapshotManagementProperty -> Bool
Prelude.Eq, Int -> SnapshotManagementProperty -> ShowS
[SnapshotManagementProperty] -> ShowS
SnapshotManagementProperty -> String
(Int -> SnapshotManagementProperty -> ShowS)
-> (SnapshotManagementProperty -> String)
-> ([SnapshotManagementProperty] -> ShowS)
-> Show SnapshotManagementProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SnapshotManagementProperty -> ShowS
showsPrec :: Int -> SnapshotManagementProperty -> ShowS
$cshow :: SnapshotManagementProperty -> String
show :: SnapshotManagementProperty -> String
$cshowList :: [SnapshotManagementProperty] -> ShowS
showList :: [SnapshotManagementProperty] -> ShowS
Prelude.Show)
mkSnapshotManagementProperty :: SnapshotManagementProperty
mkSnapshotManagementProperty :: SnapshotManagementProperty
mkSnapshotManagementProperty
= SnapshotManagementProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), maxSnapshotAgeHours :: Maybe (Value Integer)
maxSnapshotAgeHours = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
minSnapshotsToKeep :: Maybe (Value Integer)
minSnapshotsToKeep = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing, status :: Maybe (Value Text)
status = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SnapshotManagementProperty where
toResourceProperties :: SnapshotManagementProperty -> ResourceProperties
toResourceProperties SnapshotManagementProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: SnapshotManagementProperty -> ()
maxSnapshotAgeHours :: SnapshotManagementProperty -> Maybe (Value Integer)
minSnapshotsToKeep :: SnapshotManagementProperty -> Maybe (Value Integer)
status :: SnapshotManagementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxSnapshotAgeHours :: Maybe (Value Integer)
minSnapshotsToKeep :: Maybe (Value Integer)
status :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::S3Tables::Table.SnapshotManagement",
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 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
"MaxSnapshotAgeHours" (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)
maxSnapshotAgeHours,
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
"MinSnapshotsToKeep" (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)
minSnapshotsToKeep,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Status" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
status])}
instance JSON.ToJSON SnapshotManagementProperty where
toJSON :: SnapshotManagementProperty -> Value
toJSON SnapshotManagementProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: SnapshotManagementProperty -> ()
maxSnapshotAgeHours :: SnapshotManagementProperty -> Maybe (Value Integer)
minSnapshotsToKeep :: SnapshotManagementProperty -> Maybe (Value Integer)
status :: SnapshotManagementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxSnapshotAgeHours :: Maybe (Value Integer)
minSnapshotsToKeep :: Maybe (Value Integer)
status :: Maybe (Value Text)
..}
= [(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 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
"MaxSnapshotAgeHours" (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)
maxSnapshotAgeHours,
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
"MinSnapshotsToKeep" (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)
minSnapshotsToKeep,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Status" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
status]))
instance Property "MaxSnapshotAgeHours" SnapshotManagementProperty where
type PropertyType "MaxSnapshotAgeHours" SnapshotManagementProperty = Value Prelude.Integer
set :: PropertyType "MaxSnapshotAgeHours" SnapshotManagementProperty
-> SnapshotManagementProperty -> SnapshotManagementProperty
set PropertyType "MaxSnapshotAgeHours" SnapshotManagementProperty
newValue SnapshotManagementProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: SnapshotManagementProperty -> ()
maxSnapshotAgeHours :: SnapshotManagementProperty -> Maybe (Value Integer)
minSnapshotsToKeep :: SnapshotManagementProperty -> Maybe (Value Integer)
status :: SnapshotManagementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxSnapshotAgeHours :: Maybe (Value Integer)
minSnapshotsToKeep :: Maybe (Value Integer)
status :: Maybe (Value Text)
..}
= SnapshotManagementProperty
{maxSnapshotAgeHours :: Maybe (Value Integer)
maxSnapshotAgeHours = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxSnapshotAgeHours" SnapshotManagementProperty
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
minSnapshotsToKeep :: Maybe (Value Integer)
status :: Maybe (Value Text)
haddock_workaround_ :: ()
minSnapshotsToKeep :: Maybe (Value Integer)
status :: Maybe (Value Text)
..}
instance Property "MinSnapshotsToKeep" SnapshotManagementProperty where
type PropertyType "MinSnapshotsToKeep" SnapshotManagementProperty = Value Prelude.Integer
set :: PropertyType "MinSnapshotsToKeep" SnapshotManagementProperty
-> SnapshotManagementProperty -> SnapshotManagementProperty
set PropertyType "MinSnapshotsToKeep" SnapshotManagementProperty
newValue SnapshotManagementProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: SnapshotManagementProperty -> ()
maxSnapshotAgeHours :: SnapshotManagementProperty -> Maybe (Value Integer)
minSnapshotsToKeep :: SnapshotManagementProperty -> Maybe (Value Integer)
status :: SnapshotManagementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxSnapshotAgeHours :: Maybe (Value Integer)
minSnapshotsToKeep :: Maybe (Value Integer)
status :: Maybe (Value Text)
..}
= SnapshotManagementProperty
{minSnapshotsToKeep :: Maybe (Value Integer)
minSnapshotsToKeep = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MinSnapshotsToKeep" SnapshotManagementProperty
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
maxSnapshotAgeHours :: Maybe (Value Integer)
status :: Maybe (Value Text)
haddock_workaround_ :: ()
maxSnapshotAgeHours :: Maybe (Value Integer)
status :: Maybe (Value Text)
..}
instance Property "Status" SnapshotManagementProperty where
type PropertyType "Status" SnapshotManagementProperty = Value Prelude.Text
set :: PropertyType "Status" SnapshotManagementProperty
-> SnapshotManagementProperty -> SnapshotManagementProperty
set PropertyType "Status" SnapshotManagementProperty
newValue SnapshotManagementProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: SnapshotManagementProperty -> ()
maxSnapshotAgeHours :: SnapshotManagementProperty -> Maybe (Value Integer)
minSnapshotsToKeep :: SnapshotManagementProperty -> Maybe (Value Integer)
status :: SnapshotManagementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxSnapshotAgeHours :: Maybe (Value Integer)
minSnapshotsToKeep :: Maybe (Value Integer)
status :: Maybe (Value Text)
..}
= SnapshotManagementProperty {status :: Maybe (Value Text)
status = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Status" SnapshotManagementProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
maxSnapshotAgeHours :: Maybe (Value Integer)
minSnapshotsToKeep :: Maybe (Value Integer)
haddock_workaround_ :: ()
maxSnapshotAgeHours :: Maybe (Value Integer)
minSnapshotsToKeep :: Maybe (Value Integer)
..}