module Stratosphere.Cassandra.Table.ClusteringKeyColumnProperty (
        module Exports, ClusteringKeyColumnProperty(..),
        mkClusteringKeyColumnProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Cassandra.Table.ColumnProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ClusteringKeyColumnProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-clusteringkeycolumn.html>
    ClusteringKeyColumnProperty {ClusteringKeyColumnProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-clusteringkeycolumn.html#cfn-cassandra-table-clusteringkeycolumn-column>
                                 ClusteringKeyColumnProperty -> ColumnProperty
column :: ColumnProperty,
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-clusteringkeycolumn.html#cfn-cassandra-table-clusteringkeycolumn-orderby>
                                 ClusteringKeyColumnProperty -> Maybe (Value Text)
orderBy :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ClusteringKeyColumnProperty -> ClusteringKeyColumnProperty -> Bool
(ClusteringKeyColumnProperty
 -> ClusteringKeyColumnProperty -> Bool)
-> (ClusteringKeyColumnProperty
    -> ClusteringKeyColumnProperty -> Bool)
-> Eq ClusteringKeyColumnProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ClusteringKeyColumnProperty -> ClusteringKeyColumnProperty -> Bool
== :: ClusteringKeyColumnProperty -> ClusteringKeyColumnProperty -> Bool
$c/= :: ClusteringKeyColumnProperty -> ClusteringKeyColumnProperty -> Bool
/= :: ClusteringKeyColumnProperty -> ClusteringKeyColumnProperty -> Bool
Prelude.Eq, Int -> ClusteringKeyColumnProperty -> ShowS
[ClusteringKeyColumnProperty] -> ShowS
ClusteringKeyColumnProperty -> String
(Int -> ClusteringKeyColumnProperty -> ShowS)
-> (ClusteringKeyColumnProperty -> String)
-> ([ClusteringKeyColumnProperty] -> ShowS)
-> Show ClusteringKeyColumnProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ClusteringKeyColumnProperty -> ShowS
showsPrec :: Int -> ClusteringKeyColumnProperty -> ShowS
$cshow :: ClusteringKeyColumnProperty -> String
show :: ClusteringKeyColumnProperty -> String
$cshowList :: [ClusteringKeyColumnProperty] -> ShowS
showList :: [ClusteringKeyColumnProperty] -> ShowS
Prelude.Show)
mkClusteringKeyColumnProperty ::
  ColumnProperty -> ClusteringKeyColumnProperty
mkClusteringKeyColumnProperty :: ColumnProperty -> ClusteringKeyColumnProperty
mkClusteringKeyColumnProperty ColumnProperty
column
  = ClusteringKeyColumnProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), column :: ColumnProperty
column = ColumnProperty
column,
       orderBy :: Maybe (Value Text)
orderBy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ClusteringKeyColumnProperty where
  toResourceProperties :: ClusteringKeyColumnProperty -> ResourceProperties
toResourceProperties ClusteringKeyColumnProperty {Maybe (Value Text)
()
ColumnProperty
haddock_workaround_ :: ClusteringKeyColumnProperty -> ()
column :: ClusteringKeyColumnProperty -> ColumnProperty
orderBy :: ClusteringKeyColumnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
column :: ColumnProperty
orderBy :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Cassandra::Table.ClusteringKeyColumn",
         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
"Column" Key -> ColumnProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ColumnProperty
column]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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
"OrderBy" (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)
orderBy]))}
instance JSON.ToJSON ClusteringKeyColumnProperty where
  toJSON :: ClusteringKeyColumnProperty -> Value
toJSON ClusteringKeyColumnProperty {Maybe (Value Text)
()
ColumnProperty
haddock_workaround_ :: ClusteringKeyColumnProperty -> ()
column :: ClusteringKeyColumnProperty -> ColumnProperty
orderBy :: ClusteringKeyColumnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
column :: ColumnProperty
orderBy :: Maybe (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
"Column" Key -> ColumnProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ColumnProperty
column]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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
"OrderBy" (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)
orderBy])))
instance Property "Column" ClusteringKeyColumnProperty where
  type PropertyType "Column" ClusteringKeyColumnProperty = ColumnProperty
  set :: PropertyType "Column" ClusteringKeyColumnProperty
-> ClusteringKeyColumnProperty -> ClusteringKeyColumnProperty
set PropertyType "Column" ClusteringKeyColumnProperty
newValue ClusteringKeyColumnProperty {Maybe (Value Text)
()
ColumnProperty
haddock_workaround_ :: ClusteringKeyColumnProperty -> ()
column :: ClusteringKeyColumnProperty -> ColumnProperty
orderBy :: ClusteringKeyColumnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
column :: ColumnProperty
orderBy :: Maybe (Value Text)
..}
    = ClusteringKeyColumnProperty {column :: ColumnProperty
column = PropertyType "Column" ClusteringKeyColumnProperty
ColumnProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
orderBy :: Maybe (Value Text)
haddock_workaround_ :: ()
orderBy :: Maybe (Value Text)
..}
instance Property "OrderBy" ClusteringKeyColumnProperty where
  type PropertyType "OrderBy" ClusteringKeyColumnProperty = Value Prelude.Text
  set :: PropertyType "OrderBy" ClusteringKeyColumnProperty
-> ClusteringKeyColumnProperty -> ClusteringKeyColumnProperty
set PropertyType "OrderBy" ClusteringKeyColumnProperty
newValue ClusteringKeyColumnProperty {Maybe (Value Text)
()
ColumnProperty
haddock_workaround_ :: ClusteringKeyColumnProperty -> ()
column :: ClusteringKeyColumnProperty -> ColumnProperty
orderBy :: ClusteringKeyColumnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
column :: ColumnProperty
orderBy :: Maybe (Value Text)
..}
    = ClusteringKeyColumnProperty {orderBy :: Maybe (Value Text)
orderBy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "OrderBy" ClusteringKeyColumnProperty
Value Text
newValue, ()
ColumnProperty
haddock_workaround_ :: ()
column :: ColumnProperty
haddock_workaround_ :: ()
column :: ColumnProperty
..}