{-# 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.MechanicalTurk.ListHITsForQualificationType
-- 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)
--
-- The @ListHITsForQualificationType@ operation returns the HITs that use
-- the given Qualification type for a Qualification requirement. The
-- operation returns HITs of any status, except for HITs that have been
-- deleted with the @DeleteHIT@ operation or that have been auto-deleted.
--
-- This operation returns paginated results.
module Amazonka.MechanicalTurk.ListHITsForQualificationType
  ( -- * Creating a Request
    ListHITsForQualificationType (..),
    newListHITsForQualificationType,

    -- * Request Lenses
    listHITsForQualificationType_nextToken,
    listHITsForQualificationType_maxResults,
    listHITsForQualificationType_qualificationTypeId,

    -- * Destructuring the Response
    ListHITsForQualificationTypeResponse (..),
    newListHITsForQualificationTypeResponse,

    -- * Response Lenses
    listHITsForQualificationTypeResponse_nextToken,
    listHITsForQualificationTypeResponse_numResults,
    listHITsForQualificationTypeResponse_hITs,
    listHITsForQualificationTypeResponse_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

-- | /See:/ 'newListHITsForQualificationType' smart constructor.
data ListHITsForQualificationType = ListHITsForQualificationType'
  { -- | Pagination Token
    ListHITsForQualificationType -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Limit the number of results returned.
    ListHITsForQualificationType -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The ID of the Qualification type to use when querying HITs.
    ListHITsForQualificationType -> Text
qualificationTypeId :: Prelude.Text
  }
  deriving (ListHITsForQualificationType
-> ListHITsForQualificationType -> Bool
(ListHITsForQualificationType
 -> ListHITsForQualificationType -> Bool)
-> (ListHITsForQualificationType
    -> ListHITsForQualificationType -> Bool)
-> Eq ListHITsForQualificationType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListHITsForQualificationType
-> ListHITsForQualificationType -> Bool
$c/= :: ListHITsForQualificationType
-> ListHITsForQualificationType -> Bool
== :: ListHITsForQualificationType
-> ListHITsForQualificationType -> Bool
$c== :: ListHITsForQualificationType
-> ListHITsForQualificationType -> Bool
Prelude.Eq, ReadPrec [ListHITsForQualificationType]
ReadPrec ListHITsForQualificationType
Int -> ReadS ListHITsForQualificationType
ReadS [ListHITsForQualificationType]
(Int -> ReadS ListHITsForQualificationType)
-> ReadS [ListHITsForQualificationType]
-> ReadPrec ListHITsForQualificationType
-> ReadPrec [ListHITsForQualificationType]
-> Read ListHITsForQualificationType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListHITsForQualificationType]
$creadListPrec :: ReadPrec [ListHITsForQualificationType]
readPrec :: ReadPrec ListHITsForQualificationType
$creadPrec :: ReadPrec ListHITsForQualificationType
readList :: ReadS [ListHITsForQualificationType]
$creadList :: ReadS [ListHITsForQualificationType]
readsPrec :: Int -> ReadS ListHITsForQualificationType
$creadsPrec :: Int -> ReadS ListHITsForQualificationType
Prelude.Read, Int -> ListHITsForQualificationType -> ShowS
[ListHITsForQualificationType] -> ShowS
ListHITsForQualificationType -> String
(Int -> ListHITsForQualificationType -> ShowS)
-> (ListHITsForQualificationType -> String)
-> ([ListHITsForQualificationType] -> ShowS)
-> Show ListHITsForQualificationType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListHITsForQualificationType] -> ShowS
$cshowList :: [ListHITsForQualificationType] -> ShowS
show :: ListHITsForQualificationType -> String
$cshow :: ListHITsForQualificationType -> String
showsPrec :: Int -> ListHITsForQualificationType -> ShowS
$cshowsPrec :: Int -> ListHITsForQualificationType -> ShowS
Prelude.Show, (forall x.
 ListHITsForQualificationType -> Rep ListHITsForQualificationType x)
-> (forall x.
    Rep ListHITsForQualificationType x -> ListHITsForQualificationType)
