{-# 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.CognitoSync.UpdateRecords
(
UpdateRecords (..),
newUpdateRecords,
updateRecords_recordPatches,
updateRecords_deviceId,
updateRecords_clientContext,
updateRecords_identityPoolId,
updateRecords_identityId,
updateRecords_datasetName,
updateRecords_syncSessionToken,
UpdateRecordsResponse (..),
newUpdateRecordsResponse,
updateRecordsResponse_records,
updateRecordsResponse_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
data UpdateRecords = UpdateRecords'
{
UpdateRecords -> Maybe [RecordPatch]
recordPatches :: Prelude.Maybe [RecordPatch],
UpdateRecords -> Maybe Text
deviceId :: Prelude.Maybe Prelude.Text,
UpdateRecords -> Maybe Text
clientContext :: Prelude.Maybe Prelude.Text,
UpdateRecords -> Text
identityPoolId :: Prelude.Text,
UpdateRecords -> Text
identityId :: Prelude.Text,
UpdateRecords -> Text
datasetName :: Prelude.Text,
UpdateRecords -> Text
syncSessionToken :: Prelude.Text
}
deriving (UpdateRecords -> UpdateRecords -> Bool
(UpdateRecords -> UpdateRecords -> Bool)
-> (UpdateRecords -> UpdateRecords -> Bool) -> Eq UpdateRecords
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRecords -> UpdateRecords -> Bool
$c/= :: UpdateRecords -> UpdateRecords -> Bool
== :: UpdateRecords -> UpdateRecords -> Bool
$c== :: UpdateRecords -> UpdateRecords -> Bool
Prelude.Eq, ReadPrec [UpdateRecords]
ReadPrec UpdateRecords
Int -> ReadS UpdateRecords
ReadS [UpdateRecords]
(Int -> ReadS UpdateRecords)
-> ReadS [UpdateRecords]
-> ReadPrec UpdateRecords
-> ReadPrec [UpdateRecords]
-> Read UpdateRecords
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRecords]
$creadListPrec :: ReadPrec [UpdateRecords]
readPrec :: ReadPrec UpdateRecords
$creadPrec :: ReadPrec UpdateRecords
readList :: ReadS [UpdateRecords]
$creadList :: ReadS [UpdateRecords]
readsPrec :: Int -> ReadS UpdateRecords
$creadsPrec :: Int -> ReadS UpdateRecords
Prelude.Read, Int -> UpdateRecords -> ShowS
[UpdateRecords] -> ShowS
UpdateRecords -> String
(Int -> UpdateRecords -> ShowS)
-> (UpdateRecords -> String)
-> ([UpdateRecords] -> ShowS)
-> Show UpdateRecords
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRecords] -> ShowS
$cshowList :: [UpdateRecords] -> ShowS
show :: UpdateRecords -> String
$cshow :: UpdateRecords -> String
showsPrec :: Int -> UpdateRecords -> ShowS
$cshowsPrec :: Int -> UpdateRecords -> ShowS
Prelude.Show, (forall x. UpdateRecords -> Rep UpdateRecords x)
-> (forall x. Rep UpdateRecords x -> UpdateRecords)
-> Generic UpdateRecords
forall x. Rep UpdateRecords x -> UpdateRecords
forall x. UpdateRecords -> Rep UpdateRecords x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateRecords x -> UpdateRecords
$cfrom :: forall x. UpdateRecords -> Rep UpdateRecords x
Prelude.Generic)
newUpdateRecords ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
UpdateRecords
newUpdateRecords :: Text -> Text -> Text -> Text -> UpdateRecords
newUpdateRecords
Text
pIdentityPoolId_
Text
pIdentityId_
Text
pDatasetName_
Text
pSyncSessionToken_ =
UpdateRecords' :: Maybe [RecordPatch]
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> UpdateRecords
UpdateRecords'
{ $sel:recordPatches:UpdateRecords' :: Maybe [RecordPatch]
recordPatches = Maybe [RecordPatch]
forall a. Maybe a
Prelude.Nothing,
$sel:deviceId:UpdateRecords' :: Maybe Text
deviceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientContext:UpdateRecords' :: Maybe Text
clientContext = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:identityPoolId:UpdateRecords' :: Text
identityPoolId = Text
pIdentityPoolId_,
$sel:identityId:UpdateRecords' :: Text
identityId = Text
pIdentityId_,
$sel:datasetName:UpdateRecords' :: Text
datasetName = Text
pDatasetName_,
$sel:syncSessionToken:UpdateRecords' :: Text
syncSessionToken = Text
pSyncSessionToken_
}
updateRecords_recordPatches :: Lens.Lens' UpdateRecords (Prelude.Maybe [RecordPatch])
updateRecords_recordPatches :: (Maybe [RecordPatch] -> f (Maybe [RecordPatch]))
-> UpdateRecords -> f UpdateRecords
updateRecords_recordPatches = (UpdateRecords -> Maybe [RecordPatch])
-> (UpdateRecords -> Maybe [RecordPatch] -> UpdateRecords)
-> Lens
UpdateRecords
UpdateRecords
(Maybe [RecordPatch])
(Maybe [RecordPatch])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecords' {Maybe [RecordPatch]
recordPatches :: Maybe [RecordPatch]
$sel:recordPatches:UpdateRecords' :: UpdateRecords -> Maybe [RecordPatch]
recordPatches} -> Maybe [RecordPatch]
recordPatches) (\s :: UpdateRecords
s@UpdateRecords' {} Maybe [RecordPatch]
a -> UpdateRecords
s {$sel:recordPatches:UpdateRecords' :: Maybe [RecordPatch]
recordPatches = Maybe [RecordPatch]
a} :: UpdateRecords) ((Maybe [RecordPatch] -> f (Maybe [RecordPatch]))
-> UpdateRecords -> f UpdateRecords)
-> ((Maybe [RecordPatch] -> f (Maybe [RecordPatch]))
-> Maybe [RecordPatch] -> f (Maybe [RecordPatch]))
-> (Maybe [RecordPatch] -> f (Maybe [RecordPatch]))
-> UpdateRecords
-> f UpdateRecords
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [RecordPatch] [RecordPatch] [RecordPatch] [RecordPatch]
-> Iso
(Maybe [RecordPatch])
(Maybe [RecordPatch])
(Maybe [RecordPatch])
(Maybe [RecordPatch])
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 [RecordPatch] [RecordPatch] [RecordPatch] [RecordPatch]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateRecords_deviceId :: Lens.Lens' UpdateRecords (Prelude.Maybe Prelude.Text)
updateRecords_deviceId :: (Maybe Text -> f (Maybe Text)) -> UpdateRecords -> f UpdateRecords
updateRecords_deviceId = (UpdateRecords -> Maybe Text)
-> (UpdateRecords -> Maybe Text -> UpdateRecords)
-> Lens UpdateRecords UpdateRecords (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecords' {Maybe Text
deviceId :: Maybe Text
$sel:deviceId:UpdateRecords' :: UpdateRecords -> Maybe Text
deviceId} -> Maybe Text
deviceId) (\s :: UpdateRecords
s@UpdateRecords' {} Maybe Text
a -> UpdateRecords
s {$sel:deviceId:UpdateRecords' :: Maybe Text
deviceId = Maybe Text
a} :: UpdateRecords)
updateRecords_clientContext :: Lens.Lens' UpdateRecords (Prelude.Maybe Prelude.Text)
updateRecords_clientContext :: (Maybe Text -> f (Maybe Text)) -> UpdateRecords -> f UpdateRecords
updateRecords_clientContext = (UpdateRecords -> Maybe Text)
-> (UpdateRecords -> Maybe Text -> UpdateRecords)
-> Lens UpdateRecords UpdateRecords (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecords' {Maybe Text
clientContext :: Maybe Text
$sel:clientContext:UpdateRecords' :: UpdateRecords -> Maybe Text
clientContext} -> Maybe Text
clientContext) (\s :: UpdateRecords
s@UpdateRecords' {} Maybe Text
a -> UpdateRecords
s {$sel:clientContext:UpdateRecords' :: Maybe Text
clientContext = Maybe Text
a} :: UpdateRecords)
updateRecords_identityPoolId :: Lens.Lens' UpdateRecords Prelude.Text
updateRecords_identityPoolId :: (Text -> f Text) -> UpdateRecords -> f UpdateRecords
updateRecords_identityPoolId = (UpdateRecords -> Text)
-> (UpdateRecords -> Text -> UpdateRecords)
-> Lens UpdateRecords UpdateRecords Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecords' {Text
identityPoolId :: Text
$sel:identityPoolId:UpdateRecords' :: UpdateRecords -> Text
identityPoolId} -> Text
identityPoolId) (\s :: UpdateRecords
s@UpdateRecords' {} Text
a -> UpdateRecords
s {$sel:identityPoolId:UpdateRecords' :: Text
identityPoolId = Text
a} :: UpdateRecords)
updateRecords_identityId :: Lens.Lens' UpdateRecords Prelude.Text
updateRecords_identityId :: (Text -> f Text) -> UpdateRecords -> f UpdateRecords
updateRecords_identityId = (UpdateRecords -> Text)
-> (UpdateRecords -> Text -> UpdateRecords)
-> Lens UpdateRecords UpdateRecords Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecords' {Text
identityId :: Text
$sel:identityId:UpdateRecords' :: UpdateRecords -> Text
identityId} -> Text
identityId) (\s :: UpdateRecords
s@UpdateRecords' {} Text
a -> UpdateRecords
s {$sel:identityId:UpdateRecords' :: Text
identityId = Text
a} :: UpdateRecords)
updateRecords_datasetName :: Lens.Lens' UpdateRecords Prelude.Text
updateRecords_datasetName :: (Text -> f Text) -> UpdateRecords -> f UpdateRecords
updateRecords_datasetName = (UpdateRecords -> Text)
-> (UpdateRecords -> Text -> UpdateRecords)
-> Lens UpdateRecords UpdateRecords Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecords' {Text
datasetName :: Text
$sel:datasetName:UpdateRecords' :: UpdateRecords -> Text
datasetName} -> Text
datasetName) (\s :: UpdateRecords
s@UpdateRecords' {} Text
a -> UpdateRecords
s {$sel:datasetName:UpdateRecords' :: Text
datasetName = Text
a} :: UpdateRecords)
updateRecords_syncSessionToken :: Lens.Lens' UpdateRecords Prelude.Text
updateRecords_syncSessionToken :: (Text -> f Text) -> UpdateRecords -> f UpdateRecords
updateRecords_syncSessionToken = (UpdateRecords -> Text)
-> (UpdateRecords -> Text -> UpdateRecords)
-> Lens UpdateRecords UpdateRecords Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecords' {Text
syncSessionToken :: Text
$sel:syncSessionToken:UpdateRecords' :: UpdateRecords -> Text
syncSessionToken} -> Text
syncSessionToken) (\s :: UpdateRecords
s@UpdateRecords' {} Text
a -> UpdateRecords
s {$sel:syncSessionToken:UpdateRecords' :: Text
syncSessionToken = Text
a} :: UpdateRecords)
instance Core.AWSRequest UpdateRecords where
type
AWSResponse UpdateRecords =
UpdateRecordsResponse
request :: UpdateRecords -> Request UpdateRecords
request = Service -> UpdateRecords -> Request UpdateRecords
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateRecords
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateRecords)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateRecords))
-> Logger
-> Service
-> Proxy UpdateRecords
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateRecords)))
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 [Record] -> Int -> UpdateRecordsResponse
UpdateRecordsResponse'
(Maybe [Record] -> Int -> UpdateRecordsResponse)
-> Either String (Maybe [Record])
-> Either String (Int -> UpdateRecordsResponse)
forall (f :: * -> *) a b. Functor 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 (Int -> UpdateRecordsResponse)
-> Either String Int -> Either String UpdateRecordsResponse
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 UpdateRecords
instance Prelude.NFData UpdateRecords
instance Core.ToHeaders UpdateRecords where
toHeaders :: UpdateRecords -> ResponseHeaders
toHeaders UpdateRecords' {Maybe [RecordPatch]
Maybe Text
Text
syncSessionToken :: Text
datasetName :: Text
identityId :: Text
identityPoolId :: Text
clientContext :: Maybe Text
deviceId :: Maybe Text
recordPatches :: Maybe [RecordPatch]
$sel:syncSessionToken:UpdateRecords' :: UpdateRecords -> Text
$sel:datasetName:UpdateRecords' :: UpdateRecords -> Text
$sel:identityId:UpdateRecords' :: UpdateRecords -> Text
$sel:identityPoolId:UpdateRecords' :: UpdateRecords -> Text
$sel:clientContext:UpdateRecords' :: UpdateRecords -> Maybe Text
$sel:deviceId:UpdateRecords' :: UpdateRecords -> Maybe Text
$sel:recordPatches:UpdateRecords' :: UpdateRecords -> Maybe [RecordPatch]
..} =
[ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"x-amz-Client-Context" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
clientContext,
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 UpdateRecords where
toJSON :: UpdateRecords -> Value
toJSON UpdateRecords' {Maybe [RecordPatch]
Maybe Text
Text
syncSessionToken :: Text
datasetName :: Text
identityId :: Text
identityPoolId :: Text
clientContext :: Maybe Text
deviceId :: Maybe Text
recordPatches :: Maybe [RecordPatch]
$sel:syncSessionToken:UpdateRecords' :: UpdateRecords -> Text
$sel:datasetName:UpdateRecords' :: UpdateRecords -> Text
$sel:identityId:UpdateRecords' :: UpdateRecords -> Text
$sel:identityPoolId:UpdateRecords' :: UpdateRecords -> Text
$sel:clientContext:UpdateRecords' :: UpdateRecords -> Maybe Text
$sel:deviceId:UpdateRecords' :: UpdateRecords -> Maybe Text
$sel:recordPatches:UpdateRecords' :: UpdateRecords -> Maybe [RecordPatch]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"RecordPatches" Text -> [RecordPatch] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([RecordPatch] -> Pair) -> Maybe [RecordPatch] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [RecordPatch]
recordPatches,
(Text
"DeviceId" 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
deviceId,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"SyncSessionToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
syncSessionToken)
]
)
instance Core.ToPath UpdateRecords where
toPath :: UpdateRecords -> ByteString
toPath UpdateRecords' {Maybe [RecordPatch]
Maybe Text
Text
syncSessionToken :: Text
datasetName :: Text
identityId :: Text
identityPoolId :: Text
clientContext :: Maybe Text
deviceId :: Maybe Text
recordPatches :: Maybe [RecordPatch]
$sel:syncSessionToken:UpdateRecords' :: UpdateRecords -> Text
$sel:datasetName:UpdateRecords' :: UpdateRecords -> Text
$sel:identityId:UpdateRecords' :: UpdateRecords -> Text
$sel:identityPoolId:UpdateRecords' :: UpdateRecords -> Text
$sel:clientContext:UpdateRecords' :: UpdateRecords -> Maybe Text
$sel:deviceId:UpdateRecords' :: UpdateRecords -> Maybe Text
$sel:recordPatches:UpdateRecords' :: UpdateRecords -> Maybe [RecordPatch]
..} =
[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
]
instance Core.ToQuery UpdateRecords where
toQuery :: UpdateRecords -> QueryString
toQuery = QueryString -> UpdateRecords -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateRecordsResponse = UpdateRecordsResponse'
{
UpdateRecordsResponse -> Maybe [Record]
records :: Prelude.Maybe [Record],
UpdateRecordsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateRecordsResponse -> UpdateRecordsResponse -> Bool
(UpdateRecordsResponse -> UpdateRecordsResponse -> Bool)
-> (UpdateRecordsResponse -> UpdateRecordsResponse -> Bool)
-> Eq UpdateRecordsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRecordsResponse -> UpdateRecordsResponse -> Bool
$c/= :: UpdateRecordsResponse -> UpdateRecordsResponse -> Bool
== :: UpdateRecordsResponse -> UpdateRecordsResponse -> Bool
$c== :: UpdateRecordsResponse -> UpdateRecordsResponse -> Bool
Prelude.Eq, ReadPrec [UpdateRecordsResponse]
ReadPrec UpdateRecordsResponse
Int -> ReadS UpdateRecordsResponse
ReadS [UpdateRecordsResponse]
(Int -> ReadS UpdateRecordsResponse)
-> ReadS [UpdateRecordsResponse]
-> ReadPrec UpdateRecordsResponse
-> ReadPrec [UpdateRecordsResponse]
-> Read UpdateRecordsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRecordsResponse]
$creadListPrec :: ReadPrec [UpdateRecordsResponse]
readPrec :: ReadPrec UpdateRecordsResponse
$creadPrec :: ReadPrec UpdateRecordsResponse
readList :: ReadS [UpdateRecordsResponse]
$creadList :: ReadS [UpdateRecordsResponse]
readsPrec :: Int -> ReadS UpdateRecordsResponse
$creadsPrec :: Int -> ReadS UpdateRecordsResponse
Prelude.Read, Int -> UpdateRecordsResponse -> ShowS
[UpdateRecordsResponse] -> ShowS
UpdateRecordsResponse -> String
(Int -> UpdateRecordsResponse -> ShowS)
-> (UpdateRecordsResponse -> String)
-> ([UpdateRecordsResponse] -> ShowS)
-> Show UpdateRecordsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRecordsResponse] -> ShowS
$cshowList :: [UpdateRecordsResponse] -> ShowS
show :: UpdateRecordsResponse -> String
$cshow :: UpdateRecordsResponse -> String
showsPrec :: Int -> UpdateRecordsResponse -> ShowS
$cshowsPrec :: Int -> UpdateRecordsResponse -> ShowS
Prelude.Show, (forall x. UpdateRecordsResponse -> Rep UpdateRecordsResponse x)
-> (forall x. Rep UpdateRecordsResponse x -> UpdateRecordsResponse)
-> Generic UpdateRecordsResponse
forall x. Rep UpdateRecordsResponse x -> UpdateRecordsResponse
forall x. UpdateRecordsResponse -> Rep UpdateRecordsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateRecordsResponse x -> UpdateRecordsResponse
$cfrom :: forall x. UpdateRecordsResponse -> Rep UpdateRecordsResponse x
Prelude.Generic)
newUpdateRecordsResponse ::
Prelude.Int ->
UpdateRecordsResponse
newUpdateRecordsResponse :: Int -> UpdateRecordsResponse
newUpdateRecordsResponse Int
pHttpStatus_ =
UpdateRecordsResponse' :: Maybe [Record] -> Int -> UpdateRecordsResponse
UpdateRecordsResponse'
{ $sel:records:UpdateRecordsResponse' :: Maybe [Record]
records = Maybe [Record]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateRecordsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateRecordsResponse_records :: Lens.Lens' UpdateRecordsResponse (Prelude.Maybe [Record])
updateRecordsResponse_records :: (Maybe [Record] -> f (Maybe [Record]))
-> UpdateRecordsResponse -> f UpdateRecordsResponse
updateRecordsResponse_records = (UpdateRecordsResponse -> Maybe [Record])
-> (UpdateRecordsResponse
-> Maybe [Record] -> UpdateRecordsResponse)
-> Lens
UpdateRecordsResponse
UpdateRecordsResponse
(Maybe [Record])
(Maybe [Record])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecordsResponse' {Maybe [Record]
records :: Maybe [Record]
$sel:records:UpdateRecordsResponse' :: UpdateRecordsResponse -> Maybe [Record]
records} -> Maybe [Record]
records) (\s :: UpdateRecordsResponse
s@UpdateRecordsResponse' {} Maybe [Record]
a -> UpdateRecordsResponse
s {$sel:records:UpdateRecordsResponse' :: Maybe [Record]
records = Maybe [Record]
a} :: UpdateRecordsResponse) ((Maybe [Record] -> f (Maybe [Record]))
-> UpdateRecordsResponse -> f UpdateRecordsResponse)
-> ((Maybe [Record] -> f (Maybe [Record]))
-> Maybe [Record] -> f (Maybe [Record]))
-> (Maybe [Record] -> f (Maybe [Record]))
-> UpdateRecordsResponse
-> f UpdateRecordsResponse
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
updateRecordsResponse_httpStatus :: Lens.Lens' UpdateRecordsResponse Prelude.Int
updateRecordsResponse_httpStatus :: (Int -> f Int) -> UpdateRecordsResponse -> f UpdateRecordsResponse
updateRecordsResponse_httpStatus = (UpdateRecordsResponse -> Int)
-> (UpdateRecordsResponse -> Int -> UpdateRecordsResponse)
-> Lens UpdateRecordsResponse UpdateRecordsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecordsResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateRecordsResponse' :: UpdateRecordsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateRecordsResponse
s@UpdateRecordsResponse' {} Int
a -> UpdateRecordsResponse
s {$sel:httpStatus:UpdateRecordsResponse' :: Int
httpStatus = Int
a} :: UpdateRecordsResponse)
instance Prelude.NFData UpdateRecordsResponse