{-# 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.ListReviewPolicyResultsForHIT
-- 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 @ListReviewPolicyResultsForHIT@ operation retrieves the computed
-- results and the actions taken in the course of executing your Review
-- Policies for a given HIT. For information about how to specify Review
-- Policies when you call CreateHIT, see Review Policies. The
-- ListReviewPolicyResultsForHIT operation can return results for both
-- Assignment-level and HIT-level review results.
module Amazonka.MechanicalTurk.ListReviewPolicyResultsForHIT
  ( -- * Creating a Request
    ListReviewPolicyResultsForHIT (..),
    newListReviewPolicyResultsForHIT,

    -- * Request Lenses
    listReviewPolicyResultsForHIT_retrieveResults,
    listReviewPolicyResultsForHIT_policyLevels,
    listReviewPolicyResultsForHIT_retrieveActions,
    listReviewPolicyResultsForHIT_nextToken,
    listReviewPolicyResultsForHIT_maxResults,
    listReviewPolicyResultsForHIT_hITId,

    -- * Destructuring the Response
    ListReviewPolicyResultsForHITResponse (..),
    newListReviewPolicyResultsForHITResponse,

    -- * Response Lenses
    listReviewPolicyResultsForHITResponse_hITReviewPolicy,
    listReviewPolicyResultsForHITResponse_hITReviewReport,
    listReviewPolicyResultsForHITResponse_nextToken,
    listReviewPolicyResultsForHITResponse_assignmentReviewReport,
    listReviewPolicyResultsForHITResponse_hITId,
    listReviewPolicyResultsForHITResponse_assignmentReviewPolicy,
    listReviewPolicyResultsForHITResponse_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:/ 'newListReviewPolicyResultsForHIT' smart constructor.
data ListReviewPolicyResultsForHIT = ListReviewPolicyResultsForHIT'
  { -- | Specify if the operation should retrieve a list of the results computed
    -- by the Review Policies.
    ListReviewPolicyResultsForHIT -> Maybe Bool
retrieveResults :: Prelude.Maybe Prelude.Bool,
    -- | The Policy Level(s) to retrieve review results for - HIT or Assignment.
    -- If omitted, the default behavior is to retrieve all data for both policy
    -- levels. For a list of all the described policies, see Review Policies.
    ListReviewPolicyResultsForHIT -> Maybe [ReviewPolicyLevel]
policyLevels :: Prelude.Maybe [ReviewPolicyLevel],
    -- | Specify if the operation should retrieve a list of the actions taken
    -- executing the Review Policies and their outcomes.
    ListReviewPolicyResultsForHIT -> Maybe Bool
retrieveActions :: Prelude.Maybe Prelude.Bool,
    -- | Pagination token
    ListReviewPolicyResultsForHIT -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Limit the number of results returned.
    ListReviewPolicyResultsForHIT -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The unique identifier of the HIT to retrieve review results for.
    ListReviewPolicyResultsForHIT -> Text
hITId :: Prelude.Text
  }
  deriving (ListReviewPolicyResultsForHIT
-> ListReviewPolicyResultsForHIT -> Bool
(ListReviewPolicyResultsForHIT
 -> ListReviewPolicyResultsForHIT -> Bool)
-> (ListReviewPolicyResultsForHIT
    -> ListReviewPolicyResultsForHIT -> Bool)
-> Eq ListReviewPolicyResultsForHIT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListReviewPolicyResultsForHIT
-> ListReviewPolicyResultsForHIT -> Bool
$c/= :: ListReviewPolicyResultsForHIT
-> ListReviewPolicyResultsForHIT -> Bool
== :: ListReviewPolicyResultsForHIT
-> ListReviewPolicyResultsForHIT -> Bool
$c== :: ListReviewPolicyResultsForHIT
-> ListReviewPolicyResultsForHIT -> Bool
Prelude.Eq, ReadPrec [ListReviewPolicyResultsForHIT]
ReadPrec ListReviewPolicyResultsForHIT
Int -> ReadS ListReviewPolicyResultsForHIT
ReadS [ListReviewPolicyResultsForHIT]
(Int -> ReadS ListReviewPolicyResultsForHIT)
-> ReadS [ListReviewPolicyResultsForHIT]
-> ReadPrec ListReviewPolicyResultsForHIT
-> ReadPrec [ListReviewPolicyResultsForHIT]
-> Read ListReviewPolicyResultsForHIT
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListReviewPolicyResultsForHIT]
$creadListPrec :: ReadPrec [ListReviewPolicyResultsForHIT]
readPrec :: ReadPrec ListReviewPolicyResultsForHIT
$creadPrec :: ReadPrec ListReviewPolicyResultsForHIT
readList :: ReadS [ListReviewPolicyResultsForHIT]
$creadList :: ReadS [ListReviewPolicyResultsForHIT]
readsPrec :: Int -> ReadS ListReviewPolicyResultsForHIT
$creadsPrec :: Int -> ReadS ListReviewPolicyResultsForHIT
Prelude.Read, Int -> ListReviewPolicyResultsForHIT -> ShowS
[ListReviewPolicyResultsForHIT] -> ShowS
ListReviewPolicyResultsForHIT -> String
(Int -> ListReviewPolicyResultsForHIT -> ShowS)
-> (ListReviewPolicyResultsForHIT -> String)
-> ([ListReviewPolicyResultsForHIT] -> ShowS)
-> Show ListReviewPolicyResultsForHIT
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListReviewPolicyResultsForHIT] -> ShowS
$cshowList :: [ListReviewPolicyResultsForHIT] -> ShowS
show :: ListReviewPolicyResultsForHIT -> String
$cshow :: ListReviewPolicyResultsForHIT -> String
showsPrec :: Int -> ListReviewPolicyResultsForHIT -> ShowS
$cshowsPrec :: Int -> ListReviewPolicyResultsForHIT -> ShowS
Prelude.Show, (forall x.
 ListReviewPolicyResultsForHIT
 -> Rep ListReviewPolicyResultsForHIT x)
-> (forall x.
    Rep ListReviewPolicyResultsForHIT x
    -> ListReviewPolicyResultsForHIT)
-> Generic ListReviewPolicyResultsForHIT
forall x.
Rep ListReviewPolicyResultsForHIT x
-> ListReviewPolicyResultsForHIT
forall x.
ListReviewPolicyResultsForHIT
-> Rep ListReviewPolicyResultsForHIT x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListReviewPolicyResultsForHIT x
-> ListReviewPolicyResultsForHIT
$cfrom :: forall x.
ListReviewPolicyResultsForHIT
-> Rep ListReviewPolicyResultsForHIT x
Prelude.Generic)