-> Generic ListHITsForQualificationType
forall x.
Rep ListHITsForQualificationType x -> ListHITsForQualificationType
forall x.
ListHITsForQualificationType -> Rep ListHITsForQualificationType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListHITsForQualificationType x -> ListHITsForQualificationType
$cfrom :: forall x.
ListHITsForQualificationType -> Rep ListHITsForQualificationType x
Prelude.Generic)

-- |
-- Create a value of 'ListHITsForQualificationType' 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:
--
-- 'nextToken', 'listHITsForQualificationType_nextToken' - Pagination Token
--
-- 'maxResults', 'listHITsForQualificationType_maxResults' - Limit the number of results returned.
--
-- 'qualificationTypeId', 'listHITsForQualificationType_qualificationTypeId' - The ID of the Qualification type to use when querying HITs.
newListHITsForQualificationType ::
  -- | 'qualificationTypeId'
  Prelude.Text ->
  ListHITsForQualificationType
newListHITsForQualificationType :: Text -> ListHITsForQualificationType
newListHITsForQualificationType Text
pQualificationTypeId_ =
  ListHITsForQualificationType' :: Maybe Text -> Maybe Natural -> Text -> ListHITsForQualificationType
ListHITsForQualificationType'
    { $sel:nextToken:ListHITsForQualificationType' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListHITsForQualificationType' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:qualificationTypeId:ListHITsForQualificationType' :: Text
qualificationTypeId = Text
pQualificationTypeId_
    }

-- | Pagination Token
listHITsForQualificationType_nextToken :: Lens.Lens' ListHITsForQualificationType (Prelude.Maybe Prelude.Text)
listHITsForQualificationType_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListHITsForQualificationType -> f ListHITsForQualificationType
listHITsForQualificationType_nextToken = (ListHITsForQualificationType -> Maybe Text)
-> (ListHITsForQualificationType
    -> Maybe Text -> ListHITsForQualificationType)
-> Lens
     ListHITsForQualificationType
     ListHITsForQualificationType
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHITsForQualificationType' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListHITsForQualificationType' :: ListHITsForQualificationType -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListHITsForQualificationType
s@ListHITsForQualificationType' {} Maybe Text
a -> ListHITsForQualificationType
s {$sel:nextToken:ListHITsForQualificationType' :: Maybe Text
nextToken = Maybe Text
a} :: ListHITsForQualificationType)

-- | Limit the number of results returned.
listHITsForQualificationType_maxResults :: Lens.Lens' ListHITsForQualificationType (Prelude.Maybe Prelude.Natural)
listHITsForQualificationType_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListHITsForQualificationType -> f ListHITsForQualificationType
listHITsForQualificationType_maxResults = (ListHITsForQualificationType -> Maybe Natural)
-> (ListHITsForQualificationType
    -> Maybe Natural -> ListHITsForQualificationType)
-> Lens
     ListHITsForQualificationType
     ListHITsForQualificationType
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHITsForQualificationType' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListHITsForQualificationType' :: ListHITsForQualificationType -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListHITsForQualificationType
s@ListHITsForQualificationType' {} Maybe Natural
a -> ListHITsForQualificationType
s {$sel:maxResults:ListHITsForQualificationType' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListHITsForQualificationType)

-- | The ID of the Qualification type to use when querying HITs.
listHITsForQualificationType_qualificationTypeId :: Lens.Lens' ListHITsForQualificationType Prelude.Text
listHITsForQualificationType_qualificationTypeId :: (Text -> f Text)
-> ListHITsForQualificationType -> f ListHITsForQualificationType
listHITsForQualificationType_qualificationTypeId = (ListHITsForQualificationType -> Text)
-> (ListHITsForQualificationType
    -> Text -> ListHITsForQualificationType)
-> Lens
     ListHITsForQualificationType ListHITsForQualificationType Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHITsForQualificationType' {Text
qualificationTypeId :: Text
$sel:qualificationTypeId:ListHITsForQualificationType' :: ListHITsForQualificationType -> Text
qualificationTypeId} -> Text
qualificationTypeId) (\s :: ListHITsForQualificationType
s@ListHITsForQualificationType' {} Text
a -> ListHITsForQualificationType
s {$sel:qualificationTypeId:ListHITsForQualificationType' :: Text
qualificationTypeId = Text
a} :: ListHITsForQualificationType)

