{-# 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.ListTableRows
(
ListTableRows (..),
newListTableRows,
listTableRows_rowIds,
listTableRows_nextToken,
listTableRows_maxResults,
listTableRows_workbookId,
listTableRows_tableId,
ListTableRowsResponse (..),
newListTableRowsResponse,
listTableRowsResponse_rowIdsNotFound,
listTableRowsResponse_nextToken,
listTableRowsResponse_httpStatus,
listTableRowsResponse_columnIds,
listTableRowsResponse_rows,
listTableRowsResponse_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 ListTableRows = ListTableRows'
{
ListTableRows -> Maybe (NonEmpty Text)
rowIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
ListTableRows -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTableRows -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListTableRows -> Text
workbookId :: Prelude.Text,
ListTableRows -> Text
tableId :: Prelude.Text
}
deriving (ListTableRows -> ListTableRows -> Bool
(ListTableRows -> ListTableRows -> Bool)
-> (ListTableRows -> ListTableRows -> Bool) -> Eq ListTableRows
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTableRows -> ListTableRows -> Bool
$c/= :: ListTableRows -> ListTableRows -> Bool
== :: ListTableRows -> ListTableRows -> Bool
$c== :: ListTableRows -> ListTableRows -> Bool
Prelude.Eq, ReadPrec [ListTableRows]
ReadPrec ListTableRows
Int -> ReadS ListTableRows
ReadS [ListTableRows]
(Int -> ReadS ListTableRows)
-> ReadS [ListTableRows]
-> ReadPrec ListTableRows
-> ReadPrec [ListTableRows]
-> Read ListTableRows
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTableRows]
$creadListPrec :: ReadPrec [ListTableRows]
readPrec :: ReadPrec ListTableRows
$creadPrec :: ReadPrec ListTableRows
readList :: ReadS [ListTableRows]
$creadList :: ReadS [ListTableRows]
readsPrec :: Int -> ReadS ListTableRows
$creadsPrec :: Int -> ReadS ListTableRows
Prelude.Read, Int -> ListTableRows -> ShowS
[ListTableRows] -> ShowS
ListTableRows -> String
(Int -> ListTableRows -> ShowS)
-> (ListTableRows -> String)
-> ([ListTableRows] -> ShowS)
-> Show ListTableRows
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTableRows] -> ShowS
$cshowList :: [ListTableRows] -> ShowS
show :: ListTableRows -> String
$cshow :: ListTableRows -> String
showsPrec :: Int -> ListTableRows -> ShowS
$cshowsPrec :: Int -> ListTableRows -> ShowS
Prelude.Show, (forall x. ListTableRows -> Rep ListTableRows x)
-> (forall x. Rep ListTableRows x -> ListTableRows)
-> Generic ListTableRows
forall x. Rep ListTableRows x -> ListTableRows
forall x. ListTableRows -> Rep ListTableRows x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTableRows x -> ListTableRows
$cfrom :: forall x. ListTableRows -> Rep ListTableRows x
Prelude.Generic)
newListTableRows ::
Prelude.Text ->
Prelude.Text ->
ListTableRows
newListTableRows :: Text -> Text -> ListTableRows
newListTableRows Text
pWorkbookId_ Text
pTableId_ =
ListTableRows' :: Maybe (NonEmpty Text)
-> Maybe Text -> Maybe Natural -> Text -> Text -> ListTableRows
ListTableRows'
{ $sel:rowIds:ListTableRows' :: Maybe (NonEmpty Text)
rowIds = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListTableRows' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListTableRows' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:workbookId:ListTableRows' :: Text
workbookId = Text
pWorkbookId_,
$sel:tableId:ListTableRows' :: Text
tableId = Text
pTableId_
}
listTableRows_rowIds :: Lens.Lens' ListTableRows (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
listTableRows_rowIds :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListTableRows -> f ListTableRows
listTableRows_rowIds = (ListTableRows -> Maybe (NonEmpty Text))
-> (ListTableRows -> Maybe (NonEmpty Text) -> ListTableRows)
-> Lens
ListTableRows
ListTableRows
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTableRows' {Maybe (NonEmpty Text)
rowIds :: Maybe (NonEmpty Text)
$sel:rowIds:ListTableRows' :: ListTableRows -> Maybe (NonEmpty Text)
rowIds} -> Maybe (NonEmpty Text)
rowIds) (\s :: ListTableRows
s@ListTableRows' {} Maybe (NonEmpty Text)
a -> ListTableRows
s {$sel:rowIds:ListTableRows' :: Maybe (NonEmpty Text)
rowIds = Maybe (NonEmpty Text)
a} :: ListTableRows) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListTableRows -> f ListTableRows)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListTableRows
-> f ListTableRows
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty 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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listTableRows_nextToken :: Lens.Lens' ListTableRows (Prelude.Maybe Prelude.Text)
listTableRows_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListTableRows -> f ListTableRows
listTableRows_nextToken = (ListTableRows -> Maybe Text)
-> (ListTableRows -> Maybe Text -> ListTableRows)
-> Lens ListTableRows ListTableRows (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTableRows' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTableRows' :: ListTableRows -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTableRows
s@ListTableRows' {} Maybe Text
a -> ListTableRows
s {$sel:nextToken:ListTableRows' :: Maybe Text
nextToken = Maybe Text
a} :: ListTableRows)
listTableRows_maxResults :: Lens.Lens' ListTableRows (Prelude.Maybe Prelude.Natural)
listTableRows_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListTableRows -> f ListTableRows
listTableRows_maxResults = (ListTableRows -> Maybe Natural)
-> (ListTableRows -> Maybe Natural -> ListTableRows)
-> Lens ListTableRows ListTableRows (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTableRows' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListTableRows' :: ListTableRows -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListTableRows
s@ListTableRows' {} Maybe Natural
a -> ListTableRows
s {$sel:maxResults:ListTableRows' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListTableRows)
listTableRows_workbookId :: Lens.Lens' ListTableRows Prelude.Text
listTableRows_workbookId :: (Text -> f Text) -> ListTableRows -> f ListTableRows
listTableRows_workbookId = (ListTableRows -> Text)
-> (ListTableRows -> Text -> ListTableRows)
-> Lens ListTableRows ListTableRows Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTableRows' {Text
workbookId :: Text
$sel:workbookId:ListTableRows' :: ListTableRows -> Text
workbookId} -> Text
workbookId) (\s :: ListTableRows
s@ListTableRows' {} Text
a -> ListTableRows
s {$sel:workbookId:ListTableRows' :: Text
workbookId = Text
a} :: ListTableRows)
listTableRows_tableId :: Lens.Lens' ListTableRows Prelude.Text
listTableRows_tableId :: (Text -> f Text) -> ListTableRows -> f ListTableRows
listTableRows_tableId = (ListTableRows -> Text)
-> (ListTableRows -> Text -> ListTableRows)
-> Lens ListTableRows ListTableRows Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTableRows' {Text
tableId :: Text
$sel:tableId:ListTableRows' :: ListTableRows -> Text
tableId} -> Text
tableId) (\s :: ListTableRows
s@ListTableRows' {} Text
a -> ListTableRows
s {$sel:tableId:ListTableRows' :: Text
tableId = Text
a} :: ListTableRows)
instance Core.AWSPager ListTableRows where
page :: ListTableRows -> AWSResponse ListTableRows -> Maybe ListTableRows
page ListTableRows
rq AWSResponse ListTableRows
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListTableRows
ListTableRowsResponse
rs
ListTableRowsResponse
-> Getting (First Text) ListTableRowsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListTableRowsResponse
-> Const (First Text) ListTableRowsResponse
Lens' ListTableRowsResponse (Maybe Text)
listTableRowsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListTableRowsResponse
-> Const (First Text) ListTableRowsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListTableRowsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListTableRows
forall a. Maybe a
Prelude.Nothing
| [TableRow] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop (AWSResponse ListTableRows
ListTableRowsResponse
rs ListTableRowsResponse
-> Getting [TableRow] ListTableRowsResponse [TableRow]
-> [TableRow]
forall s a. s -> Getting a s a -> a
Lens.^. Getting [TableRow] ListTableRowsResponse [TableRow]
Lens' ListTableRowsResponse [TableRow]
listTableRowsResponse_rows) =
Maybe ListTableRows
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListTableRows -> Maybe ListTableRows
forall a. a -> Maybe a
Prelude.Just (ListTableRows -> Maybe ListTableRows)
-> ListTableRows -> Maybe ListTableRows
forall a b. (a -> b) -> a -> b
Prelude.$
ListTableRows
rq
ListTableRows -> (ListTableRows -> ListTableRows) -> ListTableRows
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListTableRows -> Identity ListTableRows
Lens ListTableRows ListTableRows (Maybe Text) (Maybe Text)
listTableRows_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListTableRows -> Identity ListTableRows)
-> Maybe Text -> ListTableRows -> ListTableRows
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListTableRows
ListTableRowsResponse
rs
ListTableRowsResponse
-> Getting (First Text) ListTableRowsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListTableRowsResponse
-> Const (First Text) ListTableRowsResponse
Lens' ListTableRowsResponse (Maybe Text)
listTableRowsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
-> ListTableRowsResponse
-> Const (First Text) ListTableRowsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListTableRowsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest ListTableRows where
type
AWSResponse ListTableRows =
ListTableRowsResponse
request :: ListTableRows -> Request ListTableRows
request = Service -> ListTableRows -> Request ListTableRows
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListTableRows
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListTableRows)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListTableRows))
-> Logger
-> Service
-> Proxy ListTableRows
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListTableRows)))
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 (NonEmpty Text)
-> Maybe Text
-> Int
-> NonEmpty Text
-> [TableRow]
-> Integer
-> ListTableRowsResponse
ListTableRowsResponse'
(Maybe (NonEmpty Text)
-> Maybe Text
-> Int
-> NonEmpty Text
-> [TableRow]
-> Integer
-> ListTableRowsResponse)
-> Either String (Maybe (NonEmpty Text))
-> Either
String
(Maybe Text
-> Int
-> NonEmpty Text
-> [TableRow]
-> Integer
-> ListTableRowsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"rowIdsNotFound")
Either
String
(Maybe Text
-> Int
-> NonEmpty Text
-> [TableRow]
-> Integer
-> ListTableRowsResponse)
-> Either String (Maybe Text)
-> Either
String
(Int
-> NonEmpty Text -> [TableRow] -> Integer -> ListTableRowsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextToken")
Either
String
(Int
-> NonEmpty Text -> [TableRow] -> Integer -> ListTableRowsResponse)
-> Either String Int
-> Either
String
(NonEmpty Text -> [TableRow] -> Integer -> ListTableRowsResponse)
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
(NonEmpty Text -> [TableRow] -> Integer -> ListTableRowsResponse)
-> Either String (NonEmpty Text)
-> Either String ([TableRow] -> Integer -> ListTableRowsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (NonEmpty Text)
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"columnIds")
Either String ([TableRow] -> Integer -> ListTableRowsResponse)
-> Either String [TableRow]
-> Either String (Integer -> ListTableRowsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe [TableRow])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"rows" Either String (Maybe [TableRow])
-> [TableRow] -> Either String [TableRow]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [TableRow]
forall a. Monoid a => a
Prelude.mempty)
Either String (Integer -> ListTableRowsResponse)
-> Either String Integer -> Either String ListTableRowsResponse
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 ListTableRows
instance Prelude.NFData ListTableRows
instance Core.ToHeaders ListTableRows where
toHeaders :: ListTableRows -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListTableRows -> 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 ListTableRows where
toJSON :: ListTableRows -> Value
toJSON ListTableRows' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
Text
tableId :: Text
workbookId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
rowIds :: Maybe (NonEmpty Text)
$sel:tableId:ListTableRows' :: ListTableRows -> Text
$sel:workbookId:ListTableRows' :: ListTableRows -> Text
$sel:maxResults:ListTableRows' :: ListTableRows -> Maybe Natural
$sel:nextToken:ListTableRows' :: ListTableRows -> Maybe Text
$sel:rowIds:ListTableRows' :: ListTableRows -> Maybe (NonEmpty Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"rowIds" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
rowIds,
(Text
"nextToken" 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
nextToken,
(Text
"maxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
]
)
instance Core.ToPath ListTableRows where
toPath :: ListTableRows -> ByteString
toPath ListTableRows' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
Text
tableId :: Text
workbookId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
rowIds :: Maybe (NonEmpty Text)
$sel:tableId:ListTableRows' :: ListTableRows -> Text
$sel:workbookId:ListTableRows' :: ListTableRows -> Text
$sel:maxResults:ListTableRows' :: ListTableRows -> Maybe Natural
$sel:nextToken:ListTableRows' :: ListTableRows -> Maybe Text
$sel:rowIds:ListTableRows' :: ListTableRows -> Maybe (NonEmpty 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/list"
]
instance Core.ToQuery ListTableRows where
toQuery :: ListTableRows -> QueryString
toQuery = QueryString -> ListTableRows -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListTableRowsResponse = ListTableRowsResponse'
{
ListTableRowsResponse -> Maybe (NonEmpty Text)
rowIdsNotFound :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
ListTableRowsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListTableRowsResponse -> Int
httpStatus :: Prelude.Int,
ListTableRowsResponse -> NonEmpty Text
columnIds :: Prelude.NonEmpty Prelude.Text,
ListTableRowsResponse -> [TableRow]
rows :: [TableRow],
ListTableRowsResponse -> Integer
workbookCursor :: Prelude.Integer
}
deriving (ListTableRowsResponse -> ListTableRowsResponse -> Bool
(ListTableRowsResponse -> ListTableRowsResponse -> Bool)
-> (ListTableRowsResponse -> ListTableRowsResponse -> Bool)
-> Eq ListTableRowsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTableRowsResponse -> ListTableRowsResponse -> Bool
$c/= :: ListTableRowsResponse -> ListTableRowsResponse -> Bool
== :: ListTableRowsResponse -> ListTableRowsResponse -> Bool
$c== :: ListTableRowsResponse -> ListTableRowsResponse -> Bool
Prelude.Eq, Int -> ListTableRowsResponse -> ShowS
[ListTableRowsResponse] -> ShowS
ListTableRowsResponse -> String
(Int -> ListTableRowsResponse -> ShowS)
-> (ListTableRowsResponse -> String)
-> ([ListTableRowsResponse] -> ShowS)
-> Show ListTableRowsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTableRowsResponse] -> ShowS
$cshowList :: [ListTableRowsResponse] -> ShowS
show :: ListTableRowsResponse -> String
$cshow :: ListTableRowsResponse -> String
showsPrec :: Int -> ListTableRowsResponse -> ShowS
$cshowsPrec :: Int -> ListTableRowsResponse -> ShowS
Prelude.Show, (forall x. ListTableRowsResponse -> Rep ListTableRowsResponse x)
-> (forall x. Rep ListTableRowsResponse x -> ListTableRowsResponse)
-> Generic ListTableRowsResponse
forall x. Rep ListTableRowsResponse x -> ListTableRowsResponse
forall x. ListTableRowsResponse -> Rep ListTableRowsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTableRowsResponse x -> ListTableRowsResponse
$cfrom :: forall x. ListTableRowsResponse -> Rep ListTableRowsResponse x
Prelude.Generic)
newListTableRowsResponse ::
Prelude.Int ->
Prelude.NonEmpty Prelude.Text ->
Prelude.Integer ->
ListTableRowsResponse
newListTableRowsResponse :: Int -> NonEmpty Text -> Integer -> ListTableRowsResponse
newListTableRowsResponse
Int
pHttpStatus_
NonEmpty Text
pColumnIds_
Integer
pWorkbookCursor_ =
ListTableRowsResponse' :: Maybe (NonEmpty Text)
-> Maybe Text
-> Int
-> NonEmpty Text
-> [TableRow]
-> Integer
-> ListTableRowsResponse
ListTableRowsResponse'
{ $sel:rowIdsNotFound:ListTableRowsResponse' :: Maybe (NonEmpty Text)
rowIdsNotFound =
Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListTableRowsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListTableRowsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:columnIds:ListTableRowsResponse' :: NonEmpty Text
columnIds = Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pColumnIds_,
$sel:rows:ListTableRowsResponse' :: [TableRow]
rows = [TableRow]
forall a. Monoid a => a
Prelude.mempty,
$sel:workbookCursor:ListTableRowsResponse' :: Integer
workbookCursor = Integer
pWorkbookCursor_
}
listTableRowsResponse_rowIdsNotFound :: Lens.Lens' ListTableRowsResponse (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
listTableRowsResponse_rowIdsNotFound :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListTableRowsResponse -> f ListTableRowsResponse
listTableRowsResponse_rowIdsNotFound = (ListTableRowsResponse -> Maybe (NonEmpty Text))
-> (ListTableRowsResponse
-> Maybe (NonEmpty Text) -> ListTableRowsResponse)
-> Lens
ListTableRowsResponse
ListTableRowsResponse
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTableRowsResponse' {Maybe (NonEmpty Text)
rowIdsNotFound :: Maybe (NonEmpty Text)
$sel:rowIdsNotFound:ListTableRowsResponse' :: ListTableRowsResponse -> Maybe (NonEmpty Text)
rowIdsNotFound} -> Maybe (NonEmpty Text)
rowIdsNotFound) (\s :: ListTableRowsResponse
s@ListTableRowsResponse' {} Maybe (NonEmpty Text)
a -> ListTableRowsResponse
s {$sel:rowIdsNotFound:ListTableRowsResponse' :: Maybe (NonEmpty Text)
rowIdsNotFound = Maybe (NonEmpty Text)
a} :: ListTableRowsResponse) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListTableRowsResponse -> f ListTableRowsResponse)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListTableRowsResponse
-> f ListTableRowsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty 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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listTableRowsResponse_nextToken :: Lens.Lens' ListTableRowsResponse (Prelude.Maybe Prelude.Text)
listTableRowsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTableRowsResponse -> f ListTableRowsResponse
listTableRowsResponse_nextToken = (ListTableRowsResponse -> Maybe Text)
-> (ListTableRowsResponse -> Maybe Text -> ListTableRowsResponse)
-> Lens' ListTableRowsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTableRowsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTableRowsResponse' :: ListTableRowsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTableRowsResponse
s@ListTableRowsResponse' {} Maybe Text
a -> ListTableRowsResponse
s {$sel:nextToken:ListTableRowsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListTableRowsResponse)
listTableRowsResponse_httpStatus :: Lens.Lens' ListTableRowsResponse Prelude.Int
listTableRowsResponse_httpStatus :: (Int -> f Int) -> ListTableRowsResponse -> f ListTableRowsResponse
listTableRowsResponse_httpStatus = (ListTableRowsResponse -> Int)
-> (ListTableRowsResponse -> Int -> ListTableRowsResponse)
-> Lens ListTableRowsResponse ListTableRowsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTableRowsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListTableRowsResponse' :: ListTableRowsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListTableRowsResponse
s@ListTableRowsResponse' {} Int
a -> ListTableRowsResponse
s {$sel:httpStatus:ListTableRowsResponse' :: Int
httpStatus = Int
a} :: ListTableRowsResponse)
listTableRowsResponse_columnIds :: Lens.Lens' ListTableRowsResponse (Prelude.NonEmpty Prelude.Text)
listTableRowsResponse_columnIds :: (NonEmpty Text -> f (NonEmpty Text))
-> ListTableRowsResponse -> f ListTableRowsResponse
listTableRowsResponse_columnIds = (ListTableRowsResponse -> NonEmpty Text)
-> (ListTableRowsResponse
-> NonEmpty Text -> ListTableRowsResponse)
-> Lens
ListTableRowsResponse
ListTableRowsResponse
(NonEmpty Text)
(NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTableRowsResponse' {NonEmpty Text
columnIds :: NonEmpty Text
$sel:columnIds:ListTableRowsResponse' :: ListTableRowsResponse -> NonEmpty Text
columnIds} -> NonEmpty Text
columnIds) (\s :: ListTableRowsResponse
s@ListTableRowsResponse' {} NonEmpty Text
a -> ListTableRowsResponse
s {$sel:columnIds:ListTableRowsResponse' :: NonEmpty Text
columnIds = NonEmpty Text
a} :: ListTableRowsResponse) ((NonEmpty Text -> f (NonEmpty Text))
-> ListTableRowsResponse -> f ListTableRowsResponse)
-> ((NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> ListTableRowsResponse
-> f ListTableRowsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listTableRowsResponse_rows :: Lens.Lens' ListTableRowsResponse [TableRow]
listTableRowsResponse_rows :: ([TableRow] -> f [TableRow])
-> ListTableRowsResponse -> f ListTableRowsResponse
listTableRowsResponse_rows = (ListTableRowsResponse -> [TableRow])
-> (ListTableRowsResponse -> [TableRow] -> ListTableRowsResponse)
-> Lens' ListTableRowsResponse [TableRow]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTableRowsResponse' {[TableRow]
rows :: [TableRow]
$sel:rows:ListTableRowsResponse' :: ListTableRowsResponse -> [TableRow]
rows} -> [TableRow]
rows) (\s :: ListTableRowsResponse
s@ListTableRowsResponse' {} [TableRow]
a -> ListTableRowsResponse
s {$sel:rows:ListTableRowsResponse' :: [TableRow]
rows = [TableRow]
a} :: ListTableRowsResponse) (([TableRow] -> f [TableRow])
-> ListTableRowsResponse -> f ListTableRowsResponse)
-> (([TableRow] -> f [TableRow]) -> [TableRow] -> f [TableRow])
-> ([TableRow] -> f [TableRow])
-> ListTableRowsResponse
-> f ListTableRowsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([TableRow] -> f [TableRow]) -> [TableRow] -> f [TableRow]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listTableRowsResponse_workbookCursor :: Lens.Lens' ListTableRowsResponse Prelude.Integer
listTableRowsResponse_workbookCursor :: (Integer -> f Integer)
-> ListTableRowsResponse -> f ListTableRowsResponse
listTableRowsResponse_workbookCursor = (ListTableRowsResponse -> Integer)
-> (ListTableRowsResponse -> Integer -> ListTableRowsResponse)
-> Lens ListTableRowsResponse ListTableRowsResponse Integer Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTableRowsResponse' {Integer
workbookCursor :: Integer
$sel:workbookCursor:ListTableRowsResponse' :: ListTableRowsResponse -> Integer
workbookCursor} -> Integer
workbookCursor) (\s :: ListTableRowsResponse
s@ListTableRowsResponse' {} Integer
a -> ListTableRowsResponse
s {$sel:workbookCursor:ListTableRowsResponse' :: Integer
workbookCursor = Integer
a} :: ListTableRowsResponse)
instance Prelude.NFData ListTableRowsResponse