-- |
-- Create a value of 'ListReviewPolicyResultsForHIT' 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:
--
-- 'retrieveResults', 'listReviewPolicyResultsForHIT_retrieveResults' - Specify if the operation should retrieve a list of the results computed
-- by the Review Policies.
--
-- 'policyLevels', 'listReviewPolicyResultsForHIT_policyLevels' - The Policy Level(s) to retrieve review results for - HIT or Assignment.
-- If omitted, the default behavior is to retrieve all data for both policy
-- levels. For a list of all the described policies, see Review Policies.
--
-- 'retrieveActions', 'listReviewPolicyResultsForHIT_retrieveActions' - Specify if the operation should retrieve a list of the actions taken
-- executing the Review Policies and their outcomes.
--
-- 'nextToken', 'listReviewPolicyResultsForHIT_nextToken' - Pagination token
--
-- 'maxResults', 'listReviewPolicyResultsForHIT_maxResults' - Limit the number of results returned.
--
-- 'hITId', 'listReviewPolicyResultsForHIT_hITId' - The unique identifier of the HIT to retrieve review results for.
newListReviewPolicyResultsForHIT ::
  -- | 'hITId'
  Prelude.Text ->
  ListReviewPolicyResultsForHIT
newListReviewPolicyResultsForHIT :: Text -> ListReviewPolicyResultsForHIT
newListReviewPolicyResultsForHIT Text
pHITId_ =
  ListReviewPolicyResultsForHIT' :: Maybe Bool
-> Maybe [ReviewPolicyLevel]
-> Maybe Bool
-> Maybe Text
-> Maybe Natural
-> Text
-> ListReviewPolicyResultsForHIT
ListReviewPolicyResultsForHIT'
    { $sel:retrieveResults:ListReviewPolicyResultsForHIT' :: Maybe Bool
retrieveResults =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:policyLevels:ListReviewPolicyResultsForHIT' :: Maybe [ReviewPolicyLevel]
policyLevels = Maybe [ReviewPolicyLevel]
forall a. Maybe a
Prelude.Nothing,
      $sel:retrieveActions:ListReviewPolicyResultsForHIT' :: Maybe Bool
retrieveActions = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListReviewPolicyResultsForHIT' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListReviewPolicyResultsForHIT' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:hITId:ListReviewPolicyResultsForHIT' :: Text
hITId = Text
pHITId_
    }

-- | Specify if the operation should retrieve a list of the results computed
-- by the Review Policies.
listReviewPolicyResultsForHIT_retrieveResults :: Lens.Lens' ListReviewPolicyResultsForHIT (Prelude.Maybe Prelude.Bool)
listReviewPolicyResultsForHIT_retrieveResults :: (Maybe Bool -> f (Maybe Bool))
-> ListReviewPolicyResultsForHIT -> f ListReviewPolicyResultsForHIT
listReviewPolicyResultsForHIT_retrieveResults = (ListReviewPolicyResultsForHIT -> Maybe Bool)
-> (ListReviewPolicyResultsForHIT
    -> Maybe Bool -> ListReviewPolicyResultsForHIT)