instance Core.AWSPager ListHITsForQualificationType where
  page :: ListHITsForQualificationType
-> AWSResponse ListHITsForQualificationType
-> Maybe ListHITsForQualificationType
page ListHITsForQualificationType
rq AWSResponse ListHITsForQualificationType
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListHITsForQualificationType
ListHITsForQualificationTypeResponse
rs
            ListHITsForQualificationTypeResponse
-> Getting (First Text) ListHITsForQualificationTypeResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListHITsForQualificationTypeResponse
-> Const (First Text) ListHITsForQualificationTypeResponse
Lens' ListHITsForQualificationTypeResponse (Maybe Text)
listHITsForQualificationTypeResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListHITsForQualificationTypeResponse
 -> Const (First Text) ListHITsForQualificationTypeResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListHITsForQualificationTypeResponse 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 ListHITsForQualificationType
forall a. Maybe a
Prelude.Nothing
    | Maybe [HIT] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListHITsForQualificationType
ListHITsForQualificationTypeResponse
rs
            ListHITsForQualificationTypeResponse
-> Getting (First [HIT]) ListHITsForQualificationTypeResponse [HIT]
-> Maybe [HIT]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [HIT] -> Const (First [HIT]) (Maybe [HIT]))
-> ListHITsForQualificationTypeResponse
-> Const (First [HIT]) ListHITsForQualificationTypeResponse
Lens' ListHITsForQualificationTypeResponse (Maybe [HIT])
listHITsForQualificationTypeResponse_hITs
              ((Maybe [HIT] -> Const (First [HIT]) (Maybe [HIT]))
 -> ListHITsForQualificationTypeResponse
 -> Const (First [HIT]) ListHITsForQualificationTypeResponse)
-> (([HIT] -> Const (First [HIT]) [HIT])
    -> Maybe [HIT] -> Const (First [HIT]) (Maybe [HIT]))
-> Getting (First [HIT]) ListHITsForQualificationTypeResponse [HIT]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([HIT] -> Const (First [HIT]) [HIT])
-> Maybe [HIT] -> Const (First [HIT]) (Maybe [HIT])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListHITsForQualificationType
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListHITsForQualificationType -> Maybe ListHITsForQualificationType
forall a. a -> Maybe a
Prelude.Just (ListHITsForQualificationType
 -> Maybe ListHITsForQualificationType)
-> ListHITsForQualificationType
-> Maybe ListHITsForQualificationType
forall a b. (a -> b) -> a -> b
Prelude.$
        ListHITsForQualificationType
rq
          ListHITsForQualificationType
-> (ListHITsForQualificationType -> ListHITsForQualificationType)
-> ListHITsForQualificationType
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListHITsForQualificationType
-> Identity ListHITsForQualificationType
Lens
  ListHITsForQualificationType
  ListHITsForQualificationType
  (Maybe Text)
  (Maybe Text)
listHITsForQualificationType_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListHITsForQualificationType
 -> Identity ListHITsForQualificationType)
-> Maybe Text
-> ListHITsForQualificationType
-> ListHITsForQualificationType
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListHITsForQualificationType
ListHITsForQualificationTypeResponse
rs
          ListHITsForQualificationTypeResponse
-> Getting (First Text) ListHITsForQualificationTypeResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListHITsForQualificationTypeResponse
-> Const (First Text) ListHITsForQualificationTypeResponse
Lens' ListHITsForQualificationTypeResponse (Maybe Text)
listHITsForQualificationTypeResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListHITsForQualificationTypeResponse
 -> Const (First Text) ListHITsForQualificationTypeResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListHITsForQualificationTypeResponse 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 ListHITsForQualificationType where
  type
    AWSResponse ListHITsForQualificationType =
      ListHITsForQualificationTypeResponse
  request :: ListHITsForQualificationType
