{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CognitoSync.ListRecords
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets paginated records, optionally changed after a particular sync count
-- for a dataset and identity. With Amazon Cognito Sync, each identity has
-- access only to its own data. Thus, the credentials used to make this API
-- call need to have access to the identity data.
--
-- ListRecords can be called with temporary user credentials provided by
-- Cognito Identity or with developer credentials. You should use Cognito
-- Identity credentials to make this API call.
module Amazonka.CognitoSync.ListRecords
  ( -- * Creating a Request
    ListRecords (..),
    newListRecords,

    -- * Request Lenses
    listRecords_lastSyncCount,
    listRecords_nextToken,
    listRecords_syncSessionToken,
    listRecords_maxResults,
    listRecords_identityPoolId,
    listRecords_identityId,
    listRecords_datasetName,

    -- * Destructuring the Response
    ListRecordsResponse (..),
    newListRecordsResponse,

    -- * Response Lenses
    listRecordsResponse_datasetDeletedAfterRequestedSyncCount,
    listRecordsResponse_datasetExists,
    listRecordsResponse_count,
    listRecordsResponse_records,
    listRecordsResponse_nextToken,
    listRecordsResponse_mergedDatasetNames,
    listRecordsResponse_syncSessionToken,
    listRecordsResponse_lastModifiedBy,
    listRecordsResponse_datasetSyncCount,
    listRecordsResponse_httpStatus,
  )
where

import Amazonka.CognitoSync.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | A request for a list of records.
--
-- /See:/ 'newListRecords' smart constructor.
data ListRecords = ListRecords'
  { -- | The last server sync count for this record.
    ListRecords -> Maybe Integer
lastSyncCount :: Prelude.Maybe Prelude.Integer,
    -- | A pagination token for obtaining the next page of results.
    ListRecords -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A token containing a session ID, identity ID, and expiration.
    ListRecords -> Maybe Text
syncSessionToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to be returned.
    ListRecords -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | A name-spaced GUID (for example,
    -- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
    -- Cognito. GUID generation is unique within a region.
    ListRecords -> Text
identityPoolId :: Prelude.Text,
    -- | A name-spaced GUID (for example,
    -- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
    -- Cognito. GUID generation is unique within a region.
    ListRecords -> Text
identityId :: Prelude.Text,
    -- | A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9,
    -- \'_\' (underscore), \'-\' (dash), and \'.\' (dot).
    ListRecords -> Text
datasetName :: Prelude.Text
  }
  deriving (ListRecords -> ListRecords -> Bool
(ListRecords -> ListRecords -> Bool)
-> (ListRecords -> ListRecords -> Bool) -> Eq ListRecords
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRecords -> ListRecords -> Bool
$c/= :: ListRecords -> ListRecords -> Bool
== :: ListRecords -> ListRecords -> Bool
$c== :: ListRecords -> ListRecords -> Bool
Prelude.Eq, ReadPrec [ListRecords]
ReadPrec ListRecords
Int -> ReadS ListRecords
ReadS [ListRecords]
(Int -> ReadS ListRecords)
-> ReadS [ListRecords]
-> ReadPrec ListRecords
-> ReadPrec [ListRecords]
-> Read ListRecords
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRecords]
$creadListPrec :: ReadPrec [ListRecords]
readPrec :: ReadPrec ListRecords
$creadPrec :: ReadPrec ListRecords
readList :: ReadS [ListRecords]
$creadList :: ReadS [ListRecords]
readsPrec :: Int -> ReadS ListRecords
$creadsPrec :: Int -> ReadS ListRecords
Prelude.Read, Int -> ListRecords -> ShowS
[ListRecords] -> ShowS
ListRecords -> String
(Int -> ListRecords -> ShowS)
-> (ListRecords -> String)
-> ([ListRecords] -> ShowS)
-> Show ListRecords
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRecords] -> ShowS
$cshowList :: [ListRecords] -> ShowS
show :: ListRecords -> String
$cshow :: ListRecords -> String
showsPrec :: Int -> ListRecords -> ShowS
$cshowsPrec :: Int -> ListRecords -> ShowS
Prelude.Show, (forall x. ListRecords -> Rep ListRecords x)
-> (forall x. Rep ListRecords x -> ListRecords)
-> Generic ListRecords
forall x. Rep ListRecords x -> ListRecords
forall x. ListRecords -> Rep ListRecords x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRecords x -> ListRecords
$cfrom :: forall x. ListRecords -> Rep ListRecords x
Prelude.Generic)

-- |
-- Create a value of 'ListRecords' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'lastSyncCount', 'listRecords_lastSyncCount' - The last server sync count for this record.
--
-- 'nextToken', 'listRecords_nextToken' - A pagination token for obtaining the next page of results.
--
-- 'syncSessionToken', 'listRecords_syncSessionToken' - A token containing a session ID, identity ID, and expiration.
--
-- 'maxResults', 'listRecords_maxResults' - The maximum number of results to be returned.
--
-- 'identityPoolId', 'listRecords_identityPoolId' - A name-spaced GUID (for example,
-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
-- Cognito. GUID generation is unique within a region.
--
-- 'identityId', 'listRecords_identityId' - A name-spaced GUID (for example,
-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
-- Cognito. GUID generation is unique within a region.
--
-- 'datasetName', 'listRecords_datasetName' - A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9,
-- \'_\' (underscore), \'-\' (dash), and \'.\' (dot).
newListRecords ::
  -- | 'identityPoolId'
  Prelude.Text ->
  -- | 'identityId'
  Prelude.Text ->
  -- | 'datasetName'
  Prelude.Text ->
  ListRecords
newListRecords :: Text -> Text -> Text -> ListRecords
newListRecords
  Text
pIdentityPoolId_
  Text
pIdentityId_
  Text
pDatasetName_ =
    ListRecords' :: Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Text
-> Text
-> Text
-> ListRecords
ListRecords'
      { $sel:lastSyncCount:ListRecords' :: Maybe Integer
lastSyncCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListRecords' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:syncSessionToken:ListRecords' :: Maybe Text
syncSessionToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:maxResults:ListRecords' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:identityPoolId:ListRecords' :: Text
identityPoolId = Text
pIdentityPoolId_,
        $sel:identityId:ListRecords' :: Text
identityId = Text
pIdentityId_,
        $sel:datasetName:ListRecords' :: Text
datasetName = Text
pDatasetName_
      }

-- | The last server sync count for this record.
listRecords_lastSyncCount :: Lens.Lens' ListRecords (Prelude.Maybe Prelude.Integer)
listRecords_lastSyncCount :: (Maybe Integer -> f (Maybe Integer))
-> ListRecords -> f ListRecords
listRecords_lastSyncCount = (ListRecords -> Maybe Integer)
-> (ListRecords -> Maybe Integer -> ListRecords)
-> Lens ListRecords ListRecords (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecords' {Maybe Integer
lastSyncCount :: Maybe Integer
$sel:lastSyncCount:ListRecords' :: ListRecords -> Maybe Integer
lastSyncCount} -> Maybe Integer
lastSyncCount) (\s :: ListRecords
s@ListRecords' {} Maybe Integer
a -> ListRecords
s {$sel:lastSyncCount:ListRecords' :: Maybe Integer
lastSyncCount = Maybe Integer
a} :: ListRecords)

-- | A pagination token for obtaining the next page of results.
listRecords_nextToken :: Lens.Lens' ListRecords (Prelude.Maybe Prelude.Text)
listRecords_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListRecords -> f ListRecords
listRecords_nextToken = (ListRecords -> Maybe Text)
-> (ListRecords -> Maybe Text -> ListRecords)
-> Lens ListRecords ListRecords (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecords' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRecords' :: ListRecords -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRecords
s@ListRecords' {} Maybe Text
a -> ListRecords
s {$sel:nextToken:ListRecords' :: Maybe Text
nextToken = Maybe Text
a} :: ListRecords)

-- | A token containing a session ID, identity ID, and expiration.
listRecords_syncSessionToken :: Lens.Lens' ListRecords (Prelude.Maybe Prelude.Text)
listRecords_syncSessionToken :: (Maybe Text -> f (Maybe Text)) -> ListRecords -> f ListRecords
listRecords_syncSessionToken = (ListRecords -> Maybe Text)
-> (ListRecords -> Maybe Text -> ListRecords)
-> Lens ListRecords ListRecords (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecords' {Maybe Text
syncSessionToken :: Maybe Text
$sel:syncSessionToken:ListRecords' :: ListRecords -> Maybe Text
syncSessionToken} -> Maybe Text
syncSessionToken) (\s :: ListRecords
s@ListRecords' {} Maybe Text
a -> ListRecords
s {$sel:syncSessionToken:ListRecords' :: Maybe Text
syncSessionToken = Maybe Text
a} :: ListRecords)

-- | The maximum number of results to be returned.
listRecords_maxResults :: Lens.Lens' ListRecords (Prelude.Maybe Prelude.Int)
listRecords_maxResults :: (Maybe Int -> f (Maybe Int)) -> ListRecords -> f ListRecords
listRecords_maxResults = (ListRecords -> Maybe Int)
-> (ListRecords -> Maybe Int -> ListRecords)
-> Lens ListRecords ListRecords (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecords' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListRecords' :: ListRecords -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListRecords
s@ListRecords' {} Maybe Int
a -> ListRecords
s {$sel:maxResults:ListRecords' :: Maybe Int
maxResults = Maybe Int
a} :: ListRecords)

-- | A name-spaced GUID (for example,
-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
-- Cognito. GUID generation is unique within a region.
listRecords_identityPoolId :: Lens.Lens' ListRecords Prelude.Text
listRecords_identityPoolId :: (Text -> f Text) -> ListRecords -> f ListRecords
listRecords_identityPoolId = (ListRecords -> Text)
-> (ListRecords -> Text -> ListRecords)
-> Lens ListRecords ListRecords Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecords' {Text
identityPoolId :: Text
$sel:identityPoolId:ListRecords' :: ListRecords -> Text
identityPoolId} -> Text
identityPoolId) (\s :: ListRecords
s@ListRecords' {} Text
a -> ListRecords
s {$sel:identityPoolId:ListRecords' :: Text
identityPoolId = Text
a} :: ListRecords)