-> Lens
     ListReviewPolicyResultsForHIT
     ListReviewPolicyResultsForHIT
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReviewPolicyResultsForHIT' {Maybe Bool
retrieveResults :: Maybe Bool
$sel:retrieveResults:ListReviewPolicyResultsForHIT' :: ListReviewPolicyResultsForHIT -> Maybe Bool
retrieveResults} -> Maybe Bool
retrieveResults) (\s :: ListReviewPolicyResultsForHIT
s@ListReviewPolicyResultsForHIT' {} Maybe Bool
a -> ListReviewPolicyResultsForHIT
s {$sel:retrieveResults:ListReviewPolicyResultsForHIT' :: Maybe Bool
retrieveResults = Maybe Bool
a} :: ListReviewPolicyResultsForHIT)

-- | The Policy Level(s) to retrieve review results for - HIT or Assignment.
-- If omitted, the default behavior is to retrieve all data for both policy
-- levels. For a list of all the described policies, see Review Policies.
listReviewPolicyResultsForHIT_policyLevels :: Lens.Lens' ListReviewPolicyResultsForHIT (Prelude.Maybe [ReviewPolicyLevel])
listReviewPolicyResultsForHIT_policyLevels :: (Maybe [ReviewPolicyLevel] -> f (Maybe [ReviewPolicyLevel]))
-> ListReviewPolicyResultsForHIT -> f ListReviewPolicyResultsForHIT
listReviewPolicyResultsForHIT_policyLevels = (ListReviewPolicyResultsForHIT -> Maybe [ReviewPolicyLevel])
-> (ListReviewPolicyResultsForHIT
    -> Maybe [ReviewPolicyLevel] -> ListReviewPolicyResultsForHIT)
-> Lens
     ListReviewPolicyResultsForHIT
     ListReviewPolicyResultsForHIT
     (Maybe [ReviewPolicyLevel])
     (Maybe [ReviewPolicyLevel])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReviewPolicyResultsForHIT' {Maybe [ReviewPolicyLevel]
policyLevels :: Maybe [ReviewPolicyLevel]
$sel:policyLevels:ListReviewPolicyResultsForHIT' :: ListReviewPolicyResultsForHIT -> Maybe [ReviewPolicyLevel]
policyLevels} -> Maybe [ReviewPolicyLevel]
policyLevels) (\s :: ListReviewPolicyResultsForHIT
s@ListReviewPolicyResultsForHIT' {} Maybe [ReviewPolicyLevel]
a -> ListReviewPolicyResultsForHIT
s {$sel:policyLevels:ListReviewPolicyResultsForHIT' :: Maybe [ReviewPolicyLevel]
policyLevels = Maybe [ReviewPolicyLevel]
a} :: ListReviewPolicyResultsForHIT) ((Maybe [ReviewPolicyLevel] -> f (Maybe [ReviewPolicyLevel]))
 -> ListReviewPolicyResultsForHIT
 -> f ListReviewPolicyResultsForHIT)
-> ((Maybe [ReviewPolicyLevel] -> f (Maybe [ReviewPolicyLevel]))
    -> Maybe [ReviewPolicyLevel] -> f (Maybe [ReviewPolicyLevel]))
-> (Maybe [ReviewPolicyLevel] -> f (Maybe [ReviewPolicyLevel]))
-> ListReviewPolicyResultsForHIT
-> f ListReviewPolicyResultsForHIT
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ReviewPolicyLevel]
  [ReviewPolicyLevel]
  [ReviewPolicyLevel]
  [ReviewPolicyLevel]
-> Iso
     (Maybe [ReviewPolicyLevel])
     (Maybe [ReviewPolicyLevel])
     (Maybe [ReviewPolicyLevel])
     (Maybe [ReviewPolicyLevel])
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
  [ReviewPolicyLevel]
  [ReviewPolicyLevel]
  [ReviewPolicyLevel]
  [ReviewPolicyLevel]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specify if the operation should retrieve a list of the actions taken
-- executing the Review Policies and their outcomes.
listReviewPolicyResultsForHIT_retrieveActions :: Lens.Lens' ListReviewPolicyResultsForHIT (Prelude.Maybe Prelude.Bool)
listReviewPolicyResultsForHIT_retrieveActions :: (Maybe Bool -> f (Maybe Bool))
-> ListReviewPolicyResultsForHIT -> f ListReviewPolicyResultsForHIT
listReviewPolicyResultsForHIT_retrieveActions = (ListReviewPolicyResultsForHIT -> Maybe Bool)
-> (ListReviewPolicyResultsForHIT
    -> Maybe Bool -> ListReviewPolicyResultsForHIT)