-> Request ListHITsForQualificationType
request = Service
-> ListHITsForQualificationType
-> Request ListHITsForQualificationType
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListHITsForQualificationType
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListHITsForQualificationType)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListHITsForQualificationType))
-> Logger
-> Service
-> Proxy ListHITsForQualificationType
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListHITsForQualificationType)))
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 Text
-> Maybe Int
-> Maybe [HIT]
-> Int
-> ListHITsForQualificationTypeResponse
ListHITsForQualificationTypeResponse'
            (Maybe Text
 -> Maybe Int
 -> Maybe [HIT]
 -> Int
 -> ListHITsForQualificationTypeResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe [HIT] -> Int -> ListHITsForQualificationTypeResponse)
forall (f :: * -> *) a b. Functor 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
   -> Maybe [HIT] -> Int -> ListHITsForQualificationTypeResponse)
-> Either String (Maybe Int)
-> Either
     String (Maybe [HIT] -> Int -> ListHITsForQualificationTypeResponse)
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 (Maybe [HIT] -> Int -> ListHITsForQualificationTypeResponse)
-> Either String (Maybe [HIT])
-> Either String (Int -> ListHITsForQualificationTypeResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [HIT]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"HITs" Either String (Maybe (Maybe [HIT]))
-> Maybe [HIT] -> Either String (Maybe [HIT])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [HIT]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> ListHITsForQualificationTypeResponse)
-> Either String Int
-> Either String ListHITsForQualificationTypeResponse
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
    ListHITsForQualificationType

instance Prelude.NFData ListHITsForQualificationType

instance Core.ToHeaders ListHITsForQualificationType where
  toHeaders :: ListHITsForQualificationType -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListHITsForQualificationType -> 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.ListHITsForQualificationType" ::
                          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 ListHITsForQualificationType where
  toJSON :: ListHITsForQualificationType -> Value
toJSON ListHITsForQualificationType' {Maybe Natural
Maybe Text
Text
qualificationTypeId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:qualificationTypeId:ListHITsForQualificationType' :: ListHITsForQualificationType -> Text
$sel:maxResults:ListHITsForQualificationType' :: ListHITsForQualificationType -> Maybe Natural
$sel:nextToken:ListHITsForQualificationType' :: ListHITsForQualificationType -> 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
"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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"QualificationTypeId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
qualificationTypeId)
          ]
      )

instance Core.ToPath ListHITsForQualificationType where
  toPath :: ListHITsForQualificationType -> ByteString
toPath = ByteString -> ListHITsForQualificationType -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery ListHITsForQualificationType where
  toQuery :: ListHITsForQualificationType -> QueryString
toQuery = QueryString -> ListHITsForQualificationType -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newListHITsForQualificationTypeResponse' smart constructor.
data ListHITsForQualificationTypeResponse = ListHITsForQualificationTypeResponse'
  { ListHITsForQualificationTypeResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The number of HITs on this page in the filtered results list, equivalent
    -- to the number of HITs being returned by this call.
    ListHITsForQualificationTypeResponse -> Maybe Int
numResults :: Prelude.Maybe Prelude.Int,
    -- | The list of HIT elements returned by the query.
    ListHITsForQualificationTypeResponse -> Maybe [HIT]
hITs :: Prelude.Maybe [HIT],
    -- | The response's http status code.
    ListHITsForQualificationTypeResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListHITsForQualificationTypeResponse
-> ListHITsForQualificationTypeResponse -> Bool
(ListHITsForQualificationTypeResponse
 -> ListHITsForQualificationTypeResponse -> Bool)
-> (ListHITsForQualificationTypeResponse
    -> ListHITsForQualificationTypeResponse -> Bool)
-> Eq ListHITsForQualificationTypeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListHITsForQualificationTypeResponse
-> ListHITsForQualificationTypeResponse -> Bool
$c/= :: ListHITsForQualificationTypeResponse
-> ListHITsForQualificationTypeResponse -> Bool
== :: ListHITsForQualificationTypeResponse
-> ListHITsForQualificationTypeResponse -> Bool
$c== :: ListHITsForQualificationTypeResponse
-> ListHITsForQualificationTypeResponse -> Bool
Prelude.Eq, ReadPrec [ListHITsForQualificationTypeResponse]
ReadPrec ListHITsForQualificationTypeResponse
Int -> ReadS ListHITsForQualificationTypeResponse
ReadS [ListHITsForQualificationTypeResponse]
(Int -> ReadS ListHITsForQualificationTypeResponse)
-> ReadS [ListHITsForQualificationTypeResponse]
-> ReadPrec ListHITsForQualificationTypeResponse
-> ReadPrec [ListHITsForQualificationTypeResponse]
-> Read ListHITsForQualificationTypeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListHITsForQualificationTypeResponse]
$creadListPrec :: ReadPrec [ListHITsForQualificationTypeResponse]
readPrec :: ReadPrec ListHITsForQualificationTypeResponse
$creadPrec :: ReadPrec ListHITsForQualificationTypeResponse
readList :: ReadS [ListHITsForQualificationTypeResponse]
$creadList :: ReadS [ListHITsForQualificationTypeResponse]
readsPrec :: Int -> ReadS ListHITsForQualificationTypeResponse
$creadsPrec :: Int -> ReadS ListHITsForQualificationTypeResponse
Prelude.Read, Int -> ListHITsForQualificationTypeResponse -> ShowS
[ListHITsForQualificationTypeResponse] -> ShowS
ListHITsForQualificationTypeResponse -> String
(Int -> ListHITsForQualificationTypeResponse -> ShowS)
-> (ListHITsForQualificationTypeResponse -> String)
-> ([ListHITsForQualificationTypeResponse] -> ShowS)
-> Show ListHITsForQualificationTypeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListHITsForQualificationTypeResponse] -> ShowS
$cshowList :: [ListHITsForQualificationTypeResponse] -> ShowS
show :: ListHITsForQualificationTypeResponse -> String
$cshow :: ListHITsForQualificationTypeResponse -> String
showsPrec :: Int -> ListHITsForQualificationTypeResponse -> ShowS
$cshowsPrec :: Int -> ListHITsForQualificationTypeResponse -> ShowS
Prelude.Show, (forall x.
 ListHITsForQualificationTypeResponse
 -> Rep ListHITsForQualificationTypeResponse x)
