{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.DynamoDB.Types.LocalSecondaryIndexDescription
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DynamoDB.Types.LocalSecondaryIndexDescription where

import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types.KeySchemaElement
import Amazonka.DynamoDB.Types.Projection
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents the properties of a local secondary index.
--
-- /See:/ 'newLocalSecondaryIndexDescription' smart constructor.
data LocalSecondaryIndexDescription = LocalSecondaryIndexDescription'
  { -- | The total size of the specified index, in bytes. DynamoDB updates this
    -- value approximately every six hours. Recent changes might not be
    -- reflected in this value.
    LocalSecondaryIndexDescription -> Maybe Integer
indexSizeBytes :: Prelude.Maybe Prelude.Integer,
    -- | The Amazon Resource Name (ARN) that uniquely identifies the index.
    LocalSecondaryIndexDescription -> Maybe Text
indexArn :: Prelude.Maybe Prelude.Text,
    -- | The complete key schema for the local secondary index, consisting of one
    -- or more pairs of attribute names and key types:
    --
    -- -   @HASH@ - partition key
    --
    -- -   @RANGE@ - sort key
    --
    -- The partition key of an item is also known as its /hash attribute/. The
    -- term \"hash attribute\" derives from DynamoDB\'s usage of an internal
    -- hash function to evenly distribute data items across partitions, based
    -- on their partition key values.
    --
    -- The sort key of an item is also known as its /range attribute/. The term
    -- \"range attribute\" derives from the way DynamoDB stores items with the
    -- same partition key physically close together, in sorted order by the
    -- sort key value.
    LocalSecondaryIndexDescription -> Maybe (NonEmpty KeySchemaElement)
keySchema :: Prelude.Maybe (Prelude.NonEmpty KeySchemaElement),
    -- | Represents attributes that are copied (projected) from the table into
    -- the global secondary index. These are in addition to the primary key
    -- attributes and index key attributes, which are automatically projected.
    LocalSecondaryIndexDescription -> Maybe Projection
projection :: Prelude.Maybe Projection,
    -- | The number of items in the specified index. DynamoDB updates this value
    -- approximately every six hours. Recent changes might not be reflected in
    -- this value.
    LocalSecondaryIndexDescription -> Maybe Integer
itemCount :: Prelude.Maybe Prelude.Integer,
    -- | Represents the name of the local secondary index.
    LocalSecondaryIndexDescription -> Maybe Text
indexName :: Prelude.Maybe Prelude.Text
  }
  deriving (LocalSecondaryIndexDescription
-> LocalSecondaryIndexDescription -> Bool
(LocalSecondaryIndexDescription
 -> LocalSecondaryIndexDescription -> Bool)
-> (LocalSecondaryIndexDescription
    -> LocalSecondaryIndexDescription -> Bool)
-> Eq LocalSecondaryIndexDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LocalSecondaryIndexDescription
-> LocalSecondaryIndexDescription -> Bool
$c/= :: LocalSecondaryIndexDescription
-> LocalSecondaryIndexDescription -> Bool
== :: LocalSecondaryIndexDescription
-> LocalSecondaryIndexDescription -> Bool
$c== :: LocalSecondaryIndexDescription
-> LocalSecondaryIndexDescription -> Bool
Prelude.Eq, ReadPrec [LocalSecondaryIndexDescription]
ReadPrec LocalSecondaryIndexDescription
Int -> ReadS LocalSecondaryIndexDescription
ReadS [LocalSecondaryIndexDescription]
(Int -> ReadS LocalSecondaryIndexDescription)
-> ReadS [LocalSecondaryIndexDescription]
-> ReadPrec LocalSecondaryIndexDescription
-> ReadPrec [LocalSecondaryIndexDescription]
-> Read LocalSecondaryIndexDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LocalSecondaryIndexDescription]
$creadListPrec :: ReadPrec [LocalSecondaryIndexDescription]
readPrec :: ReadPrec LocalSecondaryIndexDescription
$creadPrec :: ReadPrec LocalSecondaryIndexDescription
readList :: ReadS [LocalSecondaryIndexDescription]
$creadList :: ReadS [LocalSecondaryIndexDescription]
readsPrec :: Int -> ReadS LocalSecondaryIndexDescription
$creadsPrec :: Int -> ReadS LocalSecondaryIndexDescription
Prelude.Read, Int -> LocalSecondaryIndexDescription -> ShowS
[LocalSecondaryIndexDescription] -> ShowS
LocalSecondaryIndexDescription -> String
(Int -> LocalSecondaryIndexDescription -> ShowS)
-> (LocalSecondaryIndexDescription -> String)
-> ([LocalSecondaryIndexDescription] -> ShowS)
-> Show LocalSecondaryIndexDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LocalSecondaryIndexDescription] -> ShowS
$cshowList :: [LocalSecondaryIndexDescription] -> ShowS
show :: LocalSecondaryIndexDescription -> String
$cshow :: LocalSecondaryIndexDescription -> String
showsPrec :: Int -> LocalSecondaryIndexDescription -> ShowS
$cshowsPrec :: Int -> LocalSecondaryIndexDescription -> ShowS
Prelude.Show, (forall x.
 LocalSecondaryIndexDescription
 -> Rep LocalSecondaryIndexDescription x)
