{-# 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.TransactWriteItems
(
TransactWriteItems (..),
newTransactWriteItems,
transactWriteItems_returnConsumedCapacity,
transactWriteItems_returnItemCollectionMetrics,
transactWriteItems_clientRequestToken,
transactWriteItems_transactItems,
TransactWriteItemsResponse (..),
newTransactWriteItemsResponse,
transactWriteItemsResponse_itemCollectionMetrics,
transactWriteItemsResponse_consumedCapacity,
transactWriteItemsResponse_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 TransactWriteItems = TransactWriteItems'
{ TransactWriteItems -> Maybe ReturnConsumedCapacity
returnConsumedCapacity :: Prelude.Maybe ReturnConsumedCapacity,
TransactWriteItems -> Maybe ReturnItemCollectionMetrics
returnItemCollectionMetrics :: Prelude.Maybe ReturnItemCollectionMetrics,
TransactWriteItems -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
TransactWriteItems -> NonEmpty TransactWriteItem
transactItems :: Prelude.NonEmpty TransactWriteItem
}
deriving (TransactWriteItems -> TransactWriteItems -> Bool
(TransactWriteItems -> TransactWriteItems -> Bool)
-> (TransactWriteItems -> TransactWriteItems -> Bool)
-> Eq TransactWriteItems
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TransactWriteItems -> TransactWriteItems -> Bool
$c/= :: TransactWriteItems -> TransactWriteItems -> Bool
== :: TransactWriteItems -> TransactWriteItems -> Bool
$c== :: TransactWriteItems -> TransactWriteItems -> Bool
Prelude.Eq, ReadPrec [TransactWriteItems]
ReadPrec TransactWriteItems
Int -> ReadS TransactWriteItems
ReadS [TransactWriteItems]
(Int -> ReadS TransactWriteItems)
-> ReadS [TransactWriteItems]
-> ReadPrec TransactWriteItems
-> ReadPrec [TransactWriteItems]
-> Read TransactWriteItems
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TransactWriteItems]
$creadListPrec :: ReadPrec [TransactWriteItems]
readPrec :: ReadPrec TransactWriteItems
$creadPrec :: ReadPrec TransactWriteItems
readList :: ReadS [TransactWriteItems]
$creadList :: ReadS [TransactWriteItems]
readsPrec :: Int -> ReadS TransactWriteItems
$creadsPrec :: Int -> ReadS TransactWriteItems
Prelude.Read, Int -> TransactWriteItems -> ShowS
[TransactWriteItems] -> ShowS
TransactWriteItems -> String
(Int -> TransactWriteItems -> ShowS)
-> (TransactWriteItems -> String)
-> ([TransactWriteItems] -> ShowS)
-> Show TransactWriteItems
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TransactWriteItems] -> ShowS
$cshowList :: [TransactWriteItems] -> ShowS
show :: TransactWriteItems -> String
$cshow :: TransactWriteItems -> String
showsPrec :: Int -> TransactWriteItems -> ShowS
$cshowsPrec :: Int -> TransactWriteItems -> ShowS
Prelude.Show, (forall x. TransactWriteItems -> Rep TransactWriteItems x)
-> (forall x. Rep TransactWriteItems x -> TransactWriteItems)
-> Generic TransactWriteItems
forall x. Rep TransactWriteItems x -> TransactWriteItems
forall x. TransactWriteItems -> Rep TransactWriteItems x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TransactWriteItems x -> TransactWriteItems
$cfrom :: forall x. TransactWriteItems -> Rep TransactWriteItems x
Prelude.Generic)
newTransactWriteItems ::
Prelude.NonEmpty TransactWriteItem ->
TransactWriteItems
newTransactWriteItems :: NonEmpty TransactWriteItem -> TransactWriteItems
newTransactWriteItems NonEmpty TransactWriteItem
pTransactItems_ =
TransactWriteItems' :: Maybe ReturnConsumedCapacity
-> Maybe ReturnItemCollectionMetrics
-> Maybe Text
-> NonEmpty TransactWriteItem
-> TransactWriteItems
TransactWriteItems'
{ $sel:returnConsumedCapacity:TransactWriteItems' :: Maybe ReturnConsumedCapacity
returnConsumedCapacity =
Maybe ReturnConsumedCapacity
forall a. Maybe a
Prelude.Nothing,
$sel:returnItemCollectionMetrics:TransactWriteItems' :: Maybe ReturnItemCollectionMetrics
returnItemCollectionMetrics = Maybe ReturnItemCollectionMetrics
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:TransactWriteItems' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:transactItems:TransactWriteItems' :: NonEmpty TransactWriteItem
transactItems = Tagged
(NonEmpty TransactWriteItem)
(Identity (NonEmpty TransactWriteItem))
-> Tagged
(NonEmpty TransactWriteItem)
(Identity (NonEmpty TransactWriteItem))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
(NonEmpty TransactWriteItem)
(Identity (NonEmpty TransactWriteItem))
-> Tagged
(NonEmpty TransactWriteItem)
(Identity (NonEmpty TransactWriteItem)))
-> NonEmpty TransactWriteItem -> NonEmpty TransactWriteItem
forall t b. AReview t b -> b -> t
Lens.# NonEmpty TransactWriteItem
pTransactItems_
}
transactWriteItems_returnConsumedCapacity :: Lens.Lens' TransactWriteItems (Prelude.Maybe ReturnConsumedCapacity)
transactWriteItems_returnConsumedCapacity :: (Maybe ReturnConsumedCapacity -> f (Maybe ReturnConsumedCapacity))
-> TransactWriteItems -> f TransactWriteItems
transactWriteItems_returnConsumedCapacity = (TransactWriteItems -> Maybe ReturnConsumedCapacity)
-> (TransactWriteItems
-> Maybe ReturnConsumedCapacity -> TransactWriteItems)
-> Lens
TransactWriteItems
TransactWriteItems
(Maybe ReturnConsumedCapacity)
(Maybe ReturnConsumedCapacity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransactWriteItems' {Maybe ReturnConsumedCapacity
returnConsumedCapacity :: Maybe ReturnConsumedCapacity
$sel:returnConsumedCapacity:TransactWriteItems' :: TransactWriteItems -> Maybe ReturnConsumedCapacity
returnConsumedCapacity} -> Maybe ReturnConsumedCapacity
returnConsumedCapacity) (\s :: TransactWriteItems
s@TransactWriteItems' {} Maybe ReturnConsumedCapacity
a -> TransactWriteItems
s {$sel:returnConsumedCapacity:TransactWriteItems' :: Maybe ReturnConsumedCapacity
returnConsumedCapacity = Maybe ReturnConsumedCapacity
a} :: TransactWriteItems)
transactWriteItems_returnItemCollectionMetrics :: Lens.Lens' TransactWriteItems (Prelude.Maybe ReturnItemCollectionMetrics)
transactWriteItems_returnItemCollectionMetrics :: (Maybe ReturnItemCollectionMetrics
-> f (Maybe ReturnItemCollectionMetrics))
-> TransactWriteItems -> f TransactWriteItems
transactWriteItems_returnItemCollectionMetrics = (TransactWriteItems -> Maybe ReturnItemCollectionMetrics)
-> (TransactWriteItems
-> Maybe ReturnItemCollectionMetrics -> TransactWriteItems)
-> Lens
TransactWriteItems
TransactWriteItems
(Maybe ReturnItemCollectionMetrics)
(Maybe ReturnItemCollectionMetrics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransactWriteItems' {Maybe ReturnItemCollectionMetrics
returnItemCollectionMetrics :: Maybe ReturnItemCollectionMetrics
$sel:returnItemCollectionMetrics:TransactWriteItems' :: TransactWriteItems -> Maybe ReturnItemCollectionMetrics
returnItemCollectionMetrics} -> Maybe ReturnItemCollectionMetrics
returnItemCollectionMetrics) (\s :: TransactWriteItems
s@TransactWriteItems' {} Maybe ReturnItemCollectionMetrics
a -> TransactWriteItems
s {$sel:returnItemCollectionMetrics:TransactWriteItems' :: Maybe ReturnItemCollectionMetrics
returnItemCollectionMetrics = Maybe ReturnItemCollectionMetrics
a} :: TransactWriteItems)
transactWriteItems_clientRequestToken :: Lens.Lens' TransactWriteItems (Prelude.Maybe Prelude.Text)
transactWriteItems_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> TransactWriteItems -> f TransactWriteItems
transactWriteItems_clientRequestToken = (TransactWriteItems -> Maybe Text)
-> (TransactWriteItems -> Maybe Text -> TransactWriteItems)
-> Lens
TransactWriteItems TransactWriteItems (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransactWriteItems' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:TransactWriteItems' :: TransactWriteItems -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: TransactWriteItems
s@TransactWriteItems' {} Maybe Text
a -> TransactWriteItems
s {$sel:clientRequestToken:TransactWriteItems' :: Maybe Text
clientRequestToken = Maybe Text
a} :: TransactWriteItems)
transactWriteItems_transactItems :: Lens.Lens' TransactWriteItems (Prelude.NonEmpty TransactWriteItem)
transactWriteItems_transactItems :: (NonEmpty TransactWriteItem -> f (NonEmpty TransactWriteItem))
-> TransactWriteItems -> f TransactWriteItems
transactWriteItems_transactItems = (TransactWriteItems -> NonEmpty TransactWriteItem)
-> (TransactWriteItems
-> NonEmpty TransactWriteItem -> TransactWriteItems)
-> Lens
TransactWriteItems
TransactWriteItems
(NonEmpty TransactWriteItem)
(NonEmpty TransactWriteItem)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransactWriteItems' {NonEmpty TransactWriteItem
transactItems :: NonEmpty TransactWriteItem
$sel:transactItems:TransactWriteItems' :: TransactWriteItems -> NonEmpty TransactWriteItem
transactItems} -> NonEmpty TransactWriteItem
transactItems) (\s :: TransactWriteItems
s@TransactWriteItems' {} NonEmpty TransactWriteItem
a -> TransactWriteItems
s {$sel:transactItems:TransactWriteItems' :: NonEmpty TransactWriteItem
transactItems = NonEmpty TransactWriteItem
a} :: TransactWriteItems) ((NonEmpty TransactWriteItem -> f (NonEmpty TransactWriteItem))
-> TransactWriteItems -> f TransactWriteItems)
-> ((NonEmpty TransactWriteItem -> f (NonEmpty TransactWriteItem))
-> NonEmpty TransactWriteItem -> f (NonEmpty TransactWriteItem))
-> (NonEmpty TransactWriteItem -> f (NonEmpty TransactWriteItem))
-> TransactWriteItems
-> f TransactWriteItems
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty TransactWriteItem -> f (NonEmpty TransactWriteItem))
-> NonEmpty TransactWriteItem -> f (NonEmpty TransactWriteItem)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest TransactWriteItems where
type
AWSResponse TransactWriteItems =
TransactWriteItemsResponse
request :: TransactWriteItems -> Request TransactWriteItems
request = Service -> TransactWriteItems -> Request TransactWriteItems
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy TransactWriteItems
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse TransactWriteItems)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse TransactWriteItems))
-> Logger
-> Service
-> Proxy TransactWriteItems
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse TransactWriteItems)))
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 (HashMap Text [ItemCollectionMetrics])
-> Maybe [ConsumedCapacity] -> Int -> TransactWriteItemsResponse
TransactWriteItemsResponse'
(Maybe (HashMap Text [ItemCollectionMetrics])
-> Maybe [ConsumedCapacity] -> Int -> TransactWriteItemsResponse)
-> Either String (Maybe (HashMap Text [ItemCollectionMetrics]))
-> Either
String
(Maybe [ConsumedCapacity] -> Int -> TransactWriteItemsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text
-> Either
String (Maybe (Maybe (HashMap Text [ItemCollectionMetrics])))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ItemCollectionMetrics"
Either
String (Maybe (Maybe (HashMap Text [ItemCollectionMetrics])))
-> Maybe (HashMap Text [ItemCollectionMetrics])
-> Either String (Maybe (HashMap Text [ItemCollectionMetrics]))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text [ItemCollectionMetrics])
forall a. Monoid a => a
Prelude.mempty
)
Either
String
(Maybe [ConsumedCapacity] -> Int -> TransactWriteItemsResponse)
-> Either String (Maybe [ConsumedCapacity])
-> Either String (Int -> TransactWriteItemsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [ConsumedCapacity]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ConsumedCapacity"
Either String (Maybe (Maybe [ConsumedCapacity]))
-> Maybe [ConsumedCapacity]
-> Either String (Maybe [ConsumedCapacity])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ConsumedCapacity]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Int -> TransactWriteItemsResponse)
-> Either String Int -> Either String TransactWriteItemsResponse
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 TransactWriteItems
instance Prelude.NFData TransactWriteItems
instance Core.ToHeaders TransactWriteItems where
toHeaders :: TransactWriteItems -> ResponseHeaders
toHeaders =
ResponseHeaders -> TransactWriteItems -> 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.TransactWriteItems" ::
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 TransactWriteItems where
toJSON :: TransactWriteItems -> Value
toJSON TransactWriteItems' {Maybe Text
Maybe ReturnConsumedCapacity
Maybe ReturnItemCollectionMetrics
NonEmpty TransactWriteItem
transactItems :: NonEmpty TransactWriteItem
clientRequestToken :: Maybe Text
returnItemCollectionMetrics :: Maybe ReturnItemCollectionMetrics
returnConsumedCapacity :: Maybe ReturnConsumedCapacity
$sel:transactItems:TransactWriteItems' :: TransactWriteItems -> NonEmpty TransactWriteItem
$sel:clientRequestToken:TransactWriteItems' :: TransactWriteItems -> Maybe Text
$sel:returnItemCollectionMetrics:TransactWriteItems' :: TransactWriteItems -> Maybe ReturnItemCollectionMetrics
$sel:returnConsumedCapacity:TransactWriteItems' :: TransactWriteItems -> Maybe ReturnConsumedCapacity
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
"ClientRequestToken" 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
clientRequestToken,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"TransactItems" Text -> NonEmpty TransactWriteItem -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty TransactWriteItem
transactItems)
]
)
instance Core.ToPath TransactWriteItems where
toPath :: TransactWriteItems -> ByteString
toPath = ByteString -> TransactWriteItems -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery TransactWriteItems where
toQuery :: TransactWriteItems -> QueryString
toQuery = QueryString -> TransactWriteItems -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data TransactWriteItemsResponse = TransactWriteItemsResponse'
{
TransactWriteItemsResponse
-> Maybe (HashMap Text [ItemCollectionMetrics])
itemCollectionMetrics :: Prelude.Maybe (Prelude.HashMap Prelude.Text [ItemCollectionMetrics]),
TransactWriteItemsResponse -> Maybe [ConsumedCapacity]
consumedCapacity :: Prelude.Maybe [ConsumedCapacity],
TransactWriteItemsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (TransactWriteItemsResponse -> TransactWriteItemsResponse -> Bool
(TransactWriteItemsResponse -> TransactWriteItemsResponse -> Bool)
-> (TransactWriteItemsResponse
-> TransactWriteItemsResponse -> Bool)
-> Eq TransactWriteItemsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TransactWriteItemsResponse -> TransactWriteItemsResponse -> Bool
$c/= :: TransactWriteItemsResponse -> TransactWriteItemsResponse -> Bool
== :: TransactWriteItemsResponse -> TransactWriteItemsResponse -> Bool
$c== :: TransactWriteItemsResponse -> TransactWriteItemsResponse -> Bool
Prelude.Eq, ReadPrec [TransactWriteItemsResponse]
ReadPrec TransactWriteItemsResponse
Int -> ReadS TransactWriteItemsResponse
ReadS [TransactWriteItemsResponse]
(Int -> ReadS TransactWriteItemsResponse)
-> ReadS [TransactWriteItemsResponse]
-> ReadPrec TransactWriteItemsResponse
-> ReadPrec [TransactWriteItemsResponse]
-> Read TransactWriteItemsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TransactWriteItemsResponse]
$creadListPrec :: ReadPrec [TransactWriteItemsResponse]
readPrec :: ReadPrec TransactWriteItemsResponse
$creadPrec :: ReadPrec TransactWriteItemsResponse
readList :: ReadS [TransactWriteItemsResponse]
$creadList :: ReadS [TransactWriteItemsResponse]
readsPrec :: Int -> ReadS TransactWriteItemsResponse
$creadsPrec :: Int -> ReadS TransactWriteItemsResponse
Prelude.Read, Int -> TransactWriteItemsResponse -> ShowS
[TransactWriteItemsResponse] -> ShowS
TransactWriteItemsResponse -> String
(Int -> TransactWriteItemsResponse -> ShowS)
-> (TransactWriteItemsResponse -> String)
-> ([TransactWriteItemsResponse] -> ShowS)
-> Show TransactWriteItemsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TransactWriteItemsResponse] -> ShowS
$cshowList :: [TransactWriteItemsResponse] -> ShowS
show :: TransactWriteItemsResponse -> String
$cshow :: TransactWriteItemsResponse -> String
showsPrec :: Int -> TransactWriteItemsResponse -> ShowS
$cshowsPrec :: Int -> TransactWriteItemsResponse -> ShowS
Prelude.Show, (forall x.
TransactWriteItemsResponse -> Rep TransactWriteItemsResponse x)
-> (forall x.
Rep TransactWriteItemsResponse x -> TransactWriteItemsResponse)
-> Generic TransactWriteItemsResponse
forall x.
Rep TransactWriteItemsResponse x -> TransactWriteItemsResponse
forall x.
TransactWriteItemsResponse -> Rep TransactWriteItemsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TransactWriteItemsResponse x -> TransactWriteItemsResponse
$cfrom :: forall x.
TransactWriteItemsResponse -> Rep TransactWriteItemsResponse x
Prelude.Generic)
newTransactWriteItemsResponse ::
Prelude.Int ->
TransactWriteItemsResponse
newTransactWriteItemsResponse :: Int -> TransactWriteItemsResponse
newTransactWriteItemsResponse Int
pHttpStatus_ =
TransactWriteItemsResponse' :: Maybe (HashMap Text [ItemCollectionMetrics])
-> Maybe [ConsumedCapacity] -> Int -> TransactWriteItemsResponse
TransactWriteItemsResponse'
{ $sel:itemCollectionMetrics:TransactWriteItemsResponse' :: Maybe (HashMap Text [ItemCollectionMetrics])
itemCollectionMetrics =
Maybe (HashMap Text [ItemCollectionMetrics])
forall a. Maybe a
Prelude.Nothing,
$sel:consumedCapacity:TransactWriteItemsResponse' :: Maybe [ConsumedCapacity]
consumedCapacity = Maybe [ConsumedCapacity]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:TransactWriteItemsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
transactWriteItemsResponse_itemCollectionMetrics :: Lens.Lens' TransactWriteItemsResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text [ItemCollectionMetrics]))
transactWriteItemsResponse_itemCollectionMetrics :: (Maybe (HashMap Text [ItemCollectionMetrics])
-> f (Maybe (HashMap Text [ItemCollectionMetrics])))
-> TransactWriteItemsResponse -> f TransactWriteItemsResponse
transactWriteItemsResponse_itemCollectionMetrics = (TransactWriteItemsResponse
-> Maybe (HashMap Text [ItemCollectionMetrics]))
-> (TransactWriteItemsResponse
-> Maybe (HashMap Text [ItemCollectionMetrics])
-> TransactWriteItemsResponse)
-> Lens
TransactWriteItemsResponse
TransactWriteItemsResponse
(Maybe (HashMap Text [ItemCollectionMetrics]))
(Maybe (HashMap Text [ItemCollectionMetrics]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransactWriteItemsResponse' {Maybe (HashMap Text [ItemCollectionMetrics])
itemCollectionMetrics :: Maybe (HashMap Text [ItemCollectionMetrics])
$sel:itemCollectionMetrics:TransactWriteItemsResponse' :: TransactWriteItemsResponse
-> Maybe (HashMap Text [ItemCollectionMetrics])
itemCollectionMetrics} -> Maybe (HashMap Text [ItemCollectionMetrics])
itemCollectionMetrics) (\s :: TransactWriteItemsResponse
s@TransactWriteItemsResponse' {} Maybe (HashMap Text [ItemCollectionMetrics])
a -> TransactWriteItemsResponse
s {$sel:itemCollectionMetrics:TransactWriteItemsResponse' :: Maybe (HashMap Text [ItemCollectionMetrics])
itemCollectionMetrics = Maybe (HashMap Text [ItemCollectionMetrics])
a} :: TransactWriteItemsResponse) ((Maybe (HashMap Text [ItemCollectionMetrics])
-> f (Maybe (HashMap Text [ItemCollectionMetrics])))
-> TransactWriteItemsResponse -> f TransactWriteItemsResponse)
-> ((Maybe (HashMap Text [ItemCollectionMetrics])
-> f (Maybe (HashMap Text [ItemCollectionMetrics])))
-> Maybe (HashMap Text [ItemCollectionMetrics])
-> f (Maybe (HashMap Text [ItemCollectionMetrics])))
-> (Maybe (HashMap Text [ItemCollectionMetrics])
-> f (Maybe (HashMap Text [ItemCollectionMetrics])))
-> TransactWriteItemsResponse
-> f TransactWriteItemsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text [ItemCollectionMetrics])
(HashMap Text [ItemCollectionMetrics])
(HashMap Text [ItemCollectionMetrics])
(HashMap Text [ItemCollectionMetrics])
-> Iso
(Maybe (HashMap Text [ItemCollectionMetrics]))
(Maybe (HashMap Text [ItemCollectionMetrics]))
(Maybe (HashMap Text [ItemCollectionMetrics]))
(Maybe (HashMap Text [ItemCollectionMetrics]))
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 [ItemCollectionMetrics])
(HashMap Text [ItemCollectionMetrics])
(HashMap Text [ItemCollectionMetrics])
(HashMap Text [ItemCollectionMetrics])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
transactWriteItemsResponse_consumedCapacity :: Lens.Lens' TransactWriteItemsResponse (Prelude.Maybe [ConsumedCapacity])
transactWriteItemsResponse_consumedCapacity :: (Maybe [ConsumedCapacity] -> f (Maybe [ConsumedCapacity]))
-> TransactWriteItemsResponse -> f TransactWriteItemsResponse
transactWriteItemsResponse_consumedCapacity = (TransactWriteItemsResponse -> Maybe [ConsumedCapacity])
-> (TransactWriteItemsResponse
-> Maybe [ConsumedCapacity] -> TransactWriteItemsResponse)
-> Lens
TransactWriteItemsResponse
TransactWriteItemsResponse
(Maybe [ConsumedCapacity])
(Maybe [ConsumedCapacity])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransactWriteItemsResponse' {Maybe [ConsumedCapacity]
consumedCapacity :: Maybe [ConsumedCapacity]
$sel:consumedCapacity:TransactWriteItemsResponse' :: TransactWriteItemsResponse -> Maybe [ConsumedCapacity]
consumedCapacity} -> Maybe [ConsumedCapacity]
consumedCapacity) (\s :: TransactWriteItemsResponse
s@TransactWriteItemsResponse' {} Maybe [ConsumedCapacity]
a -> TransactWriteItemsResponse
s {$sel:consumedCapacity:TransactWriteItemsResponse' :: Maybe [ConsumedCapacity]
consumedCapacity = Maybe [ConsumedCapacity]
a} :: TransactWriteItemsResponse) ((Maybe [ConsumedCapacity] -> f (Maybe [ConsumedCapacity]))
-> TransactWriteItemsResponse -> f TransactWriteItemsResponse)
-> ((Maybe [ConsumedCapacity] -> f (Maybe [ConsumedCapacity]))
-> Maybe [ConsumedCapacity] -> f (Maybe [ConsumedCapacity]))
-> (Maybe [ConsumedCapacity] -> f (Maybe [ConsumedCapacity]))
-> TransactWriteItemsResponse
-> f TransactWriteItemsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ConsumedCapacity]
[ConsumedCapacity]
[ConsumedCapacity]
[ConsumedCapacity]
-> Iso
(Maybe [ConsumedCapacity])
(Maybe [ConsumedCapacity])
(Maybe [ConsumedCapacity])
(Maybe [ConsumedCapacity])
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
[ConsumedCapacity]
[ConsumedCapacity]
[ConsumedCapacity]
[ConsumedCapacity]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
transactWriteItemsResponse_httpStatus :: Lens.Lens' TransactWriteItemsResponse Prelude.Int
transactWriteItemsResponse_httpStatus :: (Int -> f Int)
-> TransactWriteItemsResponse -> f TransactWriteItemsResponse
transactWriteItemsResponse_httpStatus = (TransactWriteItemsResponse -> Int)
-> (TransactWriteItemsResponse
-> Int -> TransactWriteItemsResponse)
-> Lens
TransactWriteItemsResponse TransactWriteItemsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransactWriteItemsResponse' {Int
httpStatus :: Int
$sel:httpStatus:TransactWriteItemsResponse' :: TransactWriteItemsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: TransactWriteItemsResponse
s@TransactWriteItemsResponse' {} Int
a -> TransactWriteItemsResponse
s {$sel:httpStatus:TransactWriteItemsResponse' :: Int
httpStatus = Int
a} :: TransactWriteItemsResponse)
instance Prelude.NFData TransactWriteItemsResponse