{-# 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.CodePipeline.StopPipelineExecution
-- 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)
--
-- Stops the specified pipeline execution. You choose to either stop the
-- pipeline execution by completing in-progress actions without starting
-- subsequent actions, or by abandoning in-progress actions. While
-- completing or abandoning in-progress actions, the pipeline execution is
-- in a @Stopping@ state. After all in-progress actions are completed or
-- abandoned, the pipeline execution is in a @Stopped@ state.
module Amazonka.CodePipeline.StopPipelineExecution
  ( -- * Creating a Request
    StopPipelineExecution (..),
    newStopPipelineExecution,

    -- * Request Lenses
    stopPipelineExecution_abandon,
    stopPipelineExecution_reason,
    stopPipelineExecution_pipelineName,
    stopPipelineExecution_pipelineExecutionId,

    -- * Destructuring the Response
    StopPipelineExecutionResponse (..),
    newStopPipelineExecutionResponse,

    -- * Response Lenses
    stopPipelineExecutionResponse_pipelineExecutionId,
    stopPipelineExecutionResponse_httpStatus,
  )
where

import Amazonka.CodePipeline.Types
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

-- | /See:/ 'newStopPipelineExecution' smart constructor.
data StopPipelineExecution = StopPipelineExecution'
  { -- | Use this option to stop the pipeline execution by abandoning, rather
    -- than finishing, in-progress actions.
    --
    -- This option can lead to failed or out-of-sequence tasks.
    StopPipelineExecution -> Maybe Bool
abandon :: Prelude.Maybe Prelude.Bool,
    -- | Use this option to enter comments, such as the reason the pipeline was
    -- stopped.
    StopPipelineExecution -> Maybe Text
reason :: Prelude.Maybe Prelude.Text,
    -- | The name of the pipeline to stop.
    StopPipelineExecution -> Text
pipelineName :: Prelude.Text,
    -- | The ID of the pipeline execution to be stopped in the current stage. Use
    -- the @GetPipelineState@ action to retrieve the current
    -- pipelineExecutionId.
    StopPipelineExecution -> Text
pipelineExecutionId :: Prelude.Text
  }
  deriving (StopPipelineExecution -> StopPipelineExecution -> Bool
(StopPipelineExecution -> StopPipelineExecution -> Bool)
-> (StopPipelineExecution -> StopPipelineExecution -> Bool)
-> Eq StopPipelineExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopPipelineExecution -> StopPipelineExecution -> Bool
$c/= :: StopPipelineExecution -> StopPipelineExecution -> Bool
== :: StopPipelineExecution -> StopPipelineExecution -> Bool
$c== :: StopPipelineExecution -> StopPipelineExecution -> Bool
Prelude.Eq, ReadPrec [StopPipelineExecution]
ReadPrec StopPipelineExecution
Int -> ReadS StopPipelineExecution
ReadS [StopPipelineExecution]
(Int -> ReadS StopPipelineExecution)
-> ReadS [StopPipelineExecution]
-> ReadPrec StopPipelineExecution
-> ReadPrec [StopPipelineExecution]
-> Read StopPipelineExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopPipelineExecution]
$creadListPrec :: ReadPrec [StopPipelineExecution]
readPrec :: ReadPrec StopPipelineExecution
$creadPrec :: ReadPrec StopPipelineExecution
readList :: ReadS [StopPipelineExecution]
$creadList :: ReadS [StopPipelineExecution]
readsPrec :: Int -> ReadS StopPipelineExecution
$creadsPrec :: Int -> ReadS StopPipelineExecution
Prelude.Read, Int -> StopPipelineExecution -> ShowS
[StopPipelineExecution] -> ShowS
StopPipelineExecution -> String
(Int -> StopPipelineExecution -> ShowS)
-> (StopPipelineExecution -> String)
-> ([StopPipelineExecution] -> ShowS)
-> Show StopPipelineExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopPipelineExecution] -> ShowS
$cshowList :: [StopPipelineExecution] -> ShowS
show :: StopPipelineExecution -> String
$cshow :: StopPipelineExecution -> String
showsPrec :: Int -> StopPipelineExecution -> ShowS
$cshowsPrec :: Int -> StopPipelineExecution -> ShowS
Prelude.Show, (forall x. StopPipelineExecution -> Rep StopPipelineExecution x)
-> (forall x. Rep StopPipelineExecution x -> StopPipelineExecution)
-> Generic StopPipelineExecution
forall x. Rep StopPipelineExecution x -> StopPipelineExecution
forall x. StopPipelineExecution -> Rep StopPipelineExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StopPipelineExecution x -> StopPipelineExecution
$cfrom :: forall x. StopPipelineExecution -> Rep StopPipelineExecution x
Prelude.Generic)

