{-# 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.IoTAnalytics.RunPipelineActivity
-- 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)
--
-- Simulates the results of running a pipeline activity on a message
-- payload.
module Amazonka.IoTAnalytics.RunPipelineActivity
  ( -- * Creating a Request
    RunPipelineActivity (..),
    newRunPipelineActivity,

    -- * Request Lenses
    runPipelineActivity_pipelineActivity,
    runPipelineActivity_payloads,

    -- * Destructuring the Response
    RunPipelineActivityResponse (..),
    newRunPipelineActivityResponse,

    -- * Response Lenses
    runPipelineActivityResponse_logResult,
    runPipelineActivityResponse_payloads,
    runPipelineActivityResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoTAnalytics.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

-- | /See:/ 'newRunPipelineActivity' smart constructor.
data RunPipelineActivity = RunPipelineActivity'
  { -- | The pipeline activity that is run. This must not be a channel activity
    -- or a data store activity because these activities are used in a pipeline
    -- only to load the original message and to store the (possibly)
    -- transformed message. If a Lambda activity is specified, only
    -- short-running Lambda functions (those with a timeout of less than 30
    -- seconds or less) can be used.
    RunPipelineActivity -> PipelineActivity
pipelineActivity :: PipelineActivity,
    -- | The sample message payloads on which the pipeline activity is run.
    RunPipelineActivity -> NonEmpty Base64
payloads :: Prelude.NonEmpty Core.Base64
  }
  deriving (RunPipelineActivity -> RunPipelineActivity -> Bool
(RunPipelineActivity -> RunPipelineActivity -> Bool)
-> (RunPipelineActivity -> RunPipelineActivity -> Bool)
-> Eq RunPipelineActivity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RunPipelineActivity -> RunPipelineActivity -> Bool
$c/= :: RunPipelineActivity -> RunPipelineActivity -> Bool
== :: RunPipelineActivity -> RunPipelineActivity -> Bool
$c== :: RunPipelineActivity -> RunPipelineActivity -> Bool
Prelude.Eq, ReadPrec [RunPipelineActivity]
ReadPrec RunPipelineActivity
Int -> ReadS RunPipelineActivity
ReadS [RunPipelineActivity]
(Int -> ReadS RunPipelineActivity)
-> ReadS [RunPipelineActivity]
-> ReadPrec RunPipelineActivity
-> ReadPrec [RunPipelineActivity]
-> Read RunPipelineActivity
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RunPipelineActivity]
$creadListPrec :: ReadPrec [RunPipelineActivity]
readPrec :: ReadPrec RunPipelineActivity
$creadPrec :: ReadPrec RunPipelineActivity
readList :: ReadS [RunPipelineActivity]
$creadList :: ReadS [RunPipelineActivity]
readsPrec :: Int -> ReadS RunPipelineActivity
$creadsPrec :: Int -> ReadS RunPipelineActivity
Prelude.Read, Int -> RunPipelineActivity -> ShowS
[RunPipelineActivity] -> ShowS
RunPipelineActivity -> String
(Int -> RunPipelineActivity -> ShowS)
-> (RunPipelineActivity -> String)
-> ([RunPipelineActivity] -> ShowS)
-> Show RunPipelineActivity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RunPipelineActivity] -> ShowS
$cshowList :: [RunPipelineActivity] -> ShowS
show :: RunPipelineActivity -> String
$cshow :: RunPipelineActivity -> String
showsPrec :: Int -> RunPipelineActivity -> ShowS
$cshowsPrec :: Int -> RunPipelineActivity -> ShowS
Prelude.Show, (forall x. RunPipelineActivity -> Rep RunPipelineActivity x)
-> (forall x. Rep RunPipelineActivity x -> RunPipelineActivity)
-> Generic RunPipelineActivity
forall x. Rep RunPipelineActivity x -> RunPipelineActivity
forall x. RunPipelineActivity -> Rep RunPipelineActivity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RunPipelineActivity x -> RunPipelineActivity
$cfrom :: forall x. RunPipelineActivity -> Rep RunPipelineActivity x
Prelude.Generic)

