{-# 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.DataPipeline.SetTaskStatus
-- 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)
--
-- Task runners call @SetTaskStatus@ to notify AWS Data Pipeline that a
-- task is completed and provide information about the final status. A task
-- runner makes this call regardless of whether the task was sucessful. A
-- task runner does not need to call @SetTaskStatus@ for tasks that are
-- canceled by the web service during a call to ReportTaskProgress.
module Amazonka.DataPipeline.SetTaskStatus
  ( -- * Creating a Request
    SetTaskStatus (..),
    newSetTaskStatus,

    -- * Request Lenses
    setTaskStatus_errorStackTrace,
    setTaskStatus_errorId,
    setTaskStatus_errorMessage,
    setTaskStatus_taskId,
    setTaskStatus_taskStatus,

    -- * Destructuring the Response
    SetTaskStatusResponse (..),
    newSetTaskStatusResponse,

    -- * Response Lenses
    setTaskStatusResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DataPipeline.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Contains the parameters for SetTaskStatus.
--
-- /See:/ 'newSetTaskStatus' smart constructor.
data SetTaskStatus = SetTaskStatus'
  { -- | If an error occurred during the task, this value specifies the stack
    -- trace associated with the error. This value is set on the physical
    -- attempt object. It is used to display error information to the user. The
    -- web service does not parse this value.
    SetTaskStatus -> Maybe Text
errorStackTrace :: Prelude.Maybe Prelude.Text,
    -- | If an error occurred during the task, this value specifies the error
    -- code. This value is set on the physical attempt object. It is used to
    -- display error information to the user. It should not start with string
    -- \"Service_\" which is reserved by the system.
    SetTaskStatus -> Maybe Text
errorId :: Prelude.Maybe Prelude.Text,
    -- | If an error occurred during the task, this value specifies a text
    -- description of the error. This value is set on the physical attempt
    -- object. It is used to display error information to the user. The web
    -- service does not parse this value.
    SetTaskStatus -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
    -- | The ID of the task assigned to the task runner. This value is provided
    -- in the response for PollForTask.
    SetTaskStatus -> Text
taskId :: Prelude.Text,
    -- | If @FINISHED@, the task successfully completed. If @FAILED@, the task
    -- ended unsuccessfully. Preconditions use false.
    SetTaskStatus -> TaskStatus
taskStatus :: TaskStatus
  }
  deriving (SetTaskStatus -> SetTaskStatus -> Bool
(SetTaskStatus -> SetTaskStatus -> Bool)
-> (SetTaskStatus -> SetTaskStatus -> Bool) -> Eq SetTaskStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetTaskStatus -> SetTaskStatus -> Bool
$c/= :: SetTaskStatus -> SetTaskStatus -> Bool
== :: SetTaskStatus -> SetTaskStatus -> Bool
$c== :: SetTaskStatus -> SetTaskStatus -> Bool
Prelude.Eq, ReadPrec [SetTaskStatus]
ReadPrec SetTaskStatus
Int -> ReadS SetTaskStatus
ReadS [SetTaskStatus]
(Int -> ReadS SetTaskStatus)
-> ReadS [SetTaskStatus]
-> ReadPrec SetTaskStatus
-> ReadPrec [SetTaskStatus]
-> Read SetTaskStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetTaskStatus]
$creadListPrec :: ReadPrec [SetTaskStatus]
readPrec :: ReadPrec SetTaskStatus
$creadPrec :: ReadPrec SetTaskStatus
readList :: ReadS [SetTaskStatus]
$creadList :: ReadS [SetTaskStatus]
readsPrec :: Int -> ReadS SetTaskStatus
$creadsPrec :: Int -> ReadS SetTaskStatus
Prelude.Read, Int -> SetTaskStatus -> ShowS
[SetTaskStatus] -> ShowS
SetTaskStatus -> String
(Int -> SetTaskStatus -> ShowS)
-> (SetTaskStatus -> String)
-> ([SetTaskStatus] -> ShowS)
-> Show SetTaskStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetTaskStatus] -> ShowS
$cshowList :: [SetTaskStatus] -> ShowS
show :: SetTaskStatus -> String
$cshow :: SetTaskStatus -> String
showsPrec :: Int -> SetTaskStatus -> ShowS
$cshowsPrec :: Int -> SetTaskStatus -> ShowS
Prelude.Show, (forall x. SetTaskStatus -> Rep SetTaskStatus x)
-> (forall x. Rep SetTaskStatus x -> SetTaskStatus)
-> Generic SetTaskStatus
forall x. Rep SetTaskStatus x -> SetTaskStatus
forall x. SetTaskStatus -> Rep SetTaskStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SetTaskStatus x -> SetTaskStatus
$cfrom :: forall x. SetTaskStatus -> Rep SetTaskStatus x
Prelude.Generic)

-- |
-- Create a value of 'SetTaskStatus' 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:
--
-- 'errorStackTrace', 'setTaskStatus_errorStackTrace' - If an error occurred during the task, this value specifies the stack
-- trace associated with the error. This value is set on the physical
-- attempt object. It is used to display error information to the user. The
-- web service does not parse this value.
--
-- 'errorId', 'setTaskStatus_errorId' - If an error occurred during the task, this value specifies the error
-- code. This value is set on the physical attempt object. It is used to
-- display error information to the user. It should not start with string
-- \"Service_\" which is reserved by the system.
--
-- 'errorMessage', 'setTaskStatus_errorMessage' - If an error occurred during the task, this value specifies a text
-- description of the error. This value is set on the physical attempt
-- object. It is used to display error information to the user. The web
-- service does not parse this value.
--
-- 'taskId', 'setTaskStatus_taskId' - The ID of the task assigned to the task runner. This value is provided
-- in the response for PollForTask.
--
-- 'taskStatus', 'setTaskStatus_taskStatus' - If @FINISHED@, the task successfully completed. If @FAILED@, the task
-- ended unsuccessfully. Preconditions use false.
newSetTaskStatus ::
  -- | 'taskId'
  Prelude.Text ->
  -- | 'taskStatus'
  TaskStatus ->
  SetTaskStatus
newSetTaskStatus :: Text -> TaskStatus -> SetTaskStatus
newSetTaskStatus Text
pTaskId_ TaskStatus
pTaskStatus_ =
  SetTaskStatus' :: Maybe Text
-> Maybe Text -> Maybe Text -> Text -> TaskStatus -> SetTaskStatus
SetTaskStatus'
    { $sel:errorStackTrace:SetTaskStatus' :: Maybe Text
errorStackTrace = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:errorId:SetTaskStatus' :: Maybe Text
errorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:errorMessage:SetTaskStatus' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:taskId:SetTaskStatus' :: Text
taskId = Text
pTaskId_,
      $sel:taskStatus:SetTaskStatus' :: TaskStatus
taskStatus = TaskStatus
pTaskStatus_
    }

-- | If an error occurred during the task, this value specifies the stack
-- trace associated with the error. This value is set on the physical
-- attempt object. It is used to display error information to the user. The
-- web service does not parse this value.
setTaskStatus_errorStackTrace :: Lens.Lens' SetTaskStatus (Prelude.Maybe Prelude.Text)
setTaskStatus_errorStackTrace :: (Maybe Text -> f (Maybe Text)) -> SetTaskStatus -> f SetTaskStatus
setTaskStatus_errorStackTrace = (SetTaskStatus -> Maybe Text)
-> (SetTaskStatus -> Maybe Text -> SetTaskStatus)
-> Lens SetTaskStatus SetTaskStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetTaskStatus' {Maybe Text
errorStackTrace :: Maybe Text
$sel:errorStackTrace:SetTaskStatus' :: SetTaskStatus -> Maybe Text
errorStackTrace} -> Maybe Text
errorStackTrace) (\s :: SetTaskStatus
s@SetTaskStatus' {} Maybe Text
a -> SetTaskStatus
s {$sel:errorStackTrace:SetTaskStatus' :: Maybe Text
errorStackTrace = Maybe Text
a} :: SetTaskStatus)

-- | If an error occurred during the task, this value specifies the error
-- code. This value is set on the physical attempt object. It is used to
-- display error information to the user. It should not start with string
-- \"Service_\" which is reserved by the system.
setTaskStatus_errorId :: Lens.Lens' SetTaskStatus (Prelude.Maybe Prelude.Text)
setTaskStatus_errorId :: (Maybe Text -> f (Maybe Text)) -> SetTaskStatus -> f SetTaskStatus
setTaskStatus_errorId = (SetTaskStatus -> Maybe Text)
-> (SetTaskStatus -> Maybe Text -> SetTaskStatus)
-> Lens SetTaskStatus SetTaskStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetTaskStatus' {Maybe Text
errorId :: Maybe Text
$sel:errorId:SetTaskStatus' :: SetTaskStatus -> Maybe Text
errorId} -> Maybe Text
errorId) (\s :: SetTaskStatus
s@SetTaskStatus' {} Maybe Text
a -> SetTaskStatus
s {$sel:errorId:SetTaskStatus' :: Maybe Text
errorId = Maybe Text
a} :: SetTaskStatus)

-- | If an error occurred during the task, this value specifies a text
-- description of the error. This value is set on the physical attempt
-- object. It is used to display error information to the user. The web
-- service does not parse this value.
setTaskStatus_errorMessage :: Lens.Lens' SetTaskStatus (Prelude.Maybe Prelude.Text)
setTaskStatus_errorMessage :: (Maybe Text -> f (Maybe Text)) -> SetTaskStatus -> f SetTaskStatus
setTaskStatus_errorMessage = (SetTaskStatus -> Maybe Text)
-> (SetTaskStatus -> Maybe Text -> SetTaskStatus)
-> Lens SetTaskStatus SetTaskStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetTaskStatus' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:SetTaskStatus' :: SetTaskStatus -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: SetTaskStatus
s@SetTaskStatus' {} Maybe Text
a -> SetTaskStatus
s {$sel:errorMessage:SetTaskStatus' :: Maybe Text
errorMessage = Maybe Text
a} :: SetTaskStatus)

-- | The ID of the task assigned to the task runner. This value is provided
-- in the response for PollForTask.
setTaskStatus_taskId :: Lens.Lens' SetTaskStatus Prelude.Text
setTaskStatus_taskId :: (Text -> f Text) -> SetTaskStatus -> f SetTaskStatus
setTaskStatus_taskId = (SetTaskStatus -> Text)
-> (SetTaskStatus -> Text -> SetTaskStatus)
-> Lens SetTaskStatus SetTaskStatus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetTaskStatus' {Text
taskId :: Text
$sel:taskId:SetTaskStatus' :: SetTaskStatus -> Text
taskId} -> Text
taskId) (\s :: SetTaskStatus
s@SetTaskStatus' {} Text
a -> SetTaskStatus
s {$sel:taskId:SetTaskStatus' :: Text
taskId = Text
a} :: SetTaskStatus)

-- | If @FINISHED@, the task successfully completed. If @FAILED@, the task
-- ended unsuccessfully. Preconditions use false.
setTaskStatus_taskStatus :: Lens.Lens' SetTaskStatus TaskStatus
setTaskStatus_taskStatus :: (TaskStatus -> f TaskStatus) -> SetTaskStatus -> f SetTaskStatus
setTaskStatus_taskStatus = (SetTaskStatus -> TaskStatus)
-> (SetTaskStatus -> TaskStatus -> SetTaskStatus)
-> Lens SetTaskStatus SetTaskStatus TaskStatus TaskStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetTaskStatus' {TaskStatus
taskStatus :: TaskStatus
$sel:taskStatus:SetTaskStatus' :: SetTaskStatus -> TaskStatus
taskStatus} -> TaskStatus
taskStatus) (\s :: SetTaskStatus
s@SetTaskStatus' {} TaskStatus
a -> SetTaskStatus
s {$sel:taskStatus:SetTaskStatus' :: TaskStatus
taskStatus = TaskStatus
a} :: SetTaskStatus)

instance Core.AWSRequest SetTaskStatus where
  type
    AWSResponse SetTaskStatus =
      SetTaskStatusResponse
  request :: SetTaskStatus -> Request SetTaskStatus
request = Service -> SetTaskStatus -> Request SetTaskStatus
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy SetTaskStatus
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SetTaskStatus)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse SetTaskStatus))
-> Logger
-> Service
-> Proxy SetTaskStatus
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SetTaskStatus)))
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 -> SetTaskStatusResponse
SetTaskStatusResponse'
            (Int -> SetTaskStatusResponse)
-> Either String Int -> Either String SetTaskStatusResponse
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 SetTaskStatus

instance Prelude.NFData SetTaskStatus

instance Core.ToHeaders SetTaskStatus where
  toHeaders :: SetTaskStatus -> ResponseHeaders
toHeaders =
    ResponseHeaders -> SetTaskStatus -> 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
"DataPipeline.SetTaskStatus" :: 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 SetTaskStatus where
  toJSON :: SetTaskStatus -> Value
toJSON SetTaskStatus' {Maybe Text
Text
TaskStatus
taskStatus :: TaskStatus
taskId :: Text
errorMessage :: Maybe Text
errorId :: Maybe Text
errorStackTrace :: Maybe Text
$sel:taskStatus:SetTaskStatus' :: SetTaskStatus -> TaskStatus
$sel:taskId:SetTaskStatus' :: SetTaskStatus -> Text
$sel:errorMessage:SetTaskStatus' :: SetTaskStatus -> Maybe Text
$sel:errorId:SetTaskStatus' :: SetTaskStatus -> Maybe Text
$sel:errorStackTrace:SetTaskStatus' :: SetTaskStatus -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"errorStackTrace" 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
errorStackTrace,
            (Text
"errorId" 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
errorId,
            (Text
"errorMessage" 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
errorMessage,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"taskId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
taskId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"taskStatus" Text -> TaskStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= TaskStatus
taskStatus)
          ]
      )

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

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

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

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

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

instance Prelude.NFData SetTaskStatusResponse