-- |
-- Create a value of 'StopPipelineExecution' 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:
--
-- 'abandon', 'stopPipelineExecution_abandon' - Use this option to stop the pipeline execution by abandoning, rather
-- than finishing, in-progress actions.
--
-- This option can lead to failed or out-of-sequence tasks.
--
-- 'reason', 'stopPipelineExecution_reason' - Use this option to enter comments, such as the reason the pipeline was
-- stopped.
--
-- 'pipelineName', 'stopPipelineExecution_pipelineName' - The name of the pipeline to stop.
--
-- 'pipelineExecutionId', 'stopPipelineExecution_pipelineExecutionId' - The ID of the pipeline execution to be stopped in the current stage. Use
-- the @GetPipelineState@ action to retrieve the current
-- pipelineExecutionId.
newStopPipelineExecution ::
  -- | 'pipelineName'
  Prelude.Text ->
  -- | 'pipelineExecutionId'
  Prelude.Text ->
  StopPipelineExecution
newStopPipelineExecution :: Text -> Text -> StopPipelineExecution
newStopPipelineExecution
  Text
pPipelineName_
  Text
pPipelineExecutionId_ =
    StopPipelineExecution' :: Maybe Bool -> Maybe Text -> Text -> Text -> StopPipelineExecution
StopPipelineExecution'
      { $sel:abandon:StopPipelineExecution' :: Maybe Bool
abandon = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:reason:StopPipelineExecution' :: Maybe Text
reason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:pipelineName:StopPipelineExecution' :: Text
pipelineName = Text
pPipelineName_,
        $sel:pipelineExecutionId:StopPipelineExecution' :: Text
pipelineExecutionId = Text
pPipelineExecutionId_
      }

-- | Use this option to stop the pipeline execution by abandoning, rather
-- than finishing, in-progress actions.
--
-- This option can lead to failed or out-of-sequence tasks.
stopPipelineExecution_abandon :: Lens.Lens' StopPipelineExecution (Prelude.Maybe Prelude.Bool)
stopPipelineExecution_abandon :: (Maybe Bool -> f (Maybe Bool))
-> StopPipelineExecution -> f StopPipelineExecution
stopPipelineExecution_abandon = (StopPipelineExecution -> Maybe Bool)
-> (StopPipelineExecution -> Maybe Bool -> StopPipelineExecution)
-> Lens
     StopPipelineExecution
     StopPipelineExecution
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopPipelineExecution' {Maybe Bool
abandon :: Maybe Bool
$sel:abandon:StopPipelineExecution' :: StopPipelineExecution -> Maybe Bool
abandon} -> Maybe Bool
abandon) (\s :: StopPipelineExecution
s@StopPipelineExecution' {} Maybe Bool
a -> StopPipelineExecution
s {$sel:abandon:StopPipelineExecution' :: Maybe Bool
abandon = Maybe Bool
a} :: StopPipelineExecution)

-- | Use this option to enter comments, such as the reason the pipeline was
-- stopped.
stopPipelineExecution_reason :: Lens.Lens' StopPipelineExecution (Prelude.Maybe Prelude.Text)
stopPipelineExecution_reason :: (Maybe Text -> f (Maybe Text))
-> StopPipelineExecution -> f StopPipelineExecution
stopPipelineExecution_reason = (StopPipelineExecution -> Maybe Text)
-> (StopPipelineExecution -> Maybe Text -> StopPipelineExecution)
-> Lens
     StopPipelineExecution
     StopPipelineExecution
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopPipelineExecution' {Maybe Text
reason :: Maybe Text
$sel:reason:StopPipelineExecution' :: StopPipelineExecution -> Maybe Text
reason} -> Maybe Text
reason) (\s :: StopPipelineExecution
s@StopPipelineExecution' {} Maybe Text
a -> StopPipelineExecution
s {$sel:reason:StopPipelineExecution' :: Maybe Text
reason = Maybe Text
a} :: StopPipelineExecution)