-- |
-- Create a value of 'RunPipelineActivity' 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:
--
-- 'pipelineActivity', 'runPipelineActivity_pipelineActivity' - The pipeline activity that is run. This must not be a channel activity
-- or a data store activity because these activities are used in a pipeline
-- only to load the original message and to store the (possibly)
-- transformed message. If a Lambda activity is specified, only
-- short-running Lambda functions (those with a timeout of less than 30
-- seconds or less) can be used.
--
-- 'payloads', 'runPipelineActivity_payloads' - The sample message payloads on which the pipeline activity is run.
newRunPipelineActivity ::
  -- | 'pipelineActivity'
  PipelineActivity ->
  -- | 'payloads'
  Prelude.NonEmpty Prelude.ByteString ->
  RunPipelineActivity
newRunPipelineActivity :: PipelineActivity -> NonEmpty ByteString -> RunPipelineActivity
newRunPipelineActivity PipelineActivity
pPipelineActivity_ NonEmpty ByteString
pPayloads_ =
  RunPipelineActivity' :: PipelineActivity -> NonEmpty Base64 -> RunPipelineActivity
RunPipelineActivity'
    { $sel:pipelineActivity:RunPipelineActivity' :: PipelineActivity
pipelineActivity =
        PipelineActivity
pPipelineActivity_,
      $sel:payloads:RunPipelineActivity' :: NonEmpty Base64
payloads = Tagged (NonEmpty ByteString) (Identity (NonEmpty ByteString))
-> Tagged (NonEmpty Base64) (Identity (NonEmpty Base64))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty ByteString) (Identity (NonEmpty ByteString))
 -> Tagged (NonEmpty Base64) (Identity (NonEmpty Base64)))
-> NonEmpty ByteString -> NonEmpty Base64
forall t b. AReview t b -> b -> t
Lens.# NonEmpty ByteString
pPayloads_
    }

-- | The pipeline activity that is run. This must not be a channel activity
-- or a data store activity because these activities are used in a pipeline
-- only to load the original message and to store the (possibly)
-- transformed message. If a Lambda activity is specified, only
-- short-running Lambda functions (those with a timeout of less than 30
-- seconds or less) can be used.
runPipelineActivity_pipelineActivity :: Lens.Lens' RunPipelineActivity PipelineActivity
runPipelineActivity_pipelineActivity :: (PipelineActivity -> f PipelineActivity)
-> RunPipelineActivity -> f RunPipelineActivity
runPipelineActivity_pipelineActivity = (RunPipelineActivity -> PipelineActivity)
-> (RunPipelineActivity -> PipelineActivity -> RunPipelineActivity)
-> Lens
     RunPipelineActivity
     RunPipelineActivity
     PipelineActivity
     PipelineActivity
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunPipelineActivity' {PipelineActivity
pipelineActivity :: PipelineActivity
$sel:pipelineActivity:RunPipelineActivity' :: RunPipelineActivity -> PipelineActivity
pipelineActivity} -> PipelineActivity
pipelineActivity) (\s :: RunPipelineActivity
s@RunPipelineActivity' {} PipelineActivity
a -> RunPipelineActivity
s {$sel:pipelineActivity:RunPipelineActivity' :: PipelineActivity
pipelineActivity = PipelineActivity
a} :: RunPipelineActivity)

-- | The sample message payloads on which the pipeline activity is run.
runPipelineActivity_payloads :: Lens.Lens' RunPipelineActivity (Prelude.NonEmpty Prelude.ByteString)
runPipelineActivity_payloads :: (NonEmpty ByteString -> f (NonEmpty ByteString))
-> RunPipelineActivity -> f RunPipelineActivity
runPipelineActivity_payloads = (RunPipelineActivity -> NonEmpty Base64)
-> (RunPipelineActivity -> NonEmpty Base64 -> RunPipelineActivity)
-> Lens
     RunPipelineActivity
     RunPipelineActivity
     (NonEmpty Base64)
     (NonEmpty Base64)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunPipelineActivity' {NonEmpty Base64