-> Lens
     ListReviewPolicyResultsForHIT
     ListReviewPolicyResultsForHIT
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReviewPolicyResultsForHIT' {Maybe Bool
retrieveActions :: Maybe Bool
$sel:retrieveActions:ListReviewPolicyResultsForHIT' :: ListReviewPolicyResultsForHIT -> Maybe Bool
retrieveActions} -> Maybe Bool
retrieveActions) (\s :: ListReviewPolicyResultsForHIT
s@ListReviewPolicyResultsForHIT' {} Maybe Bool
a -> ListReviewPolicyResultsForHIT
s {$sel:retrieveActions:ListReviewPolicyResultsForHIT' :: Maybe Bool
retrieveActions = Maybe Bool
a} :: ListReviewPolicyResultsForHIT)

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

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

-- | The unique identifier of the HIT to retrieve review results for.
listReviewPolicyResultsForHIT_hITId :: Lens.Lens' ListReviewPolicyResultsForHIT Prelude.Text
listReviewPolicyResultsForHIT_hITId :: (Text -> f Text)
-> ListReviewPolicyResultsForHIT -> f ListReviewPolicyResultsForHIT
listReviewPolicyResultsForHIT_hITId = (ListReviewPolicyResultsForHIT -> Text)
-> (ListReviewPolicyResultsForHIT
    -> Text -> ListReviewPolicyResultsForHIT)
-> Lens
     ListReviewPolicyResultsForHIT
     ListReviewPolicyResultsForHIT
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReviewPolicyResultsForHIT' {Text
hITId :: Text
$sel:hITId:ListReviewPolicyResultsForHIT' :: ListReviewPolicyResultsForHIT -> Text
hITId} -> Text
hITId) (\s :: ListReviewPolicyResultsForHIT
s@ListReviewPolicyResultsForHIT' {} Text
a -> ListReviewPolicyResultsForHIT
s {$sel:hITId:ListReviewPolicyResultsForHIT' :: Text
hITId = Text
a} :: ListReviewPolicyResultsForHIT)

instance
  Core.AWSRequest
    ListReviewPolicyResultsForHIT
  where
  type
    AWSResponse ListReviewPolicyResultsForHIT =
      ListReviewPolicyResultsForHITResponse
  request :: ListReviewPolicyResultsForHIT
-> Request ListReviewPolicyResultsForHIT
request = Service
-> ListReviewPolicyResultsForHIT
-> Request ListReviewPolicyResultsForHIT
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListReviewPolicyResultsForHIT
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListReviewPolicyResultsForHIT)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListReviewPolicyResultsForHIT))
-> Logger
-> Service
-> Proxy ListReviewPolicyResultsForHIT
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListReviewPolicyResultsForHIT)))
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 ReviewPolicy
-> Maybe ReviewReport
-> Maybe Text
-> Maybe ReviewReport
-> Maybe Text
-> Maybe ReviewPolicy
-> Int
-> ListReviewPolicyResultsForHITResponse
ListReviewPolicyResultsForHITResponse'
            (Maybe ReviewPolicy
 -> Maybe ReviewReport
 -> Maybe Text
 -> Maybe ReviewReport
 -> Maybe Text
 -> Maybe ReviewPolicy
 -> Int
 -> ListReviewPolicyResultsForHITResponse)
-> Either String (Maybe ReviewPolicy)
-> Either
     String
     (Maybe ReviewReport
      -> Maybe Text
      -> Maybe ReviewReport
      -> Maybe Text
      -> Maybe ReviewPolicy
      -> Int
      -> ListReviewPolicyResultsForHITResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ReviewPolicy)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"HITReviewPolicy")
            Either
  String
  (Maybe ReviewReport
   -> Maybe Text
   -> Maybe ReviewReport
   -> Maybe Text
   -> Maybe ReviewPolicy
   -> Int
   -> ListReviewPolicyResultsForHITResponse)
-> Either String (Maybe ReviewReport)
-> Either
     String
     (Maybe Text
      -> Maybe ReviewReport
      -> Maybe Text
      -> Maybe ReviewPolicy
      -> Int
      -> ListReviewPolicyResultsForHITResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ReviewReport)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"HITReviewReport")
            Either
  String
  (Maybe Text
   -> Maybe ReviewReport
   -> Maybe Text
   -> Maybe ReviewPolicy
   -> Int
   -> ListReviewPolicyResultsForHITResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ReviewReport
      -> Maybe Text
      -> Maybe ReviewPolicy
      -> Int
      -> ListReviewPolicyResultsForHITResponse)
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 ReviewReport
   -> Maybe Text
   -> Maybe ReviewPolicy
   -> Int
   -> ListReviewPolicyResultsForHITResponse)
-> Either String (Maybe ReviewReport)
-> Either
     String
     (Maybe Text
      -> Maybe ReviewPolicy
      -> Int
      -> ListReviewPolicyResultsForHITResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ReviewReport)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AssignmentReviewReport")
            Either
  String
  (Maybe Text
   -> Maybe ReviewPolicy
   -> Int
   -> ListReviewPolicyResultsForHITResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ReviewPolicy
      -> Int -> ListReviewPolicyResultsForHITResponse)
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
"HITId")
            Either
  String
  (Maybe ReviewPolicy
   -> Int -> ListReviewPolicyResultsForHITResponse)
