{-# 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.StartPipelineReprocessing
-- 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)
--
-- Starts the reprocessing of raw message data through the pipeline.
module Amazonka.IoTAnalytics.StartPipelineReprocessing
  ( -- * Creating a Request
    StartPipelineReprocessing (..),
    newStartPipelineReprocessing,

    -- * Request Lenses
    startPipelineReprocessing_startTime,
    startPipelineReprocessing_endTime,
    startPipelineReprocessing_channelMessages,
    startPipelineReprocessing_pipelineName,

    -- * Destructuring the Response
    StartPipelineReprocessingResponse (..),
    newStartPipelineReprocessingResponse,

    -- * Response Lenses
    startPipelineReprocessingResponse_reprocessingId,
    startPipelineReprocessingResponse_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:/ 'newStartPipelineReprocessing' smart constructor.
data StartPipelineReprocessing = StartPipelineReprocessing'
  { -- | The start time (inclusive) of raw message data that is reprocessed.
    --
    -- If you specify a value for the @startTime@ parameter, you must not use
    -- the @channelMessages@ object.
    StartPipelineReprocessing -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
    -- | The end time (exclusive) of raw message data that is reprocessed.
    --
    -- If you specify a value for the @endTime@ parameter, you must not use the
    -- @channelMessages@ object.
    StartPipelineReprocessing -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX,
    -- | Specifies one or more sets of channel messages that you want to
    -- reprocess.
    --
    -- If you use the @channelMessages@ object, you must not specify a value
    -- for @startTime@ and @endTime@.
    StartPipelineReprocessing -> Maybe ChannelMessages
channelMessages :: Prelude.Maybe ChannelMessages,
    -- | The name of the pipeline on which to start reprocessing.
    StartPipelineReprocessing -> Text
pipelineName :: Prelude.Text
  }
  deriving (StartPipelineReprocessing -> StartPipelineReprocessing -> Bool
(StartPipelineReprocessing -> StartPipelineReprocessing -> Bool)
-> (StartPipelineReprocessing -> StartPipelineReprocessing -> Bool)
-> Eq StartPipelineReprocessing
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartPipelineReprocessing -> StartPipelineReprocessing -> Bool
$c/= :: StartPipelineReprocessing -> StartPipelineReprocessing -> Bool
== :: StartPipelineReprocessing -> StartPipelineReprocessing -> Bool
$c== :: StartPipelineReprocessing -> StartPipelineReprocessing -> Bool
Prelude.Eq, ReadPrec [StartPipelineReprocessing]
ReadPrec StartPipelineReprocessing
Int -> ReadS StartPipelineReprocessing
ReadS [StartPipelineReprocessing]
(Int -> ReadS StartPipelineReprocessing)
-> ReadS [StartPipelineReprocessing]
-> ReadPrec StartPipelineReprocessing
-> ReadPrec [StartPipelineReprocessing]
-> Read StartPipelineReprocessing
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartPipelineReprocessing]
$creadListPrec :: ReadPrec [StartPipelineReprocessing]
readPrec :: ReadPrec StartPipelineReprocessing
$creadPrec :: ReadPrec StartPipelineReprocessing
readList :: ReadS [StartPipelineReprocessing]
$creadList :: ReadS [StartPipelineReprocessing]
readsPrec :: Int -> ReadS StartPipelineReprocessing
$creadsPrec :: Int -> ReadS StartPipelineReprocessing
Prelude.Read, Int -> StartPipelineReprocessing -> ShowS
[StartPipelineReprocessing] -> ShowS
StartPipelineReprocessing -> String
(Int -> StartPipelineReprocessing -> ShowS)
-> (StartPipelineReprocessing -> String)
-> ([StartPipelineReprocessing] -> ShowS)
-> Show StartPipelineReprocessing
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartPipelineReprocessing] -> ShowS
$cshowList :: [StartPipelineReprocessing] -> ShowS
show :: StartPipelineReprocessing -> String
$cshow :: StartPipelineReprocessing -> String
showsPrec :: Int -> StartPipelineReprocessing -> ShowS
$cshowsPrec :: Int -> StartPipelineReprocessing -> ShowS
Prelude.Show, (forall x.
 StartPipelineReprocessing -> Rep StartPipelineReprocessing x)
