{-# 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.AssociateQualificationWithWorker
-- 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 @AssociateQualificationWithWorker@ operation gives a Worker a
-- Qualification. @AssociateQualificationWithWorker@ does not require that
-- the Worker submit a Qualification request. It gives the Qualification
-- directly to the Worker.
--
-- You can only assign a Qualification of a Qualification type that you
-- created (using the @CreateQualificationType@ operation).
--
-- Note: @AssociateQualificationWithWorker@ does not affect any pending
-- Qualification requests for the Qualification by the Worker. If you
-- assign a Qualification to a Worker, then later grant a Qualification
-- request made by the Worker, the granting of the request may modify the
-- Qualification score. To resolve a pending Qualification request without
-- affecting the Qualification the Worker already has, reject the request
-- with the @RejectQualificationRequest@ operation.
module Amazonka.MechanicalTurk.AssociateQualificationWithWorker
  ( -- * Creating a Request
    AssociateQualificationWithWorker (..),
    newAssociateQualificationWithWorker,

    -- * Request Lenses
    associateQualificationWithWorker_integerValue,
    associateQualificationWithWorker_sendNotification,
    associateQualificationWithWorker_qualificationTypeId,
    associateQualificationWithWorker_workerId,

    -- * Destructuring the Response
    AssociateQualificationWithWorkerResponse (..),
    newAssociateQualificationWithWorkerResponse,

    -- * Response Lenses
    associateQualificationWithWorkerResponse_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:/ 'newAssociateQualificationWithWorker' smart constructor.
data AssociateQualificationWithWorker = AssociateQualificationWithWorker'
  { -- | The value of the Qualification to assign.
    AssociateQualificationWithWorker -> Maybe Int
integerValue :: Prelude.Maybe Prelude.Int,
    -- | Specifies whether to send a notification email message to the Worker
    -- saying that the qualification was assigned to the Worker. Note: this is
    -- true by default.
    AssociateQualificationWithWorker -> Maybe Bool
sendNotification :: Prelude.Maybe Prelude.Bool,
    -- | The ID of the Qualification type to use for the assigned Qualification.
    AssociateQualificationWithWorker -> Text
qualificationTypeId :: Prelude.Text,
    -- | The ID of the Worker to whom the Qualification is being assigned. Worker
    -- IDs are included with submitted HIT assignments and Qualification
    -- requests.
    AssociateQualificationWithWorker -> Text
workerId :: Prelude.Text
  }
  deriving (AssociateQualificationWithWorker
-> AssociateQualificationWithWorker -> Bool
(AssociateQualificationWithWorker
 -> AssociateQualificationWithWorker -> Bool)
-> (AssociateQualificationWithWorker
    -> AssociateQualificationWithWorker -> Bool)
-> Eq AssociateQualificationWithWorker
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateQualificationWithWorker
-> AssociateQualificationWithWorker -> Bool
$c/= :: AssociateQualificationWithWorker
-> AssociateQualificationWithWorker -> Bool
== :: AssociateQualificationWithWorker
-> AssociateQualificationWithWorker -> Bool
$c== :: AssociateQualificationWithWorker
-> AssociateQualificationWithWorker -> Bool
Prelude.Eq, ReadPrec [AssociateQualificationWithWorker]
ReadPrec AssociateQualificationWithWorker
Int -> ReadS AssociateQualificationWithWorker
ReadS [AssociateQualificationWithWorker]
(Int -> ReadS AssociateQualificationWithWorker)
-> ReadS [AssociateQualificationWithWorker]
-> ReadPrec AssociateQualificationWithWorker
-> ReadPrec [AssociateQualificationWithWorker]
-> Read AssociateQualificationWithWorker
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateQualificationWithWorker]
$creadListPrec :: ReadPrec [AssociateQualificationWithWorker]
readPrec :: ReadPrec AssociateQualificationWithWorker
$creadPrec :: ReadPrec AssociateQualificationWithWorker
readList :: ReadS [AssociateQualificationWithWorker]
$creadList :: ReadS [AssociateQualificationWithWorker]
readsPrec :: Int -> ReadS AssociateQualificationWithWorker
$creadsPrec :: Int -> ReadS AssociateQualificationWithWorker
Prelude.Read, Int -> AssociateQualificationWithWorker -> ShowS
[AssociateQualificationWithWorker] -> ShowS
AssociateQualificationWithWorker -> String
(Int -> AssociateQualificationWithWorker -> ShowS)
-> (AssociateQualificationWithWorker -> String)
-> ([AssociateQualificationWithWorker] -> ShowS)
-> Show AssociateQualificationWithWorker
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateQualificationWithWorker] -> ShowS
$cshowList :: [AssociateQualificationWithWorker] -> ShowS
show :: AssociateQualificationWithWorker -> String
$cshow :: AssociateQualificationWithWorker -> String
showsPrec :: Int -> AssociateQualificationWithWorker -> ShowS
$cshowsPrec :: Int -> AssociateQualificationWithWorker -> ShowS
Prelude.Show, (forall x.
 AssociateQualificationWithWorker
 -> Rep AssociateQualificationWithWorker x)
-> (forall x.
    Rep AssociateQualificationWithWorker x
    -> AssociateQualificationWithWorker)
-> Generic AssociateQualificationWithWorker
forall x.
Rep AssociateQualificationWithWorker x
-> AssociateQualificationWithWorker
forall x.
AssociateQualificationWithWorker
-> Rep AssociateQualificationWithWorker x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateQualificationWithWorker x
-> AssociateQualificationWithWorker
$cfrom :: forall x.
AssociateQualificationWithWorker
-> Rep AssociateQualificationWithWorker x
Prelude.Generic)

