module Stratosphere.DynamoDB.GlobalTable.ReadProvisionedThroughputSettingsProperty (
        module Exports, ReadProvisionedThroughputSettingsProperty(..),
        mkReadProvisionedThroughputSettingsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.DynamoDB.GlobalTable.CapacityAutoScalingSettingsProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ReadProvisionedThroughputSettingsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-readprovisionedthroughputsettings.html>
    ReadProvisionedThroughputSettingsProperty {ReadProvisionedThroughputSettingsProperty -> ()
haddock_workaround_ :: (),
                                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-readprovisionedthroughputsettings.html#cfn-dynamodb-globaltable-readprovisionedthroughputsettings-readcapacityautoscalingsettings>
                                               ReadProvisionedThroughputSettingsProperty
-> Maybe CapacityAutoScalingSettingsProperty
readCapacityAutoScalingSettings :: (Prelude.Maybe CapacityAutoScalingSettingsProperty),
                                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-globaltable-readprovisionedthroughputsettings.html#cfn-dynamodb-globaltable-readprovisionedthroughputsettings-readcapacityunits>
                                               ReadProvisionedThroughputSettingsProperty -> Maybe (Value Integer)
readCapacityUnits :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (ReadProvisionedThroughputSettingsProperty
-> ReadProvisionedThroughputSettingsProperty -> Bool
(ReadProvisionedThroughputSettingsProperty
 -> ReadProvisionedThroughputSettingsProperty -> Bool)
-> (ReadProvisionedThroughputSettingsProperty
    -> ReadProvisionedThroughputSettingsProperty -> Bool)
-> Eq ReadProvisionedThroughputSettingsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReadProvisionedThroughputSettingsProperty
-> ReadProvisionedThroughputSettingsProperty -> Bool
== :: ReadProvisionedThroughputSettingsProperty
-> ReadProvisionedThroughputSettingsProperty -> Bool
$c/= :: ReadProvisionedThroughputSettingsProperty
-> ReadProvisionedThroughputSettingsProperty -> Bool
/= :: ReadProvisionedThroughputSettingsProperty
-> ReadProvisionedThroughputSettingsProperty -> Bool
Prelude.Eq, Int -> ReadProvisionedThroughputSettingsProperty -> ShowS
[ReadProvisionedThroughputSettingsProperty] -> ShowS
ReadProvisionedThroughputSettingsProperty -> String
(Int -> ReadProvisionedThroughputSettingsProperty -> ShowS)
-> (ReadProvisionedThroughputSettingsProperty -> String)
-> ([ReadProvisionedThroughputSettingsProperty] -> ShowS)
-> Show ReadProvisionedThroughputSettingsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReadProvisionedThroughputSettingsProperty -> ShowS
showsPrec :: Int -> ReadProvisionedThroughputSettingsProperty -> ShowS
$cshow :: ReadProvisionedThroughputSettingsProperty -> String
show :: ReadProvisionedThroughputSettingsProperty -> String
$cshowList :: [ReadProvisionedThroughputSettingsProperty] -> ShowS
showList :: [ReadProvisionedThroughputSettingsProperty] -> ShowS
Prelude.Show)
mkReadProvisionedThroughputSettingsProperty ::
  ReadProvisionedThroughputSettingsProperty
mkReadProvisionedThroughputSettingsProperty :: ReadProvisionedThroughputSettingsProperty
mkReadProvisionedThroughputSettingsProperty
  = ReadProvisionedThroughputSettingsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       readCapacityAutoScalingSettings :: Maybe CapacityAutoScalingSettingsProperty
readCapacityAutoScalingSettings = Maybe CapacityAutoScalingSettingsProperty
forall a. Maybe a
Prelude.Nothing,
       readCapacityUnits :: Maybe (Value Integer)
readCapacityUnits = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ReadProvisionedThroughputSettingsProperty where
  toResourceProperties :: ReadProvisionedThroughputSettingsProperty -> ResourceProperties
toResourceProperties ReadProvisionedThroughputSettingsProperty {Maybe (Value Integer)
Maybe CapacityAutoScalingSettingsProperty
()
haddock_workaround_ :: ReadProvisionedThroughputSettingsProperty -> ()
readCapacityAutoScalingSettings :: ReadProvisionedThroughputSettingsProperty
-> Maybe CapacityAutoScalingSettingsProperty
readCapacityUnits :: ReadProvisionedThroughputSettingsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
readCapacityAutoScalingSettings :: Maybe CapacityAutoScalingSettingsProperty
readCapacityUnits :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DynamoDB::GlobalTable.ReadProvisionedThroughputSettings",
         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 -> CapacityAutoScalingSettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReadCapacityAutoScalingSettings"
                              (CapacityAutoScalingSettingsProperty -> (Key, Value))
-> Maybe CapacityAutoScalingSettingsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacityAutoScalingSettingsProperty
readCapacityAutoScalingSettings,
                            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
"ReadCapacityUnits" (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)
readCapacityUnits])}
instance JSON.ToJSON ReadProvisionedThroughputSettingsProperty where
  toJSON :: ReadProvisionedThroughputSettingsProperty -> Value