-- | The name of the pipeline to stop.
stopPipelineExecution_pipelineName :: Lens.Lens' StopPipelineExecution Prelude.Text
stopPipelineExecution_pipelineName :: (Text -> f Text)
-> StopPipelineExecution -> f StopPipelineExecution
stopPipelineExecution_pipelineName = (StopPipelineExecution -> Text)
-> (StopPipelineExecution -> Text -> StopPipelineExecution)
-> Lens StopPipelineExecution StopPipelineExecution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopPipelineExecution' {Text
pipelineName :: Text
$sel:pipelineName:StopPipelineExecution' :: StopPipelineExecution -> Text
pipelineName} -> Text
pipelineName) (\s :: StopPipelineExecution
s@StopPipelineExecution' {} Text
a -> StopPipelineExecution
s {$sel:pipelineName:StopPipelineExecution' :: Text
pipelineName = Text
a} :: StopPipelineExecution)

-- | The ID of the pipeline execution to be stopped in the current stage. Use
-- the @GetPipelineState@ action to retrieve the current
-- pipelineExecutionId.
stopPipelineExecution_pipelineExecutionId :: Lens.Lens' StopPipelineExecution Prelude.Text
stopPipelineExecution_pipelineExecutionId :: (Text -> f Text)
-> StopPipelineExecution -> f StopPipelineExecution
stopPipelineExecution_pipelineExecutionId = (StopPipelineExecution -> Text)
-> (StopPipelineExecution -> Text -> StopPipelineExecution)
-> Lens StopPipelineExecution StopPipelineExecution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopPipelineExecution' {Text
pipelineExecutionId :: Text
$sel:pipelineExecutionId:StopPipelineExecution' :: StopPipelineExecution -> Text
pipelineExecutionId} -> Text
pipelineExecutionId) (\s :: StopPipelineExecution
s@StopPipelineExecution' {} Text
a -> StopPipelineExecution
s {$sel:pipelineExecutionId:StopPipelineExecution' :: Text
pipelineExecutionId = Text
a} :: StopPipelineExecution)

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

instance Prelude.NFData StopPipelineExecution

instance Core.ToHeaders StopPipelineExecution where
  toHeaders :: StopPipelineExecution -> ResponseHeaders
toHeaders =
    ResponseHeaders -> StopPipelineExecution -> 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
"CodePipeline_20150709.StopPipelineExecution" ::
                          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 StopPipelineExecution where
  toJSON :: StopPipelineExecution -> Value
toJSON StopPipelineExecution' {Maybe Bool
Maybe Text
Text
pipelineExecutionId :: Text
pipelineName :: Text
reason :: Maybe Text
abandon :: Maybe Bool
$sel:pipelineExecutionId:StopPipelineExecution' :: StopPipelineExecution -> Text
$sel:pipelineName:StopPipelineExecution' :: StopPipelineExecution -> Text
$sel:reason:StopPipelineExecution' :: StopPipelineExecution -> Maybe Text
$sel:abandon:StopPipelineExecution' :: StopPipelineExecution -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"abandon" 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
abandon,
            (Text
"reason" 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
reason,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"pipelineName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
pipelineName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"pipelineExecutionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
pipelineExecutionId)
          ]
      )

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

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

