{-# 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.DeleteGlobalSecondaryIndexAction where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DeleteGlobalSecondaryIndexAction = DeleteGlobalSecondaryIndexAction'
{
DeleteGlobalSecondaryIndexAction -> Text
indexName :: Prelude.Text
}
deriving (DeleteGlobalSecondaryIndexAction
-> DeleteGlobalSecondaryIndexAction -> Bool
(DeleteGlobalSecondaryIndexAction
-> DeleteGlobalSecondaryIndexAction -> Bool)
-> (DeleteGlobalSecondaryIndexAction
-> DeleteGlobalSecondaryIndexAction -> Bool)
-> Eq DeleteGlobalSecondaryIndexAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteGlobalSecondaryIndexAction
-> DeleteGlobalSecondaryIndexAction -> Bool
$c/= :: DeleteGlobalSecondaryIndexAction
-> DeleteGlobalSecondaryIndexAction -> Bool
== :: DeleteGlobalSecondaryIndexAction
-> DeleteGlobalSecondaryIndexAction -> Bool
$c== :: DeleteGlobalSecondaryIndexAction
-> DeleteGlobalSecondaryIndexAction -> Bool
Prelude.Eq, ReadPrec [DeleteGlobalSecondaryIndexAction]
ReadPrec DeleteGlobalSecondaryIndexAction
Int -> ReadS DeleteGlobalSecondaryIndexAction
ReadS [DeleteGlobalSecondaryIndexAction]
(Int -> ReadS DeleteGlobalSecondaryIndexAction)
-> ReadS [DeleteGlobalSecondaryIndexAction]
-> ReadPrec DeleteGlobalSecondaryIndexAction
-> ReadPrec [DeleteGlobalSecondaryIndexAction]
-> Read DeleteGlobalSecondaryIndexAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteGlobalSecondaryIndexAction]
$creadListPrec :: ReadPrec [DeleteGlobalSecondaryIndexAction]
readPrec :: ReadPrec DeleteGlobalSecondaryIndexAction
$creadPrec :: ReadPrec DeleteGlobalSecondaryIndexAction
readList :: ReadS [DeleteGlobalSecondaryIndexAction]
$creadList :: ReadS [DeleteGlobalSecondaryIndexAction]
readsPrec :: Int -> ReadS DeleteGlobalSecondaryIndexAction
$creadsPrec :: Int -> ReadS DeleteGlobalSecondaryIndexAction
Prelude.Read, Int -> DeleteGlobalSecondaryIndexAction -> ShowS
[DeleteGlobalSecondaryIndexAction] -> ShowS
DeleteGlobalSecondaryIndexAction -> String
(Int -> DeleteGlobalSecondaryIndexAction -> ShowS)
-> (DeleteGlobalSecondaryIndexAction -> String)
-> ([DeleteGlobalSecondaryIndexAction] -> ShowS)
-> Show DeleteGlobalSecondaryIndexAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteGlobalSecondaryIndexAction] -> ShowS
$cshowList :: [DeleteGlobalSecondaryIndexAction] -> ShowS
show :: DeleteGlobalSecondaryIndexAction -> String
$cshow :: DeleteGlobalSecondaryIndexAction -> String
showsPrec :: Int -> DeleteGlobalSecondaryIndexAction -> ShowS
$cshowsPrec :: Int -> DeleteGlobalSecondaryIndexAction -> ShowS
Prelude.Show, (forall x.
DeleteGlobalSecondaryIndexAction
-> Rep DeleteGlobalSecondaryIndexAction x)
-> (forall x.
Rep DeleteGlobalSecondaryIndexAction x
-> DeleteGlobalSecondaryIndexAction)
-> Generic DeleteGlobalSecondaryIndexAction
forall x.
Rep DeleteGlobalSecondaryIndexAction x
-> DeleteGlobalSecondaryIndexAction
forall x.
DeleteGlobalSecondaryIndexAction
-> Rep DeleteGlobalSecondaryIndexAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteGlobalSecondaryIndexAction x
-> DeleteGlobalSecondaryIndexAction
$cfrom :: forall x.
DeleteGlobalSecondaryIndexAction
-> Rep DeleteGlobalSecondaryIndexAction x
Prelude.Generic)
newDeleteGlobalSecondaryIndexAction ::
Prelude.Text ->
DeleteGlobalSecondaryIndexAction
newDeleteGlobalSecondaryIndexAction :: Text -> DeleteGlobalSecondaryIndexAction
newDeleteGlobalSecondaryIndexAction Text
pIndexName_ =
DeleteGlobalSecondaryIndexAction' :: Text -> DeleteGlobalSecondaryIndexAction
DeleteGlobalSecondaryIndexAction'
{ $sel:indexName:DeleteGlobalSecondaryIndexAction' :: Text
indexName =
Text
pIndexName_
}
deleteGlobalSecondaryIndexAction_indexName :: Lens.Lens' DeleteGlobalSecondaryIndexAction Prelude.Text
deleteGlobalSecondaryIndexAction_indexName :: (Text -> f Text)
-> DeleteGlobalSecondaryIndexAction
-> f DeleteGlobalSecondaryIndexAction
deleteGlobalSecondaryIndexAction_indexName = (DeleteGlobalSecondaryIndexAction -> Text)
-> (DeleteGlobalSecondaryIndexAction
-> Text -> DeleteGlobalSecondaryIndexAction)
-> Lens
DeleteGlobalSecondaryIndexAction
DeleteGlobalSecondaryIndexAction
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteGlobalSecondaryIndexAction' {Text
indexName :: Text
$sel:indexName:DeleteGlobalSecondaryIndexAction' :: DeleteGlobalSecondaryIndexAction -> Text
indexName} -> Text
indexName) (\s :: DeleteGlobalSecondaryIndexAction
s@DeleteGlobalSecondaryIndexAction' {} Text
a -> DeleteGlobalSecondaryIndexAction
s {$sel:indexName:DeleteGlobalSecondaryIndexAction' :: Text
indexName = Text
a} :: DeleteGlobalSecondaryIndexAction)
instance
Prelude.Hashable
DeleteGlobalSecondaryIndexAction
instance
Prelude.NFData
DeleteGlobalSecondaryIndexAction
instance Core.ToJSON DeleteGlobalSecondaryIndexAction where
toJSON :: DeleteGlobalSecondaryIndexAction -> Value
toJSON DeleteGlobalSecondaryIndexAction' {Text
indexName :: Text
$sel:indexName:DeleteGlobalSecondaryIndexAction' :: DeleteGlobalSecondaryIndexAction -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"IndexName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
indexName)]
)