{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DynamoDB.Types.AttributeValue
import Amazonka.DynamoDB.Types.WriteRequest
import qualified Amazonka.Prelude as Prelude
data DeleteGlobalSecondaryIndexAction = DeleteGlobalSecondaryIndexAction'
{
DeleteGlobalSecondaryIndexAction -> Text
indexName :: Prelude.Text
}
deriving (DeleteGlobalSecondaryIndexAction
-> DeleteGlobalSecondaryIndexAction -> Bool
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]
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
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.
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'
{ $sel:indexName:DeleteGlobalSecondaryIndexAction' :: Text
indexName =
Text
pIndexName_
}
deleteGlobalSecondaryIndexAction_indexName :: Lens.Lens' DeleteGlobalSecondaryIndexAction Prelude.Text
deleteGlobalSecondaryIndexAction_indexName :: Lens' DeleteGlobalSecondaryIndexAction Text
deleteGlobalSecondaryIndexAction_indexName = 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
where
hashWithSalt :: Int -> DeleteGlobalSecondaryIndexAction -> Int
hashWithSalt
Int
_salt
DeleteGlobalSecondaryIndexAction' {Text
indexName :: Text
$sel:indexName:DeleteGlobalSecondaryIndexAction' :: DeleteGlobalSecondaryIndexAction -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
indexName
instance
Prelude.NFData
DeleteGlobalSecondaryIndexAction
where
rnf :: DeleteGlobalSecondaryIndexAction -> ()
rnf DeleteGlobalSecondaryIndexAction' {Text
indexName :: Text
$sel:indexName:DeleteGlobalSecondaryIndexAction' :: DeleteGlobalSecondaryIndexAction -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
indexName
instance Data.ToJSON DeleteGlobalSecondaryIndexAction where
toJSON :: DeleteGlobalSecondaryIndexAction -> Value
toJSON DeleteGlobalSecondaryIndexAction' {Text
indexName :: Text
$sel:indexName:DeleteGlobalSecondaryIndexAction' :: DeleteGlobalSecondaryIndexAction -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"IndexName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
indexName)]
)