-- | /See:/ 'newStopPipelineExecutionResponse' smart constructor.
data StopPipelineExecutionResponse = StopPipelineExecutionResponse'
  { -- | The unique system-generated ID of the pipeline execution that was
    -- stopped.
    StopPipelineExecutionResponse -> Maybe Text
pipelineExecutionId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    StopPipelineExecutionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StopPipelineExecutionResponse
-> StopPipelineExecutionResponse -> Bool
(StopPipelineExecutionResponse
 -> StopPipelineExecutionResponse -> Bool)
-> (StopPipelineExecutionResponse
    -> StopPipelineExecutionResponse -> Bool)
-> Eq StopPipelineExecutionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopPipelineExecutionResponse
-> StopPipelineExecutionResponse -> Bool
$c/= :: StopPipelineExecutionResponse
-> StopPipelineExecutionResponse -> Bool
== :: StopPipelineExecutionResponse
-> StopPipelineExecutionResponse -> Bool
$c== :: StopPipelineExecutionResponse
-> StopPipelineExecutionResponse -> Bool
Prelude.Eq, ReadPrec [StopPipelineExecutionResponse]
ReadPrec StopPipelineExecutionResponse
Int -> ReadS StopPipelineExecutionResponse
ReadS [StopPipelineExecutionResponse]
(Int -> ReadS StopPipelineExecutionResponse)
-> ReadS [StopPipelineExecutionResponse]
-> ReadPrec StopPipelineExecutionResponse
-> ReadPrec [StopPipelineExecutionResponse]
-> Read StopPipelineExecutionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopPipelineExecutionResponse]
$creadListPrec :: ReadPrec [StopPipelineExecutionResponse]
readPrec :: ReadPrec StopPipelineExecutionResponse
$creadPrec :: ReadPrec StopPipelineExecutionResponse
readList :: ReadS [StopPipelineExecutionResponse]
$creadList :: ReadS [StopPipelineExecutionResponse]
readsPrec :: Int -> ReadS StopPipelineExecutionResponse
$creadsPrec :: Int -> ReadS StopPipelineExecutionResponse
Prelude.Read, Int -> StopPipelineExecutionResponse -> ShowS
[StopPipelineExecutionResponse] -> ShowS
StopPipelineExecutionResponse -> String
(Int -> StopPipelineExecutionResponse -> ShowS)
-> (StopPipelineExecutionResponse -> String)
-> ([StopPipelineExecutionResponse] -> ShowS)
-> Show StopPipelineExecutionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopPipelineExecutionResponse] -> ShowS
$cshowList :: [StopPipelineExecutionResponse] -> ShowS
show :: StopPipelineExecutionResponse -> String
$cshow :: StopPipelineExecutionResponse -> String
showsPrec :: Int -> StopPipelineExecutionResponse -> ShowS
$cshowsPrec :: Int -> StopPipelineExecutionResponse -> ShowS
Prelude.Show, (forall x.
 StopPipelineExecutionResponse
 -> Rep StopPipelineExecutionResponse x)
-> (forall x.
    Rep StopPipelineExecutionResponse x
    -> StopPipelineExecutionResponse)
-> Generic StopPipelineExecutionResponse
forall x.
Rep StopPipelineExecutionResponse x
-> StopPipelineExecutionResponse
forall x.
StopPipelineExecutionResponse
-> Rep StopPipelineExecutionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StopPipelineExecutionResponse x
-> StopPipelineExecutionResponse
$cfrom :: forall x.
StopPipelineExecutionResponse
-> Rep StopPipelineExecutionResponse x
Prelude.Generic)

-- |
-- Create a value of 'StopPipelineExecutionResponse' 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:
--
-- 'pipelineExecutionId', 'stopPipelineExecutionResponse_pipelineExecutionId' - The unique system-generated ID of the pipeline execution that was
-- stopped.
--
-- 'httpStatus', 'stopPipelineExecutionResponse_httpStatus' - The response's http status code.
newStopPipelineExecutionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StopPipelineExecutionResponse
newStopPipelineExecutionResponse :: Int -> StopPipelineExecutionResponse
newStopPipelineExecutionResponse Int
pHttpStatus_ =
  StopPipelineExecutionResponse' :: Maybe Text -> Int -> StopPipelineExecutionResponse
StopPipelineExecutionResponse'
    { $sel:pipelineExecutionId:StopPipelineExecutionResponse' :: Maybe Text
pipelineExecutionId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StopPipelineExecutionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The unique system-generated ID of the pipeline execution that was
-- stopped.
stopPipelineExecutionResponse_pipelineExecutionId :: Lens.Lens' StopPipelineExecutionResponse (Prelude.Maybe Prelude.Text)
stopPipelineExecutionResponse_pipelineExecutionId :: (Maybe Text -> f (Maybe Text))
-> StopPipelineExecutionResponse -> f StopPipelineExecutionResponse
stopPipelineExecutionResponse_pipelineExecutionId = (StopPipelineExecutionResponse -> Maybe Text)
-> (StopPipelineExecutionResponse
    -> Maybe Text -> StopPipelineExecutionResponse)
-> Lens
     StopPipelineExecutionResponse
     StopPipelineExecutionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopPipelineExecutionResponse' {Maybe Text
pipelineExecutionId :: Maybe Text
$sel:pipelineExecutionId:StopPipelineExecutionResponse' :: StopPipelineExecutionResponse -> Maybe Text
pipelineExecutionId} -> Maybe Text
pipelineExecutionId) (\s :: StopPipelineExecutionResponse
s@StopPipelineExecutionResponse' {} Maybe Text
a -> StopPipelineExecutionResponse
s {$sel:pipelineExecutionId:StopPipelineExecutionResponse' :: Maybe Text
pipelineExecutionId = Maybe Text
a} :: StopPipelineExecutionResponse)

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

instance Prelude.NFData StopPipelineExecutionResponse