{-# 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.HoneyCode.BatchUpsertTableRows
(
BatchUpsertTableRows (..),
newBatchUpsertTableRows,
batchUpsertTableRows_clientRequestToken,
batchUpsertTableRows_workbookId,
batchUpsertTableRows_tableId,
batchUpsertTableRows_rowsToUpsert,
BatchUpsertTableRowsResponse (..),
newBatchUpsertTableRowsResponse,
batchUpsertTableRowsResponse_failedBatchItems,
batchUpsertTableRowsResponse_httpStatus,
batchUpsertTableRowsResponse_rows,
batchUpsertTableRowsResponse_workbookCursor,
)
where
import qualified Amazonka.Core as Core
import Amazonka.HoneyCode.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 BatchUpsertTableRows = BatchUpsertTableRows'
{
BatchUpsertTableRows -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
BatchUpsertTableRows -> Text
workbookId :: Prelude.Text,
BatchUpsertTableRows -> Text
tableId :: Prelude.Text,
BatchUpsertTableRows -> [UpsertRowData]
rowsToUpsert :: [UpsertRowData]
}
deriving (BatchUpsertTableRows -> BatchUpsertTableRows -> Bool
(BatchUpsertTableRows -> BatchUpsertTableRows -> Bool)
-> (BatchUpsertTableRows -> BatchUpsertTableRows -> Bool)
-> Eq BatchUpsertTableRows
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchUpsertTableRows -> BatchUpsertTableRows -> Bool
$c/= :: BatchUpsertTableRows -> BatchUpsertTableRows -> Bool
== :: BatchUpsertTableRows -> BatchUpsertTableRows -> Bool
$c== :: BatchUpsertTableRows -> BatchUpsertTableRows -> Bool
Prelude.Eq, Int -> BatchUpsertTableRows -> ShowS
[BatchUpsertTableRows] -> ShowS
BatchUpsertTableRows -> String
(Int -> BatchUpsertTableRows -> ShowS)
-> (BatchUpsertTableRows -> String)
-> ([BatchUpsertTableRows] -> ShowS)
-> Show BatchUpsertTableRows
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchUpsertTableRows] -> ShowS
$cshowList :: [BatchUpsertTableRows] -> ShowS
show :: BatchUpsertTableRows -> String
$cshow :: BatchUpsertTableRows -> String
showsPrec :: Int -> BatchUpsertTableRows -> ShowS
$cshowsPrec :: Int -> BatchUpsertTableRows -> ShowS
Prelude.Show, (forall x. BatchUpsertTableRows -> Rep BatchUpsertTableRows x)
-> (forall x. Rep BatchUpsertTableRows x -> BatchUpsertTableRows)
-> Generic BatchUpsertTableRows
forall x. Rep BatchUpsertTableRows x -> BatchUpsertTableRows
forall x. BatchUpsertTableRows -> Rep BatchUpsertTableRows x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchUpsertTableRows x -> BatchUpsertTableRows
$cfrom :: forall x. BatchUpsertTableRows -> Rep BatchUpsertTableRows x
Prelude.Generic)
newBatchUpsertTableRows ::
Prelude.Text ->
Prelude.Text ->
BatchUpsertTableRows
newBatchUpsertTableRows :: Text -> Text -> BatchUpsertTableRows
newBatchUpsertTableRows Text
pWorkbookId_ Text
pTableId_ =
BatchUpsertTableRows' :: Maybe Text
-> Text -> Text -> [UpsertRowData] -> BatchUpsertTableRows
BatchUpsertTableRows'
{ $sel:clientRequestToken:BatchUpsertTableRows' :: Maybe Text
clientRequestToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:workbookId:BatchUpsertTableRows' :: Text
workbookId = Text
pWorkbookId_,
$sel:tableId:BatchUpsertTableRows' :: Text
tableId = Text
pTableId_,
$sel:rowsToUpsert:BatchUpsertTableRows' :: [UpsertRowData]
rowsToUpsert = [UpsertRowData]
forall a. Monoid a => a
Prelude.mempty
}
batchUpsertTableRows_clientRequestToken :: Lens.Lens' BatchUpsertTableRows (Prelude.Maybe Prelude.Text)
batchUpsertTableRows_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> BatchUpsertTableRows -> f BatchUpsertTableRows
batchUpsertTableRows_clientRequestToken = (BatchUpsertTableRows -> Maybe Text)
-> (BatchUpsertTableRows -> Maybe Text -> BatchUpsertTableRows)
-> Lens
BatchUpsertTableRows BatchUpsertTableRows (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpsertTableRows' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:BatchUpsertTableRows' :: BatchUpsertTableRows -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: BatchUpsertTableRows
s@BatchUpsertTableRows' {} Maybe Text
a -> BatchUpsertTableRows
s {$sel:clientRequestToken:BatchUpsertTableRows' :: Maybe Text
clientRequestToken = Maybe Text
a} :: BatchUpsertTableRows)
batchUpsertTableRows_workbookId :: Lens.Lens' BatchUpsertTableRows Prelude.Text
batchUpsertTableRows_workbookId :: (Text -> f Text) -> BatchUpsertTableRows -> f BatchUpsertTableRows
batchUpsertTableRows_workbookId = (BatchUpsertTableRows -> Text)
-> (BatchUpsertTableRows -> Text -> BatchUpsertTableRows)
-> Lens BatchUpsertTableRows BatchUpsertTableRows Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpsertTableRows' {Text
workbookId :: Text
$sel:workbookId:BatchUpsertTableRows' :: BatchUpsertTableRows -> Text
workbookId} -> Text
workbookId) (\s :: BatchUpsertTableRows
s@BatchUpsertTableRows' {} Text
a -> BatchUpsertTableRows
s {$sel:workbookId:BatchUpsertTableRows' :: Text
workbookId = Text
a} :: BatchUpsertTableRows)
batchUpsertTableRows_tableId :: Lens.Lens' BatchUpsertTableRows Prelude.Text
batchUpsertTableRows_tableId :: (Text -> f Text) -> BatchUpsertTableRows -> f BatchUpsertTableRows
batchUpsertTableRows_tableId = (BatchUpsertTableRows -> Text)
-> (BatchUpsertTableRows -> Text -> BatchUpsertTableRows)
-> Lens BatchUpsertTableRows BatchUpsertTableRows Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpsertTableRows' {Text
tableId :: Text
$sel:tableId:BatchUpsertTableRows' :: BatchUpsertTableRows -> Text
tableId} -> Text
tableId) (\s :: BatchUpsertTableRows
s@BatchUpsertTableRows' {} Text
a -> BatchUpsertTableRows
s {$sel:tableId:BatchUpsertTableRows' :: Text
tableId = Text
a} :: BatchUpsertTableRows)
batchUpsertTableRows_rowsToUpsert :: Lens.Lens' BatchUpsertTableRows [UpsertRowData]
batchUpsertTableRows_rowsToUpsert :: ([UpsertRowData] -> f [UpsertRowData])
-> BatchUpsertTableRows -> f BatchUpsertTableRows
batchUpsertTableRows_rowsToUpsert = (BatchUpsertTableRows -> [UpsertRowData])
-> (BatchUpsertTableRows
-> [UpsertRowData] -> BatchUpsertTableRows)
-> Lens
BatchUpsertTableRows
BatchUpsertTableRows
[UpsertRowData]
[UpsertRowData]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpsertTableRows' {[UpsertRowData]
rowsToUpsert :: [UpsertRowData]
$sel:rowsToUpsert:BatchUpsertTableRows' :: BatchUpsertTableRows -> [UpsertRowData]
rowsToUpsert} -> [UpsertRowData]
rowsToUpsert) (\s :: BatchUpsertTableRows
s@BatchUpsertTableRows' {} [UpsertRowData]
a -> BatchUpsertTableRows
s {$sel:rowsToUpsert:BatchUpsertTableRows' :: [UpsertRowData]
rowsToUpsert = [UpsertRowData]
a} :: BatchUpsertTableRows) (([UpsertRowData] -> f [UpsertRowData])
-> BatchUpsertTableRows -> f BatchUpsertTableRows)
-> (([UpsertRowData] -> f [UpsertRowData])
-> [UpsertRowData] -> f [UpsertRowData])
-> ([UpsertRowData] -> f [UpsertRowData])
-> BatchUpsertTableRows
-> f BatchUpsertTableRows
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([UpsertRowData] -> f [UpsertRowData])
-> [UpsertRowData] -> f [UpsertRowData]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest BatchUpsertTableRows where
type
AWSResponse BatchUpsertTableRows =
BatchUpsertTableRowsResponse
request :: BatchUpsertTableRows -> Request BatchUpsertTableRows
request = Service -> BatchUpsertTableRows -> Request BatchUpsertTableRows
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy BatchUpsertTableRows
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse BatchUpsertTableRows)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse BatchUpsertTableRows))
-> Logger
-> Service
-> Proxy BatchUpsertTableRows
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse BatchUpsertTableRows)))
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 [FailedBatchItem]
-> Int
-> HashMap Text UpsertRowsResult
-> Integer
-> BatchUpsertTableRowsResponse
BatchUpsertTableRowsResponse'
(Maybe [FailedBatchItem]
-> Int
-> HashMap Text UpsertRowsResult
-> Integer
-> BatchUpsertTableRowsResponse)
-> Either String (Maybe [FailedBatchItem])
-> Either
String
(Int
-> HashMap Text UpsertRowsResult
-> Integer
-> BatchUpsertTableRowsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [FailedBatchItem]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"failedBatchItems"
Either String (Maybe (Maybe [FailedBatchItem]))
-> Maybe [FailedBatchItem]
-> Either String (Maybe [FailedBatchItem])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [FailedBatchItem]
forall a. Monoid a => a
Prelude.mempty
)
Either
String
(Int
-> HashMap Text UpsertRowsResult
-> Integer
-> BatchUpsertTableRowsResponse)
-> Either String Int
-> Either
String
(HashMap Text UpsertRowsResult
-> Integer -> BatchUpsertTableRowsResponse)
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))
Either
String
(HashMap Text UpsertRowsResult
-> Integer -> BatchUpsertTableRowsResponse)
-> Either String (HashMap Text UpsertRowsResult)
-> Either String (Integer -> BatchUpsertTableRowsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe (HashMap Text UpsertRowsResult))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"rows" Either String (Maybe (HashMap Text UpsertRowsResult))
-> HashMap Text UpsertRowsResult
-> Either String (HashMap Text UpsertRowsResult)
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ HashMap Text UpsertRowsResult
forall a. Monoid a => a
Prelude.mempty)
Either String (Integer -> BatchUpsertTableRowsResponse)
-> Either String Integer
-> Either String BatchUpsertTableRowsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Integer
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"workbookCursor")
)
instance Prelude.Hashable BatchUpsertTableRows
instance Prelude.NFData BatchUpsertTableRows
instance Core.ToHeaders BatchUpsertTableRows where
toHeaders :: BatchUpsertTableRows -> ResponseHeaders
toHeaders =
ResponseHeaders -> BatchUpsertTableRows -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON BatchUpsertTableRows where
toJSON :: BatchUpsertTableRows -> Value
toJSON BatchUpsertTableRows' {[UpsertRowData]
Maybe Text
Text
rowsToUpsert :: [UpsertRowData]
tableId :: Text
workbookId :: Text
clientRequestToken :: Maybe Text
$sel:rowsToUpsert:BatchUpsertTableRows' :: BatchUpsertTableRows -> [UpsertRowData]
$sel:tableId:BatchUpsertTableRows' :: BatchUpsertTableRows -> Text
$sel:workbookId:BatchUpsertTableRows' :: BatchUpsertTableRows -> Text
$sel:clientRequestToken:BatchUpsertTableRows' :: BatchUpsertTableRows -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
"rowsToUpsert" Text -> [UpsertRowData] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [UpsertRowData]
rowsToUpsert)
]
)
instance Core.ToPath BatchUpsertTableRows where
toPath :: BatchUpsertTableRows -> ByteString
toPath BatchUpsertTableRows' {[UpsertRowData]
Maybe Text
Text
rowsToUpsert :: [UpsertRowData]
tableId :: Text
workbookId :: Text
clientRequestToken :: Maybe Text
$sel:rowsToUpsert:BatchUpsertTableRows' :: BatchUpsertTableRows -> [UpsertRowData]
$sel:tableId:BatchUpsertTableRows' :: BatchUpsertTableRows -> Text
$sel:workbookId:BatchUpsertTableRows' :: BatchUpsertTableRows -> Text
$sel:clientRequestToken:BatchUpsertTableRows' :: BatchUpsertTableRows -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/workbooks/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
workbookId,
ByteString
"/tables/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
tableId,
ByteString
"/rows/batchupsert"
]
instance Core.ToQuery BatchUpsertTableRows where
toQuery :: BatchUpsertTableRows -> QueryString
toQuery = QueryString -> BatchUpsertTableRows -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data BatchUpsertTableRowsResponse = BatchUpsertTableRowsResponse'
{
BatchUpsertTableRowsResponse -> Maybe [FailedBatchItem]
failedBatchItems :: Prelude.Maybe [FailedBatchItem],
BatchUpsertTableRowsResponse -> Int
httpStatus :: Prelude.Int,
BatchUpsertTableRowsResponse -> HashMap Text UpsertRowsResult
rows :: Prelude.HashMap Prelude.Text UpsertRowsResult,
BatchUpsertTableRowsResponse -> Integer
workbookCursor :: Prelude.Integer
}
deriving (BatchUpsertTableRowsResponse
-> BatchUpsertTableRowsResponse -> Bool
(BatchUpsertTableRowsResponse
-> BatchUpsertTableRowsResponse -> Bool)
-> (BatchUpsertTableRowsResponse
-> BatchUpsertTableRowsResponse -> Bool)
-> Eq BatchUpsertTableRowsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchUpsertTableRowsResponse
-> BatchUpsertTableRowsResponse -> Bool
$c/= :: BatchUpsertTableRowsResponse
-> BatchUpsertTableRowsResponse -> Bool
== :: BatchUpsertTableRowsResponse
-> BatchUpsertTableRowsResponse -> Bool
$c== :: BatchUpsertTableRowsResponse
-> BatchUpsertTableRowsResponse -> Bool
Prelude.Eq, ReadPrec [BatchUpsertTableRowsResponse]
ReadPrec BatchUpsertTableRowsResponse
Int -> ReadS BatchUpsertTableRowsResponse
ReadS [BatchUpsertTableRowsResponse]
(Int -> ReadS BatchUpsertTableRowsResponse)
-> ReadS [BatchUpsertTableRowsResponse]
-> ReadPrec BatchUpsertTableRowsResponse
-> ReadPrec [BatchUpsertTableRowsResponse]
-> Read BatchUpsertTableRowsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchUpsertTableRowsResponse]
$creadListPrec :: ReadPrec [BatchUpsertTableRowsResponse]
readPrec :: ReadPrec BatchUpsertTableRowsResponse
$creadPrec :: ReadPrec BatchUpsertTableRowsResponse
readList :: ReadS [BatchUpsertTableRowsResponse]
$creadList :: ReadS [BatchUpsertTableRowsResponse]
readsPrec :: Int -> ReadS BatchUpsertTableRowsResponse
$creadsPrec :: Int -> ReadS BatchUpsertTableRowsResponse
Prelude.Read, Int -> BatchUpsertTableRowsResponse -> ShowS
[BatchUpsertTableRowsResponse] -> ShowS
BatchUpsertTableRowsResponse -> String
(Int -> BatchUpsertTableRowsResponse -> ShowS)
-> (BatchUpsertTableRowsResponse -> String)
-> ([BatchUpsertTableRowsResponse] -> ShowS)
-> Show BatchUpsertTableRowsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchUpsertTableRowsResponse] -> ShowS
$cshowList :: [BatchUpsertTableRowsResponse] -> ShowS
show :: BatchUpsertTableRowsResponse -> String
$cshow :: BatchUpsertTableRowsResponse -> String
showsPrec :: Int -> BatchUpsertTableRowsResponse -> ShowS
$cshowsPrec :: Int -> BatchUpsertTableRowsResponse -> ShowS
Prelude.Show, (forall x.
BatchUpsertTableRowsResponse -> Rep BatchUpsertTableRowsResponse x)
-> (forall x.
Rep BatchUpsertTableRowsResponse x -> BatchUpsertTableRowsResponse)
-> Generic BatchUpsertTableRowsResponse
forall x.
Rep BatchUpsertTableRowsResponse x -> BatchUpsertTableRowsResponse
forall x.
BatchUpsertTableRowsResponse -> Rep BatchUpsertTableRowsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchUpsertTableRowsResponse x -> BatchUpsertTableRowsResponse
$cfrom :: forall x.
BatchUpsertTableRowsResponse -> Rep BatchUpsertTableRowsResponse x
Prelude.Generic)
newBatchUpsertTableRowsResponse ::
Prelude.Int ->
Prelude.Integer ->
BatchUpsertTableRowsResponse
newBatchUpsertTableRowsResponse :: Int -> Integer -> BatchUpsertTableRowsResponse
newBatchUpsertTableRowsResponse
Int
pHttpStatus_
Integer
pWorkbookCursor_ =
BatchUpsertTableRowsResponse' :: Maybe [FailedBatchItem]
-> Int
-> HashMap Text UpsertRowsResult
-> Integer
-> BatchUpsertTableRowsResponse
BatchUpsertTableRowsResponse'
{ $sel:failedBatchItems:BatchUpsertTableRowsResponse' :: Maybe [FailedBatchItem]
failedBatchItems =
Maybe [FailedBatchItem]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:BatchUpsertTableRowsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:rows:BatchUpsertTableRowsResponse' :: HashMap Text UpsertRowsResult
rows = HashMap Text UpsertRowsResult
forall a. Monoid a => a
Prelude.mempty,
$sel:workbookCursor:BatchUpsertTableRowsResponse' :: Integer
workbookCursor = Integer
pWorkbookCursor_
}
batchUpsertTableRowsResponse_failedBatchItems :: Lens.Lens' BatchUpsertTableRowsResponse (Prelude.Maybe [FailedBatchItem])
batchUpsertTableRowsResponse_failedBatchItems :: (Maybe [FailedBatchItem] -> f (Maybe [FailedBatchItem]))
-> BatchUpsertTableRowsResponse -> f BatchUpsertTableRowsResponse
batchUpsertTableRowsResponse_failedBatchItems = (BatchUpsertTableRowsResponse -> Maybe [FailedBatchItem])
-> (BatchUpsertTableRowsResponse
-> Maybe [FailedBatchItem] -> BatchUpsertTableRowsResponse)
-> Lens
BatchUpsertTableRowsResponse
BatchUpsertTableRowsResponse
(Maybe [FailedBatchItem])
(Maybe [FailedBatchItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpsertTableRowsResponse' {Maybe [FailedBatchItem]
failedBatchItems :: Maybe [FailedBatchItem]
$sel:failedBatchItems:BatchUpsertTableRowsResponse' :: BatchUpsertTableRowsResponse -> Maybe [FailedBatchItem]
failedBatchItems} -> Maybe [FailedBatchItem]
failedBatchItems) (\s :: BatchUpsertTableRowsResponse
s@BatchUpsertTableRowsResponse' {} Maybe [FailedBatchItem]
a -> BatchUpsertTableRowsResponse
s {$sel:failedBatchItems:BatchUpsertTableRowsResponse' :: Maybe [FailedBatchItem]
failedBatchItems = Maybe [FailedBatchItem]
a} :: BatchUpsertTableRowsResponse) ((Maybe [FailedBatchItem] -> f (Maybe [FailedBatchItem]))
-> BatchUpsertTableRowsResponse -> f BatchUpsertTableRowsResponse)
-> ((Maybe [FailedBatchItem] -> f (Maybe [FailedBatchItem]))
-> Maybe [FailedBatchItem] -> f (Maybe [FailedBatchItem]))
-> (Maybe [FailedBatchItem] -> f (Maybe [FailedBatchItem]))
-> BatchUpsertTableRowsResponse
-> f BatchUpsertTableRowsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[FailedBatchItem]
[FailedBatchItem]
[FailedBatchItem]
[FailedBatchItem]
-> Iso
(Maybe [FailedBatchItem])
(Maybe [FailedBatchItem])
(Maybe [FailedBatchItem])
(Maybe [FailedBatchItem])
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
[FailedBatchItem]
[FailedBatchItem]
[FailedBatchItem]
[FailedBatchItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
batchUpsertTableRowsResponse_httpStatus :: Lens.Lens' BatchUpsertTableRowsResponse Prelude.Int
batchUpsertTableRowsResponse_httpStatus :: (Int -> f Int)
-> BatchUpsertTableRowsResponse -> f BatchUpsertTableRowsResponse
batchUpsertTableRowsResponse_httpStatus = (BatchUpsertTableRowsResponse -> Int)
-> (BatchUpsertTableRowsResponse
-> Int -> BatchUpsertTableRowsResponse)
-> Lens
BatchUpsertTableRowsResponse BatchUpsertTableRowsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpsertTableRowsResponse' {Int
httpStatus :: Int
$sel:httpStatus:BatchUpsertTableRowsResponse' :: BatchUpsertTableRowsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: BatchUpsertTableRowsResponse
s@BatchUpsertTableRowsResponse' {} Int
a -> BatchUpsertTableRowsResponse
s {$sel:httpStatus:BatchUpsertTableRowsResponse' :: Int
httpStatus = Int
a} :: BatchUpsertTableRowsResponse)
batchUpsertTableRowsResponse_rows :: Lens.Lens' BatchUpsertTableRowsResponse (Prelude.HashMap Prelude.Text UpsertRowsResult)
batchUpsertTableRowsResponse_rows :: (HashMap Text UpsertRowsResult
-> f (HashMap Text UpsertRowsResult))
-> BatchUpsertTableRowsResponse -> f BatchUpsertTableRowsResponse
batchUpsertTableRowsResponse_rows = (BatchUpsertTableRowsResponse -> HashMap Text UpsertRowsResult)
-> (BatchUpsertTableRowsResponse
-> HashMap Text UpsertRowsResult -> BatchUpsertTableRowsResponse)
-> Lens
BatchUpsertTableRowsResponse
BatchUpsertTableRowsResponse
(HashMap Text UpsertRowsResult)
(HashMap Text UpsertRowsResult)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpsertTableRowsResponse' {HashMap Text UpsertRowsResult
rows :: HashMap Text UpsertRowsResult
$sel:rows:BatchUpsertTableRowsResponse' :: BatchUpsertTableRowsResponse -> HashMap Text UpsertRowsResult
rows} -> HashMap Text UpsertRowsResult
rows) (\s :: BatchUpsertTableRowsResponse
s@BatchUpsertTableRowsResponse' {} HashMap Text UpsertRowsResult
a -> BatchUpsertTableRowsResponse
s {$sel:rows:BatchUpsertTableRowsResponse' :: HashMap Text UpsertRowsResult
rows = HashMap Text UpsertRowsResult
a} :: BatchUpsertTableRowsResponse) ((HashMap Text UpsertRowsResult
-> f (HashMap Text UpsertRowsResult))
-> BatchUpsertTableRowsResponse -> f BatchUpsertTableRowsResponse)
-> ((HashMap Text UpsertRowsResult
-> f (HashMap Text UpsertRowsResult))
-> HashMap Text UpsertRowsResult
-> f (HashMap Text UpsertRowsResult))
-> (HashMap Text UpsertRowsResult
-> f (HashMap Text UpsertRowsResult))
-> BatchUpsertTableRowsResponse
-> f BatchUpsertTableRowsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text UpsertRowsResult
-> f (HashMap Text UpsertRowsResult))
-> HashMap Text UpsertRowsResult
-> f (HashMap Text UpsertRowsResult)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
batchUpsertTableRowsResponse_workbookCursor :: Lens.Lens' BatchUpsertTableRowsResponse Prelude.Integer
batchUpsertTableRowsResponse_workbookCursor :: (Integer -> f Integer)
-> BatchUpsertTableRowsResponse -> f BatchUpsertTableRowsResponse
batchUpsertTableRowsResponse_workbookCursor = (BatchUpsertTableRowsResponse -> Integer)
-> (BatchUpsertTableRowsResponse
-> Integer -> BatchUpsertTableRowsResponse)
-> Lens
BatchUpsertTableRowsResponse
BatchUpsertTableRowsResponse
Integer
Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpsertTableRowsResponse' {Integer
workbookCursor :: Integer
$sel:workbookCursor:BatchUpsertTableRowsResponse' :: BatchUpsertTableRowsResponse -> Integer
workbookCursor} -> Integer
workbookCursor) (\s :: BatchUpsertTableRowsResponse
s@BatchUpsertTableRowsResponse' {} Integer
a -> BatchUpsertTableRowsResponse
s {$sel:workbookCursor:BatchUpsertTableRowsResponse' :: Integer
workbookCursor = Integer
a} :: BatchUpsertTableRowsResponse)
instance Prelude.NFData BatchUpsertTableRowsResponse