-- |
-- Create a value of 'AssociateQualificationWithWorker' 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:
--
-- 'integerValue', 'associateQualificationWithWorker_integerValue' - The value of the Qualification to assign.
--
-- 'sendNotification', 'associateQualificationWithWorker_sendNotification' - Specifies whether to send a notification email message to the Worker
-- saying that the qualification was assigned to the Worker. Note: this is
-- true by default.
--
-- 'qualificationTypeId', 'associateQualificationWithWorker_qualificationTypeId' - The ID of the Qualification type to use for the assigned Qualification.
--
-- 'workerId', 'associateQualificationWithWorker_workerId' - The ID of the Worker to whom the Qualification is being assigned. Worker
-- IDs are included with submitted HIT assignments and Qualification
-- requests.
newAssociateQualificationWithWorker ::
  -- | 'qualificationTypeId'
  Prelude.Text ->
  -- | 'workerId'
  Prelude.Text ->
  AssociateQualificationWithWorker
newAssociateQualificationWithWorker :: Text -> Text -> AssociateQualificationWithWorker
newAssociateQualificationWithWorker
  Text
pQualificationTypeId_
  Text
pWorkerId_ =
    AssociateQualificationWithWorker' :: Maybe Int
-> Maybe Bool -> Text -> Text -> AssociateQualificationWithWorker
AssociateQualificationWithWorker'
      { $sel:integerValue:AssociateQualificationWithWorker' :: Maybe Int
integerValue =
          Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:sendNotification:AssociateQualificationWithWorker' :: Maybe Bool
sendNotification = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:qualificationTypeId:AssociateQualificationWithWorker' :: Text
qualificationTypeId =
          Text
pQualificationTypeId_,
        $sel:workerId:AssociateQualificationWithWorker' :: Text
workerId = Text
pWorkerId_
      }

-- | The value of the Qualification to assign.
associateQualificationWithWorker_integerValue :: Lens.Lens' AssociateQualificationWithWorker (Prelude.Maybe Prelude.Int)
associateQualificationWithWorker_integerValue :: (Maybe Int -> f (Maybe Int))
-> AssociateQualificationWithWorker
-> f AssociateQualificationWithWorker
associateQualificationWithWorker_integerValue = (AssociateQualificationWithWorker -> Maybe Int)
-> (AssociateQualificationWithWorker
    -> Maybe Int -> AssociateQualificationWithWorker)
-> Lens
     AssociateQualificationWithWorker
     AssociateQualificationWithWorker
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateQualificationWithWorker' {Maybe Int
integerValue :: Maybe Int
$sel:integerValue:AssociateQualificationWithWorker' :: AssociateQualificationWithWorker -> Maybe Int
integerValue} -> Maybe Int
integerValue) (\s :: AssociateQualificationWithWorker
s@AssociateQualificationWithWorker' {} Maybe Int
a -> AssociateQualificationWithWorker
s {$sel:integerValue:AssociateQualificationWithWorker' :: Maybe Int
integerValue = Maybe Int
a} :: AssociateQualificationWithWorker)

-- | Specifies whether to send a notification email message to the Worker
-- saying that the qualification was assigned to the Worker. Note: this is
-- true by default.
associateQualificationWithWorker_sendNotification :: Lens.Lens' AssociateQualificationWithWorker (Prelude.Maybe Prelude.Bool)
associateQualificationWithWorker_sendNotification :: (Maybe Bool -> f (Maybe Bool))
-> AssociateQualificationWithWorker
-> f AssociateQualificationWithWorker
associateQualificationWithWorker_sendNotification = (AssociateQualificationWithWorker -> Maybe Bool)
-> (AssociateQualificationWithWorker
    -> Maybe Bool -> AssociateQualificationWithWorker)
-> Lens
     AssociateQualificationWithWorker
     AssociateQualificationWithWorker
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateQualificationWithWorker' {Maybe Bool
sendNotification :: Maybe Bool
$sel:sendNotification:AssociateQualificationWithWorker' :: AssociateQualificationWithWorker -> Maybe Bool
sendNotification} -> Maybe Bool
sendNotification) (\s :: AssociateQualificationWithWorker
s@AssociateQualificationWithWorker' {} Maybe Bool
a -> AssociateQualificationWithWorker
s {$sel:sendNotification:AssociateQualificationWithWorker' :: Maybe Bool
sendNotification = Maybe Bool
a} :: AssociateQualificationWithWorker)

-- | The ID of the Qualification type to use for the assigned Qualification.
associateQualificationWithWorker_qualificationTypeId :: Lens.Lens' AssociateQualificationWithWorker Prelude.Text
associateQualificationWithWorker_qualificationTypeId :: (Text -> f Text)
-> AssociateQualificationWithWorker
-> f AssociateQualificationWithWorker
associateQualificationWithWorker_qualificationTypeId = (AssociateQualificationWithWorker -> Text)
-> (AssociateQualificationWithWorker
    -> Text -> AssociateQualificationWithWorker)
-> Lens
     AssociateQualificationWithWorker
     AssociateQualificationWithWorker
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateQualificationWithWorker' {Text
qualificationTypeId :: Text
$sel:qualificationTypeId:AssociateQualificationWithWorker' :: AssociateQualificationWithWorker -> Text
qualificationTypeId} -> Text
qualificationTypeId) (\s :: AssociateQualificationWithWorker
s@AssociateQualificationWithWorker' {} Text
a -> AssociateQualificationWithWorker
s {$sel:qualificationTypeId:AssociateQualificationWithWorker' :: Text
qualificationTypeId = Text
a} :: AssociateQualificationWithWorker)

-- | The ID of the Worker to whom the Qualification is being assigned. Worker
-- IDs are included with submitted HIT assignments and Qualification
-- requests.
associateQualificationWithWorker_workerId :: Lens.Lens' AssociateQualificationWithWorker Prelude.Text
associateQualificationWithWorker_workerId :: (Text -> f Text)
-> AssociateQualificationWithWorker
-> f AssociateQualificationWithWorker
associateQualificationWithWorker_workerId = (AssociateQualificationWithWorker -> Text)
-> (AssociateQualificationWithWorker
    -> Text -> AssociateQualificationWithWorker)