-> Either String (Maybe ReviewPolicy)
-> Either String (Int -> ListReviewPolicyResultsForHITResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ReviewPolicy)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AssignmentReviewPolicy")
            Either String (Int -> ListReviewPolicyResultsForHITResponse)
-> Either String Int
-> Either String ListReviewPolicyResultsForHITResponse
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
    ListReviewPolicyResultsForHIT

instance Prelude.NFData ListReviewPolicyResultsForHIT

instance Core.ToHeaders ListReviewPolicyResultsForHIT where
  toHeaders :: ListReviewPolicyResultsForHIT -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListReviewPolicyResultsForHIT -> 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.ListReviewPolicyResultsForHIT" ::
                          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 ListReviewPolicyResultsForHIT where
  toJSON :: ListReviewPolicyResultsForHIT -> Value
toJSON ListReviewPolicyResultsForHIT' {Maybe Bool
Maybe Natural
Maybe [ReviewPolicyLevel]
Maybe Text
Text
hITId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
retrieveActions :: Maybe Bool
policyLevels :: Maybe [ReviewPolicyLevel]
retrieveResults :: Maybe Bool
$sel:hITId:ListReviewPolicyResultsForHIT' :: ListReviewPolicyResultsForHIT -> Text
$sel:maxResults:ListReviewPolicyResultsForHIT' :: ListReviewPolicyResultsForHIT -> Maybe Natural
$sel:nextToken:ListReviewPolicyResultsForHIT' :: ListReviewPolicyResultsForHIT -> Maybe Text
$sel:retrieveActions:ListReviewPolicyResultsForHIT' :: ListReviewPolicyResultsForHIT -> Maybe Bool
$sel:policyLevels:ListReviewPolicyResultsForHIT' :: ListReviewPolicyResultsForHIT -> Maybe [ReviewPolicyLevel]
$sel:retrieveResults:ListReviewPolicyResultsForHIT' :: ListReviewPolicyResultsForHIT -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"RetrieveResults" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
retrieveResults,
            (Text
"PolicyLevels" Text -> [ReviewPolicyLevel] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([ReviewPolicyLevel] -> Pair)
-> Maybe [ReviewPolicyLevel] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ReviewPolicyLevel]
policyLevels,
            (Text
"RetrieveActions" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
retrieveActions,
            (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
"HITId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
hITId)
          ]
      )

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

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

-- | /See:/ 'newListReviewPolicyResultsForHITResponse' smart constructor.
data ListReviewPolicyResultsForHITResponse = ListReviewPolicyResultsForHITResponse'
  { -- | The name of the HIT-level Review Policy. This contains only the
    -- PolicyName element.
    ListReviewPolicyResultsForHITResponse -> Maybe ReviewPolicy
hITReviewPolicy :: Prelude.Maybe ReviewPolicy,
    -- | Contains both ReviewResult and ReviewAction elements for a particular
    -- HIT.
    ListReviewPolicyResultsForHITResponse -> Maybe ReviewReport
hITReviewReport :: Prelude.Maybe ReviewReport,
    ListReviewPolicyResultsForHITResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Contains both ReviewResult and ReviewAction elements for an Assignment.
    ListReviewPolicyResultsForHITResponse -> Maybe ReviewReport
assignmentReviewReport :: Prelude.Maybe ReviewReport,
    -- | The HITId of the HIT for which results have been returned.
    ListReviewPolicyResultsForHITResponse -> Maybe Text
hITId :: Prelude.Maybe Prelude.Text,
    -- | The name of the Assignment-level Review Policy. This contains only the
    -- PolicyName element.
    ListReviewPolicyResultsForHITResponse -> Maybe ReviewPolicy
assignmentReviewPolicy :: Prelude.Maybe ReviewPolicy,
    -- | The response's http status code.
    ListReviewPolicyResultsForHITResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListReviewPolicyResultsForHITResponse
-> ListReviewPolicyResultsForHITResponse -> Bool
(ListReviewPolicyResultsForHITResponse
 -> ListReviewPolicyResultsForHITResponse -> Bool)
-> (ListReviewPolicyResultsForHITResponse
    -> ListReviewPolicyResultsForHITResponse -> Bool)
-> Eq ListReviewPolicyResultsForHITResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListReviewPolicyResultsForHITResponse
-> ListReviewPolicyResultsForHITResponse -> Bool
$c/= :: ListReviewPolicyResultsForHITResponse
-> ListReviewPolicyResultsForHITResponse -> Bool
== :: ListReviewPolicyResultsForHITResponse
-> ListReviewPolicyResultsForHITResponse -> Bool
$c== :: ListReviewPolicyResultsForHITResponse
-> ListReviewPolicyResultsForHITResponse -> Bool
Prelude.Eq, ReadPrec [ListReviewPolicyResultsForHITResponse]
ReadPrec ListReviewPolicyResultsForHITResponse
Int -> ReadS ListReviewPolicyResultsForHITResponse
ReadS [ListReviewPolicyResultsForHITResponse]
(Int -> ReadS ListReviewPolicyResultsForHITResponse)
-> ReadS [ListReviewPolicyResultsForHITResponse]
-> ReadPrec ListReviewPolicyResultsForHITResponse
-> ReadPrec [ListReviewPolicyResultsForHITResponse]
-> Read ListReviewPolicyResultsForHITResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListReviewPolicyResultsForHITResponse]
$creadListPrec :: ReadPrec [ListReviewPolicyResultsForHITResponse]
readPrec :: ReadPrec ListReviewPolicyResultsForHITResponse
$creadPrec :: ReadPrec ListReviewPolicyResultsForHITResponse
readList :: ReadS [ListReviewPolicyResultsForHITResponse]
$creadList :: ReadS [ListReviewPolicyResultsForHITResponse]
readsPrec :: Int -> ReadS ListReviewPolicyResultsForHITResponse
$creadsPrec :: Int -> ReadS ListReviewPolicyResultsForHITResponse
Prelude.Read, Int -> ListReviewPolicyResultsForHITResponse -> ShowS
[ListReviewPolicyResultsForHITResponse] -> ShowS
ListReviewPolicyResultsForHITResponse -> String
(Int -> ListReviewPolicyResultsForHITResponse -> ShowS)
-> (ListReviewPolicyResultsForHITResponse -> String)
-> ([ListReviewPolicyResultsForHITResponse] -> ShowS)
-> Show ListReviewPolicyResultsForHITResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListReviewPolicyResultsForHITResponse] -> ShowS
$cshowList :: [ListReviewPolicyResultsForHITResponse] -> ShowS
show :: ListReviewPolicyResultsForHITResponse -> String
$cshow :: ListReviewPolicyResultsForHITResponse -> String
showsPrec :: Int -> ListReviewPolicyResultsForHITResponse -> ShowS
$cshowsPrec :: Int -> ListReviewPolicyResultsForHITResponse -> ShowS
Prelude.Show, (forall x.
 ListReviewPolicyResultsForHITResponse
 -> Rep ListReviewPolicyResultsForHITResponse x)