-- | A name-spaced GUID (for example,
-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
-- Cognito. GUID generation is unique within a region.
listRecords_identityId :: Lens.Lens' ListRecords Prelude.Text
listRecords_identityId :: (Text -> f Text) -> ListRecords -> f ListRecords
listRecords_identityId = (ListRecords -> Text)
-> (ListRecords -> Text -> ListRecords)
-> Lens ListRecords ListRecords Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecords' {Text
identityId :: Text
$sel:identityId:ListRecords' :: ListRecords -> Text
identityId} -> Text
identityId) (\s :: ListRecords
s@ListRecords' {} Text
a -> ListRecords
s {$sel:identityId:ListRecords' :: Text
identityId = Text
a} :: ListRecords)

-- | A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9,
-- \'_\' (underscore), \'-\' (dash), and \'.\' (dot).
listRecords_datasetName :: Lens.Lens' ListRecords Prelude.Text
listRecords_datasetName :: (Text -> f Text) -> ListRecords -> f ListRecords
listRecords_datasetName = (ListRecords -> Text)
-> (ListRecords -> Text -> ListRecords)
-> Lens ListRecords ListRecords Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecords' {Text
datasetName :: Text
$sel:datasetName:ListRecords' :: ListRecords -> Text
datasetName} -> Text
datasetName) (\s :: ListRecords
s@ListRecords' {} Text
a -> ListRecords
s {$sel:datasetName:ListRecords' :: Text
datasetName = Text
a} :: ListRecords)

