{-# 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.DynamoDB.Types.ReplicaGlobalSecondaryIndexDescription where
import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types.ProvisionedThroughputOverride
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ReplicaGlobalSecondaryIndexDescription = ReplicaGlobalSecondaryIndexDescription'
{
ReplicaGlobalSecondaryIndexDescription
-> Maybe ProvisionedThroughputOverride
provisionedThroughputOverride :: Prelude.Maybe ProvisionedThroughputOverride,
ReplicaGlobalSecondaryIndexDescription -> Maybe Text
indexName :: Prelude.Maybe Prelude.Text
}
deriving (ReplicaGlobalSecondaryIndexDescription
-> ReplicaGlobalSecondaryIndexDescription -> Bool
(ReplicaGlobalSecondaryIndexDescription
-> ReplicaGlobalSecondaryIndexDescription -> Bool)
-> (ReplicaGlobalSecondaryIndexDescription
-> ReplicaGlobalSecondaryIndexDescription -> Bool)
-> Eq ReplicaGlobalSecondaryIndexDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReplicaGlobalSecondaryIndexDescription
-> ReplicaGlobalSecondaryIndexDescription -> Bool
$c/= :: ReplicaGlobalSecondaryIndexDescription
-> ReplicaGlobalSecondaryIndexDescription -> Bool
== :: ReplicaGlobalSecondaryIndexDescription
-> ReplicaGlobalSecondaryIndexDescription -> Bool
$c== :: ReplicaGlobalSecondaryIndexDescription
-> ReplicaGlobalSecondaryIndexDescription -> Bool
Prelude.Eq, ReadPrec [ReplicaGlobalSecondaryIndexDescription]
ReadPrec ReplicaGlobalSecondaryIndexDescription
Int -> ReadS ReplicaGlobalSecondaryIndexDescription
ReadS [ReplicaGlobalSecondaryIndexDescription]
(Int -> ReadS ReplicaGlobalSecondaryIndexDescription)
-> ReadS [ReplicaGlobalSecondaryIndexDescription]
-> ReadPrec ReplicaGlobalSecondaryIndexDescription
-> ReadPrec [ReplicaGlobalSecondaryIndexDescription]
-> Read ReplicaGlobalSecondaryIndexDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReplicaGlobalSecondaryIndexDescription]
$creadListPrec :: ReadPrec [ReplicaGlobalSecondaryIndexDescription]
readPrec :: ReadPrec ReplicaGlobalSecondaryIndexDescription
$creadPrec :: ReadPrec ReplicaGlobalSecondaryIndexDescription
readList :: ReadS [ReplicaGlobalSecondaryIndexDescription]
$creadList :: ReadS [ReplicaGlobalSecondaryIndexDescription]
readsPrec :: Int -> ReadS ReplicaGlobalSecondaryIndexDescription
$creadsPrec :: Int -> ReadS ReplicaGlobalSecondaryIndexDescription
Prelude.Read, Int -> ReplicaGlobalSecondaryIndexDescription -> ShowS
[ReplicaGlobalSecondaryIndexDescription] -> ShowS
ReplicaGlobalSecondaryIndexDescription -> String
(Int -> ReplicaGlobalSecondaryIndexDescription -> ShowS)
-> (ReplicaGlobalSecondaryIndexDescription -> String)
-> ([ReplicaGlobalSecondaryIndexDescription] -> ShowS)
-> Show ReplicaGlobalSecondaryIndexDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReplicaGlobalSecondaryIndexDescription] -> ShowS
$cshowList :: [ReplicaGlobalSecondaryIndexDescription] -> ShowS
show :: ReplicaGlobalSecondaryIndexDescription -> String
$cshow :: ReplicaGlobalSecondaryIndexDescription -> String
showsPrec :: Int -> ReplicaGlobalSecondaryIndexDescription -> ShowS
$cshowsPrec :: Int -> ReplicaGlobalSecondaryIndexDescription -> ShowS
Prelude.Show, (forall x.
ReplicaGlobalSecondaryIndexDescription
-> Rep ReplicaGlobalSecondaryIndexDescription x)
-> (forall x.
Rep ReplicaGlobalSecondaryIndexDescription x
-> ReplicaGlobalSecondaryIndexDescription)
-> Generic ReplicaGlobalSecondaryIndexDescription
forall x.
Rep ReplicaGlobalSecondaryIndexDescription x
-> ReplicaGlobalSecondaryIndexDescription
forall x.
ReplicaGlobalSecondaryIndexDescription
-> Rep ReplicaGlobalSecondaryIndexDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ReplicaGlobalSecondaryIndexDescription x
-> ReplicaGlobalSecondaryIndexDescription
$cfrom :: forall x.
ReplicaGlobalSecondaryIndexDescription
-> Rep ReplicaGlobalSecondaryIndexDescription x
Prelude.Generic)
newReplicaGlobalSecondaryIndexDescription ::
ReplicaGlobalSecondaryIndexDescription
newReplicaGlobalSecondaryIndexDescription :: ReplicaGlobalSecondaryIndexDescription
newReplicaGlobalSecondaryIndexDescription =
ReplicaGlobalSecondaryIndexDescription' :: Maybe ProvisionedThroughputOverride
-> Maybe Text -> ReplicaGlobalSecondaryIndexDescription
ReplicaGlobalSecondaryIndexDescription'
{ $sel:provisionedThroughputOverride:ReplicaGlobalSecondaryIndexDescription' :: Maybe ProvisionedThroughputOverride
provisionedThroughputOverride =
Maybe ProvisionedThroughputOverride
forall a. Maybe a
Prelude.Nothing,
$sel:indexName:ReplicaGlobalSecondaryIndexDescription' :: Maybe Text
indexName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
replicaGlobalSecondaryIndexDescription_provisionedThroughputOverride :: Lens.Lens' ReplicaGlobalSecondaryIndexDescription (Prelude.Maybe ProvisionedThroughputOverride)
replicaGlobalSecondaryIndexDescription_provisionedThroughputOverride :: (Maybe ProvisionedThroughputOverride
-> f (Maybe ProvisionedThroughputOverride))
-> ReplicaGlobalSecondaryIndexDescription
-> f ReplicaGlobalSecondaryIndexDescription
replicaGlobalSecondaryIndexDescription_provisionedThroughputOverride = (ReplicaGlobalSecondaryIndexDescription
-> Maybe ProvisionedThroughputOverride)
-> (ReplicaGlobalSecondaryIndexDescription
-> Maybe ProvisionedThroughputOverride
-> ReplicaGlobalSecondaryIndexDescription)
-> Lens
ReplicaGlobalSecondaryIndexDescription
ReplicaGlobalSecondaryIndexDescription
(Maybe ProvisionedThroughputOverride)
(Maybe ProvisionedThroughputOverride)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexDescription' {Maybe ProvisionedThroughputOverride
provisionedThroughputOverride :: Maybe ProvisionedThroughputOverride
$sel:provisionedThroughputOverride:ReplicaGlobalSecondaryIndexDescription' :: ReplicaGlobalSecondaryIndexDescription
-> Maybe ProvisionedThroughputOverride
provisionedThroughputOverride} -> Maybe ProvisionedThroughputOverride
provisionedThroughputOverride) (\s :: ReplicaGlobalSecondaryIndexDescription
s@ReplicaGlobalSecondaryIndexDescription' {} Maybe ProvisionedThroughputOverride
a -> ReplicaGlobalSecondaryIndexDescription
s {$sel:provisionedThroughputOverride:ReplicaGlobalSecondaryIndexDescription' :: Maybe ProvisionedThroughputOverride
provisionedThroughputOverride = Maybe ProvisionedThroughputOverride
a} :: ReplicaGlobalSecondaryIndexDescription)
replicaGlobalSecondaryIndexDescription_indexName :: Lens.Lens' ReplicaGlobalSecondaryIndexDescription (Prelude.Maybe Prelude.Text)
replicaGlobalSecondaryIndexDescription_indexName :: (Maybe Text -> f (Maybe Text))
-> ReplicaGlobalSecondaryIndexDescription
-> f ReplicaGlobalSecondaryIndexDescription
replicaGlobalSecondaryIndexDescription_indexName = (ReplicaGlobalSecondaryIndexDescription -> Maybe Text)
-> (ReplicaGlobalSecondaryIndexDescription
-> Maybe Text -> ReplicaGlobalSecondaryIndexDescription)
-> Lens
ReplicaGlobalSecondaryIndexDescription
ReplicaGlobalSecondaryIndexDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReplicaGlobalSecondaryIndexDescription' {Maybe Text
indexName :: Maybe Text
$sel:indexName:ReplicaGlobalSecondaryIndexDescription' :: ReplicaGlobalSecondaryIndexDescription -> Maybe Text
indexName} -> Maybe Text
indexName) (\s :: ReplicaGlobalSecondaryIndexDescription
s@ReplicaGlobalSecondaryIndexDescription' {} Maybe Text
a -> ReplicaGlobalSecondaryIndexDescription
s {$sel:indexName:ReplicaGlobalSecondaryIndexDescription' :: Maybe Text
indexName = Maybe Text
a} :: ReplicaGlobalSecondaryIndexDescription)
instance
Core.FromJSON
ReplicaGlobalSecondaryIndexDescription
where
parseJSON :: Value -> Parser ReplicaGlobalSecondaryIndexDescription
parseJSON =
String
-> (Object -> Parser ReplicaGlobalSecondaryIndexDescription)
-> Value
-> Parser ReplicaGlobalSecondaryIndexDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ReplicaGlobalSecondaryIndexDescription"
( \Object
x ->
Maybe ProvisionedThroughputOverride
-> Maybe Text -> ReplicaGlobalSecondaryIndexDescription
ReplicaGlobalSecondaryIndexDescription'
(Maybe ProvisionedThroughputOverride
-> Maybe Text -> ReplicaGlobalSecondaryIndexDescription)
-> Parser (Maybe ProvisionedThroughputOverride)
-> Parser (Maybe Text -> ReplicaGlobalSecondaryIndexDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ProvisionedThroughputOverride)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProvisionedThroughputOverride")
Parser (Maybe Text -> ReplicaGlobalSecondaryIndexDescription)
-> Parser (Maybe Text)
-> Parser ReplicaGlobalSecondaryIndexDescription
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
ReplicaGlobalSecondaryIndexDescription
instance
Prelude.NFData
ReplicaGlobalSecondaryIndexDescription