-> (forall x.
    Rep ListReviewPolicyResultsForHITResponse x
    -> ListReviewPolicyResultsForHITResponse)
-> Generic ListReviewPolicyResultsForHITResponse
forall x.
Rep ListReviewPolicyResultsForHITResponse x
-> ListReviewPolicyResultsForHITResponse
forall x.
ListReviewPolicyResultsForHITResponse
-> Rep ListReviewPolicyResultsForHITResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListReviewPolicyResultsForHITResponse x
-> ListReviewPolicyResultsForHITResponse
$cfrom :: forall x.
ListReviewPolicyResultsForHITResponse
-> Rep ListReviewPolicyResultsForHITResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListReviewPolicyResultsForHITResponse' 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:
--
-- 'hITReviewPolicy', 'listReviewPolicyResultsForHITResponse_hITReviewPolicy' - The name of the HIT-level Review Policy. This contains only the
-- PolicyName element.
--
-- 'hITReviewReport', 'listReviewPolicyResultsForHITResponse_hITReviewReport' - Contains both ReviewResult and ReviewAction elements for a particular
-- HIT.
--
-- 'nextToken', 'listReviewPolicyResultsForHITResponse_nextToken' - Undocumented member.
--
-- 'assignmentReviewReport', 'listReviewPolicyResultsForHITResponse_assignmentReviewReport' - Contains both ReviewResult and ReviewAction elements for an Assignment.
--
-- 'hITId', 'listReviewPolicyResultsForHITResponse_hITId' - The HITId of the HIT for which results have been returned.
--
-- 'assignmentReviewPolicy', 'listReviewPolicyResultsForHITResponse_assignmentReviewPolicy' - The name of the Assignment-level Review Policy. This contains only the
-- PolicyName element.
--
-- 'httpStatus', 'listReviewPolicyResultsForHITResponse_httpStatus' - The response's http status code.
newListReviewPolicyResultsForHITResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListReviewPolicyResultsForHITResponse
newListReviewPolicyResultsForHITResponse :: Int -> ListReviewPolicyResultsForHITResponse
newListReviewPolicyResultsForHITResponse Int
pHttpStatus_ =
  ListReviewPolicyResultsForHITResponse' :: Maybe ReviewPolicy