payloads :: NonEmpty Base64
$sel:payloads:RunPipelineActivity' :: RunPipelineActivity -> NonEmpty Base64
payloads} -> NonEmpty Base64
payloads) (\s :: RunPipelineActivity
s@RunPipelineActivity' {} NonEmpty Base64
a -> RunPipelineActivity
s {$sel:payloads:RunPipelineActivity' :: NonEmpty Base64
payloads = NonEmpty Base64
a} :: RunPipelineActivity) ((NonEmpty Base64 -> f (NonEmpty Base64))
 -> RunPipelineActivity -> f RunPipelineActivity)
-> ((NonEmpty ByteString -> f (NonEmpty ByteString))
    -> NonEmpty Base64 -> f (NonEmpty Base64))
-> (NonEmpty ByteString -> f (NonEmpty ByteString))
-> RunPipelineActivity
-> f RunPipelineActivity
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty ByteString -> f (NonEmpty ByteString))
-> NonEmpty Base64 -> f (NonEmpty Base64)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest RunPipelineActivity where
  type
    AWSResponse RunPipelineActivity =
      RunPipelineActivityResponse
  request :: RunPipelineActivity -> Request RunPipelineActivity
request = Service -> RunPipelineActivity -> Request RunPipelineActivity
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy RunPipelineActivity
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RunPipelineActivity)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse RunPipelineActivity))
-> Logger
-> Service
-> Proxy RunPipelineActivity
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RunPipelineActivity)))
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
-> Maybe (NonEmpty Base64) -> Int -> RunPipelineActivityResponse
RunPipelineActivityResponse'
            (Maybe Text
 -> Maybe (NonEmpty Base64) -> Int -> RunPipelineActivityResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (NonEmpty Base64) -> Int -> RunPipelineActivityResponse)
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
"logResult")
            Either
  String
  (Maybe (NonEmpty Base64) -> Int -> RunPipelineActivityResponse)
-> Either String (Maybe (NonEmpty Base64))
-> Either String (Int -> RunPipelineActivityResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (NonEmpty Base64))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"payloads")
            Either String (Int -> RunPipelineActivityResponse)
-> Either String Int -> Either String RunPipelineActivityResponse
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 RunPipelineActivity

instance Prelude.NFData RunPipelineActivity

instance Core.ToHeaders RunPipelineActivity where
  toHeaders :: RunPipelineActivity -> ResponseHeaders
toHeaders = ResponseHeaders -> RunPipelineActivity -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToJSON RunPipelineActivity where
  toJSON :: RunPipelineActivity -> Value
toJSON RunPipelineActivity' {NonEmpty Base64
PipelineActivity
payloads :: NonEmpty Base64
pipelineActivity :: PipelineActivity
$sel:payloads:RunPipelineActivity' :: RunPipelineActivity -> NonEmpty Base64
$sel:pipelineActivity:RunPipelineActivity' :: RunPipelineActivity -> PipelineActivity
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"pipelineActivity" Text -> PipelineActivity -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= PipelineActivity
pipelineActivity),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"payloads" Text -> NonEmpty Base64 -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Base64
payloads)
          ]
      )

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

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