-> (forall x.
    Rep LocalSecondaryIndexDescription x
    -> LocalSecondaryIndexDescription)
-> Generic LocalSecondaryIndexDescription
forall x.
Rep LocalSecondaryIndexDescription x
-> LocalSecondaryIndexDescription
forall x.
LocalSecondaryIndexDescription
-> Rep LocalSecondaryIndexDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LocalSecondaryIndexDescription x
-> LocalSecondaryIndexDescription
$cfrom :: forall x.
LocalSecondaryIndexDescription
-> Rep LocalSecondaryIndexDescription x
Prelude.Generic)

-- |
-- Create a value of 'LocalSecondaryIndexDescription' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'indexSizeBytes', 'localSecondaryIndexDescription_indexSizeBytes' - The total size of the specified index, in bytes. DynamoDB updates this
-- value approximately every six hours. Recent changes might not be
-- reflected in this value.
--
-- 'indexArn', 'localSecondaryIndexDescription_indexArn' - The Amazon Resource Name (ARN) that uniquely identifies the index.
--
-- 'keySchema', 'localSecondaryIndexDescription_keySchema' - The complete key schema for the local secondary index, consisting of one
-- or more pairs of attribute names and key types:
--
-- -   @HASH@ - partition key
--
-- -   @RANGE@ - sort key
--
-- The partition key of an item is also known as its /hash attribute/. The
-- term \"hash attribute\" derives from DynamoDB\'s usage of an internal
-- hash function to evenly distribute data items across partitions, based
-- on their partition key values.
--
-- The sort key of an item is also known as its /range attribute/. The term
-- \"range attribute\" derives from the way DynamoDB stores items with the
-- same partition key physically close together, in sorted order by the
-- sort key value.
--
-- 'projection', 'localSecondaryIndexDescription_projection' - Represents attributes that are copied (projected) from the table into
-- the global secondary index. These are in addition to the primary key
-- attributes and index key attributes, which are automatically projected.
--
-- 'itemCount', 'localSecondaryIndexDescription_itemCount' - The number of items in the specified index. DynamoDB updates this value
-- approximately every six hours. Recent changes might not be reflected in
-- this value.
--
-- 'indexName', 'localSecondaryIndexDescription_indexName' - Represents the name of the local secondary index.
newLocalSecondaryIndexDescription ::
  LocalSecondaryIndexDescription
newLocalSecondaryIndexDescription :: LocalSecondaryIndexDescription
newLocalSecondaryIndexDescription =
  LocalSecondaryIndexDescription' :: Maybe Integer