-> (forall x.
    Rep ListHITsForQualificationTypeResponse x
    -> ListHITsForQualificationTypeResponse)
-> Generic ListHITsForQualificationTypeResponse
forall x.
Rep ListHITsForQualificationTypeResponse x
-> ListHITsForQualificationTypeResponse
forall x.
ListHITsForQualificationTypeResponse
-> Rep ListHITsForQualificationTypeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListHITsForQualificationTypeResponse x
-> ListHITsForQualificationTypeResponse
$cfrom :: forall x.
ListHITsForQualificationTypeResponse
-> Rep ListHITsForQualificationTypeResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListHITsForQualificationTypeResponse' 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:
--
-- 'nextToken', 'listHITsForQualificationTypeResponse_nextToken' - Undocumented member.
--
-- 'numResults', 'listHITsForQualificationTypeResponse_numResults' - The number of HITs on this page in the filtered results list, equivalent
-- to the number of HITs being returned by this call.
--
-- 'hITs', 'listHITsForQualificationTypeResponse_hITs' - The list of HIT elements returned by the query.
--
-- 'httpStatus', 'listHITsForQualificationTypeResponse_httpStatus' - The response's http status code.
newListHITsForQualificationTypeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListHITsForQualificationTypeResponse
newListHITsForQualificationTypeResponse :: Int -> ListHITsForQualificationTypeResponse
newListHITsForQualificationTypeResponse Int
pHttpStatus_ =
  ListHITsForQualificationTypeResponse' :: Maybe Text
