module Stratosphere.DynamoDB.Table.ProjectionProperty (
ProjectionProperty(..), mkProjectionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ProjectionProperty
=
ProjectionProperty {ProjectionProperty -> ()
haddock_workaround_ :: (),
ProjectionProperty -> Maybe (ValueList Text)
nonKeyAttributes :: (Prelude.Maybe (ValueList Prelude.Text)),
ProjectionProperty -> Maybe (Value Text)
projectionType :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (ProjectionProperty -> ProjectionProperty -> Bool
(ProjectionProperty -> ProjectionProperty -> Bool)
-> (ProjectionProperty -> ProjectionProperty -> Bool)
-> Eq ProjectionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ProjectionProperty -> ProjectionProperty -> Bool
== :: ProjectionProperty -> ProjectionProperty -> Bool
$c/= :: ProjectionProperty -> ProjectionProperty -> Bool
/= :: ProjectionProperty -> ProjectionProperty -> Bool
Prelude.Eq, Int -> ProjectionProperty -> ShowS
[ProjectionProperty] -> ShowS
ProjectionProperty -> String
(Int -> ProjectionProperty -> ShowS)
-> (ProjectionProperty -> String)
-> ([ProjectionProperty] -> ShowS)
-> Show ProjectionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ProjectionProperty -> ShowS
showsPrec :: Int -> ProjectionProperty -> ShowS
$cshow :: ProjectionProperty -> String
show :: ProjectionProperty -> String
$cshowList :: [ProjectionProperty] -> ShowS
showList :: [ProjectionProperty] -> ShowS
Prelude.Show)
mkProjectionProperty :: ProjectionProperty
mkProjectionProperty :: ProjectionProperty
mkProjectionProperty
= ProjectionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), nonKeyAttributes :: Maybe (ValueList Text)
nonKeyAttributes = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
projectionType :: Maybe (Value Text)
projectionType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ProjectionProperty where
toResourceProperties :: ProjectionProperty -> ResourceProperties
toResourceProperties ProjectionProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ProjectionProperty -> ()
nonKeyAttributes :: ProjectionProperty -> Maybe (ValueList Text)
projectionType :: ProjectionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
nonKeyAttributes :: Maybe (ValueList Text)
projectionType :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::DynamoDB::Table.Projection",
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
"NonKeyAttributes" (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)
nonKeyAttributes,
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
"ProjectionType" (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)
projectionType])}
instance JSON.ToJSON ProjectionProperty where
toJSON :: ProjectionProperty -> Value
toJSON ProjectionProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ProjectionProperty -> ()
nonKeyAttributes :: ProjectionProperty -> Maybe (ValueList Text)
projectionType :: ProjectionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
nonKeyAttributes :: Maybe (ValueList Text)
projectionType :: 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
"NonKeyAttributes" (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)
nonKeyAttributes,
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
"ProjectionType" (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)
projectionType]))
instance Property "NonKeyAttributes" ProjectionProperty where
type PropertyType "NonKeyAttributes" ProjectionProperty = ValueList Prelude.Text
set :: PropertyType "NonKeyAttributes" ProjectionProperty
-> ProjectionProperty -> ProjectionProperty
set PropertyType "NonKeyAttributes" ProjectionProperty
newValue ProjectionProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ProjectionProperty -> ()
nonKeyAttributes :: ProjectionProperty -> Maybe (ValueList Text)
projectionType :: ProjectionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
nonKeyAttributes :: Maybe (ValueList Text)
projectionType :: Maybe (Value Text)
..}
= ProjectionProperty {nonKeyAttributes :: Maybe (ValueList Text)
nonKeyAttributes = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NonKeyAttributes" ProjectionProperty
ValueList Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
projectionType :: Maybe (Value Text)
haddock_workaround_ :: ()
projectionType :: Maybe (Value Text)
..}
instance Property "ProjectionType" ProjectionProperty where
type PropertyType "ProjectionType" ProjectionProperty = Value Prelude.Text
set :: PropertyType "ProjectionType" ProjectionProperty
-> ProjectionProperty -> ProjectionProperty
set PropertyType "ProjectionType" ProjectionProperty
newValue ProjectionProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ProjectionProperty -> ()
nonKeyAttributes :: ProjectionProperty -> Maybe (ValueList Text)
projectionType :: ProjectionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
nonKeyAttributes :: Maybe (ValueList Text)
projectionType :: Maybe (Value Text)
..}
= ProjectionProperty {projectionType :: Maybe (Value Text)
projectionType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ProjectionType" ProjectionProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
nonKeyAttributes :: Maybe (ValueList Text)
haddock_workaround_ :: ()
nonKeyAttributes :: Maybe (ValueList Text)
..}