instance Core.AWSRequest ListRecords where
  type AWSResponse ListRecords = ListRecordsResponse
  request :: ListRecords -> Request ListRecords
request = Service -> ListRecords -> Request ListRecords
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListRecords
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListRecords)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListRecords))
-> Logger
-> Service
-> Proxy ListRecords
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListRecords)))
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 Bool
-> Maybe Bool
-> Maybe Int
-> Maybe [Record]
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Int
-> ListRecordsResponse
ListRecordsResponse'
            (Maybe Bool
 -> Maybe Bool
 -> Maybe Int
 -> Maybe [Record]
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Int
 -> ListRecordsResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Bool
      -> Maybe Int
      -> Maybe [Record]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Int
      -> ListRecordsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DatasetDeletedAfterRequestedSyncCount")
            Either
  String
  (Maybe Bool
   -> Maybe Int
   -> Maybe [Record]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Int
   -> ListRecordsResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Int
      -> Maybe [Record]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Int
      -> ListRecordsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DatasetExists")
            Either
  String
  (Maybe Int
   -> Maybe [Record]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Int
   -> ListRecordsResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe [Record]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Int
      -> ListRecordsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Count")
            Either
  String
  (Maybe [Record]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Int
   -> ListRecordsResponse)
-> Either String (Maybe [Record])
-> Either
     String
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Int
      -> ListRecordsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Record]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Records" Either String (Maybe (Maybe [Record]))
-> Maybe [Record] -> Either String (Maybe [Record])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Record]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Int
   -> ListRecordsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Int
      -> ListRecordsResponse)
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
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Int
   -> ListRecordsResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Integer -> Int -> ListRecordsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MergedDatasetNames"
                            Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Integer -> Int -> ListRecordsResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe Integer -> Int -> ListRecordsResponse)
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
"SyncSessionToken")
            Either
  String (Maybe Text -> Maybe Integer -> Int -> ListRecordsResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Integer -> Int -> ListRecordsResponse)
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
"LastModifiedBy")
            Either String (Maybe Integer -> Int -> ListRecordsResponse)