-> (forall x.
    Rep StartPipelineReprocessing x -> StartPipelineReprocessing)
-> Generic StartPipelineReprocessing
forall x.
Rep StartPipelineReprocessing x -> StartPipelineReprocessing
forall x.
StartPipelineReprocessing -> Rep StartPipelineReprocessing x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartPipelineReprocessing x -> StartPipelineReprocessing
$cfrom :: forall x.
StartPipelineReprocessing -> Rep StartPipelineReprocessing x
Prelude.Generic)

-- |
-- Create a value of 'StartPipelineReprocessing' 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:
--
-- 'startTime', 'startPipelineReprocessing_startTime' - The start time (inclusive) of raw message data that is reprocessed.
--
-- If you specify a value for the @startTime@ parameter, you must not use
-- the @channelMessages@ object.
--
-- 'endTime', 'startPipelineReprocessing_endTime' - The end time (exclusive) of raw message data that is reprocessed.
--
-- If you specify a value for the @endTime@ parameter, you must not use the
-- @channelMessages@ object.
--
-- 'channelMessages', 'startPipelineReprocessing_channelMessages' - Specifies one or more sets of channel messages that you want to
-- reprocess.
--
-- If you use the @channelMessages@ object, you must not specify a value
-- for @startTime@ and @endTime@.
--
-- 'pipelineName', 'startPipelineReprocessing_pipelineName' - The name of the pipeline on which to start reprocessing.
newStartPipelineReprocessing ::
  -- | 'pipelineName'
  Prelude.Text ->
  StartPipelineReprocessing
newStartPipelineReprocessing :: Text -> StartPipelineReprocessing
newStartPipelineReprocessing Text
pPipelineName_ =
  StartPipelineReprocessing' :: Maybe POSIX
-> Maybe POSIX
-> Maybe ChannelMessages
-> Text
-> StartPipelineReprocessing
StartPipelineReprocessing'
    { $sel:startTime:StartPipelineReprocessing' :: Maybe POSIX
startTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:StartPipelineReprocessing' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:channelMessages:StartPipelineReprocessing' :: Maybe ChannelMessages
channelMessages = Maybe ChannelMessages
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelineName:StartPipelineReprocessing' :: Text
pipelineName = Text
pPipelineName_
    }

-- | The start time (inclusive) of raw message data that is reprocessed.
--
-- If you specify a value for the @startTime@ parameter, you must not use
-- the @channelMessages@ object.
startPipelineReprocessing_startTime :: Lens.Lens' StartPipelineReprocessing (Prelude.Maybe Prelude.UTCTime)
startPipelineReprocessing_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StartPipelineReprocessing -> f StartPipelineReprocessing
startPipelineReprocessing_startTime = (StartPipelineReprocessing -> Maybe POSIX)
-> (StartPipelineReprocessing
    -> Maybe POSIX -> StartPipelineReprocessing)
-> Lens
     StartPipelineReprocessing
     StartPipelineReprocessing
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPipelineReprocessing' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:StartPipelineReprocessing' :: StartPipelineReprocessing -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: StartPipelineReprocessing
s@StartPipelineReprocessing' {} Maybe POSIX
a -> StartPipelineReprocessing
s {$sel:startTime:StartPipelineReprocessing' :: Maybe POSIX
startTime = Maybe POSIX
a} :: StartPipelineReprocessing) ((Maybe POSIX -> f (Maybe POSIX))
 -> StartPipelineReprocessing -> f StartPipelineReprocessing)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StartPipelineReprocessing