-> Maybe Text
-> Maybe (NonEmpty KeySchemaElement)
-> Maybe Projection
-> Maybe Integer
-> Maybe Text
-> LocalSecondaryIndexDescription
LocalSecondaryIndexDescription'
    { $sel:indexSizeBytes:LocalSecondaryIndexDescription' :: Maybe Integer
indexSizeBytes =
        Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:indexArn:LocalSecondaryIndexDescription' :: Maybe Text
indexArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:keySchema:LocalSecondaryIndexDescription' :: Maybe (NonEmpty KeySchemaElement)
keySchema = Maybe (NonEmpty KeySchemaElement)
forall a. Maybe a
Prelude.Nothing,
      $sel:projection:LocalSecondaryIndexDescription' :: Maybe Projection
projection = Maybe Projection
forall a. Maybe a
Prelude.Nothing,
      $sel:itemCount:LocalSecondaryIndexDescription' :: Maybe Integer
itemCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:indexName:LocalSecondaryIndexDescription' :: Maybe Text
indexName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The total size of the specified index, in bytes. DynamoDB updates this
-- value approximately every six hours. Recent changes might not be
-- reflected in this value.
localSecondaryIndexDescription_indexSizeBytes :: Lens.Lens' LocalSecondaryIndexDescription (Prelude.Maybe Prelude.Integer)
localSecondaryIndexDescription_indexSizeBytes :: (Maybe Integer -> f (Maybe Integer))
-> LocalSecondaryIndexDescription
-> f LocalSecondaryIndexDescription
localSecondaryIndexDescription_indexSizeBytes = (LocalSecondaryIndexDescription -> Maybe Integer)
-> (LocalSecondaryIndexDescription
    -> Maybe Integer -> LocalSecondaryIndexDescription)
-> Lens
     LocalSecondaryIndexDescription
     LocalSecondaryIndexDescription
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LocalSecondaryIndexDescription' {Maybe Integer
indexSizeBytes :: Maybe Integer
$sel:indexSizeBytes:LocalSecondaryIndexDescription' :: LocalSecondaryIndexDescription -> Maybe Integer
indexSizeBytes} -> Maybe Integer
indexSizeBytes) (\s :: LocalSecondaryIndexDescription
s@LocalSecondaryIndexDescription' {} Maybe Integer
a -> LocalSecondaryIndexDescription
s {$sel:indexSizeBytes:LocalSecondaryIndexDescription' :: Maybe Integer
indexSizeBytes = Maybe Integer
a} :: LocalSecondaryIndexDescription)

-- | The Amazon Resource Name (ARN) that uniquely identifies the index.
localSecondaryIndexDescription_indexArn :: Lens.Lens' LocalSecondaryIndexDescription (Prelude.Maybe Prelude.Text)
localSecondaryIndexDescription_indexArn :: (Maybe Text -> f (Maybe Text))
-> LocalSecondaryIndexDescription
-> f LocalSecondaryIndexDescription
localSecondaryIndexDescription_indexArn = (LocalSecondaryIndexDescription -> Maybe Text)
-> (LocalSecondaryIndexDescription
    -> Maybe Text -> LocalSecondaryIndexDescription)
-> Lens
     LocalSecondaryIndexDescription
     LocalSecondaryIndexDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LocalSecondaryIndexDescription' {Maybe Text
indexArn :: Maybe Text
$sel:indexArn:LocalSecondaryIndexDescription' :: LocalSecondaryIndexDescription -> Maybe Text
indexArn} -> Maybe Text
indexArn) (\s :: LocalSecondaryIndexDescription
s@LocalSecondaryIndexDescription' {} Maybe Text
a -> LocalSecondaryIndexDescription
s {$sel:indexArn:LocalSecondaryIndexDescription' :: Maybe Text
indexArn = Maybe Text
a} :: LocalSecondaryIndexDescription)

-- | The complete key schema for the local secondary index, consisting of one
-- or more pairs of attribute names and key types:
--
-- -   @HASH@ - partition key
--
-- -   @RANGE@ - sort key
--
-- The partition key of an item is also known as its /hash attribute/. The
-- term \"hash attribute\" derives from DynamoDB\'s usage of an internal
-- hash function to evenly distribute data items across partitions, based
-- on their partition key values.
--
-- The sort key of an item is also known as its /range attribute/. The term
-- \"range attribute\" derives from the way DynamoDB stores items with the
-- same partition key physically close together, in sorted order by the
-- sort key value.
localSecondaryIndexDescription_keySchema :: Lens.Lens' LocalSecondaryIndexDescription (Prelude.Maybe (Prelude.NonEmpty KeySchemaElement))
localSecondaryIndexDescription_keySchema :: (Maybe (NonEmpty KeySchemaElement)
 -> f (Maybe (NonEmpty KeySchemaElement)))
-> LocalSecondaryIndexDescription
-> f LocalSecondaryIndexDescription
localSecondaryIndexDescription_keySchema = (LocalSecondaryIndexDescription
 -> Maybe (NonEmpty KeySchemaElement))
-> (LocalSecondaryIndexDescription
    -> Maybe (NonEmpty KeySchemaElement)
    -> LocalSecondaryIndexDescription)
-> Lens
     LocalSecondaryIndexDescription
     LocalSecondaryIndexDescription
     (Maybe (NonEmpty KeySchemaElement))
     (Maybe (NonEmpty KeySchemaElement))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LocalSecondaryIndexDescription' {Maybe (NonEmpty KeySchemaElement)