-> Either String (Maybe Integer)
-> Either String (Int -> ListRecordsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DatasetSyncCount")
            Either String (Int -> ListRecordsResponse)
-> Either String Int -> Either String ListRecordsResponse
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 ListRecords

instance Prelude.NFData ListRecords

instance Core.ToHeaders ListRecords where
  toHeaders :: ListRecords -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListRecords -> 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.ToPath ListRecords where
  toPath :: ListRecords -> ByteString
toPath ListRecords' {Maybe Int
Maybe Integer
Maybe Text
Text
datasetName :: Text
identityId :: Text
identityPoolId :: Text
maxResults :: Maybe Int
syncSessionToken :: Maybe Text
nextToken :: Maybe Text
lastSyncCount :: Maybe Integer
$sel:datasetName:ListRecords' :: ListRecords -> Text
$sel:identityId:ListRecords' :: ListRecords -> Text
$sel:identityPoolId:ListRecords' :: ListRecords -> Text
$sel:maxResults:ListRecords' :: ListRecords -> Maybe Int
$sel:syncSessionToken:ListRecords' :: ListRecords -> Maybe Text
$sel:nextToken:ListRecords' :: ListRecords -> Maybe Text
$sel:lastSyncCount:ListRecords' :: ListRecords -> Maybe Integer
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/identitypools/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
identityPoolId,
        ByteString
"/identities/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
identityId,
        ByteString
"/datasets/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
datasetName,
        ByteString
"/records"
      ]

instance Core.ToQuery ListRecords where
  toQuery :: ListRecords -> QueryString
toQuery ListRecords' {Maybe Int
Maybe Integer
Maybe Text
Text
datasetName :: Text
identityId :: Text
identityPoolId :: Text
maxResults :: Maybe Int
syncSessionToken :: Maybe Text
nextToken :: Maybe Text
lastSyncCount :: Maybe Integer
$sel:datasetName:ListRecords' :: ListRecords -> Text
$sel:identityId:ListRecords' :: ListRecords -> Text
$sel:identityPoolId:ListRecords' :: ListRecords -> Text
$sel:maxResults:ListRecords' :: ListRecords -> Maybe Int
$sel:syncSessionToken:ListRecords' :: ListRecords -> Maybe Text
$sel:nextToken:ListRecords' :: ListRecords -> Maybe Text
$sel:lastSyncCount:ListRecords' :: ListRecords -> Maybe Integer
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"lastSyncCount" ByteString -> Maybe Integer -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Integer
lastSyncCount,
        ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"syncSessionToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
syncSessionToken,
        ByteString
"maxResults" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxResults
      ]