-> f StartPipelineReprocessing
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The end time (exclusive) of raw message data that is reprocessed.
--
-- If you specify a value for the @endTime@ parameter, you must not use the
-- @channelMessages@ object.
startPipelineReprocessing_endTime :: Lens.Lens' StartPipelineReprocessing (Prelude.Maybe Prelude.UTCTime)
startPipelineReprocessing_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StartPipelineReprocessing -> f StartPipelineReprocessing
startPipelineReprocessing_endTime = (StartPipelineReprocessing -> Maybe POSIX)
-> (StartPipelineReprocessing
    -> Maybe POSIX -> StartPipelineReprocessing)
-> Lens
     StartPipelineReprocessing
     StartPipelineReprocessing
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPipelineReprocessing' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:StartPipelineReprocessing' :: StartPipelineReprocessing -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: StartPipelineReprocessing
s@StartPipelineReprocessing' {} Maybe POSIX
a -> StartPipelineReprocessing
s {$sel:endTime:StartPipelineReprocessing' :: Maybe POSIX
endTime = Maybe POSIX
a} :: StartPipelineReprocessing) ((Maybe POSIX -> f (Maybe POSIX))
 -> StartPipelineReprocessing -> f StartPipelineReprocessing)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StartPipelineReprocessing
-> f StartPipelineReprocessing
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Specifies one or more sets of channel messages that you want to
-- reprocess.
--
-- If you use the @channelMessages@ object, you must not specify a value
-- for @startTime@ and @endTime@.
startPipelineReprocessing_channelMessages :: Lens.Lens' StartPipelineReprocessing (Prelude.Maybe ChannelMessages)
startPipelineReprocessing_channelMessages :: (Maybe ChannelMessages -> f (Maybe ChannelMessages))
-> StartPipelineReprocessing -> f StartPipelineReprocessing
startPipelineReprocessing_channelMessages = (StartPipelineReprocessing -> Maybe ChannelMessages)
-> (StartPipelineReprocessing
    -> Maybe ChannelMessages -> StartPipelineReprocessing)
-> Lens
     StartPipelineReprocessing
     StartPipelineReprocessing
     (Maybe ChannelMessages)
     (Maybe ChannelMessages)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPipelineReprocessing' {Maybe ChannelMessages
channelMessages :: Maybe ChannelMessages
$sel:channelMessages:StartPipelineReprocessing' :: StartPipelineReprocessing -> Maybe ChannelMessages
channelMessages} -> Maybe ChannelMessages
channelMessages) (\s :: StartPipelineReprocessing
s@StartPipelineReprocessing' {} Maybe ChannelMessages
a -> StartPipelineReprocessing
s {$sel:channelMessages:StartPipelineReprocessing' :: Maybe ChannelMessages
channelMessages = Maybe ChannelMessages
a} :: StartPipelineReprocessing)

-- | The name of the pipeline on which to start reprocessing.
startPipelineReprocessing_pipelineName :: Lens.Lens' StartPipelineReprocessing Prelude.Text
startPipelineReprocessing_pipelineName :: (Text -> f Text)
-> StartPipelineReprocessing -> f StartPipelineReprocessing
startPipelineReprocessing_pipelineName = (StartPipelineReprocessing -> Text)
-> (StartPipelineReprocessing -> Text -> StartPipelineReprocessing)
-> Lens
     StartPipelineReprocessing StartPipelineReprocessing Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPipelineReprocessing' {Text
pipelineName :: Text
$sel:pipelineName:StartPipelineReprocessing' :: StartPipelineReprocessing -> Text
pipelineName} -> Text
pipelineName) (\s :: StartPipelineReprocessing
s@StartPipelineReprocessing' {} Text
a -> StartPipelineReprocessing
s {$sel:pipelineName:StartPipelineReprocessing' :: Text
pipelineName = Text
a} :: StartPipelineReprocessing)

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

instance Prelude.NFData StartPipelineReprocessing

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

instance Core.ToJSON StartPipelineReprocessing where
  toJSON :: StartPipelineReprocessing -> Value