-> Lens
     AssociateQualificationWithWorker
     AssociateQualificationWithWorker
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateQualificationWithWorker' {Text
workerId :: Text
$sel:workerId:AssociateQualificationWithWorker' :: AssociateQualificationWithWorker -> Text
workerId} -> Text
workerId) (\s :: AssociateQualificationWithWorker
s@AssociateQualificationWithWorker' {} Text
a -> AssociateQualificationWithWorker
s {$sel:workerId:AssociateQualificationWithWorker' :: Text
workerId = Text
a} :: AssociateQualificationWithWorker)

instance
  Core.AWSRequest
    AssociateQualificationWithWorker
  where
  type
    AWSResponse AssociateQualificationWithWorker =
      AssociateQualificationWithWorkerResponse
  request :: AssociateQualificationWithWorker
-> Request AssociateQualificationWithWorker
request = Service
-> AssociateQualificationWithWorker
-> Request AssociateQualificationWithWorker
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy AssociateQualificationWithWorker
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse AssociateQualificationWithWorker)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse AssociateQualificationWithWorker))
-> Logger
-> Service
-> Proxy AssociateQualificationWithWorker
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse AssociateQualificationWithWorker)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> AssociateQualificationWithWorkerResponse
AssociateQualificationWithWorkerResponse'
            (Int -> AssociateQualificationWithWorkerResponse)
-> Either String Int
-> Either String AssociateQualificationWithWorkerResponse
forall (f :: * -> *) a b. Functor 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
    AssociateQualificationWithWorker

instance
  Prelude.NFData
    AssociateQualificationWithWorker

instance
  Core.ToHeaders
    AssociateQualificationWithWorker
  where
  toHeaders :: AssociateQualificationWithWorker -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> AssociateQualificationWithWorker -> 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.AssociateQualificationWithWorker" ::
                          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 AssociateQualificationWithWorker where
  toJSON :: AssociateQualificationWithWorker -> Value
toJSON AssociateQualificationWithWorker' {Maybe Bool
Maybe Int
Text
workerId :: Text
qualificationTypeId :: Text
sendNotification :: Maybe Bool
integerValue :: Maybe Int
$sel:workerId:AssociateQualificationWithWorker' :: AssociateQualificationWithWorker -> Text
$sel:qualificationTypeId:AssociateQualificationWithWorker' :: AssociateQualificationWithWorker -> Text
$sel:sendNotification:AssociateQualificationWithWorker' :: AssociateQualificationWithWorker -> Maybe Bool
$sel:integerValue:AssociateQualificationWithWorker' :: AssociateQualificationWithWorker -> Maybe Int
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"IntegerValue" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
integerValue,
            (Text
"SendNotification" 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
sendNotification,
            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),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"WorkerId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
workerId)
          ]
      )

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

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