-- | Returned for a successful ListRecordsRequest.
--
-- /See:/ 'newListRecordsResponse' smart constructor.
data ListRecordsResponse = ListRecordsResponse'
  { -- | A boolean value specifying whether to delete the dataset locally.
    ListRecordsResponse -> Maybe Bool
datasetDeletedAfterRequestedSyncCount :: Prelude.Maybe Prelude.Bool,
    -- | Indicates whether the dataset exists.
    ListRecordsResponse -> Maybe Bool
datasetExists :: Prelude.Maybe Prelude.Bool,
    -- | Total number of records.
    ListRecordsResponse -> Maybe Int
count :: Prelude.Maybe Prelude.Int,
    -- | A list of all records.
    ListRecordsResponse -> Maybe [Record]
records :: Prelude.Maybe [Record],
    -- | A pagination token for obtaining the next page of results.
    ListRecordsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Names of merged datasets.
    ListRecordsResponse -> Maybe [Text]
mergedDatasetNames :: Prelude.Maybe [Prelude.Text],
    -- | A token containing a session ID, identity ID, and expiration.
    ListRecordsResponse -> Maybe Text
syncSessionToken :: Prelude.Maybe Prelude.Text,
    -- | The user\/device that made the last change to this record.
    ListRecordsResponse -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
    -- | Server sync count for this dataset.
    ListRecordsResponse -> Maybe Integer
datasetSyncCount :: Prelude.Maybe Prelude.Integer,
    -- | The response's http status code.
    ListRecordsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListRecordsResponse -> ListRecordsResponse -> Bool
(ListRecordsResponse -> ListRecordsResponse -> Bool)
-> (ListRecordsResponse -> ListRecordsResponse -> Bool)
-> Eq ListRecordsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRecordsResponse -> ListRecordsResponse -> Bool
$c/= :: ListRecordsResponse -> ListRecordsResponse -> Bool
== :: ListRecordsResponse -> ListRecordsResponse -> Bool
$c== :: ListRecordsResponse -> ListRecordsResponse -> Bool
Prelude.Eq, ReadPrec [ListRecordsResponse]
ReadPrec ListRecordsResponse
Int -> ReadS ListRecordsResponse
ReadS [ListRecordsResponse]
(Int -> ReadS ListRecordsResponse)
-> ReadS [ListRecordsResponse]
-> ReadPrec ListRecordsResponse
-> ReadPrec [ListRecordsResponse]
-> Read ListRecordsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRecordsResponse]
$creadListPrec :: ReadPrec [ListRecordsResponse]
readPrec :: ReadPrec ListRecordsResponse
$creadPrec :: ReadPrec ListRecordsResponse
readList :: ReadS [ListRecordsResponse]
$creadList :: ReadS [ListRecordsResponse]
readsPrec :: Int -> ReadS ListRecordsResponse
$creadsPrec :: Int -> ReadS ListRecordsResponse
Prelude.Read, Int -> ListRecordsResponse -> ShowS
[ListRecordsResponse] -> ShowS
ListRecordsResponse -> String
(Int -> ListRecordsResponse -> ShowS)
-> (ListRecordsResponse -> String)
-> ([ListRecordsResponse] -> ShowS)
-> Show ListRecordsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRecordsResponse] -> ShowS
$cshowList :: [ListRecordsResponse] -> ShowS
show :: ListRecordsResponse -> String
$cshow :: ListRecordsResponse -> String
showsPrec :: Int -> ListRecordsResponse -> ShowS
$cshowsPrec :: Int -> ListRecordsResponse -> ShowS
Prelude.Show, (forall x. ListRecordsResponse -> Rep ListRecordsResponse x)
-> (forall x. Rep ListRecordsResponse x -> ListRecordsResponse)
-> Generic ListRecordsResponse
forall x. Rep ListRecordsResponse x -> ListRecordsResponse
forall x. ListRecordsResponse -> Rep ListRecordsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRecordsResponse x -> ListRecordsResponse
$cfrom :: forall x. ListRecordsResponse -> Rep ListRecordsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListRecordsResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'datasetDeletedAfterRequestedSyncCount', 'listRecordsResponse_datasetDeletedAfterRequestedSyncCount' - A boolean value specifying whether to delete the dataset locally.
--
-- 'datasetExists', 'listRecordsResponse_datasetExists' - Indicates whether the dataset exists.
--
-- 'count', 'listRecordsResponse_count' - Total number of records.
--
-- 'records', 'listRecordsResponse_records' - A list of all records.
--
-- 'nextToken', 'listRecordsResponse_nextToken' - A pagination token for obtaining the next page of results.
--
-- 'mergedDatasetNames', 'listRecordsResponse_mergedDatasetNames' - Names of merged datasets.
--
-- 'syncSessionToken', 'listRecordsResponse_syncSessionToken' - A token containing a session ID, identity ID, and expiration.
--
-- 'lastModifiedBy', 'listRecordsResponse_lastModifiedBy' - The user\/device that made the last change to this record.
--
-- 'datasetSyncCount', 'listRecordsResponse_datasetSyncCount' - Server sync count for this dataset.
--
-- 'httpStatus', 'listRecordsResponse_httpStatus' - The response's http status code.
newListRecordsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRecordsResponse
newListRecordsResponse :: Int -> ListRecordsResponse
newListRecordsResponse Int
pHttpStatus_ =
  ListRecordsResponse' :: Maybe Bool
