{-# 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.SageMaker.SendPipelineExecutionStepFailure
-- 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)
--
-- Notifies the pipeline that the execution of a callback step failed,
-- along with a message describing why. When a callback step is run, the
-- pipeline generates a callback token and includes the token in a message
-- sent to Amazon Simple Queue Service (Amazon SQS).
module Amazonka.SageMaker.SendPipelineExecutionStepFailure
  ( -- * Creating a Request
    SendPipelineExecutionStepFailure (..),
    newSendPipelineExecutionStepFailure,

    -- * Request Lenses
    sendPipelineExecutionStepFailure_failureReason,
    sendPipelineExecutionStepFailure_clientRequestToken,
    sendPipelineExecutionStepFailure_callbackToken,

    -- * Destructuring the Response
    SendPipelineExecutionStepFailureResponse (..),
    newSendPipelineExecutionStepFailureResponse,

    -- * Response Lenses
    sendPipelineExecutionStepFailureResponse_pipelineExecutionArn,
    sendPipelineExecutionStepFailureResponse_httpStatus,
  )
where

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

-- | /See:/ 'newSendPipelineExecutionStepFailure' smart constructor.
data SendPipelineExecutionStepFailure = SendPipelineExecutionStepFailure'
  { -- | A message describing why the step failed.
    SendPipelineExecutionStepFailure -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | A unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the operation. An idempotent operation completes no more
    -- than one time.
    SendPipelineExecutionStepFailure -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The pipeline generated token from the Amazon SQS queue.
    SendPipelineExecutionStepFailure -> Text
callbackToken :: Prelude.Text
  }
  deriving (SendPipelineExecutionStepFailure
-> SendPipelineExecutionStepFailure -> Bool
(SendPipelineExecutionStepFailure
 -> SendPipelineExecutionStepFailure -> Bool)
-> (SendPipelineExecutionStepFailure
    -> SendPipelineExecutionStepFailure -> Bool)
-> Eq SendPipelineExecutionStepFailure
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendPipelineExecutionStepFailure
-> SendPipelineExecutionStepFailure -> Bool
$c/= :: SendPipelineExecutionStepFailure
-> SendPipelineExecutionStepFailure -> Bool
== :: SendPipelineExecutionStepFailure
-> SendPipelineExecutionStepFailure -> Bool
$c== :: SendPipelineExecutionStepFailure
-> SendPipelineExecutionStepFailure -> Bool
Prelude.Eq, ReadPrec [SendPipelineExecutionStepFailure]
ReadPrec SendPipelineExecutionStepFailure
Int -> ReadS SendPipelineExecutionStepFailure
ReadS [SendPipelineExecutionStepFailure]
(Int -> ReadS SendPipelineExecutionStepFailure)
-> ReadS [SendPipelineExecutionStepFailure]
-> ReadPrec SendPipelineExecutionStepFailure
-> ReadPrec [SendPipelineExecutionStepFailure]
-> Read SendPipelineExecutionStepFailure
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendPipelineExecutionStepFailure]
$creadListPrec :: ReadPrec [SendPipelineExecutionStepFailure]
readPrec :: ReadPrec SendPipelineExecutionStepFailure
$creadPrec :: ReadPrec SendPipelineExecutionStepFailure
readList :: ReadS [SendPipelineExecutionStepFailure]
$creadList :: ReadS [SendPipelineExecutionStepFailure]
readsPrec :: Int -> ReadS SendPipelineExecutionStepFailure
$creadsPrec :: Int -> ReadS SendPipelineExecutionStepFailure
Prelude.Read, Int -> SendPipelineExecutionStepFailure -> ShowS
[SendPipelineExecutionStepFailure] -> ShowS
SendPipelineExecutionStepFailure -> String
(Int -> SendPipelineExecutionStepFailure -> ShowS)
-> (SendPipelineExecutionStepFailure -> String)
-> ([SendPipelineExecutionStepFailure] -> ShowS)
-> Show SendPipelineExecutionStepFailure
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendPipelineExecutionStepFailure] -> ShowS
$cshowList :: [SendPipelineExecutionStepFailure] -> ShowS
show :: SendPipelineExecutionStepFailure -> String
$cshow :: SendPipelineExecutionStepFailure -> String
showsPrec :: Int -> SendPipelineExecutionStepFailure -> ShowS
$cshowsPrec :: Int -> SendPipelineExecutionStepFailure -> ShowS
Prelude.Show, (forall x.
 SendPipelineExecutionStepFailure
 -> Rep SendPipelineExecutionStepFailure x)
-> (forall x.
    Rep SendPipelineExecutionStepFailure x
    -> SendPipelineExecutionStepFailure)
-> Generic SendPipelineExecutionStepFailure
forall x.
Rep SendPipelineExecutionStepFailure x
-> SendPipelineExecutionStepFailure
forall x.
SendPipelineExecutionStepFailure
-> Rep SendPipelineExecutionStepFailure x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SendPipelineExecutionStepFailure x
-> SendPipelineExecutionStepFailure
$cfrom :: forall x.
SendPipelineExecutionStepFailure
-> Rep SendPipelineExecutionStepFailure x
Prelude.Generic)

-- |
-- Create a value of 'SendPipelineExecutionStepFailure' 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:
--
-- 'failureReason', 'sendPipelineExecutionStepFailure_failureReason' - A message describing why the step failed.
--
-- 'clientRequestToken', 'sendPipelineExecutionStepFailure_clientRequestToken' - A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the operation. An idempotent operation completes no more
-- than one time.
--
-- 'callbackToken', 'sendPipelineExecutionStepFailure_callbackToken' - The pipeline generated token from the Amazon SQS queue.
newSendPipelineExecutionStepFailure ::
  -- | 'callbackToken'
  Prelude.Text ->
  SendPipelineExecutionStepFailure
newSendPipelineExecutionStepFailure :: Text -> SendPipelineExecutionStepFailure
newSendPipelineExecutionStepFailure Text
pCallbackToken_ =
  SendPipelineExecutionStepFailure' :: Maybe Text
-> Maybe Text -> Text -> SendPipelineExecutionStepFailure
SendPipelineExecutionStepFailure'
    { $sel:failureReason:SendPipelineExecutionStepFailure' :: Maybe Text
failureReason =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:SendPipelineExecutionStepFailure' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:callbackToken:SendPipelineExecutionStepFailure' :: Text
callbackToken = Text
pCallbackToken_
    }

-- | A message describing why the step failed.
sendPipelineExecutionStepFailure_failureReason :: Lens.Lens' SendPipelineExecutionStepFailure (Prelude.Maybe Prelude.Text)
sendPipelineExecutionStepFailure_failureReason :: (Maybe Text -> f (Maybe Text))
-> SendPipelineExecutionStepFailure
-> f SendPipelineExecutionStepFailure
sendPipelineExecutionStepFailure_failureReason = (SendPipelineExecutionStepFailure -> Maybe Text)
-> (SendPipelineExecutionStepFailure
    -> Maybe Text -> SendPipelineExecutionStepFailure)
-> Lens
     SendPipelineExecutionStepFailure
     SendPipelineExecutionStepFailure
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendPipelineExecutionStepFailure' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:SendPipelineExecutionStepFailure' :: SendPipelineExecutionStepFailure -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: SendPipelineExecutionStepFailure
s@SendPipelineExecutionStepFailure' {} Maybe Text
a -> SendPipelineExecutionStepFailure
s {$sel:failureReason:SendPipelineExecutionStepFailure' :: Maybe Text
failureReason = Maybe Text
a} :: SendPipelineExecutionStepFailure)

-- | A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the operation. An idempotent operation completes no more
-- than one time.
sendPipelineExecutionStepFailure_clientRequestToken :: Lens.Lens' SendPipelineExecutionStepFailure (Prelude.Maybe Prelude.Text)
sendPipelineExecutionStepFailure_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> SendPipelineExecutionStepFailure
-> f SendPipelineExecutionStepFailure
sendPipelineExecutionStepFailure_clientRequestToken = (SendPipelineExecutionStepFailure -> Maybe Text)
-> (SendPipelineExecutionStepFailure
    -> Maybe Text -> SendPipelineExecutionStepFailure)
-> Lens
     SendPipelineExecutionStepFailure
     SendPipelineExecutionStepFailure
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendPipelineExecutionStepFailure' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:SendPipelineExecutionStepFailure' :: SendPipelineExecutionStepFailure -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: SendPipelineExecutionStepFailure
s@SendPipelineExecutionStepFailure' {} Maybe Text
a -> SendPipelineExecutionStepFailure
s {$sel:clientRequestToken:SendPipelineExecutionStepFailure' :: Maybe Text
clientRequestToken = Maybe Text
a} :: SendPipelineExecutionStepFailure)

-- | The pipeline generated token from the Amazon SQS queue.
sendPipelineExecutionStepFailure_callbackToken :: Lens.Lens' SendPipelineExecutionStepFailure Prelude.Text
sendPipelineExecutionStepFailure_callbackToken :: (Text -> f Text)
-> SendPipelineExecutionStepFailure
-> f SendPipelineExecutionStepFailure
sendPipelineExecutionStepFailure_callbackToken = (SendPipelineExecutionStepFailure -> Text)
-> (SendPipelineExecutionStepFailure
    -> Text -> SendPipelineExecutionStepFailure)
-> Lens
     SendPipelineExecutionStepFailure
     SendPipelineExecutionStepFailure
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendPipelineExecutionStepFailure' {Text
callbackToken :: Text
$sel:callbackToken:SendPipelineExecutionStepFailure' :: SendPipelineExecutionStepFailure -> Text
callbackToken} -> Text
callbackToken) (\s :: SendPipelineExecutionStepFailure
s@SendPipelineExecutionStepFailure' {} Text
a -> SendPipelineExecutionStepFailure
s {$sel:callbackToken:SendPipelineExecutionStepFailure' :: Text
callbackToken = Text
a} :: SendPipelineExecutionStepFailure)

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

instance
  Prelude.NFData
    SendPipelineExecutionStepFailure

instance
  Core.ToHeaders
    SendPipelineExecutionStepFailure
  where
  toHeaders :: SendPipelineExecutionStepFailure -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> SendPipelineExecutionStepFailure -> 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
"SageMaker.SendPipelineExecutionStepFailure" ::
                          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 SendPipelineExecutionStepFailure where
  toJSON :: SendPipelineExecutionStepFailure -> Value
toJSON SendPipelineExecutionStepFailure' {Maybe Text
Text
callbackToken :: Text
clientRequestToken :: Maybe Text
failureReason :: Maybe Text
$sel:callbackToken:SendPipelineExecutionStepFailure' :: SendPipelineExecutionStepFailure -> Text
$sel:clientRequestToken:SendPipelineExecutionStepFailure' :: SendPipelineExecutionStepFailure -> Maybe Text
$sel:failureReason:SendPipelineExecutionStepFailure' :: SendPipelineExecutionStepFailure -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"FailureReason" 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
failureReason,
            (Text
"ClientRequestToken" 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
clientRequestToken,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"CallbackToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
callbackToken)
          ]
      )

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

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

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

-- |
-- Create a value of 'SendPipelineExecutionStepFailureResponse' 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:
--
-- 'pipelineExecutionArn', 'sendPipelineExecutionStepFailureResponse_pipelineExecutionArn' - The Amazon Resource Name (ARN) of the pipeline execution.
--
-- 'httpStatus', 'sendPipelineExecutionStepFailureResponse_httpStatus' - The response's http status code.
newSendPipelineExecutionStepFailureResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  SendPipelineExecutionStepFailureResponse
newSendPipelineExecutionStepFailureResponse :: Int -> SendPipelineExecutionStepFailureResponse
newSendPipelineExecutionStepFailureResponse
  Int
pHttpStatus_ =
    SendPipelineExecutionStepFailureResponse' :: Maybe Text -> Int -> SendPipelineExecutionStepFailureResponse
SendPipelineExecutionStepFailureResponse'
      { $sel:pipelineExecutionArn:SendPipelineExecutionStepFailureResponse' :: Maybe Text
pipelineExecutionArn =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:SendPipelineExecutionStepFailureResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The Amazon Resource Name (ARN) of the pipeline execution.
sendPipelineExecutionStepFailureResponse_pipelineExecutionArn :: Lens.Lens' SendPipelineExecutionStepFailureResponse (Prelude.Maybe Prelude.Text)
sendPipelineExecutionStepFailureResponse_pipelineExecutionArn :: (Maybe Text -> f (Maybe Text))
-> SendPipelineExecutionStepFailureResponse
-> f SendPipelineExecutionStepFailureResponse
sendPipelineExecutionStepFailureResponse_pipelineExecutionArn = (SendPipelineExecutionStepFailureResponse -> Maybe Text)
-> (SendPipelineExecutionStepFailureResponse
    -> Maybe Text -> SendPipelineExecutionStepFailureResponse)
-> Lens
     SendPipelineExecutionStepFailureResponse
     SendPipelineExecutionStepFailureResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendPipelineExecutionStepFailureResponse' {Maybe Text
pipelineExecutionArn :: Maybe Text
$sel:pipelineExecutionArn:SendPipelineExecutionStepFailureResponse' :: SendPipelineExecutionStepFailureResponse -> Maybe Text
pipelineExecutionArn} -> Maybe Text
pipelineExecutionArn) (\s :: SendPipelineExecutionStepFailureResponse
s@SendPipelineExecutionStepFailureResponse' {} Maybe Text
a -> SendPipelineExecutionStepFailureResponse
s {$sel:pipelineExecutionArn:SendPipelineExecutionStepFailureResponse' :: Maybe Text
pipelineExecutionArn = Maybe Text
a} :: SendPipelineExecutionStepFailureResponse)

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

instance
  Prelude.NFData
    SendPipelineExecutionStepFailureResponse