keySchema :: Maybe (NonEmpty KeySchemaElement)
$sel:keySchema:LocalSecondaryIndexDescription' :: LocalSecondaryIndexDescription -> Maybe (NonEmpty KeySchemaElement)
keySchema} -> Maybe (NonEmpty KeySchemaElement)
keySchema) (\s :: LocalSecondaryIndexDescription
s@LocalSecondaryIndexDescription' {} Maybe (NonEmpty KeySchemaElement)
a -> LocalSecondaryIndexDescription
s {$sel:keySchema:LocalSecondaryIndexDescription' :: Maybe (NonEmpty KeySchemaElement)
keySchema = Maybe (NonEmpty KeySchemaElement)
a} :: LocalSecondaryIndexDescription) ((Maybe (NonEmpty KeySchemaElement)
  -> f (Maybe (NonEmpty KeySchemaElement)))
 -> LocalSecondaryIndexDescription
 -> f LocalSecondaryIndexDescription)
-> ((Maybe (NonEmpty KeySchemaElement)
     -> f (Maybe (NonEmpty KeySchemaElement)))
    -> Maybe (NonEmpty KeySchemaElement)
    -> f (Maybe (NonEmpty KeySchemaElement)))
-> (Maybe (NonEmpty KeySchemaElement)
    -> f (Maybe (NonEmpty KeySchemaElement)))
-> LocalSecondaryIndexDescription
-> f LocalSecondaryIndexDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty KeySchemaElement)
  (NonEmpty KeySchemaElement)
  (NonEmpty KeySchemaElement)
  (NonEmpty KeySchemaElement)
-> Iso
     (Maybe (NonEmpty KeySchemaElement))
     (Maybe (NonEmpty KeySchemaElement))
     (Maybe (NonEmpty KeySchemaElement))
     (Maybe (NonEmpty KeySchemaElement))
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
  (NonEmpty KeySchemaElement)
  (NonEmpty KeySchemaElement)
  (NonEmpty KeySchemaElement)
  (NonEmpty KeySchemaElement)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Represents attributes that are copied (projected) from the table into
-- the global secondary index. These are in addition to the primary key
-- attributes and index key attributes, which are automatically projected.
localSecondaryIndexDescription_projection :: Lens.Lens' LocalSecondaryIndexDescription (Prelude.Maybe Projection)
localSecondaryIndexDescription_projection :: (Maybe Projection -> f (Maybe Projection))
-> LocalSecondaryIndexDescription
-> f LocalSecondaryIndexDescription
localSecondaryIndexDescription_projection = (LocalSecondaryIndexDescription -> Maybe Projection)
-> (LocalSecondaryIndexDescription
    -> Maybe Projection -> LocalSecondaryIndexDescription)
-> Lens
     LocalSecondaryIndexDescription
     LocalSecondaryIndexDescription
     (Maybe Projection)
     (Maybe Projection)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LocalSecondaryIndexDescription' {Maybe Projection
projection :: Maybe Projection
$sel:projection:LocalSecondaryIndexDescription' :: LocalSecondaryIndexDescription -> Maybe Projection
projection} -> Maybe Projection
projection) (\s :: LocalSecondaryIndexDescription
s@LocalSecondaryIndexDescription' {} Maybe Projection
a -> LocalSecondaryIndexDescription
s {$sel:projection:LocalSecondaryIndexDescription' :: Maybe Projection
projection = Maybe Projection
a} :: LocalSecondaryIndexDescription)

-- | The number of items in the specified index. DynamoDB updates this value
-- approximately every six hours. Recent changes might not be reflected in
-- this value.
localSecondaryIndexDescription_itemCount :: Lens.Lens' LocalSecondaryIndexDescription (Prelude.Maybe Prelude.Integer)
localSecondaryIndexDescription_itemCount :: (Maybe Integer -> f (Maybe Integer))
-> LocalSecondaryIndexDescription
-> f LocalSecondaryIndexDescription
localSecondaryIndexDescription_itemCount = (LocalSecondaryIndexDescription -> Maybe Integer)
-> (LocalSecondaryIndexDescription
    -> Maybe Integer -> LocalSecondaryIndexDescription)