-> Maybe Bool
-> Maybe Int
-> Maybe [Record]
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Int
-> ListRecordsResponse
ListRecordsResponse'
    { $sel:datasetDeletedAfterRequestedSyncCount:ListRecordsResponse' :: Maybe Bool
datasetDeletedAfterRequestedSyncCount =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:datasetExists:ListRecordsResponse' :: Maybe Bool
datasetExists = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:count:ListRecordsResponse' :: Maybe Int
count = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:records:ListRecordsResponse' :: Maybe [Record]
records = Maybe [Record]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListRecordsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:mergedDatasetNames:ListRecordsResponse' :: Maybe [Text]
mergedDatasetNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:syncSessionToken:ListRecordsResponse' :: Maybe Text
syncSessionToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:ListRecordsResponse' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:datasetSyncCount:ListRecordsResponse' :: Maybe Integer
datasetSyncCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRecordsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A boolean value specifying whether to delete the dataset locally.
listRecordsResponse_datasetDeletedAfterRequestedSyncCount :: Lens.Lens' ListRecordsResponse (Prelude.Maybe Prelude.Bool)
listRecordsResponse_datasetDeletedAfterRequestedSyncCount :: (Maybe Bool -> f (Maybe Bool))
-> ListRecordsResponse -> f ListRecordsResponse
listRecordsResponse_datasetDeletedAfterRequestedSyncCount = (ListRecordsResponse -> Maybe Bool)
-> (ListRecordsResponse -> Maybe Bool -> ListRecordsResponse)
-> Lens
     ListRecordsResponse ListRecordsResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecordsResponse' {Maybe Bool
datasetDeletedAfterRequestedSyncCount :: Maybe Bool
$sel:datasetDeletedAfterRequestedSyncCount:ListRecordsResponse' :: ListRecordsResponse -> Maybe Bool
datasetDeletedAfterRequestedSyncCount} -> Maybe Bool
datasetDeletedAfterRequestedSyncCount) (\s :: ListRecordsResponse
s@ListRecordsResponse' {} Maybe Bool
a -> ListRecordsResponse
s {$sel:datasetDeletedAfterRequestedSyncCount:ListRecordsResponse' :: Maybe Bool
datasetDeletedAfterRequestedSyncCount = Maybe Bool
a} :: ListRecordsResponse)

-- | Indicates whether the dataset exists.
listRecordsResponse_datasetExists :: Lens.Lens' ListRecordsResponse (Prelude.Maybe Prelude.Bool)
listRecordsResponse_datasetExists :: (Maybe Bool -> f (Maybe Bool))
-> ListRecordsResponse -> f ListRecordsResponse
listRecordsResponse_datasetExists = (ListRecordsResponse -> Maybe Bool)
-> (ListRecordsResponse -> Maybe Bool -> ListRecordsResponse)
-> Lens
     ListRecordsResponse ListRecordsResponse (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecordsResponse' {Maybe Bool
datasetExists :: Maybe Bool
$sel:datasetExists:ListRecordsResponse' :: ListRecordsResponse -> Maybe Bool
datasetExists} -> Maybe Bool
datasetExists) (\s :: ListRecordsResponse
s@ListRecordsResponse' {} Maybe Bool
a -> ListRecordsResponse
s {$sel:datasetExists:ListRecordsResponse' :: Maybe Bool
datasetExists = Maybe Bool
a} :: ListRecordsResponse)

