module Stratosphere.DynamoDB.GlobalTable.WarmThroughputProperty (
        WarmThroughputProperty(..), mkWarmThroughputProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data WarmThroughputProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-warmthroughput.html>
    WarmThroughputProperty {WarmThroughputProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-warmthroughput.html#cfn-dynamodb-globaltable-warmthroughput-readunitspersecond>
                            WarmThroughputProperty -> Maybe (Value Integer)
readUnitsPerSecond :: (Prelude.Maybe (Value Prelude.Integer)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-warmthroughput.html#cfn-dynamodb-globaltable-warmthroughput-writeunitspersecond>
                            WarmThroughputProperty -> Maybe (Value Integer)
writeUnitsPerSecond :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (WarmThroughputProperty -> WarmThroughputProperty -> Bool
(WarmThroughputProperty -> WarmThroughputProperty -> Bool)
-> (WarmThroughputProperty -> WarmThroughputProperty -> Bool)
-> Eq WarmThroughputProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WarmThroughputProperty -> WarmThroughputProperty -> Bool
== :: WarmThroughputProperty -> WarmThroughputProperty -> Bool
$c/= :: WarmThroughputProperty -> WarmThroughputProperty -> Bool
/= :: WarmThroughputProperty -> WarmThroughputProperty -> Bool
Prelude.Eq, Int -> WarmThroughputProperty -> ShowS
[WarmThroughputProperty] -> ShowS
WarmThroughputProperty -> String
(Int -> WarmThroughputProperty -> ShowS)
-> (WarmThroughputProperty -> String)
-> ([WarmThroughputProperty] -> ShowS)
-> Show WarmThroughputProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WarmThroughputProperty -> ShowS
showsPrec :: Int -> WarmThroughputProperty -> ShowS
$cshow :: WarmThroughputProperty -> String
show :: WarmThroughputProperty -> String
$cshowList :: [WarmThroughputProperty] -> ShowS
showList :: [WarmThroughputProperty] -> ShowS
Prelude.Show)
mkWarmThroughputProperty :: WarmThroughputProperty
mkWarmThroughputProperty :: WarmThroughputProperty
mkWarmThroughputProperty
  = WarmThroughputProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), readUnitsPerSecond :: Maybe (Value Integer)
readUnitsPerSecond = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       writeUnitsPerSecond :: Maybe (Value Integer)
writeUnitsPerSecond = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties WarmThroughputProperty where
  toResourceProperties :: WarmThroughputProperty -> ResourceProperties
toResourceProperties WarmThroughputProperty {Maybe (Value Integer)
()
haddock_workaround_ :: WarmThroughputProperty -> ()
readUnitsPerSecond :: WarmThroughputProperty -> Maybe (Value Integer)
writeUnitsPerSecond :: WarmThroughputProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
readUnitsPerSecond :: Maybe (Value Integer)
writeUnitsPerSecond :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DynamoDB::GlobalTable.WarmThroughput",
         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
"ReadUnitsPerSecond" (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)
readUnitsPerSecond,
                            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
"WriteUnitsPerSecond" (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)
writeUnitsPerSecond])}
instance JSON.ToJSON WarmThroughputProperty where
  toJSON :: WarmThroughputProperty -> Value
toJSON WarmThroughputProperty {Maybe (Value Integer)
()
haddock_workaround_ :: WarmThroughputProperty -> ()
readUnitsPerSecond :: WarmThroughputProperty -> Maybe (Value Integer)
writeUnitsPerSecond :: WarmThroughputProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
readUnitsPerSecond :: Maybe (Value Integer)
writeUnitsPerSecond :: 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 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
"ReadUnitsPerSecond" (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)
readUnitsPerSecond,
               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
"WriteUnitsPerSecond" (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)
writeUnitsPerSecond]))
instance Property "ReadUnitsPerSecond" WarmThroughputProperty where
  type PropertyType "ReadUnitsPerSecond" WarmThroughputProperty = Value Prelude.Integer
  set :: PropertyType "ReadUnitsPerSecond" WarmThroughputProperty
-> WarmThroughputProperty -> WarmThroughputProperty
set PropertyType "ReadUnitsPerSecond" WarmThroughputProperty
newValue WarmThroughputProperty {Maybe (Value Integer)
()
haddock_workaround_ :: WarmThroughputProperty -> ()
readUnitsPerSecond :: WarmThroughputProperty -> Maybe (Value Integer)
writeUnitsPerSecond :: WarmThroughputProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
readUnitsPerSecond :: Maybe (Value Integer)
writeUnitsPerSecond :: Maybe (Value Integer)
..}
    = WarmThroughputProperty
        {readUnitsPerSecond :: Maybe (Value Integer)
readUnitsPerSecond = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ReadUnitsPerSecond" WarmThroughputProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
writeUnitsPerSecond :: Maybe (Value Integer)
haddock_workaround_ :: ()
writeUnitsPerSecond :: Maybe (Value Integer)
..}
instance Property "WriteUnitsPerSecond" WarmThroughputProperty where
  type PropertyType "WriteUnitsPerSecond" WarmThroughputProperty = Value Prelude.Integer
  set :: PropertyType "WriteUnitsPerSecond" WarmThroughputProperty
-> WarmThroughputProperty -> WarmThroughputProperty
set PropertyType "WriteUnitsPerSecond" WarmThroughputProperty
newValue WarmThroughputProperty {Maybe (Value Integer)
()
haddock_workaround_ :: WarmThroughputProperty -> ()
readUnitsPerSecond :: WarmThroughputProperty -> Maybe (Value Integer)
writeUnitsPerSecond :: WarmThroughputProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
readUnitsPerSecond :: Maybe (Value Integer)
writeUnitsPerSecond :: Maybe (Value Integer)
..}
    = WarmThroughputProperty
        {writeUnitsPerSecond :: Maybe (Value Integer)
writeUnitsPerSecond = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "WriteUnitsPerSecond" WarmThroughputProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
readUnitsPerSecond :: Maybe (Value Integer)
haddock_workaround_ :: ()
readUnitsPerSecond :: Maybe (Value Integer)
..}