-> Lens
     LocalSecondaryIndexDescription
     LocalSecondaryIndexDescription
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LocalSecondaryIndexDescription' {Maybe Integer
itemCount :: Maybe Integer
$sel:itemCount:LocalSecondaryIndexDescription' :: LocalSecondaryIndexDescription -> Maybe Integer
itemCount} -> Maybe Integer
itemCount) (\s :: LocalSecondaryIndexDescription
s@LocalSecondaryIndexDescription' {} Maybe Integer
a -> LocalSecondaryIndexDescription
s {$sel:itemCount:LocalSecondaryIndexDescription' :: Maybe Integer
itemCount = Maybe Integer
a} :: LocalSecondaryIndexDescription)

-- | Represents the name of the local secondary index.
localSecondaryIndexDescription_indexName :: Lens.Lens' LocalSecondaryIndexDescription (Prelude.Maybe Prelude.Text)
localSecondaryIndexDescription_indexName :: (Maybe Text -> f (Maybe Text))
-> LocalSecondaryIndexDescription
-> f LocalSecondaryIndexDescription
localSecondaryIndexDescription_indexName = (LocalSecondaryIndexDescription -> Maybe Text)
-> (LocalSecondaryIndexDescription
    -> Maybe Text -> LocalSecondaryIndexDescription)
-> Lens
     LocalSecondaryIndexDescription
     LocalSecondaryIndexDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LocalSecondaryIndexDescription' {Maybe Text
indexName :: Maybe Text
$sel:indexName:LocalSecondaryIndexDescription' :: LocalSecondaryIndexDescription -> Maybe Text
indexName} -> Maybe Text
indexName) (\s :: LocalSecondaryIndexDescription
s@LocalSecondaryIndexDescription' {} Maybe Text
a -> LocalSecondaryIndexDescription
s {$sel:indexName:LocalSecondaryIndexDescription' :: Maybe Text
indexName = Maybe Text
a} :: LocalSecondaryIndexDescription)

instance Core.FromJSON LocalSecondaryIndexDescription where
  parseJSON :: Value -> Parser LocalSecondaryIndexDescription
parseJSON =
    String
-> (Object -> Parser LocalSecondaryIndexDescription)
-> Value
-> Parser LocalSecondaryIndexDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"LocalSecondaryIndexDescription"
      ( \Object
x ->
          Maybe Integer
-> Maybe Text
-> Maybe (NonEmpty KeySchemaElement)
-> Maybe Projection
-> Maybe Integer
-> Maybe Text
-> LocalSecondaryIndexDescription
LocalSecondaryIndexDescription'
            (Maybe Integer
 -> Maybe Text
 -> Maybe (NonEmpty KeySchemaElement)
 -> Maybe Projection
 -> Maybe Integer
 -> Maybe Text
 -> LocalSecondaryIndexDescription)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty KeySchemaElement)
      -> Maybe Projection
      -> Maybe Integer
      -> Maybe Text
      -> LocalSecondaryIndexDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IndexSizeBytes")
            Parser
  (Maybe Text
   -> Maybe (NonEmpty KeySchemaElement)
   -> Maybe Projection
   -> Maybe Integer
   -> Maybe Text
   -> LocalSecondaryIndexDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty KeySchemaElement)
      -> Maybe Projection
      -> Maybe Integer
      -> Maybe Text
      -> LocalSecondaryIndexDescription)
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
"IndexArn")
            Parser
  (Maybe (NonEmpty KeySchemaElement)
   -> Maybe Projection
   -> Maybe Integer
   -> Maybe Text
   -> LocalSecondaryIndexDescription)
-> Parser (Maybe (NonEmpty KeySchemaElement))
-> Parser
     (Maybe Projection
      -> Maybe Integer -> Maybe Text -> LocalSecondaryIndexDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty KeySchemaElement))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KeySchema")
            Parser
  (Maybe Projection
   -> Maybe Integer -> Maybe Text -> LocalSecondaryIndexDescription)
-> Parser (Maybe Projection)
-> Parser
     (Maybe Integer -> Maybe Text -> LocalSecondaryIndexDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Projection)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Projection")
            Parser
  (Maybe Integer -> Maybe Text -> LocalSecondaryIndexDescription)
-> Parser (Maybe Integer)
-> Parser (Maybe Text -> LocalSecondaryIndexDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ItemCount")
            Parser (Maybe Text -> LocalSecondaryIndexDescription)
-> Parser (Maybe Text) -> Parser LocalSecondaryIndexDescription
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
    LocalSecondaryIndexDescription

instance
  Prelude.NFData
    LocalSecondaryIndexDescription