-- | Total number of records.
listRecordsResponse_count :: Lens.Lens' ListRecordsResponse (Prelude.Maybe Prelude.Int)
listRecordsResponse_count :: (Maybe Int -> f (Maybe Int))
-> ListRecordsResponse -> f ListRecordsResponse
listRecordsResponse_count = (ListRecordsResponse -> Maybe Int)
-> (ListRecordsResponse -> Maybe Int -> ListRecordsResponse)
-> Lens
     ListRecordsResponse ListRecordsResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecordsResponse' {Maybe Int
count :: Maybe Int
$sel:count:ListRecordsResponse' :: ListRecordsResponse -> Maybe Int
count} -> Maybe Int
count) (\s :: ListRecordsResponse
s@ListRecordsResponse' {} Maybe Int
a -> ListRecordsResponse
s {$sel:count:ListRecordsResponse' :: Maybe Int
count = Maybe Int
a} :: ListRecordsResponse)

-- | A list of all records.
listRecordsResponse_records :: Lens.Lens' ListRecordsResponse (Prelude.Maybe [Record])
listRecordsResponse_records :: (Maybe [Record] -> f (Maybe [Record]))
-> ListRecordsResponse -> f ListRecordsResponse
listRecordsResponse_records = (ListRecordsResponse -> Maybe [Record])
-> (ListRecordsResponse -> Maybe [Record] -> ListRecordsResponse)
-> Lens
     ListRecordsResponse
     ListRecordsResponse
     (Maybe [Record])
     (Maybe [Record])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecordsResponse' {Maybe [Record]
records :: Maybe [Record]
$sel:records:ListRecordsResponse' :: ListRecordsResponse -> Maybe [Record]
records} -> Maybe [Record]
records) (\s :: ListRecordsResponse
s@ListRecordsResponse' {} Maybe [Record]
a -> ListRecordsResponse
s {$sel:records:ListRecordsResponse' :: Maybe [Record]
records = Maybe [Record]
a} :: ListRecordsResponse) ((Maybe [Record] -> f (Maybe [Record]))
 -> ListRecordsResponse -> f ListRecordsResponse)
-> ((Maybe [Record] -> f (Maybe [Record]))
    -> Maybe [Record] -> f (Maybe [Record]))
-> (Maybe [Record] -> f (Maybe [Record]))
-> ListRecordsResponse
-> f ListRecordsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Record] [Record] [Record] [Record]
-> Iso
     (Maybe [Record]) (Maybe [Record]) (Maybe [Record]) (Maybe [Record])
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 [Record] [Record] [Record] [Record]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A pagination token for obtaining the next page of results.
listRecordsResponse_nextToken :: Lens.Lens' ListRecordsResponse (Prelude.Maybe Prelude.Text)
listRecordsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListRecordsResponse -> f ListRecordsResponse
listRecordsResponse_nextToken = (ListRecordsResponse -> Maybe Text)
-> (ListRecordsResponse -> Maybe Text -> ListRecordsResponse)
-> Lens
     ListRecordsResponse ListRecordsResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecordsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRecordsResponse' :: ListRecordsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRecordsResponse
s@ListRecordsResponse' {} Maybe Text
a -> ListRecordsResponse
s {$sel:nextToken:ListRecordsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListRecordsResponse)

-- | Names of merged datasets.
listRecordsResponse_mergedDatasetNames :: Lens.Lens' ListRecordsResponse (Prelude.Maybe [Prelude.Text])
listRecordsResponse_mergedDatasetNames :: (Maybe [Text] -> f (Maybe [Text]))
-> ListRecordsResponse -> f ListRecordsResponse
listRecordsResponse_mergedDatasetNames = (ListRecordsResponse -> Maybe [Text])
-> (ListRecordsResponse -> Maybe [Text] -> ListRecordsResponse)
-> Lens
     ListRecordsResponse
     ListRecordsResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecordsResponse' {Maybe [Text]