toJSON ReadProvisionedThroughputSettingsProperty {Maybe (Value Integer)
Maybe CapacityAutoScalingSettingsProperty
()
haddock_workaround_ :: ReadProvisionedThroughputSettingsProperty -> ()
readCapacityAutoScalingSettings :: ReadProvisionedThroughputSettingsProperty
-> Maybe CapacityAutoScalingSettingsProperty
readCapacityUnits :: ReadProvisionedThroughputSettingsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
readCapacityAutoScalingSettings :: Maybe CapacityAutoScalingSettingsProperty
readCapacityUnits :: 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 -> CapacityAutoScalingSettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReadCapacityAutoScalingSettings"
                 (CapacityAutoScalingSettingsProperty -> (Key, Value))
-> Maybe CapacityAutoScalingSettingsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacityAutoScalingSettingsProperty
readCapacityAutoScalingSettings,
               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
"ReadCapacityUnits" (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)
readCapacityUnits]))
instance Property "ReadCapacityAutoScalingSettings" ReadProvisionedThroughputSettingsProperty where
  type PropertyType "ReadCapacityAutoScalingSettings" ReadProvisionedThroughputSettingsProperty = CapacityAutoScalingSettingsProperty
  set :: PropertyType
  "ReadCapacityAutoScalingSettings"
  ReadProvisionedThroughputSettingsProperty
-> ReadProvisionedThroughputSettingsProperty
-> ReadProvisionedThroughputSettingsProperty
set PropertyType
  "ReadCapacityAutoScalingSettings"
  ReadProvisionedThroughputSettingsProperty
newValue ReadProvisionedThroughputSettingsProperty {Maybe (Value Integer)
Maybe CapacityAutoScalingSettingsProperty
()
haddock_workaround_ :: ReadProvisionedThroughputSettingsProperty -> ()
readCapacityAutoScalingSettings :: ReadProvisionedThroughputSettingsProperty
-> Maybe CapacityAutoScalingSettingsProperty
readCapacityUnits :: ReadProvisionedThroughputSettingsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
readCapacityAutoScalingSettings :: Maybe CapacityAutoScalingSettingsProperty
readCapacityUnits :: Maybe (Value Integer)
..}
    = ReadProvisionedThroughputSettingsProperty
        {readCapacityAutoScalingSettings :: Maybe CapacityAutoScalingSettingsProperty
readCapacityAutoScalingSettings = CapacityAutoScalingSettingsProperty
-> Maybe CapacityAutoScalingSettingsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ReadCapacityAutoScalingSettings"
  ReadProvisionedThroughputSettingsProperty
CapacityAutoScalingSettingsProperty
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
readCapacityUnits :: Maybe (Value Integer)
haddock_workaround_ :: ()
readCapacityUnits :: Maybe (Value Integer)
..}
instance Property "ReadCapacityUnits" ReadProvisionedThroughputSettingsProperty where
  type PropertyType "ReadCapacityUnits" ReadProvisionedThroughputSettingsProperty = Value Prelude.Integer
  set :: PropertyType
  "ReadCapacityUnits" ReadProvisionedThroughputSettingsProperty
-> ReadProvisionedThroughputSettingsProperty
-> ReadProvisionedThroughputSettingsProperty
set PropertyType
  "ReadCapacityUnits" ReadProvisionedThroughputSettingsProperty
newValue ReadProvisionedThroughputSettingsProperty {Maybe (Value Integer)
Maybe CapacityAutoScalingSettingsProperty
()
haddock_workaround_ :: ReadProvisionedThroughputSettingsProperty -> ()
readCapacityAutoScalingSettings :: ReadProvisionedThroughputSettingsProperty
-> Maybe CapacityAutoScalingSettingsProperty
readCapacityUnits :: ReadProvisionedThroughputSettingsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
readCapacityAutoScalingSettings :: Maybe CapacityAutoScalingSettingsProperty
readCapacityUnits :: Maybe (Value Integer)
..}
    = ReadProvisionedThroughputSettingsProperty
        {readCapacityUnits :: Maybe (Value Integer)
readCapacityUnits = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ReadCapacityUnits" ReadProvisionedThroughputSettingsProperty
Value Integer
newValue, Maybe CapacityAutoScalingSettingsProperty
()
haddock_workaround_ :: ()
readCapacityAutoScalingSettings :: Maybe CapacityAutoScalingSettingsProperty
haddock_workaround_ :: ()
readCapacityAutoScalingSettings :: Maybe CapacityAutoScalingSettingsProperty
..}