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