mergedDatasetNames :: Maybe [Text]
$sel:mergedDatasetNames:ListRecordsResponse' :: ListRecordsResponse -> Maybe [Text]
mergedDatasetNames} -> Maybe [Text]
mergedDatasetNames) (\s :: ListRecordsResponse
s@ListRecordsResponse' {} Maybe [Text]
a -> ListRecordsResponse
s {$sel:mergedDatasetNames:ListRecordsResponse' :: Maybe [Text]
mergedDatasetNames = Maybe [Text]
a} :: ListRecordsResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> ListRecordsResponse -> f ListRecordsResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListRecordsResponse
-> f ListRecordsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A token containing a session ID, identity ID, and expiration.
listRecordsResponse_syncSessionToken :: Lens.Lens' ListRecordsResponse (Prelude.Maybe Prelude.Text)
listRecordsResponse_syncSessionToken :: (Maybe Text -> f (Maybe Text))
-> ListRecordsResponse -> f ListRecordsResponse
listRecordsResponse_syncSessionToken = (ListRecordsResponse -> Maybe Text)
-> (ListRecordsResponse -> Maybe Text -> ListRecordsResponse)
-> Lens
     ListRecordsResponse ListRecordsResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecordsResponse' {Maybe Text
syncSessionToken :: Maybe Text
$sel:syncSessionToken:ListRecordsResponse' :: ListRecordsResponse -> Maybe Text
syncSessionToken} -> Maybe Text
syncSessionToken) (\s :: ListRecordsResponse
s@ListRecordsResponse' {} Maybe Text
a -> ListRecordsResponse
s {$sel:syncSessionToken:ListRecordsResponse' :: Maybe Text
syncSessionToken = Maybe Text
a} :: ListRecordsResponse)

-- | The user\/device that made the last change to this record.
listRecordsResponse_lastModifiedBy :: Lens.Lens' ListRecordsResponse (Prelude.Maybe Prelude.Text)
listRecordsResponse_lastModifiedBy :: (Maybe Text -> f (Maybe Text))
-> ListRecordsResponse -> f ListRecordsResponse
listRecordsResponse_lastModifiedBy = (ListRecordsResponse -> Maybe Text)
-> (ListRecordsResponse -> Maybe Text -> ListRecordsResponse)
-> Lens
     ListRecordsResponse ListRecordsResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecordsResponse' {Maybe Text
lastModifiedBy :: Maybe Text
$sel:lastModifiedBy:ListRecordsResponse' :: ListRecordsResponse -> Maybe Text
lastModifiedBy} -> Maybe Text
lastModifiedBy) (\s :: ListRecordsResponse
s@ListRecordsResponse' {} Maybe Text
a -> ListRecordsResponse
s {$sel:lastModifiedBy:ListRecordsResponse' :: Maybe Text
lastModifiedBy = Maybe Text
a} :: ListRecordsResponse)

-- | Server sync count for this dataset.
listRecordsResponse_datasetSyncCount :: Lens.Lens' ListRecordsResponse (Prelude.Maybe Prelude.Integer)
listRecordsResponse_datasetSyncCount :: (Maybe Integer -> f (Maybe Integer))
-> ListRecordsResponse -> f ListRecordsResponse
listRecordsResponse_datasetSyncCount = (ListRecordsResponse -> Maybe Integer)
-> (ListRecordsResponse -> Maybe Integer -> ListRecordsResponse)
-> Lens
     ListRecordsResponse
     ListRecordsResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecordsResponse' {Maybe Integer
datasetSyncCount :: Maybe Integer
$sel:datasetSyncCount:ListRecordsResponse' :: ListRecordsResponse -> Maybe Integer
datasetSyncCount} -> Maybe Integer
datasetSyncCount) (\s :: ListRecordsResponse
s@ListRecordsResponse' {} Maybe Integer
a -> ListRecordsResponse
s {$sel:datasetSyncCount:ListRecordsResponse' :: Maybe Integer
datasetSyncCount = Maybe Integer
a} :: ListRecordsResponse)

-- | The response's http status code.
listRecordsResponse_httpStatus :: Lens.Lens' ListRecordsResponse Prelude.Int
listRecordsResponse_httpStatus :: (Int -> f Int) -> ListRecordsResponse -> f ListRecordsResponse
listRecordsResponse_httpStatus = (ListRecordsResponse -> Int)
-> (ListRecordsResponse -> Int -> ListRecordsResponse)
-> Lens ListRecordsResponse ListRecordsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecordsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListRecordsResponse' :: ListRecordsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListRecordsResponse
s@ListRecordsResponse' {} Int
a -> ListRecordsResponse
s {$sel:httpStatus:ListRecordsResponse' :: Int
httpStatus = Int
a} :: ListRecordsResponse)

instance Prelude.NFData ListRecordsResponse