-- | /See:/ 'newAssociateQualificationWithWorkerResponse' smart constructor.
data AssociateQualificationWithWorkerResponse = AssociateQualificationWithWorkerResponse'
  { -- | The response's http status code.
    AssociateQualificationWithWorkerResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AssociateQualificationWithWorkerResponse
-> AssociateQualificationWithWorkerResponse -> Bool
(AssociateQualificationWithWorkerResponse
 -> AssociateQualificationWithWorkerResponse -> Bool)
-> (AssociateQualificationWithWorkerResponse
    -> AssociateQualificationWithWorkerResponse -> Bool)
-> Eq AssociateQualificationWithWorkerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateQualificationWithWorkerResponse
-> AssociateQualificationWithWorkerResponse -> Bool
$c/= :: AssociateQualificationWithWorkerResponse
-> AssociateQualificationWithWorkerResponse -> Bool
== :: AssociateQualificationWithWorkerResponse
-> AssociateQualificationWithWorkerResponse -> Bool
$c== :: AssociateQualificationWithWorkerResponse
-> AssociateQualificationWithWorkerResponse -> Bool
Prelude.Eq, ReadPrec [AssociateQualificationWithWorkerResponse]
ReadPrec AssociateQualificationWithWorkerResponse
Int -> ReadS AssociateQualificationWithWorkerResponse
ReadS [AssociateQualificationWithWorkerResponse]
(Int -> ReadS AssociateQualificationWithWorkerResponse)
-> ReadS [AssociateQualificationWithWorkerResponse]
-> ReadPrec AssociateQualificationWithWorkerResponse
-> ReadPrec [AssociateQualificationWithWorkerResponse]
-> Read AssociateQualificationWithWorkerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateQualificationWithWorkerResponse]
$creadListPrec :: ReadPrec [AssociateQualificationWithWorkerResponse]
readPrec :: ReadPrec AssociateQualificationWithWorkerResponse
$creadPrec :: ReadPrec AssociateQualificationWithWorkerResponse
readList :: ReadS [AssociateQualificationWithWorkerResponse]
$creadList :: ReadS [AssociateQualificationWithWorkerResponse]
readsPrec :: Int -> ReadS AssociateQualificationWithWorkerResponse
$creadsPrec :: Int -> ReadS AssociateQualificationWithWorkerResponse
Prelude.Read, Int -> AssociateQualificationWithWorkerResponse -> ShowS
[AssociateQualificationWithWorkerResponse] -> ShowS
AssociateQualificationWithWorkerResponse -> String
(Int -> AssociateQualificationWithWorkerResponse -> ShowS)
-> (AssociateQualificationWithWorkerResponse -> String)
-> ([AssociateQualificationWithWorkerResponse] -> ShowS)
-> Show AssociateQualificationWithWorkerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateQualificationWithWorkerResponse] -> ShowS
$cshowList :: [AssociateQualificationWithWorkerResponse] -> ShowS
show :: AssociateQualificationWithWorkerResponse -> String
$cshow :: AssociateQualificationWithWorkerResponse -> String
showsPrec :: Int -> AssociateQualificationWithWorkerResponse -> ShowS
$cshowsPrec :: Int -> AssociateQualificationWithWorkerResponse -> ShowS
Prelude.Show, (forall x.
 AssociateQualificationWithWorkerResponse
 -> Rep AssociateQualificationWithWorkerResponse x)
-> (forall x.
    Rep AssociateQualificationWithWorkerResponse x
    -> AssociateQualificationWithWorkerResponse)
-> Generic AssociateQualificationWithWorkerResponse
forall x.
Rep AssociateQualificationWithWorkerResponse x
-> AssociateQualificationWithWorkerResponse
forall x.
AssociateQualificationWithWorkerResponse
-> Rep AssociateQualificationWithWorkerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateQualificationWithWorkerResponse x
-> AssociateQualificationWithWorkerResponse
$cfrom :: forall x.
AssociateQualificationWithWorkerResponse
-> Rep AssociateQualificationWithWorkerResponse x
Prelude.Generic)

-- |
-- Create a value of 'AssociateQualificationWithWorkerResponse' 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:
--
-- 'httpStatus', 'associateQualificationWithWorkerResponse_httpStatus' - The response's http status code.
newAssociateQualificationWithWorkerResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AssociateQualificationWithWorkerResponse
newAssociateQualificationWithWorkerResponse :: Int -> AssociateQualificationWithWorkerResponse
newAssociateQualificationWithWorkerResponse
  Int
pHttpStatus_ =
    AssociateQualificationWithWorkerResponse' :: Int -> AssociateQualificationWithWorkerResponse
AssociateQualificationWithWorkerResponse'
      { $sel:httpStatus:AssociateQualificationWithWorkerResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

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

instance
  Prelude.NFData
    AssociateQualificationWithWorkerResponse