-- | /See:/ 'newRunPipelineActivityResponse' smart constructor.
data RunPipelineActivityResponse = RunPipelineActivityResponse'
  { -- | In case the pipeline activity fails, the log message that is generated.
    RunPipelineActivityResponse -> Maybe Text
logResult :: Prelude.Maybe Prelude.Text,
    -- | The enriched or transformed sample message payloads as base64-encoded
    -- strings. (The results of running the pipeline activity on each input
    -- sample message payload, encoded in base64.)
    RunPipelineActivityResponse -> Maybe (NonEmpty Base64)
payloads :: Prelude.Maybe (Prelude.NonEmpty Core.Base64),
    -- | The response's http status code.
    RunPipelineActivityResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (RunPipelineActivityResponse -> RunPipelineActivityResponse -> Bool
(RunPipelineActivityResponse
 -> RunPipelineActivityResponse -> Bool)
-> (RunPipelineActivityResponse
    -> RunPipelineActivityResponse -> Bool)
-> Eq RunPipelineActivityResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RunPipelineActivityResponse -> RunPipelineActivityResponse -> Bool
$c/= :: RunPipelineActivityResponse -> RunPipelineActivityResponse -> Bool
== :: RunPipelineActivityResponse -> RunPipelineActivityResponse -> Bool
$c== :: RunPipelineActivityResponse -> RunPipelineActivityResponse -> Bool
Prelude.Eq, ReadPrec [RunPipelineActivityResponse]
ReadPrec RunPipelineActivityResponse
Int -> ReadS RunPipelineActivityResponse
ReadS [RunPipelineActivityResponse]
(Int -> ReadS RunPipelineActivityResponse)
-> ReadS [RunPipelineActivityResponse]
-> ReadPrec RunPipelineActivityResponse
-> ReadPrec [RunPipelineActivityResponse]
-> Read RunPipelineActivityResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RunPipelineActivityResponse]
$creadListPrec :: ReadPrec [RunPipelineActivityResponse]
readPrec :: ReadPrec RunPipelineActivityResponse
$creadPrec :: ReadPrec RunPipelineActivityResponse
readList :: ReadS [RunPipelineActivityResponse]
$creadList :: ReadS [RunPipelineActivityResponse]
readsPrec :: Int -> ReadS RunPipelineActivityResponse
$creadsPrec :: Int -> ReadS RunPipelineActivityResponse
Prelude.Read, Int -> RunPipelineActivityResponse -> ShowS
[RunPipelineActivityResponse] -> ShowS
RunPipelineActivityResponse -> String
(Int -> RunPipelineActivityResponse -> ShowS)
-> (RunPipelineActivityResponse -> String)
-> ([RunPipelineActivityResponse] -> ShowS)
-> Show RunPipelineActivityResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RunPipelineActivityResponse] -> ShowS
$cshowList :: [RunPipelineActivityResponse] -> ShowS
show :: RunPipelineActivityResponse -> String
$cshow :: RunPipelineActivityResponse -> String
showsPrec :: Int -> RunPipelineActivityResponse -> ShowS
$cshowsPrec :: Int -> RunPipelineActivityResponse -> ShowS
Prelude.Show, (forall x.
 RunPipelineActivityResponse -> Rep RunPipelineActivityResponse x)
-> (forall x.
    Rep RunPipelineActivityResponse x -> RunPipelineActivityResponse)
-> Generic RunPipelineActivityResponse
forall x.
Rep RunPipelineActivityResponse x -> RunPipelineActivityResponse
forall x.
RunPipelineActivityResponse -> Rep RunPipelineActivityResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RunPipelineActivityResponse x -> RunPipelineActivityResponse
$cfrom :: forall x.
RunPipelineActivityResponse -> Rep RunPipelineActivityResponse x
Prelude.Generic)

-- |
-- Create a value of 'RunPipelineActivityResponse' 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:
--
-- 'logResult', 'runPipelineActivityResponse_logResult' - In case the pipeline activity fails, the log message that is generated.
--
-- 'payloads', 'runPipelineActivityResponse_payloads' - The enriched or transformed sample message payloads as base64-encoded
-- strings. (The results of running the pipeline activity on each input
-- sample message payload, encoded in base64.)
--
-- 'httpStatus', 'runPipelineActivityResponse_httpStatus' - The response's http status code.
newRunPipelineActivityResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RunPipelineActivityResponse
newRunPipelineActivityResponse :: Int -> RunPipelineActivityResponse
newRunPipelineActivityResponse Int
pHttpStatus_ =
  RunPipelineActivityResponse' :: Maybe Text
