{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.DynamoDB.UpdateItem
(
UpdateItem (..),
newUpdateItem,
updateItem_expressionAttributeNames,
updateItem_returnValues,
updateItem_updateExpression,
updateItem_expressionAttributeValues,
updateItem_attributeUpdates,
updateItem_returnConsumedCapacity,
updateItem_returnItemCollectionMetrics,
updateItem_conditionExpression,
updateItem_conditionalOperator,
updateItem_expected,
updateItem_tableName,
updateItem_key,
UpdateItemResponse (..),
newUpdateItemResponse,
updateItemResponse_itemCollectionMetrics,
updateItemResponse_consumedCapacity,
updateItemResponse_attributes,
updateItemResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateItem = UpdateItem'
{
UpdateItem -> Maybe (HashMap Text Text)
expressionAttributeNames :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
UpdateItem -> Maybe ReturnValue
returnValues :: Prelude.Maybe ReturnValue,
UpdateItem -> Maybe Text
updateExpression :: Prelude.Maybe Prelude.Text,
UpdateItem -> Maybe (HashMap Text AttributeValue)
expressionAttributeValues :: Prelude.Maybe (Prelude.HashMap Prelude.Text AttributeValue),
UpdateItem -> Maybe (HashMap Text AttributeValueUpdate)
attributeUpdates :: Prelude.Maybe (Prelude.HashMap Prelude.Text AttributeValueUpdate),
UpdateItem -> Maybe ReturnConsumedCapacity
returnConsumedCapacity :: Prelude.Maybe ReturnConsumedCapacity,
UpdateItem -> Maybe ReturnItemCollectionMetrics
returnItemCollectionMetrics :: Prelude.Maybe ReturnItemCollectionMetrics,
UpdateItem -> Maybe Text
conditionExpression :: Prelude.Maybe Prelude.Text,
UpdateItem -> Maybe ConditionalOperator
conditionalOperator :: Prelude.Maybe ConditionalOperator,
UpdateItem -> Maybe (HashMap Text ExpectedAttributeValue)
expected :: Prelude.Maybe (Prelude.HashMap Prelude.Text ExpectedAttributeValue),
UpdateItem -> Text
tableName :: Prelude.Text,
UpdateItem -> HashMap Text AttributeValue
key :: Prelude.HashMap Prelude.Text AttributeValue
}
deriving (UpdateItem -> UpdateItem -> Bool
(UpdateItem -> UpdateItem -> Bool)
-> (UpdateItem -> UpdateItem -> Bool) -> Eq UpdateItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateItem -> UpdateItem -> Bool
$c/= :: UpdateItem -> UpdateItem -> Bool
== :: UpdateItem -> UpdateItem -> Bool
$c== :: UpdateItem -> UpdateItem -> Bool
Prelude.Eq, ReadPrec [UpdateItem]
ReadPrec UpdateItem
Int -> ReadS UpdateItem
ReadS [UpdateItem]
(Int -> ReadS UpdateItem)
-> ReadS [UpdateItem]
-> ReadPrec UpdateItem
-> ReadPrec [UpdateItem]
-> Read UpdateItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateItem]
$creadListPrec :: ReadPrec [UpdateItem]
readPrec :: ReadPrec UpdateItem
$creadPrec :: ReadPrec UpdateItem
readList :: ReadS [UpdateItem]
$creadList :: ReadS [UpdateItem]
readsPrec :: Int -> ReadS UpdateItem
$creadsPrec :: Int -> ReadS UpdateItem
Prelude.Read, Int -> UpdateItem -> ShowS
[UpdateItem] -> ShowS
UpdateItem -> String
(Int -> UpdateItem -> ShowS)
-> (UpdateItem -> String)
-> ([UpdateItem] -> ShowS)
-> Show UpdateItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateItem] -> ShowS
$cshowList :: [UpdateItem] -> ShowS
show :: UpdateItem -> String
$cshow :: UpdateItem -> String
showsPrec :: Int -> UpdateItem -> ShowS
$cshowsPrec :: Int -> UpdateItem -> ShowS
Prelude.Show, (forall x. UpdateItem -> Rep UpdateItem x)
-> (forall x. Rep UpdateItem x -> UpdateItem) -> Generic UpdateItem
forall x. Rep UpdateItem x -> UpdateItem
forall x. UpdateItem -> Rep UpdateItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateItem x -> UpdateItem
$cfrom :: forall x. UpdateItem -> Rep UpdateItem x
Prelude.Generic)
newUpdateItem ::
Prelude.Text ->
UpdateItem
newUpdateItem :: Text -> UpdateItem
newUpdateItem Text
pTableName_ =
UpdateItem' :: Maybe (HashMap Text Text)
-> Maybe ReturnValue
-> Maybe Text
-> Maybe (HashMap Text AttributeValue)
-> Maybe (HashMap Text AttributeValueUpdate)
-> Maybe ReturnConsumedCapacity
-> Maybe ReturnItemCollectionMetrics
-> Maybe Text
-> Maybe ConditionalOperator
-> Maybe (HashMap Text ExpectedAttributeValue)
-> Text
-> HashMap Text AttributeValue
-> UpdateItem
UpdateItem'
{ $sel:expressionAttributeNames:UpdateItem' :: Maybe (HashMap Text Text)
expressionAttributeNames =
Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:returnValues:UpdateItem' :: Maybe ReturnValue
returnValues = Maybe ReturnValue
forall a. Maybe a
Prelude.Nothing,
$sel:updateExpression:UpdateItem' :: Maybe Text
updateExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:expressionAttributeValues:UpdateItem' :: Maybe (HashMap Text AttributeValue)
expressionAttributeValues = Maybe (HashMap Text AttributeValue)
forall a. Maybe a
Prelude.Nothing,
$sel:attributeUpdates:UpdateItem' :: Maybe (HashMap Text AttributeValueUpdate)
attributeUpdates = Maybe (HashMap Text AttributeValueUpdate)
forall a. Maybe a
Prelude.Nothing,
$sel:returnConsumedCapacity:UpdateItem' :: Maybe ReturnConsumedCapacity
returnConsumedCapacity = Maybe ReturnConsumedCapacity
forall a. Maybe a
Prelude.Nothing,
$sel:returnItemCollectionMetrics:UpdateItem' :: Maybe ReturnItemCollectionMetrics
returnItemCollectionMetrics = Maybe ReturnItemCollectionMetrics
forall a. Maybe a
Prelude.Nothing,
$sel:conditionExpression:UpdateItem' :: Maybe Text
conditionExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:conditionalOperator:UpdateItem' :: Maybe ConditionalOperator
conditionalOperator = Maybe ConditionalOperator
forall a. Maybe a
Prelude.Nothing,
$sel:expected:UpdateItem' :: Maybe (HashMap Text ExpectedAttributeValue)
expected = Maybe (HashMap Text ExpectedAttributeValue)
forall a. Maybe a
Prelude.Nothing,
$sel:tableName:UpdateItem' :: Text
tableName = Text
pTableName_,
$sel:key:UpdateItem' :: HashMap Text AttributeValue
key = HashMap Text AttributeValue
forall a. Monoid a => a
Prelude.mempty
}
updateItem_expressionAttributeNames :: Lens.Lens' UpdateItem (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateItem_expressionAttributeNames :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateItem -> f UpdateItem
updateItem_expressionAttributeNames = (UpdateItem -> Maybe (HashMap Text Text))
-> (UpdateItem -> Maybe (HashMap Text Text) -> UpdateItem)
-> Lens
UpdateItem
UpdateItem
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItem' {Maybe (HashMap Text Text)
expressionAttributeNames :: Maybe (HashMap Text Text)
$sel:expressionAttributeNames:UpdateItem' :: UpdateItem -> Maybe (HashMap Text Text)
expressionAttributeNames} -> Maybe (HashMap Text Text)
expressionAttributeNames) (\s :: UpdateItem
s@UpdateItem' {} Maybe (HashMap Text Text)
a -> UpdateItem
s {$sel:expressionAttributeNames:UpdateItem' :: Maybe (HashMap Text Text)
expressionAttributeNames = Maybe (HashMap Text Text)
a} :: UpdateItem) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateItem -> f UpdateItem)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateItem
-> f UpdateItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateItem_returnValues :: Lens.Lens' UpdateItem (Prelude.Maybe ReturnValue)
updateItem_returnValues :: (Maybe ReturnValue -> f (Maybe ReturnValue))
-> UpdateItem -> f UpdateItem
updateItem_returnValues = (UpdateItem -> Maybe ReturnValue)
-> (UpdateItem -> Maybe ReturnValue -> UpdateItem)
-> Lens
UpdateItem UpdateItem (Maybe ReturnValue) (Maybe ReturnValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItem' {Maybe ReturnValue
returnValues :: Maybe ReturnValue
$sel:returnValues:UpdateItem' :: UpdateItem -> Maybe ReturnValue
returnValues} -> Maybe ReturnValue
returnValues) (\s :: UpdateItem
s@UpdateItem' {} Maybe ReturnValue
a -> UpdateItem
s {$sel:returnValues:UpdateItem' :: Maybe ReturnValue
returnValues = Maybe ReturnValue
a} :: UpdateItem)
updateItem_updateExpression :: Lens.Lens' UpdateItem (Prelude.Maybe Prelude.Text)
updateItem_updateExpression :: (Maybe Text -> f (Maybe Text)) -> UpdateItem -> f UpdateItem
updateItem_updateExpression = (UpdateItem -> Maybe Text)
-> (UpdateItem -> Maybe Text -> UpdateItem)
-> Lens UpdateItem UpdateItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItem' {Maybe Text
updateExpression :: Maybe Text
$sel:updateExpression:UpdateItem' :: UpdateItem -> Maybe Text
updateExpression} -> Maybe Text
updateExpression) (\s :: UpdateItem
s@UpdateItem' {} Maybe Text
a -> UpdateItem
s {$sel:updateExpression:UpdateItem' :: Maybe Text
updateExpression = Maybe Text
a} :: UpdateItem)
updateItem_expressionAttributeValues :: Lens.Lens' UpdateItem (Prelude.Maybe (Prelude.HashMap Prelude.Text AttributeValue))
updateItem_expressionAttributeValues :: (Maybe (HashMap Text AttributeValue)
-> f (Maybe (HashMap Text AttributeValue)))
-> UpdateItem -> f UpdateItem
updateItem_expressionAttributeValues = (UpdateItem -> Maybe (HashMap Text AttributeValue))
-> (UpdateItem
-> Maybe (HashMap Text AttributeValue) -> UpdateItem)
-> Lens
UpdateItem
UpdateItem
(Maybe (HashMap Text AttributeValue))
(Maybe (HashMap Text AttributeValue))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItem' {Maybe (HashMap Text AttributeValue)
expressionAttributeValues :: Maybe (HashMap Text AttributeValue)
$sel:expressionAttributeValues:UpdateItem' :: UpdateItem -> Maybe (HashMap Text AttributeValue)
expressionAttributeValues} -> Maybe (HashMap Text AttributeValue)
expressionAttributeValues) (\s :: UpdateItem
s@UpdateItem' {} Maybe (HashMap Text AttributeValue)
a -> UpdateItem
s {$sel:expressionAttributeValues:UpdateItem' :: Maybe (HashMap Text AttributeValue)
expressionAttributeValues = Maybe (HashMap Text AttributeValue)
a} :: UpdateItem) ((Maybe (HashMap Text AttributeValue)
-> f (Maybe (HashMap Text AttributeValue)))
-> UpdateItem -> f UpdateItem)
-> ((Maybe (HashMap Text AttributeValue)
-> f (Maybe (HashMap Text AttributeValue)))
-> Maybe (HashMap Text AttributeValue)
-> f (Maybe (HashMap Text AttributeValue)))
-> (Maybe (HashMap Text AttributeValue)
-> f (Maybe (HashMap Text AttributeValue)))
-> UpdateItem
-> f UpdateItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text AttributeValue)
(HashMap Text AttributeValue)
(HashMap Text AttributeValue)
(HashMap Text AttributeValue)
-> Iso
(Maybe (HashMap Text AttributeValue))
(Maybe (HashMap Text AttributeValue))
(Maybe (HashMap Text AttributeValue))
(Maybe (HashMap Text AttributeValue))
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
(HashMap Text AttributeValue)
(HashMap Text AttributeValue)
(HashMap Text AttributeValue)
(HashMap Text AttributeValue)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateItem_attributeUpdates :: Lens.Lens' UpdateItem (Prelude.Maybe (Prelude.HashMap Prelude.Text AttributeValueUpdate))
updateItem_attributeUpdates :: (Maybe (HashMap Text AttributeValueUpdate)
-> f (Maybe (HashMap Text AttributeValueUpdate)))
-> UpdateItem -> f UpdateItem
updateItem_attributeUpdates = (UpdateItem -> Maybe (HashMap Text AttributeValueUpdate))
-> (UpdateItem
-> Maybe (HashMap Text AttributeValueUpdate) -> UpdateItem)
-> Lens
UpdateItem
UpdateItem
(Maybe (HashMap Text AttributeValueUpdate))
(Maybe (HashMap Text AttributeValueUpdate))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItem' {Maybe (HashMap Text AttributeValueUpdate)
attributeUpdates :: Maybe (HashMap Text AttributeValueUpdate)
$sel:attributeUpdates:UpdateItem' :: UpdateItem -> Maybe (HashMap Text AttributeValueUpdate)
attributeUpdates} -> Maybe (HashMap Text AttributeValueUpdate)
attributeUpdates) (\s :: UpdateItem
s@UpdateItem' {} Maybe (HashMap Text AttributeValueUpdate)
a -> UpdateItem
s {$sel:attributeUpdates:UpdateItem' :: Maybe (HashMap Text AttributeValueUpdate)
attributeUpdates = Maybe (HashMap Text AttributeValueUpdate)
a} :: UpdateItem) ((Maybe (HashMap Text AttributeValueUpdate)
-> f (Maybe (HashMap Text AttributeValueUpdate)))
-> UpdateItem -> f UpdateItem)
-> ((Maybe (HashMap Text AttributeValueUpdate)
-> f (Maybe (HashMap Text AttributeValueUpdate)))
-> Maybe (HashMap Text AttributeValueUpdate)
-> f (Maybe (HashMap Text AttributeValueUpdate)))
-> (Maybe (HashMap Text AttributeValueUpdate)
-> f (Maybe (HashMap Text AttributeValueUpdate)))
-> UpdateItem
-> f UpdateItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text AttributeValueUpdate)
(HashMap Text AttributeValueUpdate)
(HashMap Text AttributeValueUpdate)
(HashMap Text AttributeValueUpdate)
-> Iso
(Maybe (HashMap Text AttributeValueUpdate))
(Maybe (HashMap Text AttributeValueUpdate))
(Maybe (HashMap Text AttributeValueUpdate))
(Maybe (HashMap Text AttributeValueUpdate))
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
(HashMap Text AttributeValueUpdate)
(HashMap Text AttributeValueUpdate)
(HashMap Text AttributeValueUpdate)
(HashMap Text AttributeValueUpdate)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateItem_returnConsumedCapacity :: Lens.Lens' UpdateItem (Prelude.Maybe ReturnConsumedCapacity)
updateItem_returnConsumedCapacity :: (Maybe ReturnConsumedCapacity -> f (Maybe ReturnConsumedCapacity))
-> UpdateItem -> f UpdateItem
updateItem_returnConsumedCapacity = (UpdateItem -> Maybe ReturnConsumedCapacity)
-> (UpdateItem -> Maybe ReturnConsumedCapacity -> UpdateItem)
-> Lens
UpdateItem
UpdateItem
(Maybe ReturnConsumedCapacity)
(Maybe ReturnConsumedCapacity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItem' {Maybe ReturnConsumedCapacity
returnConsumedCapacity :: Maybe ReturnConsumedCapacity
$sel:returnConsumedCapacity:UpdateItem' :: UpdateItem -> Maybe ReturnConsumedCapacity
returnConsumedCapacity} -> Maybe ReturnConsumedCapacity
returnConsumedCapacity) (\s :: UpdateItem
s@UpdateItem' {} Maybe ReturnConsumedCapacity
a -> UpdateItem
s {$sel:returnConsumedCapacity:UpdateItem' :: Maybe ReturnConsumedCapacity
returnConsumedCapacity = Maybe ReturnConsumedCapacity
a} :: UpdateItem)
updateItem_returnItemCollectionMetrics :: Lens.Lens' UpdateItem (Prelude.Maybe ReturnItemCollectionMetrics)
updateItem_returnItemCollectionMetrics :: (Maybe ReturnItemCollectionMetrics
-> f (Maybe ReturnItemCollectionMetrics))
-> UpdateItem -> f UpdateItem
updateItem_returnItemCollectionMetrics = (UpdateItem -> Maybe ReturnItemCollectionMetrics)
-> (UpdateItem -> Maybe ReturnItemCollectionMetrics -> UpdateItem)
-> Lens
UpdateItem
UpdateItem
(Maybe ReturnItemCollectionMetrics)
(Maybe ReturnItemCollectionMetrics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItem' {Maybe ReturnItemCollectionMetrics
returnItemCollectionMetrics :: Maybe ReturnItemCollectionMetrics
$sel:returnItemCollectionMetrics:UpdateItem' :: UpdateItem -> Maybe ReturnItemCollectionMetrics
returnItemCollectionMetrics} -> Maybe ReturnItemCollectionMetrics
returnItemCollectionMetrics) (\s :: UpdateItem
s@UpdateItem' {} Maybe ReturnItemCollectionMetrics
a -> UpdateItem
s {$sel:returnItemCollectionMetrics:UpdateItem' :: Maybe ReturnItemCollectionMetrics
returnItemCollectionMetrics = Maybe ReturnItemCollectionMetrics
a} :: UpdateItem)
updateItem_conditionExpression :: Lens.Lens' UpdateItem (Prelude.Maybe Prelude.Text)
updateItem_conditionExpression :: (Maybe Text -> f (Maybe Text)) -> UpdateItem -> f UpdateItem
updateItem_conditionExpression = (UpdateItem -> Maybe Text)
-> (UpdateItem -> Maybe Text -> UpdateItem)
-> Lens UpdateItem UpdateItem (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItem' {Maybe Text
conditionExpression :: Maybe Text
$sel:conditionExpression:UpdateItem' :: UpdateItem -> Maybe Text
conditionExpression} -> Maybe Text
conditionExpression) (\s :: UpdateItem
s@UpdateItem' {} Maybe Text
a -> UpdateItem
s {$sel:conditionExpression:UpdateItem' :: Maybe Text
conditionExpression = Maybe Text
a} :: UpdateItem)
updateItem_conditionalOperator :: Lens.Lens' UpdateItem (Prelude.Maybe ConditionalOperator)
updateItem_conditionalOperator :: (Maybe ConditionalOperator -> f (Maybe ConditionalOperator))
-> UpdateItem -> f UpdateItem
updateItem_conditionalOperator = (UpdateItem -> Maybe ConditionalOperator)
-> (UpdateItem -> Maybe ConditionalOperator -> UpdateItem)
-> Lens
UpdateItem
UpdateItem
(Maybe ConditionalOperator)
(Maybe ConditionalOperator)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItem' {Maybe ConditionalOperator
conditionalOperator :: Maybe ConditionalOperator
$sel:conditionalOperator:UpdateItem' :: UpdateItem -> Maybe ConditionalOperator
conditionalOperator} -> Maybe ConditionalOperator
conditionalOperator) (\s :: UpdateItem
s@UpdateItem' {} Maybe ConditionalOperator
a -> UpdateItem
s {$sel:conditionalOperator:UpdateItem' :: Maybe ConditionalOperator
conditionalOperator = Maybe ConditionalOperator
a} :: UpdateItem)
updateItem_expected :: Lens.Lens' UpdateItem (Prelude.Maybe (Prelude.HashMap Prelude.Text ExpectedAttributeValue))
updateItem_expected :: (Maybe (HashMap Text ExpectedAttributeValue)
-> f (Maybe (HashMap Text ExpectedAttributeValue)))
-> UpdateItem -> f UpdateItem
updateItem_expected = (UpdateItem -> Maybe (HashMap Text ExpectedAttributeValue))
-> (UpdateItem
-> Maybe (HashMap Text ExpectedAttributeValue) -> UpdateItem)
-> Lens
UpdateItem
UpdateItem
(Maybe (HashMap Text ExpectedAttributeValue))
(Maybe (HashMap Text ExpectedAttributeValue))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItem' {Maybe (HashMap Text ExpectedAttributeValue)
expected :: Maybe (HashMap Text ExpectedAttributeValue)
$sel:expected:UpdateItem' :: UpdateItem -> Maybe (HashMap Text ExpectedAttributeValue)
expected} -> Maybe (HashMap Text ExpectedAttributeValue)
expected) (\s :: UpdateItem
s@UpdateItem' {} Maybe (HashMap Text ExpectedAttributeValue)
a -> UpdateItem
s {$sel:expected:UpdateItem' :: Maybe (HashMap Text ExpectedAttributeValue)
expected = Maybe (HashMap Text ExpectedAttributeValue)
a} :: UpdateItem) ((Maybe (HashMap Text ExpectedAttributeValue)
-> f (Maybe (HashMap Text ExpectedAttributeValue)))
-> UpdateItem -> f UpdateItem)
-> ((Maybe (HashMap Text ExpectedAttributeValue)
-> f (Maybe (HashMap Text ExpectedAttributeValue)))
-> Maybe (HashMap Text ExpectedAttributeValue)
-> f (Maybe (HashMap Text ExpectedAttributeValue)))
-> (Maybe (HashMap Text ExpectedAttributeValue)
-> f (Maybe (HashMap Text ExpectedAttributeValue)))
-> UpdateItem
-> f UpdateItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text ExpectedAttributeValue)
(HashMap Text ExpectedAttributeValue)
(HashMap Text ExpectedAttributeValue)
(HashMap Text ExpectedAttributeValue)
-> Iso
(Maybe (HashMap Text ExpectedAttributeValue))
(Maybe (HashMap Text ExpectedAttributeValue))
(Maybe (HashMap Text ExpectedAttributeValue))
(Maybe (HashMap Text ExpectedAttributeValue))
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
(HashMap Text ExpectedAttributeValue)
(HashMap Text ExpectedAttributeValue)
(HashMap Text ExpectedAttributeValue)
(HashMap Text ExpectedAttributeValue)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateItem_tableName :: Lens.Lens' UpdateItem Prelude.Text
updateItem_tableName :: (Text -> f Text) -> UpdateItem -> f UpdateItem
updateItem_tableName = (UpdateItem -> Text)
-> (UpdateItem -> Text -> UpdateItem)
-> Lens UpdateItem UpdateItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItem' {Text
tableName :: Text
$sel:tableName:UpdateItem' :: UpdateItem -> Text
tableName} -> Text
tableName) (\s :: UpdateItem
s@UpdateItem' {} Text
a -> UpdateItem
s {$sel:tableName:UpdateItem' :: Text
tableName = Text
a} :: UpdateItem)
updateItem_key :: Lens.Lens' UpdateItem (Prelude.HashMap Prelude.Text AttributeValue)
updateItem_key :: (HashMap Text AttributeValue -> f (HashMap Text AttributeValue))
-> UpdateItem -> f UpdateItem
updateItem_key = (UpdateItem -> HashMap Text AttributeValue)
-> (UpdateItem -> HashMap Text AttributeValue -> UpdateItem)
-> Lens
UpdateItem
UpdateItem
(HashMap Text AttributeValue)
(HashMap Text AttributeValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItem' {HashMap Text AttributeValue
key :: HashMap Text AttributeValue
$sel:key:UpdateItem' :: UpdateItem -> HashMap Text AttributeValue
key} -> HashMap Text AttributeValue
key) (\s :: UpdateItem
s@UpdateItem' {} HashMap Text AttributeValue
a -> UpdateItem
s {$sel:key:UpdateItem' :: HashMap Text AttributeValue
key = HashMap Text AttributeValue
a} :: UpdateItem) ((HashMap Text AttributeValue -> f (HashMap Text AttributeValue))
-> UpdateItem -> f UpdateItem)
-> ((HashMap Text AttributeValue
-> f (HashMap Text AttributeValue))
-> HashMap Text AttributeValue -> f (HashMap Text AttributeValue))
-> (HashMap Text AttributeValue -> f (HashMap Text AttributeValue))
-> UpdateItem
-> f UpdateItem
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text AttributeValue -> f (HashMap Text AttributeValue))
-> HashMap Text AttributeValue -> f (HashMap Text AttributeValue)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest UpdateItem where
type AWSResponse UpdateItem = UpdateItemResponse
request :: UpdateItem -> Request UpdateItem
request = Service -> UpdateItem -> Request UpdateItem
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateItem
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateItem)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateItem))
-> Logger
-> Service
-> Proxy UpdateItem
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateItem)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe ItemCollectionMetrics
-> Maybe ConsumedCapacity
-> Maybe (HashMap Text AttributeValue)
-> Int
-> UpdateItemResponse
UpdateItemResponse'
(Maybe ItemCollectionMetrics
-> Maybe ConsumedCapacity
-> Maybe (HashMap Text AttributeValue)
-> Int
-> UpdateItemResponse)
-> Either String (Maybe ItemCollectionMetrics)
-> Either
String
(Maybe ConsumedCapacity
-> Maybe (HashMap Text AttributeValue)
-> Int
-> UpdateItemResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ItemCollectionMetrics)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ItemCollectionMetrics")
Either
String
(Maybe ConsumedCapacity
-> Maybe (HashMap Text AttributeValue)
-> Int
-> UpdateItemResponse)
-> Either String (Maybe ConsumedCapacity)
-> Either
String
(Maybe (HashMap Text AttributeValue) -> Int -> UpdateItemResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ConsumedCapacity)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ConsumedCapacity")
Either
String
(Maybe (HashMap Text AttributeValue) -> Int -> UpdateItemResponse)
-> Either String (Maybe (HashMap Text AttributeValue))
-> Either String (Int -> UpdateItemResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (Maybe (HashMap Text AttributeValue)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Attributes" Either String (Maybe (Maybe (HashMap Text AttributeValue)))
-> Maybe (HashMap Text AttributeValue)
-> Either String (Maybe (HashMap Text AttributeValue))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text AttributeValue)
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> UpdateItemResponse)
-> Either String Int -> Either String UpdateItemResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable UpdateItem
instance Prelude.NFData UpdateItem
instance Core.ToHeaders UpdateItem where
toHeaders :: UpdateItem -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateItem -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"DynamoDB_20120810.UpdateItem" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateItem where
toJSON :: UpdateItem -> Value
toJSON UpdateItem' {Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text AttributeValue)
Maybe (HashMap Text AttributeValueUpdate)
Maybe (HashMap Text ExpectedAttributeValue)
Maybe ConditionalOperator
Maybe ReturnConsumedCapacity
Maybe ReturnItemCollectionMetrics
Maybe ReturnValue
Text
HashMap Text AttributeValue
key :: HashMap Text AttributeValue
tableName :: Text
expected :: Maybe (HashMap Text ExpectedAttributeValue)
conditionalOperator :: Maybe ConditionalOperator
conditionExpression :: Maybe Text
returnItemCollectionMetrics :: Maybe ReturnItemCollectionMetrics
returnConsumedCapacity :: Maybe ReturnConsumedCapacity
attributeUpdates :: Maybe (HashMap Text AttributeValueUpdate)
expressionAttributeValues :: Maybe (HashMap Text AttributeValue)
updateExpression :: Maybe Text
returnValues :: Maybe ReturnValue
expressionAttributeNames :: Maybe (HashMap Text Text)
$sel:key:UpdateItem' :: UpdateItem -> HashMap Text AttributeValue
$sel:tableName:UpdateItem' :: UpdateItem -> Text
$sel:expected:UpdateItem' :: UpdateItem -> Maybe (HashMap Text ExpectedAttributeValue)
$sel:conditionalOperator:UpdateItem' :: UpdateItem -> Maybe ConditionalOperator
$sel:conditionExpression:UpdateItem' :: UpdateItem -> Maybe Text
$sel:returnItemCollectionMetrics:UpdateItem' :: UpdateItem -> Maybe ReturnItemCollectionMetrics
$sel:returnConsumedCapacity:UpdateItem' :: UpdateItem -> Maybe ReturnConsumedCapacity
$sel:attributeUpdates:UpdateItem' :: UpdateItem -> Maybe (HashMap Text AttributeValueUpdate)
$sel:expressionAttributeValues:UpdateItem' :: UpdateItem -> Maybe (HashMap Text AttributeValue)
$sel:updateExpression:UpdateItem' :: UpdateItem -> Maybe Text
$sel:returnValues:UpdateItem' :: UpdateItem -> Maybe ReturnValue
$sel:expressionAttributeNames:UpdateItem' :: UpdateItem -> Maybe (HashMap Text Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ExpressionAttributeNames" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
expressionAttributeNames,
(Text
"ReturnValues" Text -> ReturnValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ReturnValue -> Pair) -> Maybe ReturnValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReturnValue
returnValues,
(Text
"UpdateExpression" 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
updateExpression,
(Text
"ExpressionAttributeValues" Text -> HashMap Text AttributeValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text AttributeValue -> Pair)
-> Maybe (HashMap Text AttributeValue) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text AttributeValue)
expressionAttributeValues,
(Text
"AttributeUpdates" Text -> HashMap Text AttributeValueUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text AttributeValueUpdate -> Pair)
-> Maybe (HashMap Text AttributeValueUpdate) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text AttributeValueUpdate)
attributeUpdates,
(Text
"ReturnConsumedCapacity" Text -> ReturnConsumedCapacity -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ReturnConsumedCapacity -> Pair)
-> Maybe ReturnConsumedCapacity -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReturnConsumedCapacity
returnConsumedCapacity,
(Text
"ReturnItemCollectionMetrics" Text -> ReturnItemCollectionMetrics -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ReturnItemCollectionMetrics -> Pair)
-> Maybe ReturnItemCollectionMetrics -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ReturnItemCollectionMetrics
returnItemCollectionMetrics,
(Text
"ConditionExpression" 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
conditionExpression,
(Text
"ConditionalOperator" Text -> ConditionalOperator -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ConditionalOperator -> Pair)
-> Maybe ConditionalOperator -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConditionalOperator
conditionalOperator,
(Text
"Expected" Text -> HashMap Text ExpectedAttributeValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text ExpectedAttributeValue -> Pair)
-> Maybe (HashMap Text ExpectedAttributeValue) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text ExpectedAttributeValue)
expected,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TableName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
tableName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Key" Text -> HashMap Text AttributeValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= HashMap Text AttributeValue
key)
]
)
instance Core.ToPath UpdateItem where
toPath :: UpdateItem -> ByteString
toPath = ByteString -> UpdateItem -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateItem where
toQuery :: UpdateItem -> QueryString
toQuery = QueryString -> UpdateItem -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateItemResponse = UpdateItemResponse'
{
UpdateItemResponse -> Maybe ItemCollectionMetrics
itemCollectionMetrics :: Prelude.Maybe ItemCollectionMetrics,
UpdateItemResponse -> Maybe ConsumedCapacity
consumedCapacity :: Prelude.Maybe ConsumedCapacity,
UpdateItemResponse -> Maybe (HashMap Text AttributeValue)
attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text AttributeValue),
UpdateItemResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateItemResponse -> UpdateItemResponse -> Bool
(UpdateItemResponse -> UpdateItemResponse -> Bool)
-> (UpdateItemResponse -> UpdateItemResponse -> Bool)
-> Eq UpdateItemResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateItemResponse -> UpdateItemResponse -> Bool
$c/= :: UpdateItemResponse -> UpdateItemResponse -> Bool
== :: UpdateItemResponse -> UpdateItemResponse -> Bool
$c== :: UpdateItemResponse -> UpdateItemResponse -> Bool
Prelude.Eq, ReadPrec [UpdateItemResponse]
ReadPrec UpdateItemResponse
Int -> ReadS UpdateItemResponse
ReadS [UpdateItemResponse]
(Int -> ReadS UpdateItemResponse)
-> ReadS [UpdateItemResponse]
-> ReadPrec UpdateItemResponse
-> ReadPrec [UpdateItemResponse]
-> Read UpdateItemResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateItemResponse]
$creadListPrec :: ReadPrec [UpdateItemResponse]
readPrec :: ReadPrec UpdateItemResponse
$creadPrec :: ReadPrec UpdateItemResponse
readList :: ReadS [UpdateItemResponse]
$creadList :: ReadS [UpdateItemResponse]
readsPrec :: Int -> ReadS UpdateItemResponse
$creadsPrec :: Int -> ReadS UpdateItemResponse
Prelude.Read, Int -> UpdateItemResponse -> ShowS
[UpdateItemResponse] -> ShowS
UpdateItemResponse -> String
(Int -> UpdateItemResponse -> ShowS)
-> (UpdateItemResponse -> String)
-> ([UpdateItemResponse] -> ShowS)
-> Show UpdateItemResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateItemResponse] -> ShowS
$cshowList :: [UpdateItemResponse] -> ShowS
show :: UpdateItemResponse -> String
$cshow :: UpdateItemResponse -> String
showsPrec :: Int -> UpdateItemResponse -> ShowS
$cshowsPrec :: Int -> UpdateItemResponse -> ShowS
Prelude.Show, (forall x. UpdateItemResponse -> Rep UpdateItemResponse x)
-> (forall x. Rep UpdateItemResponse x -> UpdateItemResponse)
-> Generic UpdateItemResponse
forall x. Rep UpdateItemResponse x -> UpdateItemResponse
forall x. UpdateItemResponse -> Rep UpdateItemResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateItemResponse x -> UpdateItemResponse
$cfrom :: forall x. UpdateItemResponse -> Rep UpdateItemResponse x
Prelude.Generic)
newUpdateItemResponse ::
Prelude.Int ->
UpdateItemResponse
newUpdateItemResponse :: Int -> UpdateItemResponse
newUpdateItemResponse Int
pHttpStatus_ =
UpdateItemResponse' :: Maybe ItemCollectionMetrics
-> Maybe ConsumedCapacity
-> Maybe (HashMap Text AttributeValue)
-> Int
-> UpdateItemResponse
UpdateItemResponse'
{ $sel:itemCollectionMetrics:UpdateItemResponse' :: Maybe ItemCollectionMetrics
itemCollectionMetrics =
Maybe ItemCollectionMetrics
forall a. Maybe a
Prelude.Nothing,
$sel:consumedCapacity:UpdateItemResponse' :: Maybe ConsumedCapacity
consumedCapacity = Maybe ConsumedCapacity
forall a. Maybe a
Prelude.Nothing,
$sel:attributes:UpdateItemResponse' :: Maybe (HashMap Text AttributeValue)
attributes = Maybe (HashMap Text AttributeValue)
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateItemResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateItemResponse_itemCollectionMetrics :: Lens.Lens' UpdateItemResponse (Prelude.Maybe ItemCollectionMetrics)
updateItemResponse_itemCollectionMetrics :: (Maybe ItemCollectionMetrics -> f (Maybe ItemCollectionMetrics))
-> UpdateItemResponse -> f UpdateItemResponse
updateItemResponse_itemCollectionMetrics = (UpdateItemResponse -> Maybe ItemCollectionMetrics)
-> (UpdateItemResponse
-> Maybe ItemCollectionMetrics -> UpdateItemResponse)
-> Lens
UpdateItemResponse
UpdateItemResponse
(Maybe ItemCollectionMetrics)
(Maybe ItemCollectionMetrics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItemResponse' {Maybe ItemCollectionMetrics
itemCollectionMetrics :: Maybe ItemCollectionMetrics
$sel:itemCollectionMetrics:UpdateItemResponse' :: UpdateItemResponse -> Maybe ItemCollectionMetrics
itemCollectionMetrics} -> Maybe ItemCollectionMetrics
itemCollectionMetrics) (\s :: UpdateItemResponse
s@UpdateItemResponse' {} Maybe ItemCollectionMetrics
a -> UpdateItemResponse
s {$sel:itemCollectionMetrics:UpdateItemResponse' :: Maybe ItemCollectionMetrics
itemCollectionMetrics = Maybe ItemCollectionMetrics
a} :: UpdateItemResponse)
updateItemResponse_consumedCapacity :: Lens.Lens' UpdateItemResponse (Prelude.Maybe ConsumedCapacity)
updateItemResponse_consumedCapacity :: (Maybe ConsumedCapacity -> f (Maybe ConsumedCapacity))
-> UpdateItemResponse -> f UpdateItemResponse
updateItemResponse_consumedCapacity = (UpdateItemResponse -> Maybe ConsumedCapacity)
-> (UpdateItemResponse
-> Maybe ConsumedCapacity -> UpdateItemResponse)
-> Lens
UpdateItemResponse
UpdateItemResponse
(Maybe ConsumedCapacity)
(Maybe ConsumedCapacity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItemResponse' {Maybe ConsumedCapacity
consumedCapacity :: Maybe ConsumedCapacity
$sel:consumedCapacity:UpdateItemResponse' :: UpdateItemResponse -> Maybe ConsumedCapacity
consumedCapacity} -> Maybe ConsumedCapacity
consumedCapacity) (\s :: UpdateItemResponse
s@UpdateItemResponse' {} Maybe ConsumedCapacity
a -> UpdateItemResponse
s {$sel:consumedCapacity:UpdateItemResponse' :: Maybe ConsumedCapacity
consumedCapacity = Maybe ConsumedCapacity
a} :: UpdateItemResponse)
updateItemResponse_attributes :: Lens.Lens' UpdateItemResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text AttributeValue))
updateItemResponse_attributes :: (Maybe (HashMap Text AttributeValue)
-> f (Maybe (HashMap Text AttributeValue)))
-> UpdateItemResponse -> f UpdateItemResponse
updateItemResponse_attributes = (UpdateItemResponse -> Maybe (HashMap Text AttributeValue))
-> (UpdateItemResponse
-> Maybe (HashMap Text AttributeValue) -> UpdateItemResponse)
-> Lens
UpdateItemResponse
UpdateItemResponse
(Maybe (HashMap Text AttributeValue))
(Maybe (HashMap Text AttributeValue))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItemResponse' {Maybe (HashMap Text AttributeValue)
attributes :: Maybe (HashMap Text AttributeValue)
$sel:attributes:UpdateItemResponse' :: UpdateItemResponse -> Maybe (HashMap Text AttributeValue)
attributes} -> Maybe (HashMap Text AttributeValue)
attributes) (\s :: UpdateItemResponse
s@UpdateItemResponse' {} Maybe (HashMap Text AttributeValue)
a -> UpdateItemResponse
s {$sel:attributes:UpdateItemResponse' :: Maybe (HashMap Text AttributeValue)
attributes = Maybe (HashMap Text AttributeValue)
a} :: UpdateItemResponse) ((Maybe (HashMap Text AttributeValue)
-> f (Maybe (HashMap Text AttributeValue)))
-> UpdateItemResponse -> f UpdateItemResponse)
-> ((Maybe (HashMap Text AttributeValue)
-> f (Maybe (HashMap Text AttributeValue)))
-> Maybe (HashMap Text AttributeValue)
-> f (Maybe (HashMap Text AttributeValue)))
-> (Maybe (HashMap Text AttributeValue)
-> f (Maybe (HashMap Text AttributeValue)))
-> UpdateItemResponse
-> f UpdateItemResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text AttributeValue)
(HashMap Text AttributeValue)
(HashMap Text AttributeValue)
(HashMap Text AttributeValue)
-> Iso
(Maybe (HashMap Text AttributeValue))
(Maybe (HashMap Text AttributeValue))
(Maybe (HashMap Text AttributeValue))
(Maybe (HashMap Text AttributeValue))
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
(HashMap Text AttributeValue)
(HashMap Text AttributeValue)
(HashMap Text AttributeValue)
(HashMap Text AttributeValue)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateItemResponse_httpStatus :: Lens.Lens' UpdateItemResponse Prelude.Int
updateItemResponse_httpStatus :: (Int -> f Int) -> UpdateItemResponse -> f UpdateItemResponse
updateItemResponse_httpStatus = (UpdateItemResponse -> Int)
-> (UpdateItemResponse -> Int -> UpdateItemResponse)
-> Lens UpdateItemResponse UpdateItemResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateItemResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateItemResponse' :: UpdateItemResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateItemResponse
s@UpdateItemResponse' {} Int
a -> UpdateItemResponse
s {$sel:httpStatus:UpdateItemResponse' :: Int
httpStatus = Int
a} :: UpdateItemResponse)
instance Prelude.NFData UpdateItemResponse