module Stratosphere.Cassandra.Keyspace.ReplicationSpecificationProperty (
        ReplicationSpecificationProperty(..),
        mkReplicationSpecificationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ReplicationSpecificationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-keyspace-replicationspecification.html>
    ReplicationSpecificationProperty {ReplicationSpecificationProperty -> ()
haddock_workaround_ :: (),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-keyspace-replicationspecification.html#cfn-cassandra-keyspace-replicationspecification-regionlist>
                                      ReplicationSpecificationProperty -> Maybe (ValueList Text)
regionList :: (Prelude.Maybe (ValueList Prelude.Text)),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-keyspace-replicationspecification.html#cfn-cassandra-keyspace-replicationspecification-replicationstrategy>
                                      ReplicationSpecificationProperty -> Maybe (Value Text)
replicationStrategy :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ReplicationSpecificationProperty
-> ReplicationSpecificationProperty -> Bool
(ReplicationSpecificationProperty
 -> ReplicationSpecificationProperty -> Bool)
-> (ReplicationSpecificationProperty
    -> ReplicationSpecificationProperty -> Bool)
-> Eq ReplicationSpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReplicationSpecificationProperty
-> ReplicationSpecificationProperty -> Bool
== :: ReplicationSpecificationProperty
-> ReplicationSpecificationProperty -> Bool
$c/= :: ReplicationSpecificationProperty
-> ReplicationSpecificationProperty -> Bool
/= :: ReplicationSpecificationProperty
-> ReplicationSpecificationProperty -> Bool
Prelude.Eq, Int -> ReplicationSpecificationProperty -> ShowS
[ReplicationSpecificationProperty] -> ShowS
ReplicationSpecificationProperty -> String
(Int -> ReplicationSpecificationProperty -> ShowS)
-> (ReplicationSpecificationProperty -> String)
-> ([ReplicationSpecificationProperty] -> ShowS)
-> Show ReplicationSpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReplicationSpecificationProperty -> ShowS
showsPrec :: Int -> ReplicationSpecificationProperty -> ShowS
$cshow :: ReplicationSpecificationProperty -> String
show :: ReplicationSpecificationProperty -> String
$cshowList :: [ReplicationSpecificationProperty] -> ShowS
showList :: [ReplicationSpecificationProperty] -> ShowS
Prelude.Show)
mkReplicationSpecificationProperty ::
  ReplicationSpecificationProperty
mkReplicationSpecificationProperty :: ReplicationSpecificationProperty
mkReplicationSpecificationProperty
  = ReplicationSpecificationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), regionList :: Maybe (ValueList Text)
regionList = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       replicationStrategy :: Maybe (Value Text)
replicationStrategy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ReplicationSpecificationProperty where
  toResourceProperties :: ReplicationSpecificationProperty -> ResourceProperties
toResourceProperties ReplicationSpecificationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ReplicationSpecificationProperty -> ()
regionList :: ReplicationSpecificationProperty -> Maybe (ValueList Text)
replicationStrategy :: ReplicationSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
regionList :: Maybe (ValueList Text)
replicationStrategy :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Cassandra::Keyspace.ReplicationSpecification",
         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 -> ValueList 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
"RegionList" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
regionList,
                            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
"ReplicationStrategy" (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)
replicationStrategy])}
instance JSON.ToJSON ReplicationSpecificationProperty where
  toJSON :: ReplicationSpecificationProperty -> Value
toJSON ReplicationSpecificationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ReplicationSpecificationProperty -> ()
regionList :: ReplicationSpecificationProperty -> Maybe (ValueList Text)
replicationStrategy :: ReplicationSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
regionList :: Maybe (ValueList Text)
replicationStrategy :: Maybe (Value Text)
..}
    = [(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 -> ValueList 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
"RegionList" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
regionList,
               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
"ReplicationStrategy" (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)
replicationStrategy]))
instance Property "RegionList" ReplicationSpecificationProperty where
  type PropertyType "RegionList" ReplicationSpecificationProperty = ValueList Prelude.Text
  set :: PropertyType "RegionList" ReplicationSpecificationProperty
-> ReplicationSpecificationProperty
-> ReplicationSpecificationProperty
set PropertyType "RegionList" ReplicationSpecificationProperty
newValue ReplicationSpecificationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ReplicationSpecificationProperty -> ()
regionList :: ReplicationSpecificationProperty -> Maybe (ValueList Text)
replicationStrategy :: ReplicationSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
regionList :: Maybe (ValueList Text)
replicationStrategy :: Maybe (Value Text)
..}
    = ReplicationSpecificationProperty
        {regionList :: Maybe (ValueList Text)
regionList = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RegionList" ReplicationSpecificationProperty
ValueList Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
replicationStrategy :: Maybe (Value Text)
haddock_workaround_ :: ()
replicationStrategy :: Maybe (Value Text)
..}
instance Property "ReplicationStrategy" ReplicationSpecificationProperty where
  type PropertyType "ReplicationStrategy" ReplicationSpecificationProperty = Value Prelude.Text
  set :: PropertyType "ReplicationStrategy" ReplicationSpecificationProperty
-> ReplicationSpecificationProperty
-> ReplicationSpecificationProperty
set PropertyType "ReplicationStrategy" ReplicationSpecificationProperty
newValue ReplicationSpecificationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ReplicationSpecificationProperty -> ()
regionList :: ReplicationSpecificationProperty -> Maybe (ValueList Text)
replicationStrategy :: ReplicationSpecificationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
regionList :: Maybe (ValueList Text)
replicationStrategy :: Maybe (Value Text)
..}
    = ReplicationSpecificationProperty
        {replicationStrategy :: Maybe (Value Text)
replicationStrategy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ReplicationStrategy" ReplicationSpecificationProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
regionList :: Maybe (ValueList Text)
haddock_workaround_ :: ()
regionList :: Maybe (ValueList Text)
..}