-> Maybe ReviewReport
-> Maybe Text
-> Maybe ReviewReport
-> Maybe Text
-> Maybe ReviewPolicy
-> Int
-> ListReviewPolicyResultsForHITResponse
ListReviewPolicyResultsForHITResponse'
    { $sel:hITReviewPolicy:ListReviewPolicyResultsForHITResponse' :: Maybe ReviewPolicy
hITReviewPolicy =
        Maybe ReviewPolicy
forall a. Maybe a
Prelude.Nothing,
      $sel:hITReviewReport:ListReviewPolicyResultsForHITResponse' :: Maybe ReviewReport
hITReviewReport = Maybe ReviewReport
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListReviewPolicyResultsForHITResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:assignmentReviewReport:ListReviewPolicyResultsForHITResponse' :: Maybe ReviewReport
assignmentReviewReport =
        Maybe ReviewReport
forall a. Maybe a
Prelude.Nothing,
      $sel:hITId:ListReviewPolicyResultsForHITResponse' :: Maybe Text
hITId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:assignmentReviewPolicy:ListReviewPolicyResultsForHITResponse' :: Maybe ReviewPolicy
assignmentReviewPolicy =
        Maybe ReviewPolicy
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListReviewPolicyResultsForHITResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the HIT-level Review Policy. This contains only the
-- PolicyName element.
listReviewPolicyResultsForHITResponse_hITReviewPolicy :: Lens.Lens' ListReviewPolicyResultsForHITResponse (Prelude.Maybe ReviewPolicy)
listReviewPolicyResultsForHITResponse_hITReviewPolicy :: (Maybe ReviewPolicy -> f (Maybe ReviewPolicy))
-> ListReviewPolicyResultsForHITResponse
-> f ListReviewPolicyResultsForHITResponse
listReviewPolicyResultsForHITResponse_hITReviewPolicy = (ListReviewPolicyResultsForHITResponse -> Maybe ReviewPolicy)
-> (ListReviewPolicyResultsForHITResponse
    -> Maybe ReviewPolicy -> ListReviewPolicyResultsForHITResponse)
-> Lens
     ListReviewPolicyResultsForHITResponse
     ListReviewPolicyResultsForHITResponse
     (Maybe ReviewPolicy)
     (Maybe ReviewPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReviewPolicyResultsForHITResponse' {Maybe ReviewPolicy
hITReviewPolicy :: Maybe ReviewPolicy
$sel:hITReviewPolicy:ListReviewPolicyResultsForHITResponse' :: ListReviewPolicyResultsForHITResponse -> Maybe ReviewPolicy
hITReviewPolicy} -> Maybe ReviewPolicy
hITReviewPolicy) (\s :: ListReviewPolicyResultsForHITResponse
s@ListReviewPolicyResultsForHITResponse' {} Maybe ReviewPolicy
a -> ListReviewPolicyResultsForHITResponse
s {$sel:hITReviewPolicy:ListReviewPolicyResultsForHITResponse' :: Maybe ReviewPolicy
hITReviewPolicy = Maybe ReviewPolicy
a} :: ListReviewPolicyResultsForHITResponse)

-- | Contains both ReviewResult and ReviewAction elements for a particular
-- HIT.
listReviewPolicyResultsForHITResponse_hITReviewReport :: Lens.Lens' ListReviewPolicyResultsForHITResponse (Prelude.Maybe ReviewReport)
listReviewPolicyResultsForHITResponse_hITReviewReport :: (Maybe ReviewReport -> f (Maybe ReviewReport))
-> ListReviewPolicyResultsForHITResponse
-> f ListReviewPolicyResultsForHITResponse
listReviewPolicyResultsForHITResponse_hITReviewReport = (ListReviewPolicyResultsForHITResponse -> Maybe ReviewReport)
-> (ListReviewPolicyResultsForHITResponse
    -> Maybe ReviewReport -> ListReviewPolicyResultsForHITResponse)
-> Lens
     ListReviewPolicyResultsForHITResponse
     ListReviewPolicyResultsForHITResponse
     (Maybe ReviewReport)
     (Maybe ReviewReport)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReviewPolicyResultsForHITResponse' {Maybe ReviewReport
hITReviewReport :: Maybe ReviewReport
$sel:hITReviewReport:ListReviewPolicyResultsForHITResponse' :: ListReviewPolicyResultsForHITResponse -> Maybe ReviewReport
hITReviewReport} -> Maybe ReviewReport
hITReviewReport) (\s :: ListReviewPolicyResultsForHITResponse
s@ListReviewPolicyResultsForHITResponse' {} Maybe ReviewReport
a -> ListReviewPolicyResultsForHITResponse
s {$sel:hITReviewReport:ListReviewPolicyResultsForHITResponse' :: Maybe ReviewReport
hITReviewReport = Maybe ReviewReport
a} :: ListReviewPolicyResultsForHITResponse)

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

