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