module Stratosphere.DynamoDB.Table.LocalSecondaryIndexProperty (
module Exports, LocalSecondaryIndexProperty(..),
mkLocalSecondaryIndexProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.DynamoDB.Table.KeySchemaProperty as Exports
import {-# SOURCE #-} Stratosphere.DynamoDB.Table.ProjectionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LocalSecondaryIndexProperty
=
LocalSecondaryIndexProperty {LocalSecondaryIndexProperty -> ()
haddock_workaround_ :: (),
LocalSecondaryIndexProperty -> Value Text
indexName :: (Value Prelude.Text),
LocalSecondaryIndexProperty -> [KeySchemaProperty]
keySchema :: [KeySchemaProperty],
LocalSecondaryIndexProperty -> ProjectionProperty
projection :: ProjectionProperty}
deriving stock (LocalSecondaryIndexProperty -> LocalSecondaryIndexProperty -> Bool
(LocalSecondaryIndexProperty
-> LocalSecondaryIndexProperty -> Bool)
-> (LocalSecondaryIndexProperty
-> LocalSecondaryIndexProperty -> Bool)
-> Eq LocalSecondaryIndexProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LocalSecondaryIndexProperty -> LocalSecondaryIndexProperty -> Bool
== :: LocalSecondaryIndexProperty -> LocalSecondaryIndexProperty -> Bool
$c/= :: LocalSecondaryIndexProperty -> LocalSecondaryIndexProperty -> Bool
/= :: LocalSecondaryIndexProperty -> LocalSecondaryIndexProperty -> Bool
Prelude.Eq, Int -> LocalSecondaryIndexProperty -> ShowS
[LocalSecondaryIndexProperty] -> ShowS
LocalSecondaryIndexProperty -> String
(Int -> LocalSecondaryIndexProperty -> ShowS)
-> (LocalSecondaryIndexProperty -> String)
-> ([LocalSecondaryIndexProperty] -> ShowS)
-> Show LocalSecondaryIndexProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LocalSecondaryIndexProperty -> ShowS
showsPrec :: Int -> LocalSecondaryIndexProperty -> ShowS
$cshow :: LocalSecondaryIndexProperty -> String
show :: LocalSecondaryIndexProperty -> String
$cshowList :: [LocalSecondaryIndexProperty] -> ShowS
showList :: [LocalSecondaryIndexProperty] -> ShowS
Prelude.Show)
mkLocalSecondaryIndexProperty ::
Value Prelude.Text
-> [KeySchemaProperty]
-> ProjectionProperty -> LocalSecondaryIndexProperty
mkLocalSecondaryIndexProperty :: Value Text
-> [KeySchemaProperty]
-> ProjectionProperty
-> LocalSecondaryIndexProperty
mkLocalSecondaryIndexProperty Value Text
indexName [KeySchemaProperty]
keySchema ProjectionProperty
projection
= LocalSecondaryIndexProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), indexName :: Value Text
indexName = Value Text
indexName,
keySchema :: [KeySchemaProperty]
keySchema = [KeySchemaProperty]
keySchema, projection :: ProjectionProperty
projection = ProjectionProperty
projection}
instance ToResourceProperties LocalSecondaryIndexProperty where
toResourceProperties :: LocalSecondaryIndexProperty -> ResourceProperties
toResourceProperties LocalSecondaryIndexProperty {[KeySchemaProperty]
()
Value Text
ProjectionProperty
haddock_workaround_ :: LocalSecondaryIndexProperty -> ()
indexName :: LocalSecondaryIndexProperty -> Value Text
keySchema :: LocalSecondaryIndexProperty -> [KeySchemaProperty]
projection :: LocalSecondaryIndexProperty -> ProjectionProperty
haddock_workaround_ :: ()
indexName :: Value Text
keySchema :: [KeySchemaProperty]
projection :: ProjectionProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::DynamoDB::Table.LocalSecondaryIndex",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Key
"IndexName" 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
indexName,
Key
"KeySchema" Key -> [KeySchemaProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [KeySchemaProperty]
keySchema, Key
"Projection" Key -> ProjectionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ProjectionProperty
projection]}
instance JSON.ToJSON LocalSecondaryIndexProperty where
toJSON :: LocalSecondaryIndexProperty -> Value
toJSON LocalSecondaryIndexProperty {[KeySchemaProperty]
()
Value Text
ProjectionProperty
haddock_workaround_ :: LocalSecondaryIndexProperty -> ()
indexName :: LocalSecondaryIndexProperty -> Value Text
keySchema :: LocalSecondaryIndexProperty -> [KeySchemaProperty]
projection :: LocalSecondaryIndexProperty -> ProjectionProperty
haddock_workaround_ :: ()
indexName :: Value Text
keySchema :: [KeySchemaProperty]
projection :: ProjectionProperty
..}
= [(Key, Value)] -> Value
JSON.object
[Key
"IndexName" 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
indexName, Key
"KeySchema" Key -> [KeySchemaProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [KeySchemaProperty]
keySchema,
Key
"Projection" Key -> ProjectionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ProjectionProperty
projection]
instance Property "IndexName" LocalSecondaryIndexProperty where
type PropertyType "IndexName" LocalSecondaryIndexProperty = Value Prelude.Text
set :: PropertyType "IndexName" LocalSecondaryIndexProperty
-> LocalSecondaryIndexProperty -> LocalSecondaryIndexProperty
set PropertyType "IndexName" LocalSecondaryIndexProperty
newValue LocalSecondaryIndexProperty {[KeySchemaProperty]
()
Value Text
ProjectionProperty
haddock_workaround_ :: LocalSecondaryIndexProperty -> ()
indexName :: LocalSecondaryIndexProperty -> Value Text
keySchema :: LocalSecondaryIndexProperty -> [KeySchemaProperty]
projection :: LocalSecondaryIndexProperty -> ProjectionProperty
haddock_workaround_ :: ()
indexName :: Value Text
keySchema :: [KeySchemaProperty]
projection :: ProjectionProperty
..}
= LocalSecondaryIndexProperty {indexName :: Value Text
indexName = PropertyType "IndexName" LocalSecondaryIndexProperty
Value Text
newValue, [KeySchemaProperty]
()
ProjectionProperty
haddock_workaround_ :: ()
keySchema :: [KeySchemaProperty]
projection :: ProjectionProperty
haddock_workaround_ :: ()
keySchema :: [KeySchemaProperty]
projection :: ProjectionProperty
..}
instance Property "KeySchema" LocalSecondaryIndexProperty where
type PropertyType "KeySchema" LocalSecondaryIndexProperty = [KeySchemaProperty]
set :: PropertyType "KeySchema" LocalSecondaryIndexProperty
-> LocalSecondaryIndexProperty -> LocalSecondaryIndexProperty
set PropertyType "KeySchema" LocalSecondaryIndexProperty
newValue LocalSecondaryIndexProperty {[KeySchemaProperty]
()
Value Text
ProjectionProperty
haddock_workaround_ :: LocalSecondaryIndexProperty -> ()
indexName :: LocalSecondaryIndexProperty -> Value Text
keySchema :: LocalSecondaryIndexProperty -> [KeySchemaProperty]
projection :: LocalSecondaryIndexProperty -> ProjectionProperty
haddock_workaround_ :: ()
indexName :: Value Text
keySchema :: [KeySchemaProperty]
projection :: ProjectionProperty
..}
= LocalSecondaryIndexProperty {keySchema :: [KeySchemaProperty]
keySchema = [KeySchemaProperty]
PropertyType "KeySchema" LocalSecondaryIndexProperty
newValue, ()
Value Text
ProjectionProperty
haddock_workaround_ :: ()
indexName :: Value Text
projection :: ProjectionProperty
haddock_workaround_ :: ()
indexName :: Value Text
projection :: ProjectionProperty
..}
instance Property "Projection" LocalSecondaryIndexProperty where
type PropertyType "Projection" LocalSecondaryIndexProperty = ProjectionProperty
set :: PropertyType "Projection" LocalSecondaryIndexProperty
-> LocalSecondaryIndexProperty -> LocalSecondaryIndexProperty
set PropertyType "Projection" LocalSecondaryIndexProperty
newValue LocalSecondaryIndexProperty {[KeySchemaProperty]
()
Value Text
ProjectionProperty
haddock_workaround_ :: LocalSecondaryIndexProperty -> ()
indexName :: LocalSecondaryIndexProperty -> Value Text
keySchema :: LocalSecondaryIndexProperty -> [KeySchemaProperty]
projection :: LocalSecondaryIndexProperty -> ProjectionProperty
haddock_workaround_ :: ()
indexName :: Value Text
keySchema :: [KeySchemaProperty]
projection :: ProjectionProperty
..}
= LocalSecondaryIndexProperty {projection :: ProjectionProperty
projection = PropertyType "Projection" LocalSecondaryIndexProperty
ProjectionProperty
newValue, [KeySchemaProperty]
()
Value Text
haddock_workaround_ :: ()
indexName :: Value Text
keySchema :: [KeySchemaProperty]
haddock_workaround_ :: ()
indexName :: Value Text
keySchema :: [KeySchemaProperty]
..}