toJSON StartPipelineReprocessing' {Maybe POSIX
Maybe ChannelMessages
Text
pipelineName :: Text
channelMessages :: Maybe ChannelMessages
endTime :: Maybe POSIX
startTime :: Maybe POSIX
$sel:pipelineName:StartPipelineReprocessing' :: StartPipelineReprocessing -> Text
$sel:channelMessages:StartPipelineReprocessing' :: StartPipelineReprocessing -> Maybe ChannelMessages
$sel:endTime:StartPipelineReprocessing' :: StartPipelineReprocessing -> Maybe POSIX
$sel:startTime:StartPipelineReprocessing' :: StartPipelineReprocessing -> Maybe POSIX
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"startTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
startTime,
            (Text
"endTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
endTime,
            (Text
"channelMessages" Text -> ChannelMessages -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ChannelMessages -> Pair) -> Maybe ChannelMessages -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ChannelMessages
channelMessages
          ]
      )

instance Core.ToPath StartPipelineReprocessing where
  toPath :: StartPipelineReprocessing -> ByteString
toPath StartPipelineReprocessing' {Maybe POSIX
Maybe ChannelMessages
Text
pipelineName :: Text
channelMessages :: Maybe ChannelMessages
endTime :: Maybe POSIX
startTime :: Maybe POSIX
$sel:pipelineName:StartPipelineReprocessing' :: StartPipelineReprocessing -> Text
$sel:channelMessages:StartPipelineReprocessing' :: StartPipelineReprocessing -> Maybe ChannelMessages
$sel:endTime:StartPipelineReprocessing' :: StartPipelineReprocessing -> Maybe POSIX
$sel:startTime:StartPipelineReprocessing' :: StartPipelineReprocessing -> Maybe POSIX
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/pipelines/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
pipelineName,
        ByteString
"/reprocessing"
      ]

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

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

-- |
-- Create a value of 'StartPipelineReprocessingResponse' 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:
--
-- 'reprocessingId', 'startPipelineReprocessingResponse_reprocessingId' - The ID of the pipeline reprocessing activity that was started.
--
-- 'httpStatus', 'startPipelineReprocessingResponse_httpStatus' - The response's http status code.
newStartPipelineReprocessingResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartPipelineReprocessingResponse
newStartPipelineReprocessingResponse :: Int -> StartPipelineReprocessingResponse
newStartPipelineReprocessingResponse Int
pHttpStatus_ =
  StartPipelineReprocessingResponse' :: Maybe Text -> Int -> StartPipelineReprocessingResponse
StartPipelineReprocessingResponse'
    { $sel:reprocessingId:StartPipelineReprocessingResponse' :: Maybe Text
reprocessingId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartPipelineReprocessingResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ID of the pipeline reprocessing activity that was started.
startPipelineReprocessingResponse_reprocessingId :: Lens.Lens' StartPipelineReprocessingResponse (Prelude.Maybe Prelude.Text)
startPipelineReprocessingResponse_reprocessingId :: (Maybe Text -> f (Maybe Text))
-> StartPipelineReprocessingResponse
-> f StartPipelineReprocessingResponse
startPipelineReprocessingResponse_reprocessingId = (StartPipelineReprocessingResponse -> Maybe Text)
-> (StartPipelineReprocessingResponse
    -> Maybe Text -> StartPipelineReprocessingResponse)
-> Lens
     StartPipelineReprocessingResponse
     StartPipelineReprocessingResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartPipelineReprocessingResponse' {Maybe Text
reprocessingId :: Maybe Text
$sel:reprocessingId:StartPipelineReprocessingResponse' :: StartPipelineReprocessingResponse -> Maybe Text
reprocessingId} -> Maybe Text
reprocessingId) (\s :: StartPipelineReprocessingResponse
s@StartPipelineReprocessingResponse' {} Maybe Text
a -> StartPipelineReprocessingResponse
s {$sel:reprocessingId:StartPipelineReprocessingResponse' :: Maybe Text
reprocessingId = Maybe Text
a} :: StartPipelineReprocessingResponse)

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

instance
  Prelude.NFData
    StartPipelineReprocessingResponse