{-# 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 #-}
module Amazonka.IoTAnalytics.CancelPipelineReprocessing
(
CancelPipelineReprocessing (..),
newCancelPipelineReprocessing,
cancelPipelineReprocessing_pipelineName,
cancelPipelineReprocessing_reprocessingId,
CancelPipelineReprocessingResponse (..),
newCancelPipelineReprocessingResponse,
cancelPipelineReprocessingResponse_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
data CancelPipelineReprocessing = CancelPipelineReprocessing'
{
CancelPipelineReprocessing -> Text
pipelineName :: Prelude.Text,
CancelPipelineReprocessing -> Text
reprocessingId :: Prelude.Text
}
deriving (CancelPipelineReprocessing -> CancelPipelineReprocessing -> Bool
(CancelPipelineReprocessing -> CancelPipelineReprocessing -> Bool)
-> (CancelPipelineReprocessing
-> CancelPipelineReprocessing -> Bool)
-> Eq CancelPipelineReprocessing
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelPipelineReprocessing -> CancelPipelineReprocessing -> Bool
$c/= :: CancelPipelineReprocessing -> CancelPipelineReprocessing -> Bool
== :: CancelPipelineReprocessing -> CancelPipelineReprocessing -> Bool
$c== :: CancelPipelineReprocessing -> CancelPipelineReprocessing -> Bool
Prelude.Eq, ReadPrec [CancelPipelineReprocessing]
ReadPrec CancelPipelineReprocessing
Int -> ReadS CancelPipelineReprocessing
ReadS [CancelPipelineReprocessing]
(Int -> ReadS CancelPipelineReprocessing)
-> ReadS [CancelPipelineReprocessing]
-> ReadPrec CancelPipelineReprocessing
-> ReadPrec [CancelPipelineReprocessing]
-> Read CancelPipelineReprocessing
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelPipelineReprocessing]
$creadListPrec :: ReadPrec [CancelPipelineReprocessing]
readPrec :: ReadPrec CancelPipelineReprocessing
$creadPrec :: ReadPrec CancelPipelineReprocessing
readList :: ReadS [CancelPipelineReprocessing]
$creadList :: ReadS [CancelPipelineReprocessing]
readsPrec :: Int -> ReadS CancelPipelineReprocessing
$creadsPrec :: Int -> ReadS CancelPipelineReprocessing
Prelude.Read, Int -> CancelPipelineReprocessing -> ShowS
[CancelPipelineReprocessing] -> ShowS
CancelPipelineReprocessing -> String
(Int -> CancelPipelineReprocessing -> ShowS)
-> (CancelPipelineReprocessing -> String)
-> ([CancelPipelineReprocessing] -> ShowS)
-> Show CancelPipelineReprocessing
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelPipelineReprocessing] -> ShowS
$cshowList :: [CancelPipelineReprocessing] -> ShowS
show :: CancelPipelineReprocessing -> String
$cshow :: CancelPipelineReprocessing -> String
showsPrec :: Int -> CancelPipelineReprocessing -> ShowS
$cshowsPrec :: Int -> CancelPipelineReprocessing -> ShowS
Prelude.Show, (forall x.
CancelPipelineReprocessing -> Rep CancelPipelineReprocessing x)
-> (forall x.
Rep CancelPipelineReprocessing x -> CancelPipelineReprocessing)
-> Generic CancelPipelineReprocessing
forall x.
Rep CancelPipelineReprocessing x -> CancelPipelineReprocessing
forall x.
CancelPipelineReprocessing -> Rep CancelPipelineReprocessing x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CancelPipelineReprocessing x -> CancelPipelineReprocessing
$cfrom :: forall x.
CancelPipelineReprocessing -> Rep CancelPipelineReprocessing x
Prelude.Generic)
newCancelPipelineReprocessing ::
Prelude.Text ->
Prelude.Text ->
CancelPipelineReprocessing
newCancelPipelineReprocessing :: Text -> Text -> CancelPipelineReprocessing
newCancelPipelineReprocessing
Text
pPipelineName_
Text
pReprocessingId_ =
CancelPipelineReprocessing' :: Text -> Text -> CancelPipelineReprocessing
CancelPipelineReprocessing'
{ $sel:pipelineName:CancelPipelineReprocessing' :: Text
pipelineName =
Text
pPipelineName_,
$sel:reprocessingId:CancelPipelineReprocessing' :: Text
reprocessingId = Text
pReprocessingId_
}
cancelPipelineReprocessing_pipelineName :: Lens.Lens' CancelPipelineReprocessing Prelude.Text
cancelPipelineReprocessing_pipelineName :: (Text -> f Text)
-> CancelPipelineReprocessing -> f CancelPipelineReprocessing
cancelPipelineReprocessing_pipelineName = (CancelPipelineReprocessing -> Text)
-> (CancelPipelineReprocessing
-> Text -> CancelPipelineReprocessing)
-> Lens
CancelPipelineReprocessing CancelPipelineReprocessing Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelPipelineReprocessing' {Text
pipelineName :: Text
$sel:pipelineName:CancelPipelineReprocessing' :: CancelPipelineReprocessing -> Text
pipelineName} -> Text
pipelineName) (\s :: CancelPipelineReprocessing
s@CancelPipelineReprocessing' {} Text
a -> CancelPipelineReprocessing
s {$sel:pipelineName:CancelPipelineReprocessing' :: Text
pipelineName = Text
a} :: CancelPipelineReprocessing)
cancelPipelineReprocessing_reprocessingId :: Lens.Lens' CancelPipelineReprocessing Prelude.Text
cancelPipelineReprocessing_reprocessingId :: (Text -> f Text)
-> CancelPipelineReprocessing -> f CancelPipelineReprocessing
cancelPipelineReprocessing_reprocessingId = (CancelPipelineReprocessing -> Text)
-> (CancelPipelineReprocessing
-> Text -> CancelPipelineReprocessing)
-> Lens
CancelPipelineReprocessing CancelPipelineReprocessing Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelPipelineReprocessing' {Text
reprocessingId :: Text
$sel:reprocessingId:CancelPipelineReprocessing' :: CancelPipelineReprocessing -> Text
reprocessingId} -> Text
reprocessingId) (\s :: CancelPipelineReprocessing
s@CancelPipelineReprocessing' {} Text
a -> CancelPipelineReprocessing
s {$sel:reprocessingId:CancelPipelineReprocessing' :: Text
reprocessingId = Text
a} :: CancelPipelineReprocessing)
instance Core.AWSRequest CancelPipelineReprocessing where
type
AWSResponse CancelPipelineReprocessing =
CancelPipelineReprocessingResponse
request :: CancelPipelineReprocessing -> Request CancelPipelineReprocessing
request = Service
-> CancelPipelineReprocessing -> Request CancelPipelineReprocessing
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy CancelPipelineReprocessing
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CancelPipelineReprocessing)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse CancelPipelineReprocessing))
-> Logger
-> Service
-> Proxy CancelPipelineReprocessing
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CancelPipelineReprocessing)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> CancelPipelineReprocessingResponse
CancelPipelineReprocessingResponse'
(Int -> CancelPipelineReprocessingResponse)
-> Either String Int
-> Either String CancelPipelineReprocessingResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CancelPipelineReprocessing
instance Prelude.NFData CancelPipelineReprocessing
instance Core.ToHeaders CancelPipelineReprocessing where
toHeaders :: CancelPipelineReprocessing -> ResponseHeaders
toHeaders = ResponseHeaders -> CancelPipelineReprocessing -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath CancelPipelineReprocessing where
toPath :: CancelPipelineReprocessing -> ByteString
toPath CancelPipelineReprocessing' {Text
reprocessingId :: Text
pipelineName :: Text
$sel:reprocessingId:CancelPipelineReprocessing' :: CancelPipelineReprocessing -> Text
$sel:pipelineName:CancelPipelineReprocessing' :: CancelPipelineReprocessing -> Text
..} =
[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/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
reprocessingId
]
instance Core.ToQuery CancelPipelineReprocessing where
toQuery :: CancelPipelineReprocessing -> QueryString
toQuery = QueryString -> CancelPipelineReprocessing -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CancelPipelineReprocessingResponse = CancelPipelineReprocessingResponse'
{
CancelPipelineReprocessingResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CancelPipelineReprocessingResponse
-> CancelPipelineReprocessingResponse -> Bool
(CancelPipelineReprocessingResponse
-> CancelPipelineReprocessingResponse -> Bool)
-> (CancelPipelineReprocessingResponse
-> CancelPipelineReprocessingResponse -> Bool)
-> Eq CancelPipelineReprocessingResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelPipelineReprocessingResponse
-> CancelPipelineReprocessingResponse -> Bool
$c/= :: CancelPipelineReprocessingResponse
-> CancelPipelineReprocessingResponse -> Bool
== :: CancelPipelineReprocessingResponse
-> CancelPipelineReprocessingResponse -> Bool
$c== :: CancelPipelineReprocessingResponse
-> CancelPipelineReprocessingResponse -> Bool
Prelude.Eq, ReadPrec [CancelPipelineReprocessingResponse]
ReadPrec CancelPipelineReprocessingResponse
Int -> ReadS CancelPipelineReprocessingResponse
ReadS [CancelPipelineReprocessingResponse]
(Int -> ReadS CancelPipelineReprocessingResponse)
-> ReadS [CancelPipelineReprocessingResponse]
-> ReadPrec CancelPipelineReprocessingResponse
-> ReadPrec [CancelPipelineReprocessingResponse]
-> Read CancelPipelineReprocessingResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelPipelineReprocessingResponse]
$creadListPrec :: ReadPrec [CancelPipelineReprocessingResponse]
readPrec :: ReadPrec CancelPipelineReprocessingResponse
$creadPrec :: ReadPrec CancelPipelineReprocessingResponse
readList :: ReadS [CancelPipelineReprocessingResponse]
$creadList :: ReadS [CancelPipelineReprocessingResponse]
readsPrec :: Int -> ReadS CancelPipelineReprocessingResponse
$creadsPrec :: Int -> ReadS CancelPipelineReprocessingResponse
Prelude.Read, Int -> CancelPipelineReprocessingResponse -> ShowS
[CancelPipelineReprocessingResponse] -> ShowS
CancelPipelineReprocessingResponse -> String
(Int -> CancelPipelineReprocessingResponse -> ShowS)
-> (CancelPipelineReprocessingResponse -> String)
-> ([CancelPipelineReprocessingResponse] -> ShowS)
-> Show CancelPipelineReprocessingResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelPipelineReprocessingResponse] -> ShowS
$cshowList :: [CancelPipelineReprocessingResponse] -> ShowS
show :: CancelPipelineReprocessingResponse -> String
$cshow :: CancelPipelineReprocessingResponse -> String
showsPrec :: Int -> CancelPipelineReprocessingResponse -> ShowS
$cshowsPrec :: Int -> CancelPipelineReprocessingResponse -> ShowS
Prelude.Show, (forall x.
CancelPipelineReprocessingResponse
-> Rep CancelPipelineReprocessingResponse x)
-> (forall x.
Rep CancelPipelineReprocessingResponse x
-> CancelPipelineReprocessingResponse)
-> Generic CancelPipelineReprocessingResponse
forall x.
Rep CancelPipelineReprocessingResponse x
-> CancelPipelineReprocessingResponse
forall x.
CancelPipelineReprocessingResponse
-> Rep CancelPipelineReprocessingResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CancelPipelineReprocessingResponse x
-> CancelPipelineReprocessingResponse
$cfrom :: forall x.
CancelPipelineReprocessingResponse
-> Rep CancelPipelineReprocessingResponse x
Prelude.Generic)
newCancelPipelineReprocessingResponse ::
Prelude.Int ->
CancelPipelineReprocessingResponse
newCancelPipelineReprocessingResponse :: Int -> CancelPipelineReprocessingResponse
newCancelPipelineReprocessingResponse Int
pHttpStatus_ =
CancelPipelineReprocessingResponse' :: Int -> CancelPipelineReprocessingResponse
CancelPipelineReprocessingResponse'
{ $sel:httpStatus:CancelPipelineReprocessingResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
cancelPipelineReprocessingResponse_httpStatus :: Lens.Lens' CancelPipelineReprocessingResponse Prelude.Int
cancelPipelineReprocessingResponse_httpStatus :: (Int -> f Int)
-> CancelPipelineReprocessingResponse
-> f CancelPipelineReprocessingResponse
cancelPipelineReprocessingResponse_httpStatus = (CancelPipelineReprocessingResponse -> Int)
-> (CancelPipelineReprocessingResponse
-> Int -> CancelPipelineReprocessingResponse)
-> Lens
CancelPipelineReprocessingResponse
CancelPipelineReprocessingResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelPipelineReprocessingResponse' {Int
httpStatus :: Int
$sel:httpStatus:CancelPipelineReprocessingResponse' :: CancelPipelineReprocessingResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CancelPipelineReprocessingResponse
s@CancelPipelineReprocessingResponse' {} Int
a -> CancelPipelineReprocessingResponse
s {$sel:httpStatus:CancelPipelineReprocessingResponse' :: Int
httpStatus = Int
a} :: CancelPipelineReprocessingResponse)
instance
Prelude.NFData
CancelPipelineReprocessingResponse