module Stratosphere.Cassandra.Keyspace (
module Exports, Keyspace(..), mkKeyspace
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Cassandra.Keyspace.ReplicationSpecificationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Keyspace
=
Keyspace {Keyspace -> ()
haddock_workaround_ :: (),
Keyspace -> Maybe (Value Bool)
clientSideTimestampsEnabled :: (Prelude.Maybe (Value Prelude.Bool)),
Keyspace -> Maybe (Value Text)
keyspaceName :: (Prelude.Maybe (Value Prelude.Text)),
Keyspace -> Maybe ReplicationSpecificationProperty
replicationSpecification :: (Prelude.Maybe ReplicationSpecificationProperty),
Keyspace -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (Keyspace -> Keyspace -> Bool
(Keyspace -> Keyspace -> Bool)
-> (Keyspace -> Keyspace -> Bool) -> Eq Keyspace
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Keyspace -> Keyspace -> Bool
== :: Keyspace -> Keyspace -> Bool
$c/= :: Keyspace -> Keyspace -> Bool
/= :: Keyspace -> Keyspace -> Bool
Prelude.Eq, Int -> Keyspace -> ShowS
[Keyspace] -> ShowS
Keyspace -> String
(Int -> Keyspace -> ShowS)
-> (Keyspace -> String) -> ([Keyspace] -> ShowS) -> Show Keyspace
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Keyspace -> ShowS
showsPrec :: Int -> Keyspace -> ShowS
$cshow :: Keyspace -> String
show :: Keyspace -> String
$cshowList :: [Keyspace] -> ShowS
showList :: [Keyspace] -> ShowS
Prelude.Show)
mkKeyspace :: Keyspace
mkKeyspace :: Keyspace
mkKeyspace
= Keyspace
{haddock_workaround_ :: ()
haddock_workaround_ = (),
clientSideTimestampsEnabled :: Maybe (Value Bool)
clientSideTimestampsEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
keyspaceName :: Maybe (Value Text)
keyspaceName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
replicationSpecification :: Maybe ReplicationSpecificationProperty
replicationSpecification = Maybe ReplicationSpecificationProperty
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Keyspace where
toResourceProperties :: Keyspace -> ResourceProperties
toResourceProperties Keyspace {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
Maybe ReplicationSpecificationProperty
()
haddock_workaround_ :: Keyspace -> ()
clientSideTimestampsEnabled :: Keyspace -> Maybe (Value Bool)
keyspaceName :: Keyspace -> Maybe (Value Text)
replicationSpecification :: Keyspace -> Maybe ReplicationSpecificationProperty
tags :: Keyspace -> Maybe [Tag]
haddock_workaround_ :: ()
clientSideTimestampsEnabled :: Maybe (Value Bool)
keyspaceName :: Maybe (Value Text)
replicationSpecification :: Maybe ReplicationSpecificationProperty
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Cassandra::Keyspace", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ClientSideTimestampsEnabled"
(Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
clientSideTimestampsEnabled,
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
"KeyspaceName" (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)
keyspaceName,
Key -> ReplicationSpecificationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReplicationSpecification"
(ReplicationSpecificationProperty -> (Key, Value))
-> Maybe ReplicationSpecificationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReplicationSpecificationProperty
replicationSpecification,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])}
instance JSON.ToJSON Keyspace where
toJSON :: Keyspace -> Value
toJSON Keyspace {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
Maybe ReplicationSpecificationProperty
()
haddock_workaround_ :: Keyspace -> ()
clientSideTimestampsEnabled :: Keyspace -> Maybe (Value Bool)
keyspaceName :: Keyspace -> Maybe (Value Text)
replicationSpecification :: Keyspace -> Maybe ReplicationSpecificationProperty
tags :: Keyspace -> Maybe [Tag]
haddock_workaround_ :: ()
clientSideTimestampsEnabled :: Maybe (Value Bool)
keyspaceName :: Maybe (Value Text)
replicationSpecification :: Maybe ReplicationSpecificationProperty
tags :: Maybe [Tag]
..}
= [(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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ClientSideTimestampsEnabled"
(Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
clientSideTimestampsEnabled,
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
"KeyspaceName" (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)
keyspaceName,
Key -> ReplicationSpecificationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ReplicationSpecification"
(ReplicationSpecificationProperty -> (Key, Value))
-> Maybe ReplicationSpecificationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReplicationSpecificationProperty
replicationSpecification,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))
instance Property "ClientSideTimestampsEnabled" Keyspace where
type PropertyType "ClientSideTimestampsEnabled" Keyspace = Value Prelude.Bool
set :: PropertyType "ClientSideTimestampsEnabled" Keyspace
-> Keyspace -> Keyspace
set PropertyType "ClientSideTimestampsEnabled" Keyspace
newValue Keyspace {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
Maybe ReplicationSpecificationProperty
()
haddock_workaround_ :: Keyspace -> ()
clientSideTimestampsEnabled :: Keyspace -> Maybe (Value Bool)
keyspaceName :: Keyspace -> Maybe (Value Text)
replicationSpecification :: Keyspace -> Maybe ReplicationSpecificationProperty
tags :: Keyspace -> Maybe [Tag]
haddock_workaround_ :: ()
clientSideTimestampsEnabled :: Maybe (Value Bool)
keyspaceName :: Maybe (Value Text)
replicationSpecification :: Maybe ReplicationSpecificationProperty
tags :: Maybe [Tag]
..}
= Keyspace
{clientSideTimestampsEnabled :: Maybe (Value Bool)
clientSideTimestampsEnabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ClientSideTimestampsEnabled" Keyspace
Value Bool
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe ReplicationSpecificationProperty
()
haddock_workaround_ :: ()
keyspaceName :: Maybe (Value Text)
replicationSpecification :: Maybe ReplicationSpecificationProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
keyspaceName :: Maybe (Value Text)
replicationSpecification :: Maybe ReplicationSpecificationProperty
tags :: Maybe [Tag]
..}
instance Property "KeyspaceName" Keyspace where
type PropertyType "KeyspaceName" Keyspace = Value Prelude.Text
set :: PropertyType "KeyspaceName" Keyspace -> Keyspace -> Keyspace
set PropertyType "KeyspaceName" Keyspace
newValue Keyspace {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
Maybe ReplicationSpecificationProperty
()
haddock_workaround_ :: Keyspace -> ()
clientSideTimestampsEnabled :: Keyspace -> Maybe (Value Bool)
keyspaceName :: Keyspace -> Maybe (Value Text)
replicationSpecification :: Keyspace -> Maybe ReplicationSpecificationProperty
tags :: Keyspace -> Maybe [Tag]
haddock_workaround_ :: ()
clientSideTimestampsEnabled :: Maybe (Value Bool)
keyspaceName :: Maybe (Value Text)
replicationSpecification :: Maybe ReplicationSpecificationProperty
tags :: Maybe [Tag]
..}
= Keyspace {keyspaceName :: Maybe (Value Text)
keyspaceName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KeyspaceName" Keyspace
Value Text
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe ReplicationSpecificationProperty
()
haddock_workaround_ :: ()
clientSideTimestampsEnabled :: Maybe (Value Bool)
replicationSpecification :: Maybe ReplicationSpecificationProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
clientSideTimestampsEnabled :: Maybe (Value Bool)
replicationSpecification :: Maybe ReplicationSpecificationProperty
tags :: Maybe [Tag]
..}
instance Property "ReplicationSpecification" Keyspace where
type PropertyType "ReplicationSpecification" Keyspace = ReplicationSpecificationProperty
set :: PropertyType "ReplicationSpecification" Keyspace
-> Keyspace -> Keyspace
set PropertyType "ReplicationSpecification" Keyspace
newValue Keyspace {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
Maybe ReplicationSpecificationProperty
()
haddock_workaround_ :: Keyspace -> ()
clientSideTimestampsEnabled :: Keyspace -> Maybe (Value Bool)
keyspaceName :: Keyspace -> Maybe (Value Text)
replicationSpecification :: Keyspace -> Maybe ReplicationSpecificationProperty
tags :: Keyspace -> Maybe [Tag]
haddock_workaround_ :: ()
clientSideTimestampsEnabled :: Maybe (Value Bool)
keyspaceName :: Maybe (Value Text)
replicationSpecification :: Maybe ReplicationSpecificationProperty
tags :: Maybe [Tag]
..}
= Keyspace {replicationSpecification :: Maybe ReplicationSpecificationProperty
replicationSpecification = ReplicationSpecificationProperty
-> Maybe ReplicationSpecificationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ReplicationSpecification" Keyspace
ReplicationSpecificationProperty
newValue, Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
clientSideTimestampsEnabled :: Maybe (Value Bool)
keyspaceName :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
clientSideTimestampsEnabled :: Maybe (Value Bool)
keyspaceName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" Keyspace where
type PropertyType "Tags" Keyspace = [Tag]
set :: PropertyType "Tags" Keyspace -> Keyspace -> Keyspace
set PropertyType "Tags" Keyspace
newValue Keyspace {Maybe [Tag]
Maybe (Value Bool)
Maybe (Value Text)
Maybe ReplicationSpecificationProperty
()
haddock_workaround_ :: Keyspace -> ()
clientSideTimestampsEnabled :: Keyspace -> Maybe (Value Bool)
keyspaceName :: Keyspace -> Maybe (Value Text)
replicationSpecification :: Keyspace -> Maybe ReplicationSpecificationProperty
tags :: Keyspace -> Maybe [Tag]
haddock_workaround_ :: ()
clientSideTimestampsEnabled :: Maybe (Value Bool)
keyspaceName :: Maybe (Value Text)
replicationSpecification :: Maybe ReplicationSpecificationProperty
tags :: Maybe [Tag]
..}
= Keyspace {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Keyspace
newValue, Maybe (Value Bool)
Maybe (Value Text)
Maybe ReplicationSpecificationProperty
()
haddock_workaround_ :: ()
clientSideTimestampsEnabled :: Maybe (Value Bool)
keyspaceName :: Maybe (Value Text)
replicationSpecification :: Maybe ReplicationSpecificationProperty
haddock_workaround_ :: ()
clientSideTimestampsEnabled :: Maybe (Value Bool)
keyspaceName :: Maybe (Value Text)
replicationSpecification :: Maybe ReplicationSpecificationProperty
..}