-> Maybe Int
-> Maybe [HIT]
-> Int
-> ListHITsForQualificationTypeResponse
ListHITsForQualificationTypeResponse'
    { $sel:nextToken:ListHITsForQualificationTypeResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:numResults:ListHITsForQualificationTypeResponse' :: Maybe Int
numResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:hITs:ListHITsForQualificationTypeResponse' :: Maybe [HIT]
hITs = Maybe [HIT]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListHITsForQualificationTypeResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
listHITsForQualificationTypeResponse_nextToken :: Lens.Lens' ListHITsForQualificationTypeResponse (Prelude.Maybe Prelude.Text)
listHITsForQualificationTypeResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListHITsForQualificationTypeResponse
-> f ListHITsForQualificationTypeResponse
listHITsForQualificationTypeResponse_nextToken = (ListHITsForQualificationTypeResponse -> Maybe Text)
-> (ListHITsForQualificationTypeResponse
    -> Maybe Text -> ListHITsForQualificationTypeResponse)
-> Lens' ListHITsForQualificationTypeResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHITsForQualificationTypeResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListHITsForQualificationTypeResponse' :: ListHITsForQualificationTypeResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListHITsForQualificationTypeResponse
s@ListHITsForQualificationTypeResponse' {} Maybe Text
a -> ListHITsForQualificationTypeResponse
s {$sel:nextToken:ListHITsForQualificationTypeResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListHITsForQualificationTypeResponse)

-- | The number of HITs on this page in the filtered results list, equivalent
-- to the number of HITs being returned by this call.
listHITsForQualificationTypeResponse_numResults :: Lens.Lens' ListHITsForQualificationTypeResponse (Prelude.Maybe Prelude.Int)
listHITsForQualificationTypeResponse_numResults :: (Maybe Int -> f (Maybe Int))
-> ListHITsForQualificationTypeResponse
-> f ListHITsForQualificationTypeResponse
listHITsForQualificationTypeResponse_numResults = (ListHITsForQualificationTypeResponse -> Maybe Int)
-> (ListHITsForQualificationTypeResponse
    -> Maybe Int -> ListHITsForQualificationTypeResponse)
-> Lens
     ListHITsForQualificationTypeResponse
     ListHITsForQualificationTypeResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHITsForQualificationTypeResponse' {Maybe Int
numResults :: Maybe Int
$sel:numResults:ListHITsForQualificationTypeResponse' :: ListHITsForQualificationTypeResponse -> Maybe Int
numResults} -> Maybe Int
numResults) (\s :: ListHITsForQualificationTypeResponse
s@ListHITsForQualificationTypeResponse' {} Maybe Int
a -> ListHITsForQualificationTypeResponse
s {$sel:numResults:ListHITsForQualificationTypeResponse' :: Maybe Int
numResults = Maybe Int
a} :: ListHITsForQualificationTypeResponse)

-- | The list of HIT elements returned by the query.
listHITsForQualificationTypeResponse_hITs :: Lens.Lens' ListHITsForQualificationTypeResponse (Prelude.Maybe [HIT])
listHITsForQualificationTypeResponse_hITs :: (Maybe [HIT] -> f (Maybe [HIT]))
-> ListHITsForQualificationTypeResponse
-> f ListHITsForQualificationTypeResponse
listHITsForQualificationTypeResponse_hITs = (ListHITsForQualificationTypeResponse -> Maybe [HIT])
-> (ListHITsForQualificationTypeResponse
    -> Maybe [HIT] -> ListHITsForQualificationTypeResponse)
-> Lens' ListHITsForQualificationTypeResponse (Maybe [HIT])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHITsForQualificationTypeResponse' {Maybe [HIT]
hITs :: Maybe [HIT]
$sel:hITs:ListHITsForQualificationTypeResponse' :: ListHITsForQualificationTypeResponse -> Maybe [HIT]
hITs} -> Maybe [HIT]
hITs) (\s :: ListHITsForQualificationTypeResponse
s@ListHITsForQualificationTypeResponse' {} Maybe [HIT]
a -> ListHITsForQualificationTypeResponse
s {$sel:hITs:ListHITsForQualificationTypeResponse' :: Maybe [HIT]
hITs = Maybe [HIT]
a} :: ListHITsForQualificationTypeResponse) ((Maybe [HIT] -> f (Maybe [HIT]))
 -> ListHITsForQualificationTypeResponse
 -> f ListHITsForQualificationTypeResponse)
-> ((Maybe [HIT] -> f (Maybe [HIT]))
    -> Maybe [HIT] -> f (Maybe [HIT]))
-> (Maybe [HIT] -> f (Maybe [HIT]))
-> ListHITsForQualificationTypeResponse
-> f ListHITsForQualificationTypeResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [HIT] [HIT] [HIT] [HIT]
-> Iso (Maybe [HIT]) (Maybe [HIT]) (Maybe [HIT]) (Maybe [HIT])
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 [HIT] [HIT] [HIT] [HIT]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListHITsForQualificationTypeResponse