module Stratosphere.Cassandra.Table.ReplicaSpecificationProperty (
module Exports, ReplicaSpecificationProperty(..),
mkReplicaSpecificationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Cassandra.Table.AutoScalingSettingProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ReplicaSpecificationProperty
=
ReplicaSpecificationProperty {ReplicaSpecificationProperty -> ()
haddock_workaround_ :: (),
ReplicaSpecificationProperty -> Maybe AutoScalingSettingProperty
readCapacityAutoScaling :: (Prelude.Maybe AutoScalingSettingProperty),
ReplicaSpecificationProperty -> Maybe (Value Integer)
readCapacityUnits :: (Prelude.Maybe (Value Prelude.Integer)),
ReplicaSpecificationProperty -> Value Text
region :: (Value Prelude.Text)}
deriving stock (ReplicaSpecificationProperty
-> ReplicaSpecificationProperty -> Bool
(ReplicaSpecificationProperty
-> ReplicaSpecificationProperty -> Bool)
-> (ReplicaSpecificationProperty
-> ReplicaSpecificationProperty -> Bool)
-> Eq ReplicaSpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReplicaSpecificationProperty
-> ReplicaSpecificationProperty -> Bool
== :: ReplicaSpecificationProperty
-> ReplicaSpecificationProperty -> Bool
$c/= :: ReplicaSpecificationProperty
-> ReplicaSpecificationProperty -> Bool
/= :: ReplicaSpecificationProperty
-> ReplicaSpecificationProperty -> Bool
Prelude.Eq, Int -> ReplicaSpecificationProperty -> ShowS
[ReplicaSpecificationProperty] -> ShowS
ReplicaSpecificationProperty -> String
(Int -> ReplicaSpecificationProperty -> ShowS)
-> (ReplicaSpecificationProperty -> String)
-> ([ReplicaSpecificationProperty] -> ShowS)
-> Show ReplicaSpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReplicaSpecificationProperty -> ShowS
showsPrec :: Int -> ReplicaSpecificationProperty -> ShowS
$cshow :: ReplicaSpecificationProperty -> String
show :: ReplicaSpecificationProperty -> String
$cshowList :: [ReplicaSpecificationProperty] -> ShowS
showList :: [ReplicaSpecificationProperty] -> ShowS
Prelude.Show)
mkReplicaSpecificationProperty ::
Value Prelude.Text -> ReplicaSpecificationProperty
mkReplicaSpecificationProperty :: Value Text -> ReplicaSpecificationProperty
mkReplicaSpecificationProperty Value Text
region
= ReplicaSpecificationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), region :: Value Text
region = Value Text
region,
readCapacityAutoScaling :: Maybe AutoScalingSettingProperty
readCapacityAutoScaling = Maybe AutoScalingSettingProperty
forall a. Maybe a
Prelude.Nothing,
readCapacityUnits :: Maybe (Value Integer)
readCapacityUnits = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ReplicaSpecificationProperty where
toResourceProperties :: ReplicaSpecificationProperty -> ResourceProperties
toResourceProperties ReplicaSpecificationProperty {Maybe (Value Integer)
Maybe AutoScalingSettingProperty
()
Value Text
haddock_workaround_ :: ReplicaSpecificationProperty -> ()
readCapacityAutoScaling :: ReplicaSpecificationProperty -> Maybe AutoScalingSettingProperty
readCapacityUnits :: ReplicaSpecificationProperty -> Maybe (Value Integer)
region :: ReplicaSpecificationProperty -> Value Text
haddock_workaround_ :: ()
readCapacityAutoScaling :: Maybe AutoScalingSettingProperty
readCapacityUnits :: Maybe (Value Integer)
region :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Cassandra::Table.ReplicaSpecification",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Region" 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..= Value Text
region]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> AutoScalingSettingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReadCapacityAutoScaling"
(AutoScalingSettingProperty -> (Key, Value))
-> Maybe AutoScalingSettingProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoScalingSettingProperty
readCapacityAutoScaling,
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 ReplicaSpecificationProperty where
toJSON :: ReplicaSpecificationProperty -> Value
toJSON ReplicaSpecificationProperty {Maybe (Value Integer)
Maybe AutoScalingSettingProperty
()
Value Text
haddock_workaround_ :: ReplicaSpecificationProperty -> ()
readCapacityAutoScaling :: ReplicaSpecificationProperty -> Maybe AutoScalingSettingProperty
readCapacityUnits :: ReplicaSpecificationProperty -> Maybe (Value Integer)
region :: ReplicaSpecificationProperty -> Value Text
haddock_workaround_ :: ()
readCapacityAutoScaling :: Maybe AutoScalingSettingProperty
readCapacityUnits :: Maybe (Value Integer)
region :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Region" 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..= Value Text
region]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> AutoScalingSettingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReadCapacityAutoScaling"
(AutoScalingSettingProperty -> (Key, Value))
-> Maybe AutoScalingSettingProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoScalingSettingProperty
readCapacityAutoScaling,
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 "ReadCapacityAutoScaling" ReplicaSpecificationProperty where
type PropertyType "ReadCapacityAutoScaling" ReplicaSpecificationProperty = AutoScalingSettingProperty
set :: PropertyType "ReadCapacityAutoScaling" ReplicaSpecificationProperty
-> ReplicaSpecificationProperty -> ReplicaSpecificationProperty
set PropertyType "ReadCapacityAutoScaling" ReplicaSpecificationProperty
newValue ReplicaSpecificationProperty {Maybe (Value Integer)
Maybe AutoScalingSettingProperty
()
Value Text
haddock_workaround_ :: ReplicaSpecificationProperty -> ()
readCapacityAutoScaling :: ReplicaSpecificationProperty -> Maybe AutoScalingSettingProperty
readCapacityUnits :: ReplicaSpecificationProperty -> Maybe (Value Integer)
region :: ReplicaSpecificationProperty -> Value Text
haddock_workaround_ :: ()
readCapacityAutoScaling :: Maybe AutoScalingSettingProperty
readCapacityUnits :: Maybe (Value Integer)
region :: Value Text
..}
= ReplicaSpecificationProperty
{readCapacityAutoScaling :: Maybe AutoScalingSettingProperty
readCapacityAutoScaling = AutoScalingSettingProperty -> Maybe AutoScalingSettingProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ReadCapacityAutoScaling" ReplicaSpecificationProperty
AutoScalingSettingProperty
newValue, Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
readCapacityUnits :: Maybe (Value Integer)
region :: Value Text
haddock_workaround_ :: ()
readCapacityUnits :: Maybe (Value Integer)
region :: Value Text
..}
instance Property "ReadCapacityUnits" ReplicaSpecificationProperty where
type PropertyType "ReadCapacityUnits" ReplicaSpecificationProperty = Value Prelude.Integer
set :: PropertyType "ReadCapacityUnits" ReplicaSpecificationProperty
-> ReplicaSpecificationProperty -> ReplicaSpecificationProperty
set PropertyType "ReadCapacityUnits" ReplicaSpecificationProperty
newValue ReplicaSpecificationProperty {Maybe (Value Integer)
Maybe AutoScalingSettingProperty
()
Value Text
haddock_workaround_ :: ReplicaSpecificationProperty -> ()
readCapacityAutoScaling :: ReplicaSpecificationProperty -> Maybe AutoScalingSettingProperty
readCapacityUnits :: ReplicaSpecificationProperty -> Maybe (Value Integer)
region :: ReplicaSpecificationProperty -> Value Text
haddock_workaround_ :: ()
readCapacityAutoScaling :: Maybe AutoScalingSettingProperty
readCapacityUnits :: Maybe (Value Integer)
region :: Value Text
..}
= ReplicaSpecificationProperty
{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" ReplicaSpecificationProperty
Value Integer
newValue, Maybe AutoScalingSettingProperty
()
Value Text
haddock_workaround_ :: ()
readCapacityAutoScaling :: Maybe AutoScalingSettingProperty
region :: Value Text
haddock_workaround_ :: ()
readCapacityAutoScaling :: Maybe AutoScalingSettingProperty
region :: Value Text
..}
instance Property "Region" ReplicaSpecificationProperty where
type PropertyType "Region" ReplicaSpecificationProperty = Value Prelude.Text
set :: PropertyType "Region" ReplicaSpecificationProperty
-> ReplicaSpecificationProperty -> ReplicaSpecificationProperty
set PropertyType "Region" ReplicaSpecificationProperty
newValue ReplicaSpecificationProperty {Maybe (Value Integer)
Maybe AutoScalingSettingProperty
()
Value Text
haddock_workaround_ :: ReplicaSpecificationProperty -> ()
readCapacityAutoScaling :: ReplicaSpecificationProperty -> Maybe AutoScalingSettingProperty
readCapacityUnits :: ReplicaSpecificationProperty -> Maybe (Value Integer)
region :: ReplicaSpecificationProperty -> Value Text
haddock_workaround_ :: ()
readCapacityAutoScaling :: Maybe AutoScalingSettingProperty
readCapacityUnits :: Maybe (Value Integer)
region :: Value Text
..}
= ReplicaSpecificationProperty {region :: Value Text
region = PropertyType "Region" ReplicaSpecificationProperty
Value Text
newValue, Maybe (Value Integer)
Maybe AutoScalingSettingProperty
()
haddock_workaround_ :: ()
readCapacityAutoScaling :: Maybe AutoScalingSettingProperty
readCapacityUnits :: Maybe (Value Integer)
haddock_workaround_ :: ()
readCapacityAutoScaling :: Maybe AutoScalingSettingProperty
readCapacityUnits :: Maybe (Value Integer)
..}