-> Maybe (NonEmpty Base64) -> Int -> RunPipelineActivityResponse
RunPipelineActivityResponse'
    { $sel:logResult:RunPipelineActivityResponse' :: Maybe Text
logResult =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:payloads:RunPipelineActivityResponse' :: Maybe (NonEmpty Base64)
payloads = Maybe (NonEmpty Base64)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RunPipelineActivityResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | In case the pipeline activity fails, the log message that is generated.
runPipelineActivityResponse_logResult :: Lens.Lens' RunPipelineActivityResponse (Prelude.Maybe Prelude.Text)
runPipelineActivityResponse_logResult :: (Maybe Text -> f (Maybe Text))
-> RunPipelineActivityResponse -> f RunPipelineActivityResponse
runPipelineActivityResponse_logResult = (RunPipelineActivityResponse -> Maybe Text)
-> (RunPipelineActivityResponse
    -> Maybe Text -> RunPipelineActivityResponse)
-> Lens
     RunPipelineActivityResponse
     RunPipelineActivityResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunPipelineActivityResponse' {Maybe Text
logResult :: Maybe Text
$sel:logResult:RunPipelineActivityResponse' :: RunPipelineActivityResponse -> Maybe Text
logResult} -> Maybe Text
logResult) (\s :: RunPipelineActivityResponse
s@RunPipelineActivityResponse' {} Maybe Text
a -> RunPipelineActivityResponse
s {$sel:logResult:RunPipelineActivityResponse' :: Maybe Text
logResult = Maybe Text
a} :: RunPipelineActivityResponse)

-- | The enriched or transformed sample message payloads as base64-encoded
-- strings. (The results of running the pipeline activity on each input
-- sample message payload, encoded in base64.)
runPipelineActivityResponse_payloads :: Lens.Lens' RunPipelineActivityResponse (Prelude.Maybe (Prelude.NonEmpty Prelude.ByteString))
runPipelineActivityResponse_payloads :: (Maybe (NonEmpty ByteString) -> f (Maybe (NonEmpty ByteString)))
-> RunPipelineActivityResponse -> f RunPipelineActivityResponse
runPipelineActivityResponse_payloads = (RunPipelineActivityResponse -> Maybe (NonEmpty Base64))
-> (RunPipelineActivityResponse
    -> Maybe (NonEmpty Base64) -> RunPipelineActivityResponse)
-> Lens
     RunPipelineActivityResponse
     RunPipelineActivityResponse
     (Maybe (NonEmpty Base64))
     (Maybe (NonEmpty Base64))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunPipelineActivityResponse' {Maybe (NonEmpty Base64)
payloads :: Maybe (NonEmpty Base64)
$sel:payloads:RunPipelineActivityResponse' :: RunPipelineActivityResponse -> Maybe (NonEmpty Base64)
payloads} -> Maybe (NonEmpty Base64)
payloads) (\s :: RunPipelineActivityResponse
s@RunPipelineActivityResponse' {} Maybe (NonEmpty Base64)
a -> RunPipelineActivityResponse
s {$sel:payloads:RunPipelineActivityResponse' :: Maybe (NonEmpty Base64)
payloads = Maybe (NonEmpty Base64)
a} :: RunPipelineActivityResponse) ((Maybe (NonEmpty Base64) -> f (Maybe (NonEmpty Base64)))
 -> RunPipelineActivityResponse -> f RunPipelineActivityResponse)
-> ((Maybe (NonEmpty ByteString)
     -> f (Maybe (NonEmpty ByteString)))
    -> Maybe (NonEmpty Base64) -> f (Maybe (NonEmpty Base64)))
-> (Maybe (NonEmpty ByteString) -> f (Maybe (NonEmpty ByteString)))
-> RunPipelineActivityResponse
-> f RunPipelineActivityResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Base64)
  (NonEmpty Base64)
  (NonEmpty ByteString)
  (NonEmpty ByteString)
-> Iso
     (Maybe (NonEmpty Base64))
     (Maybe (NonEmpty Base64))
     (Maybe (NonEmpty ByteString))
     (Maybe (NonEmpty ByteString))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (NonEmpty Base64)
  (NonEmpty Base64)
  (NonEmpty ByteString)
  (NonEmpty ByteString)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData RunPipelineActivityResponse