{-# 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.MechanicalTurk.ListBonusPayments
(
ListBonusPayments (..),
newListBonusPayments,
listBonusPayments_nextToken,
listBonusPayments_hITId,
listBonusPayments_assignmentId,
listBonusPayments_maxResults,
ListBonusPaymentsResponse (..),
newListBonusPaymentsResponse,
listBonusPaymentsResponse_bonusPayments,
listBonusPaymentsResponse_nextToken,
listBonusPaymentsResponse_numResults,
listBonusPaymentsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MechanicalTurk.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListBonusPayments = ListBonusPayments'
{
ListBonusPayments -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListBonusPayments -> Maybe Text
hITId :: Prelude.Maybe Prelude.Text,
ListBonusPayments -> Maybe Text
assignmentId :: Prelude.Maybe Prelude.Text,
ListBonusPayments -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (ListBonusPayments -> ListBonusPayments -> Bool
(ListBonusPayments -> ListBonusPayments -> Bool)
-> (ListBonusPayments -> ListBonusPayments -> Bool)
-> Eq ListBonusPayments
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBonusPayments -> ListBonusPayments -> Bool
$c/= :: ListBonusPayments -> ListBonusPayments -> Bool
== :: ListBonusPayments -> ListBonusPayments -> Bool
$c== :: ListBonusPayments -> ListBonusPayments -> Bool
Prelude.Eq, ReadPrec [ListBonusPayments]
ReadPrec ListBonusPayments
Int -> ReadS ListBonusPayments
ReadS [ListBonusPayments]
(Int -> ReadS ListBonusPayments)
-> ReadS [ListBonusPayments]
-> ReadPrec ListBonusPayments
-> ReadPrec [ListBonusPayments]
-> Read ListBonusPayments
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBonusPayments]
$creadListPrec :: ReadPrec [ListBonusPayments]
readPrec :: ReadPrec ListBonusPayments
$creadPrec :: ReadPrec ListBonusPayments
readList :: ReadS [ListBonusPayments]
$creadList :: ReadS [ListBonusPayments]
readsPrec :: Int -> ReadS ListBonusPayments
$creadsPrec :: Int -> ReadS ListBonusPayments
Prelude.Read, Int -> ListBonusPayments -> ShowS
[ListBonusPayments] -> ShowS
ListBonusPayments -> String
(Int -> ListBonusPayments -> ShowS)
-> (ListBonusPayments -> String)
-> ([ListBonusPayments] -> ShowS)
-> Show ListBonusPayments
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBonusPayments] -> ShowS
$cshowList :: [ListBonusPayments] -> ShowS
show :: ListBonusPayments -> String
$cshow :: ListBonusPayments -> String
showsPrec :: Int -> ListBonusPayments -> ShowS
$cshowsPrec :: Int -> ListBonusPayments -> ShowS
Prelude.Show, (forall x. ListBonusPayments -> Rep ListBonusPayments x)
-> (forall x. Rep ListBonusPayments x -> ListBonusPayments)
-> Generic ListBonusPayments
forall x. Rep ListBonusPayments x -> ListBonusPayments
forall x. ListBonusPayments -> Rep ListBonusPayments x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListBonusPayments x -> ListBonusPayments
$cfrom :: forall x. ListBonusPayments -> Rep ListBonusPayments x
Prelude.Generic)
newListBonusPayments ::
ListBonusPayments
newListBonusPayments :: ListBonusPayments
newListBonusPayments =
ListBonusPayments' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Natural -> ListBonusPayments
ListBonusPayments'
{ $sel:nextToken:ListBonusPayments' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hITId:ListBonusPayments' :: Maybe Text
hITId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:assignmentId:ListBonusPayments' :: Maybe Text
assignmentId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListBonusPayments' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
listBonusPayments_nextToken :: Lens.Lens' ListBonusPayments (Prelude.Maybe Prelude.Text)
listBonusPayments_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListBonusPayments -> f ListBonusPayments
listBonusPayments_nextToken = (ListBonusPayments -> Maybe Text)
-> (ListBonusPayments -> Maybe Text -> ListBonusPayments)
-> Lens
ListBonusPayments ListBonusPayments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBonusPayments' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListBonusPayments' :: ListBonusPayments -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListBonusPayments
s@ListBonusPayments' {} Maybe Text
a -> ListBonusPayments
s {$sel:nextToken:ListBonusPayments' :: Maybe Text
nextToken = Maybe Text
a} :: ListBonusPayments)
listBonusPayments_hITId :: Lens.Lens' ListBonusPayments (Prelude.Maybe Prelude.Text)
listBonusPayments_hITId :: (Maybe Text -> f (Maybe Text))
-> ListBonusPayments -> f ListBonusPayments
listBonusPayments_hITId = (ListBonusPayments -> Maybe Text)
-> (ListBonusPayments -> Maybe Text -> ListBonusPayments)
-> Lens
ListBonusPayments ListBonusPayments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBonusPayments' {Maybe Text
hITId :: Maybe Text
$sel:hITId:ListBonusPayments' :: ListBonusPayments -> Maybe Text
hITId} -> Maybe Text
hITId) (\s :: ListBonusPayments
s@ListBonusPayments' {} Maybe Text
a -> ListBonusPayments
s {$sel:hITId:ListBonusPayments' :: Maybe Text
hITId = Maybe Text
a} :: ListBonusPayments)
listBonusPayments_assignmentId :: Lens.Lens' ListBonusPayments (Prelude.Maybe Prelude.Text)
listBonusPayments_assignmentId :: (Maybe Text -> f (Maybe Text))
-> ListBonusPayments -> f ListBonusPayments
listBonusPayments_assignmentId = (ListBonusPayments -> Maybe Text)
-> (ListBonusPayments -> Maybe Text -> ListBonusPayments)
-> Lens
ListBonusPayments ListBonusPayments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBonusPayments' {Maybe Text
assignmentId :: Maybe Text
$sel:assignmentId:ListBonusPayments' :: ListBonusPayments -> Maybe Text
assignmentId} -> Maybe Text
assignmentId) (\s :: ListBonusPayments
s@ListBonusPayments' {} Maybe Text
a -> ListBonusPayments
s {$sel:assignmentId:ListBonusPayments' :: Maybe Text
assignmentId = Maybe Text
a} :: ListBonusPayments)
listBonusPayments_maxResults :: Lens.Lens' ListBonusPayments (Prelude.Maybe Prelude.Natural)
listBonusPayments_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListBonusPayments -> f ListBonusPayments
listBonusPayments_maxResults = (ListBonusPayments -> Maybe Natural)
-> (ListBonusPayments -> Maybe Natural -> ListBonusPayments)
-> Lens
ListBonusPayments ListBonusPayments (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBonusPayments' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListBonusPayments' :: ListBonusPayments -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListBonusPayments
s@ListBonusPayments' {} Maybe Natural
a -> ListBonusPayments
s {$sel:maxResults:ListBonusPayments' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListBonusPayments)
instance Core.AWSPager ListBonusPayments where
page :: ListBonusPayments
-> AWSResponse ListBonusPayments -> Maybe ListBonusPayments
page ListBonusPayments
rq AWSResponse ListBonusPayments
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListBonusPayments
ListBonusPaymentsResponse
rs
ListBonusPaymentsResponse
-> Getting (First Text) ListBonusPaymentsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListBonusPaymentsResponse
-> Const (First Text) ListBonusPaymentsResponse
Lens' ListBonusPaymentsResponse (Maybe Text)
listBonusPaymentsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListBonusPaymentsResponse
-> Const (First Text) ListBonusPaymentsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListBonusPaymentsResponse 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 ListBonusPayments
forall a. Maybe a
Prelude.Nothing
| Maybe [BonusPayment] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListBonusPayments
ListBonusPaymentsResponse
rs
ListBonusPaymentsResponse
-> Getting
(First [BonusPayment]) ListBonusPaymentsResponse [BonusPayment]
-> Maybe [BonusPayment]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [BonusPayment]
-> Const (First [BonusPayment]) (Maybe [BonusPayment]))
-> ListBonusPaymentsResponse
-> Const (First [BonusPayment]) ListBonusPaymentsResponse
Lens' ListBonusPaymentsResponse (Maybe [BonusPayment])
listBonusPaymentsResponse_bonusPayments
((Maybe [BonusPayment]
-> Const (First [BonusPayment]) (Maybe [BonusPayment]))
-> ListBonusPaymentsResponse
-> Const (First [BonusPayment]) ListBonusPaymentsResponse)
-> (([BonusPayment] -> Const (First [BonusPayment]) [BonusPayment])
-> Maybe [BonusPayment]
-> Const (First [BonusPayment]) (Maybe [BonusPayment]))
-> Getting
(First [BonusPayment]) ListBonusPaymentsResponse [BonusPayment]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([BonusPayment] -> Const (First [BonusPayment]) [BonusPayment])
-> Maybe [BonusPayment]
-> Const (First [BonusPayment]) (Maybe [BonusPayment])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListBonusPayments
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListBonusPayments -> Maybe ListBonusPayments
forall a. a -> Maybe a
Prelude.Just (ListBonusPayments -> Maybe ListBonusPayments)
-> ListBonusPayments -> Maybe ListBonusPayments
forall a b. (a -> b) -> a -> b
Prelude.$
ListBonusPayments
rq
ListBonusPayments
-> (ListBonusPayments -> ListBonusPayments) -> ListBonusPayments
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListBonusPayments -> Identity ListBonusPayments
Lens ListBonusPayments ListBonusPayments (Maybe Text) (Maybe Text)
listBonusPayments_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListBonusPayments -> Identity ListBonusPayments)
-> Maybe Text -> ListBonusPayments -> ListBonusPayments
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListBonusPayments
ListBonusPaymentsResponse
rs
ListBonusPaymentsResponse
-> Getting (First Text) ListBonusPaymentsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListBonusPaymentsResponse
-> Const (First Text) ListBonusPaymentsResponse
Lens' ListBonusPaymentsResponse (Maybe Text)
listBonusPaymentsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListBonusPaymentsResponse
-> Const (First Text) ListBonusPaymentsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListBonusPaymentsResponse 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 ListBonusPayments where
type
AWSResponse ListBonusPayments =
ListBonusPaymentsResponse
request :: ListBonusPayments -> Request ListBonusPayments
request = Service -> ListBonusPayments -> Request ListBonusPayments
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListBonusPayments
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListBonusPayments)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListBonusPayments))
-> Logger
-> Service
-> Proxy ListBonusPayments
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListBonusPayments)))
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 [BonusPayment]
-> Maybe Text -> Maybe Int -> Int -> ListBonusPaymentsResponse
ListBonusPaymentsResponse'
(Maybe [BonusPayment]
-> Maybe Text -> Maybe Int -> Int -> ListBonusPaymentsResponse)
-> Either String (Maybe [BonusPayment])
-> Either
String
(Maybe Text -> Maybe Int -> Int -> ListBonusPaymentsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [BonusPayment]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"BonusPayments" Either String (Maybe (Maybe [BonusPayment]))
-> Maybe [BonusPayment] -> Either String (Maybe [BonusPayment])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [BonusPayment]
forall a. Monoid a => a
Prelude.mempty)
Either
String
(Maybe Text -> Maybe Int -> Int -> ListBonusPaymentsResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Int -> Int -> ListBonusPaymentsResponse)
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 Int -> Int -> ListBonusPaymentsResponse)
-> Either String (Maybe Int)
-> Either String (Int -> ListBonusPaymentsResponse)
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
"NumResults")
Either String (Int -> ListBonusPaymentsResponse)
-> Either String Int -> Either String ListBonusPaymentsResponse
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 ListBonusPayments
instance Prelude.NFData ListBonusPayments
instance Core.ToHeaders ListBonusPayments where
toHeaders :: ListBonusPayments -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListBonusPayments -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"MTurkRequesterServiceV20170117.ListBonusPayments" ::
Prelude.ByteString
),
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 ListBonusPayments where
toJSON :: ListBonusPayments -> Value
toJSON ListBonusPayments' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
assignmentId :: Maybe Text
hITId :: Maybe Text
nextToken :: Maybe Text
$sel:maxResults:ListBonusPayments' :: ListBonusPayments -> Maybe Natural
$sel:assignmentId:ListBonusPayments' :: ListBonusPayments -> Maybe Text
$sel:hITId:ListBonusPayments' :: ListBonusPayments -> Maybe Text
$sel:nextToken:ListBonusPayments' :: ListBonusPayments -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
"HITId" 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
hITId,
(Text
"AssignmentId" 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
assignmentId,
(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 ListBonusPayments where
toPath :: ListBonusPayments -> ByteString
toPath = ByteString -> ListBonusPayments -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListBonusPayments where
toQuery :: ListBonusPayments -> QueryString
toQuery = QueryString -> ListBonusPayments -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListBonusPaymentsResponse = ListBonusPaymentsResponse'
{
ListBonusPaymentsResponse -> Maybe [BonusPayment]
bonusPayments :: Prelude.Maybe [BonusPayment],
ListBonusPaymentsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListBonusPaymentsResponse -> Maybe Int
numResults :: Prelude.Maybe Prelude.Int,
ListBonusPaymentsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListBonusPaymentsResponse -> ListBonusPaymentsResponse -> Bool
(ListBonusPaymentsResponse -> ListBonusPaymentsResponse -> Bool)
-> (ListBonusPaymentsResponse -> ListBonusPaymentsResponse -> Bool)
-> Eq ListBonusPaymentsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListBonusPaymentsResponse -> ListBonusPaymentsResponse -> Bool
$c/= :: ListBonusPaymentsResponse -> ListBonusPaymentsResponse -> Bool
== :: ListBonusPaymentsResponse -> ListBonusPaymentsResponse -> Bool
$c== :: ListBonusPaymentsResponse -> ListBonusPaymentsResponse -> Bool
Prelude.Eq, ReadPrec [ListBonusPaymentsResponse]
ReadPrec ListBonusPaymentsResponse
Int -> ReadS ListBonusPaymentsResponse
ReadS [ListBonusPaymentsResponse]
(Int -> ReadS ListBonusPaymentsResponse)
-> ReadS [ListBonusPaymentsResponse]
-> ReadPrec ListBonusPaymentsResponse
-> ReadPrec [ListBonusPaymentsResponse]
-> Read ListBonusPaymentsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListBonusPaymentsResponse]
$creadListPrec :: ReadPrec [ListBonusPaymentsResponse]
readPrec :: ReadPrec ListBonusPaymentsResponse
$creadPrec :: ReadPrec ListBonusPaymentsResponse
readList :: ReadS [ListBonusPaymentsResponse]
$creadList :: ReadS [ListBonusPaymentsResponse]
readsPrec :: Int -> ReadS ListBonusPaymentsResponse
$creadsPrec :: Int -> ReadS ListBonusPaymentsResponse
Prelude.Read, Int -> ListBonusPaymentsResponse -> ShowS
[ListBonusPaymentsResponse] -> ShowS
ListBonusPaymentsResponse -> String
(Int -> ListBonusPaymentsResponse -> ShowS)
-> (ListBonusPaymentsResponse -> String)
-> ([ListBonusPaymentsResponse] -> ShowS)
-> Show ListBonusPaymentsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListBonusPaymentsResponse] -> ShowS
$cshowList :: [ListBonusPaymentsResponse] -> ShowS
show :: ListBonusPaymentsResponse -> String
$cshow :: ListBonusPaymentsResponse -> String
showsPrec :: Int -> ListBonusPaymentsResponse -> ShowS
$cshowsPrec :: Int -> ListBonusPaymentsResponse -> ShowS
Prelude.Show, (forall x.
ListBonusPaymentsResponse -> Rep ListBonusPaymentsResponse x)
-> (forall x.
Rep ListBonusPaymentsResponse x -> ListBonusPaymentsResponse)
-> Generic ListBonusPaymentsResponse
forall x.
Rep ListBonusPaymentsResponse x -> ListBonusPaymentsResponse
forall x.
ListBonusPaymentsResponse -> Rep ListBonusPaymentsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListBonusPaymentsResponse x -> ListBonusPaymentsResponse
$cfrom :: forall x.
ListBonusPaymentsResponse -> Rep ListBonusPaymentsResponse x
Prelude.Generic)
newListBonusPaymentsResponse ::
Prelude.Int ->
ListBonusPaymentsResponse
newListBonusPaymentsResponse :: Int -> ListBonusPaymentsResponse
newListBonusPaymentsResponse Int
pHttpStatus_ =
ListBonusPaymentsResponse' :: Maybe [BonusPayment]
-> Maybe Text -> Maybe Int -> Int -> ListBonusPaymentsResponse
ListBonusPaymentsResponse'
{ $sel:bonusPayments:ListBonusPaymentsResponse' :: Maybe [BonusPayment]
bonusPayments =
Maybe [BonusPayment]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListBonusPaymentsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:numResults:ListBonusPaymentsResponse' :: Maybe Int
numResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListBonusPaymentsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listBonusPaymentsResponse_bonusPayments :: Lens.Lens' ListBonusPaymentsResponse (Prelude.Maybe [BonusPayment])
listBonusPaymentsResponse_bonusPayments :: (Maybe [BonusPayment] -> f (Maybe [BonusPayment]))
-> ListBonusPaymentsResponse -> f ListBonusPaymentsResponse
listBonusPaymentsResponse_bonusPayments = (ListBonusPaymentsResponse -> Maybe [BonusPayment])
-> (ListBonusPaymentsResponse
-> Maybe [BonusPayment] -> ListBonusPaymentsResponse)
-> Lens' ListBonusPaymentsResponse (Maybe [BonusPayment])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBonusPaymentsResponse' {Maybe [BonusPayment]
bonusPayments :: Maybe [BonusPayment]
$sel:bonusPayments:ListBonusPaymentsResponse' :: ListBonusPaymentsResponse -> Maybe [BonusPayment]
bonusPayments} -> Maybe [BonusPayment]
bonusPayments) (\s :: ListBonusPaymentsResponse
s@ListBonusPaymentsResponse' {} Maybe [BonusPayment]
a -> ListBonusPaymentsResponse
s {$sel:bonusPayments:ListBonusPaymentsResponse' :: Maybe [BonusPayment]
bonusPayments = Maybe [BonusPayment]
a} :: ListBonusPaymentsResponse) ((Maybe [BonusPayment] -> f (Maybe [BonusPayment]))
-> ListBonusPaymentsResponse -> f ListBonusPaymentsResponse)
-> ((Maybe [BonusPayment] -> f (Maybe [BonusPayment]))
-> Maybe [BonusPayment] -> f (Maybe [BonusPayment]))
-> (Maybe [BonusPayment] -> f (Maybe [BonusPayment]))
-> ListBonusPaymentsResponse
-> f ListBonusPaymentsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [BonusPayment] [BonusPayment] [BonusPayment] [BonusPayment]
-> Iso
(Maybe [BonusPayment])
(Maybe [BonusPayment])
(Maybe [BonusPayment])
(Maybe [BonusPayment])
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 [BonusPayment] [BonusPayment] [BonusPayment] [BonusPayment]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listBonusPaymentsResponse_nextToken :: Lens.Lens' ListBonusPaymentsResponse (Prelude.Maybe Prelude.Text)
listBonusPaymentsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListBonusPaymentsResponse -> f ListBonusPaymentsResponse
listBonusPaymentsResponse_nextToken = (ListBonusPaymentsResponse -> Maybe Text)
-> (ListBonusPaymentsResponse
-> Maybe Text -> ListBonusPaymentsResponse)
-> Lens' ListBonusPaymentsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBonusPaymentsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListBonusPaymentsResponse' :: ListBonusPaymentsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListBonusPaymentsResponse
s@ListBonusPaymentsResponse' {} Maybe Text
a -> ListBonusPaymentsResponse
s {$sel:nextToken:ListBonusPaymentsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListBonusPaymentsResponse)
listBonusPaymentsResponse_numResults :: Lens.Lens' ListBonusPaymentsResponse (Prelude.Maybe Prelude.Int)
listBonusPaymentsResponse_numResults :: (Maybe Int -> f (Maybe Int))
-> ListBonusPaymentsResponse -> f ListBonusPaymentsResponse
listBonusPaymentsResponse_numResults = (ListBonusPaymentsResponse -> Maybe Int)
-> (ListBonusPaymentsResponse
-> Maybe Int -> ListBonusPaymentsResponse)
-> Lens
ListBonusPaymentsResponse
ListBonusPaymentsResponse
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBonusPaymentsResponse' {Maybe Int
numResults :: Maybe Int
$sel:numResults:ListBonusPaymentsResponse' :: ListBonusPaymentsResponse -> Maybe Int
numResults} -> Maybe Int
numResults) (\s :: ListBonusPaymentsResponse
s@ListBonusPaymentsResponse' {} Maybe Int
a -> ListBonusPaymentsResponse
s {$sel:numResults:ListBonusPaymentsResponse' :: Maybe Int
numResults = Maybe Int
a} :: ListBonusPaymentsResponse)
listBonusPaymentsResponse_httpStatus :: Lens.Lens' ListBonusPaymentsResponse Prelude.Int
listBonusPaymentsResponse_httpStatus :: (Int -> f Int)
-> ListBonusPaymentsResponse -> f ListBonusPaymentsResponse
listBonusPaymentsResponse_httpStatus = (ListBonusPaymentsResponse -> Int)
-> (ListBonusPaymentsResponse -> Int -> ListBonusPaymentsResponse)
-> Lens ListBonusPaymentsResponse ListBonusPaymentsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListBonusPaymentsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListBonusPaymentsResponse' :: ListBonusPaymentsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListBonusPaymentsResponse
s@ListBonusPaymentsResponse' {} Int
a -> ListBonusPaymentsResponse
s {$sel:httpStatus:ListBonusPaymentsResponse' :: Int
httpStatus = Int
a} :: ListBonusPaymentsResponse)
instance Prelude.NFData ListBonusPaymentsResponse