-- | Contains both ReviewResult and ReviewAction elements for an Assignment.
listReviewPolicyResultsForHITResponse_assignmentReviewReport :: Lens.Lens' ListReviewPolicyResultsForHITResponse (Prelude.Maybe ReviewReport)
listReviewPolicyResultsForHITResponse_assignmentReviewReport :: (Maybe ReviewReport -> f (Maybe ReviewReport))
-> ListReviewPolicyResultsForHITResponse
-> f ListReviewPolicyResultsForHITResponse
listReviewPolicyResultsForHITResponse_assignmentReviewReport = (ListReviewPolicyResultsForHITResponse -> Maybe ReviewReport)
-> (ListReviewPolicyResultsForHITResponse
    -> Maybe ReviewReport -> ListReviewPolicyResultsForHITResponse)
-> Lens
     ListReviewPolicyResultsForHITResponse
     ListReviewPolicyResultsForHITResponse
     (Maybe ReviewReport)
     (Maybe ReviewReport)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReviewPolicyResultsForHITResponse' {Maybe ReviewReport
assignmentReviewReport :: Maybe ReviewReport
$sel:assignmentReviewReport:ListReviewPolicyResultsForHITResponse' :: ListReviewPolicyResultsForHITResponse -> Maybe ReviewReport
assignmentReviewReport} -> Maybe ReviewReport
assignmentReviewReport) (\s :: ListReviewPolicyResultsForHITResponse
s@ListReviewPolicyResultsForHITResponse' {} Maybe ReviewReport
a -> ListReviewPolicyResultsForHITResponse
s {$sel:assignmentReviewReport:ListReviewPolicyResultsForHITResponse' :: Maybe ReviewReport
assignmentReviewReport = Maybe ReviewReport
a} :: ListReviewPolicyResultsForHITResponse)

-- | The HITId of the HIT for which results have been returned.
listReviewPolicyResultsForHITResponse_hITId :: Lens.Lens' ListReviewPolicyResultsForHITResponse (Prelude.Maybe Prelude.Text)
listReviewPolicyResultsForHITResponse_hITId :: (Maybe Text -> f (Maybe Text))
-> ListReviewPolicyResultsForHITResponse
-> f ListReviewPolicyResultsForHITResponse
listReviewPolicyResultsForHITResponse_hITId = (ListReviewPolicyResultsForHITResponse -> Maybe Text)
-> (ListReviewPolicyResultsForHITResponse
    -> Maybe Text -> ListReviewPolicyResultsForHITResponse)
-> Lens
     ListReviewPolicyResultsForHITResponse
     ListReviewPolicyResultsForHITResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReviewPolicyResultsForHITResponse' {Maybe Text
hITId :: Maybe Text
$sel:hITId:ListReviewPolicyResultsForHITResponse' :: ListReviewPolicyResultsForHITResponse -> Maybe Text
hITId} -> Maybe Text
hITId) (\s :: ListReviewPolicyResultsForHITResponse
s@ListReviewPolicyResultsForHITResponse' {} Maybe Text
a -> ListReviewPolicyResultsForHITResponse
s {$sel:hITId:ListReviewPolicyResultsForHITResponse' :: Maybe Text
hITId = Maybe Text
a} :: ListReviewPolicyResultsForHITResponse)

-- | The name of the Assignment-level Review Policy. This contains only the
-- PolicyName element.
listReviewPolicyResultsForHITResponse_assignmentReviewPolicy :: Lens.Lens' ListReviewPolicyResultsForHITResponse (Prelude.Maybe ReviewPolicy)
listReviewPolicyResultsForHITResponse_assignmentReviewPolicy :: (Maybe ReviewPolicy -> f (Maybe ReviewPolicy))
-> ListReviewPolicyResultsForHITResponse
-> f ListReviewPolicyResultsForHITResponse
listReviewPolicyResultsForHITResponse_assignmentReviewPolicy = (ListReviewPolicyResultsForHITResponse -> Maybe ReviewPolicy)
-> (ListReviewPolicyResultsForHITResponse
    -> Maybe ReviewPolicy -> ListReviewPolicyResultsForHITResponse)
-> Lens
     ListReviewPolicyResultsForHITResponse
     ListReviewPolicyResultsForHITResponse
     (Maybe ReviewPolicy)
     (Maybe ReviewPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReviewPolicyResultsForHITResponse' {Maybe ReviewPolicy
assignmentReviewPolicy :: Maybe ReviewPolicy
$sel:assignmentReviewPolicy:ListReviewPolicyResultsForHITResponse' :: ListReviewPolicyResultsForHITResponse -> Maybe ReviewPolicy
assignmentReviewPolicy} -> Maybe ReviewPolicy
assignmentReviewPolicy) (\s :: ListReviewPolicyResultsForHITResponse
s@ListReviewPolicyResultsForHITResponse' {} Maybe ReviewPolicy
a -> ListReviewPolicyResultsForHITResponse
s {$sel:assignmentReviewPolicy:ListReviewPolicyResultsForHITResponse' :: Maybe ReviewPolicy
assignmentReviewPolicy = Maybe ReviewPolicy
a} :: ListReviewPolicyResultsForHITResponse)

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

instance
  Prelude.NFData
    ListReviewPolicyResultsForHITResponse