{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SecurityHub.Types.AwsDynamoDbTableLocalSecondaryIndex where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsDynamoDbTableKeySchema
import Amazonka.SecurityHub.Types.AwsDynamoDbTableProjection
data AwsDynamoDbTableLocalSecondaryIndex = AwsDynamoDbTableLocalSecondaryIndex'
{
AwsDynamoDbTableLocalSecondaryIndex -> Maybe Text
indexArn :: Prelude.Maybe Prelude.Text,
AwsDynamoDbTableLocalSecondaryIndex
-> Maybe [AwsDynamoDbTableKeySchema]
keySchema :: Prelude.Maybe [AwsDynamoDbTableKeySchema],
AwsDynamoDbTableLocalSecondaryIndex
-> Maybe AwsDynamoDbTableProjection
projection :: Prelude.Maybe AwsDynamoDbTableProjection,
AwsDynamoDbTableLocalSecondaryIndex -> Maybe Text
indexName :: Prelude.Maybe Prelude.Text
}
deriving (AwsDynamoDbTableLocalSecondaryIndex
-> AwsDynamoDbTableLocalSecondaryIndex -> Bool
(AwsDynamoDbTableLocalSecondaryIndex
-> AwsDynamoDbTableLocalSecondaryIndex -> Bool)
-> (AwsDynamoDbTableLocalSecondaryIndex
-> AwsDynamoDbTableLocalSecondaryIndex -> Bool)
-> Eq AwsDynamoDbTableLocalSecondaryIndex
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsDynamoDbTableLocalSecondaryIndex
-> AwsDynamoDbTableLocalSecondaryIndex -> Bool
$c/= :: AwsDynamoDbTableLocalSecondaryIndex
-> AwsDynamoDbTableLocalSecondaryIndex -> Bool
== :: AwsDynamoDbTableLocalSecondaryIndex
-> AwsDynamoDbTableLocalSecondaryIndex -> Bool
$c== :: AwsDynamoDbTableLocalSecondaryIndex
-> AwsDynamoDbTableLocalSecondaryIndex -> Bool
Prelude.Eq, ReadPrec [AwsDynamoDbTableLocalSecondaryIndex]
ReadPrec AwsDynamoDbTableLocalSecondaryIndex
Int -> ReadS AwsDynamoDbTableLocalSecondaryIndex
ReadS [AwsDynamoDbTableLocalSecondaryIndex]
(Int -> ReadS AwsDynamoDbTableLocalSecondaryIndex)
-> ReadS [AwsDynamoDbTableLocalSecondaryIndex]
-> ReadPrec AwsDynamoDbTableLocalSecondaryIndex
-> ReadPrec [AwsDynamoDbTableLocalSecondaryIndex]
-> Read AwsDynamoDbTableLocalSecondaryIndex
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsDynamoDbTableLocalSecondaryIndex]
$creadListPrec :: ReadPrec [AwsDynamoDbTableLocalSecondaryIndex]
readPrec :: ReadPrec AwsDynamoDbTableLocalSecondaryIndex
$creadPrec :: ReadPrec AwsDynamoDbTableLocalSecondaryIndex
readList :: ReadS [AwsDynamoDbTableLocalSecondaryIndex]
$creadList :: ReadS [AwsDynamoDbTableLocalSecondaryIndex]
readsPrec :: Int -> ReadS AwsDynamoDbTableLocalSecondaryIndex
$creadsPrec :: Int -> ReadS AwsDynamoDbTableLocalSecondaryIndex
Prelude.Read, Int -> AwsDynamoDbTableLocalSecondaryIndex -> ShowS
[AwsDynamoDbTableLocalSecondaryIndex] -> ShowS
AwsDynamoDbTableLocalSecondaryIndex -> String
(Int -> AwsDynamoDbTableLocalSecondaryIndex -> ShowS)
-> (AwsDynamoDbTableLocalSecondaryIndex -> String)
-> ([AwsDynamoDbTableLocalSecondaryIndex] -> ShowS)
-> Show AwsDynamoDbTableLocalSecondaryIndex
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsDynamoDbTableLocalSecondaryIndex] -> ShowS
$cshowList :: [AwsDynamoDbTableLocalSecondaryIndex] -> ShowS
show :: AwsDynamoDbTableLocalSecondaryIndex -> String
$cshow :: AwsDynamoDbTableLocalSecondaryIndex -> String
showsPrec :: Int -> AwsDynamoDbTableLocalSecondaryIndex -> ShowS
$cshowsPrec :: Int -> AwsDynamoDbTableLocalSecondaryIndex -> ShowS
Prelude.Show, (forall x.
AwsDynamoDbTableLocalSecondaryIndex
-> Rep AwsDynamoDbTableLocalSecondaryIndex x)
-> (forall x.
Rep AwsDynamoDbTableLocalSecondaryIndex x
-> AwsDynamoDbTableLocalSecondaryIndex)
-> Generic AwsDynamoDbTableLocalSecondaryIndex
forall x.
Rep AwsDynamoDbTableLocalSecondaryIndex x
-> AwsDynamoDbTableLocalSecondaryIndex
forall x.
AwsDynamoDbTableLocalSecondaryIndex
-> Rep AwsDynamoDbTableLocalSecondaryIndex x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsDynamoDbTableLocalSecondaryIndex x
-> AwsDynamoDbTableLocalSecondaryIndex
$cfrom :: forall x.
AwsDynamoDbTableLocalSecondaryIndex
-> Rep AwsDynamoDbTableLocalSecondaryIndex x
Prelude.Generic)
newAwsDynamoDbTableLocalSecondaryIndex ::
AwsDynamoDbTableLocalSecondaryIndex
newAwsDynamoDbTableLocalSecondaryIndex :: AwsDynamoDbTableLocalSecondaryIndex
newAwsDynamoDbTableLocalSecondaryIndex =
AwsDynamoDbTableLocalSecondaryIndex' :: Maybe Text
-> Maybe [AwsDynamoDbTableKeySchema]
-> Maybe AwsDynamoDbTableProjection
-> Maybe Text
-> AwsDynamoDbTableLocalSecondaryIndex
AwsDynamoDbTableLocalSecondaryIndex'
{ $sel:indexArn:AwsDynamoDbTableLocalSecondaryIndex' :: Maybe Text
indexArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:keySchema:AwsDynamoDbTableLocalSecondaryIndex' :: Maybe [AwsDynamoDbTableKeySchema]
keySchema = Maybe [AwsDynamoDbTableKeySchema]
forall a. Maybe a
Prelude.Nothing,
$sel:projection:AwsDynamoDbTableLocalSecondaryIndex' :: Maybe AwsDynamoDbTableProjection
projection = Maybe AwsDynamoDbTableProjection
forall a. Maybe a
Prelude.Nothing,
$sel:indexName:AwsDynamoDbTableLocalSecondaryIndex' :: Maybe Text
indexName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsDynamoDbTableLocalSecondaryIndex_indexArn :: Lens.Lens' AwsDynamoDbTableLocalSecondaryIndex (Prelude.Maybe Prelude.Text)
awsDynamoDbTableLocalSecondaryIndex_indexArn :: (Maybe Text -> f (Maybe Text))
-> AwsDynamoDbTableLocalSecondaryIndex
-> f AwsDynamoDbTableLocalSecondaryIndex
awsDynamoDbTableLocalSecondaryIndex_indexArn = (AwsDynamoDbTableLocalSecondaryIndex -> Maybe Text)
-> (AwsDynamoDbTableLocalSecondaryIndex
-> Maybe Text -> AwsDynamoDbTableLocalSecondaryIndex)
-> Lens
AwsDynamoDbTableLocalSecondaryIndex
AwsDynamoDbTableLocalSecondaryIndex
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsDynamoDbTableLocalSecondaryIndex' {Maybe Text
indexArn :: Maybe Text
$sel:indexArn:AwsDynamoDbTableLocalSecondaryIndex' :: AwsDynamoDbTableLocalSecondaryIndex -> Maybe Text
indexArn} -> Maybe Text
indexArn) (\s :: AwsDynamoDbTableLocalSecondaryIndex
s@AwsDynamoDbTableLocalSecondaryIndex' {} Maybe Text
a -> AwsDynamoDbTableLocalSecondaryIndex
s {$sel:indexArn:AwsDynamoDbTableLocalSecondaryIndex' :: Maybe Text
indexArn = Maybe Text
a} :: AwsDynamoDbTableLocalSecondaryIndex)
awsDynamoDbTableLocalSecondaryIndex_keySchema :: Lens.Lens' AwsDynamoDbTableLocalSecondaryIndex (Prelude.Maybe [AwsDynamoDbTableKeySchema])
awsDynamoDbTableLocalSecondaryIndex_keySchema :: (Maybe [AwsDynamoDbTableKeySchema]
-> f (Maybe [AwsDynamoDbTableKeySchema]))
-> AwsDynamoDbTableLocalSecondaryIndex
-> f AwsDynamoDbTableLocalSecondaryIndex
awsDynamoDbTableLocalSecondaryIndex_keySchema = (AwsDynamoDbTableLocalSecondaryIndex
-> Maybe [AwsDynamoDbTableKeySchema])
-> (AwsDynamoDbTableLocalSecondaryIndex
-> Maybe [AwsDynamoDbTableKeySchema]
-> AwsDynamoDbTableLocalSecondaryIndex)
-> Lens
AwsDynamoDbTableLocalSecondaryIndex
AwsDynamoDbTableLocalSecondaryIndex
(Maybe [AwsDynamoDbTableKeySchema])
(Maybe [AwsDynamoDbTableKeySchema])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsDynamoDbTableLocalSecondaryIndex' {Maybe [AwsDynamoDbTableKeySchema]
keySchema :: Maybe [AwsDynamoDbTableKeySchema]
$sel:keySchema:AwsDynamoDbTableLocalSecondaryIndex' :: AwsDynamoDbTableLocalSecondaryIndex
-> Maybe [AwsDynamoDbTableKeySchema]
keySchema} -> Maybe [AwsDynamoDbTableKeySchema]
keySchema) (\s :: AwsDynamoDbTableLocalSecondaryIndex
s@AwsDynamoDbTableLocalSecondaryIndex' {} Maybe [AwsDynamoDbTableKeySchema]
a -> AwsDynamoDbTableLocalSecondaryIndex
s {$sel:keySchema:AwsDynamoDbTableLocalSecondaryIndex' :: Maybe [AwsDynamoDbTableKeySchema]
keySchema = Maybe [AwsDynamoDbTableKeySchema]
a} :: AwsDynamoDbTableLocalSecondaryIndex) ((Maybe [AwsDynamoDbTableKeySchema]
-> f (Maybe [AwsDynamoDbTableKeySchema]))
-> AwsDynamoDbTableLocalSecondaryIndex
-> f AwsDynamoDbTableLocalSecondaryIndex)
-> ((Maybe [AwsDynamoDbTableKeySchema]
-> f (Maybe [AwsDynamoDbTableKeySchema]))
-> Maybe [AwsDynamoDbTableKeySchema]
-> f (Maybe [AwsDynamoDbTableKeySchema]))
-> (Maybe [AwsDynamoDbTableKeySchema]
-> f (Maybe [AwsDynamoDbTableKeySchema]))
-> AwsDynamoDbTableLocalSecondaryIndex
-> f AwsDynamoDbTableLocalSecondaryIndex
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AwsDynamoDbTableKeySchema]
[AwsDynamoDbTableKeySchema]
[AwsDynamoDbTableKeySchema]
[AwsDynamoDbTableKeySchema]
-> Iso
(Maybe [AwsDynamoDbTableKeySchema])
(Maybe [AwsDynamoDbTableKeySchema])
(Maybe [AwsDynamoDbTableKeySchema])
(Maybe [AwsDynamoDbTableKeySchema])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[AwsDynamoDbTableKeySchema]
[AwsDynamoDbTableKeySchema]
[AwsDynamoDbTableKeySchema]
[AwsDynamoDbTableKeySchema]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
awsDynamoDbTableLocalSecondaryIndex_projection :: Lens.Lens' AwsDynamoDbTableLocalSecondaryIndex (Prelude.Maybe AwsDynamoDbTableProjection)
awsDynamoDbTableLocalSecondaryIndex_projection :: (Maybe AwsDynamoDbTableProjection
-> f (Maybe AwsDynamoDbTableProjection))
-> AwsDynamoDbTableLocalSecondaryIndex
-> f AwsDynamoDbTableLocalSecondaryIndex
awsDynamoDbTableLocalSecondaryIndex_projection = (AwsDynamoDbTableLocalSecondaryIndex
-> Maybe AwsDynamoDbTableProjection)
-> (AwsDynamoDbTableLocalSecondaryIndex
-> Maybe AwsDynamoDbTableProjection
-> AwsDynamoDbTableLocalSecondaryIndex)
-> Lens
AwsDynamoDbTableLocalSecondaryIndex
AwsDynamoDbTableLocalSecondaryIndex
(Maybe AwsDynamoDbTableProjection)
(Maybe AwsDynamoDbTableProjection)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsDynamoDbTableLocalSecondaryIndex' {Maybe AwsDynamoDbTableProjection
projection :: Maybe AwsDynamoDbTableProjection
$sel:projection:AwsDynamoDbTableLocalSecondaryIndex' :: AwsDynamoDbTableLocalSecondaryIndex
-> Maybe AwsDynamoDbTableProjection
projection} -> Maybe AwsDynamoDbTableProjection
projection) (\s :: AwsDynamoDbTableLocalSecondaryIndex
s@AwsDynamoDbTableLocalSecondaryIndex' {} Maybe AwsDynamoDbTableProjection
a -> AwsDynamoDbTableLocalSecondaryIndex
s {$sel:projection:AwsDynamoDbTableLocalSecondaryIndex' :: Maybe AwsDynamoDbTableProjection
projection = Maybe AwsDynamoDbTableProjection
a} :: AwsDynamoDbTableLocalSecondaryIndex)
awsDynamoDbTableLocalSecondaryIndex_indexName :: Lens.Lens' AwsDynamoDbTableLocalSecondaryIndex (Prelude.Maybe Prelude.Text)
awsDynamoDbTableLocalSecondaryIndex_indexName :: (Maybe Text -> f (Maybe Text))
-> AwsDynamoDbTableLocalSecondaryIndex
-> f AwsDynamoDbTableLocalSecondaryIndex
awsDynamoDbTableLocalSecondaryIndex_indexName = (AwsDynamoDbTableLocalSecondaryIndex -> Maybe Text)
-> (AwsDynamoDbTableLocalSecondaryIndex
-> Maybe Text -> AwsDynamoDbTableLocalSecondaryIndex)
-> Lens
AwsDynamoDbTableLocalSecondaryIndex
AwsDynamoDbTableLocalSecondaryIndex
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsDynamoDbTableLocalSecondaryIndex' {Maybe Text
indexName :: Maybe Text
$sel:indexName:AwsDynamoDbTableLocalSecondaryIndex' :: AwsDynamoDbTableLocalSecondaryIndex -> Maybe Text
indexName} -> Maybe Text
indexName) (\s :: AwsDynamoDbTableLocalSecondaryIndex
s@AwsDynamoDbTableLocalSecondaryIndex' {} Maybe Text
a -> AwsDynamoDbTableLocalSecondaryIndex
s {$sel:indexName:AwsDynamoDbTableLocalSecondaryIndex' :: Maybe Text
indexName = Maybe Text
a} :: AwsDynamoDbTableLocalSecondaryIndex)
instance
Core.FromJSON
AwsDynamoDbTableLocalSecondaryIndex
where
parseJSON :: Value -> Parser AwsDynamoDbTableLocalSecondaryIndex
parseJSON =
String
-> (Object -> Parser AwsDynamoDbTableLocalSecondaryIndex)
-> Value
-> Parser AwsDynamoDbTableLocalSecondaryIndex
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsDynamoDbTableLocalSecondaryIndex"
( \Object
x ->
Maybe Text
-> Maybe [AwsDynamoDbTableKeySchema]
-> Maybe AwsDynamoDbTableProjection
-> Maybe Text
-> AwsDynamoDbTableLocalSecondaryIndex
AwsDynamoDbTableLocalSecondaryIndex'
(Maybe Text
-> Maybe [AwsDynamoDbTableKeySchema]
-> Maybe AwsDynamoDbTableProjection
-> Maybe Text
-> AwsDynamoDbTableLocalSecondaryIndex)
-> Parser (Maybe Text)
-> Parser
(Maybe [AwsDynamoDbTableKeySchema]
-> Maybe AwsDynamoDbTableProjection
-> Maybe Text
-> AwsDynamoDbTableLocalSecondaryIndex)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IndexArn")
Parser
(Maybe [AwsDynamoDbTableKeySchema]
-> Maybe AwsDynamoDbTableProjection
-> Maybe Text
-> AwsDynamoDbTableLocalSecondaryIndex)
-> Parser (Maybe [AwsDynamoDbTableKeySchema])
-> Parser
(Maybe AwsDynamoDbTableProjection
-> Maybe Text -> AwsDynamoDbTableLocalSecondaryIndex)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe (Maybe [AwsDynamoDbTableKeySchema]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KeySchema" Parser (Maybe (Maybe [AwsDynamoDbTableKeySchema]))
-> Maybe [AwsDynamoDbTableKeySchema]
-> Parser (Maybe [AwsDynamoDbTableKeySchema])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AwsDynamoDbTableKeySchema]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe AwsDynamoDbTableProjection
-> Maybe Text -> AwsDynamoDbTableLocalSecondaryIndex)
-> Parser (Maybe AwsDynamoDbTableProjection)
-> Parser (Maybe Text -> AwsDynamoDbTableLocalSecondaryIndex)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AwsDynamoDbTableProjection)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Projection")
Parser (Maybe Text -> AwsDynamoDbTableLocalSecondaryIndex)
-> Parser (Maybe Text)
-> Parser AwsDynamoDbTableLocalSecondaryIndex
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IndexName")
)
instance
Prelude.Hashable
AwsDynamoDbTableLocalSecondaryIndex
instance
Prelude.NFData
AwsDynamoDbTableLocalSecondaryIndex
instance
Core.ToJSON
AwsDynamoDbTableLocalSecondaryIndex
where
toJSON :: AwsDynamoDbTableLocalSecondaryIndex -> Value
toJSON AwsDynamoDbTableLocalSecondaryIndex' {Maybe [AwsDynamoDbTableKeySchema]
Maybe Text
Maybe AwsDynamoDbTableProjection
indexName :: Maybe Text
projection :: Maybe AwsDynamoDbTableProjection
keySchema :: Maybe [AwsDynamoDbTableKeySchema]
indexArn :: Maybe Text
$sel:indexName:AwsDynamoDbTableLocalSecondaryIndex' :: AwsDynamoDbTableLocalSecondaryIndex -> Maybe Text
$sel:projection:AwsDynamoDbTableLocalSecondaryIndex' :: AwsDynamoDbTableLocalSecondaryIndex
-> Maybe AwsDynamoDbTableProjection
$sel:keySchema:AwsDynamoDbTableLocalSecondaryIndex' :: AwsDynamoDbTableLocalSecondaryIndex
-> Maybe [AwsDynamoDbTableKeySchema]
$sel:indexArn:AwsDynamoDbTableLocalSecondaryIndex' :: AwsDynamoDbTableLocalSecondaryIndex -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"IndexArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
indexArn,
(Text
"KeySchema" Text -> [AwsDynamoDbTableKeySchema] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([AwsDynamoDbTableKeySchema] -> Pair)
-> Maybe [AwsDynamoDbTableKeySchema] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AwsDynamoDbTableKeySchema]
keySchema,
(Text
"Projection" Text -> AwsDynamoDbTableProjection -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AwsDynamoDbTableProjection -> Pair)
-> Maybe AwsDynamoDbTableProjection -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AwsDynamoDbTableProjection
projection,
(Text
"IndexName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
indexName
]
)