{-# 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.Transfer.DeleteWorkflow
(
DeleteWorkflow (..),
newDeleteWorkflow,
deleteWorkflow_workflowId,
DeleteWorkflowResponse (..),
newDeleteWorkflowResponse,
)
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.Transfer.Types
data DeleteWorkflow = DeleteWorkflow'
{
DeleteWorkflow -> Text
workflowId :: Prelude.Text
}
deriving (DeleteWorkflow -> DeleteWorkflow -> Bool
(DeleteWorkflow -> DeleteWorkflow -> Bool)
-> (DeleteWorkflow -> DeleteWorkflow -> Bool) -> Eq DeleteWorkflow
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteWorkflow -> DeleteWorkflow -> Bool
$c/= :: DeleteWorkflow -> DeleteWorkflow -> Bool
== :: DeleteWorkflow -> DeleteWorkflow -> Bool
$c== :: DeleteWorkflow -> DeleteWorkflow -> Bool
Prelude.Eq, ReadPrec [DeleteWorkflow]
ReadPrec DeleteWorkflow
Int -> ReadS DeleteWorkflow
ReadS [DeleteWorkflow]
(Int -> ReadS DeleteWorkflow)
-> ReadS [DeleteWorkflow]
-> ReadPrec DeleteWorkflow
-> ReadPrec [DeleteWorkflow]
-> Read DeleteWorkflow
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteWorkflow]
$creadListPrec :: ReadPrec [DeleteWorkflow]
readPrec :: ReadPrec DeleteWorkflow
$creadPrec :: ReadPrec DeleteWorkflow
readList :: ReadS [DeleteWorkflow]
$creadList :: ReadS [DeleteWorkflow]
readsPrec :: Int -> ReadS DeleteWorkflow
$creadsPrec :: Int -> ReadS DeleteWorkflow
Prelude.Read, Int -> DeleteWorkflow -> ShowS
[DeleteWorkflow] -> ShowS
DeleteWorkflow -> String
(Int -> DeleteWorkflow -> ShowS)
-> (DeleteWorkflow -> String)
-> ([DeleteWorkflow] -> ShowS)
-> Show DeleteWorkflow
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteWorkflow] -> ShowS
$cshowList :: [DeleteWorkflow] -> ShowS
show :: DeleteWorkflow -> String
$cshow :: DeleteWorkflow -> String
showsPrec :: Int -> DeleteWorkflow -> ShowS
$cshowsPrec :: Int -> DeleteWorkflow -> ShowS
Prelude.Show, (forall x. DeleteWorkflow -> Rep DeleteWorkflow x)
-> (forall x. Rep DeleteWorkflow x -> DeleteWorkflow)
-> Generic DeleteWorkflow
forall x. Rep DeleteWorkflow x -> DeleteWorkflow
forall x. DeleteWorkflow -> Rep DeleteWorkflow x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteWorkflow x -> DeleteWorkflow
$cfrom :: forall x. DeleteWorkflow -> Rep DeleteWorkflow x
Prelude.Generic)
newDeleteWorkflow ::
Prelude.Text ->
DeleteWorkflow
newDeleteWorkflow :: Text -> DeleteWorkflow
newDeleteWorkflow Text
pWorkflowId_ =
DeleteWorkflow' :: Text -> DeleteWorkflow
DeleteWorkflow' {$sel:workflowId:DeleteWorkflow' :: Text
workflowId = Text
pWorkflowId_}
deleteWorkflow_workflowId :: Lens.Lens' DeleteWorkflow Prelude.Text
deleteWorkflow_workflowId :: (Text -> f Text) -> DeleteWorkflow -> f DeleteWorkflow
deleteWorkflow_workflowId = (DeleteWorkflow -> Text)
-> (DeleteWorkflow -> Text -> DeleteWorkflow)
-> Lens DeleteWorkflow DeleteWorkflow Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteWorkflow' {Text
workflowId :: Text
$sel:workflowId:DeleteWorkflow' :: DeleteWorkflow -> Text
workflowId} -> Text
workflowId) (\s :: DeleteWorkflow
s@DeleteWorkflow' {} Text
a -> DeleteWorkflow
s {$sel:workflowId:DeleteWorkflow' :: Text
workflowId = Text
a} :: DeleteWorkflow)
instance Core.AWSRequest DeleteWorkflow where
type
AWSResponse DeleteWorkflow =
DeleteWorkflowResponse
request :: DeleteWorkflow -> Request DeleteWorkflow
request = Service -> DeleteWorkflow -> Request DeleteWorkflow
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteWorkflow
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteWorkflow)))
response =
AWSResponse DeleteWorkflow
-> Logger
-> Service
-> Proxy DeleteWorkflow
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteWorkflow)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteWorkflow
DeleteWorkflowResponse
DeleteWorkflowResponse'
instance Prelude.Hashable DeleteWorkflow
instance Prelude.NFData DeleteWorkflow
instance Core.ToHeaders DeleteWorkflow where
toHeaders :: DeleteWorkflow -> [Header]
toHeaders =
[Header] -> DeleteWorkflow -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"TransferService.DeleteWorkflow" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteWorkflow where
toJSON :: DeleteWorkflow -> Value
toJSON DeleteWorkflow' {Text
workflowId :: Text
$sel:workflowId:DeleteWorkflow' :: DeleteWorkflow -> Text
..} =
[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
"WorkflowId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
workflowId)]
)
instance Core.ToPath DeleteWorkflow where
toPath :: DeleteWorkflow -> ByteString
toPath = ByteString -> DeleteWorkflow -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteWorkflow where
toQuery :: DeleteWorkflow -> QueryString
toQuery = QueryString -> DeleteWorkflow -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteWorkflowResponse = DeleteWorkflowResponse'
{
}
deriving (DeleteWorkflowResponse -> DeleteWorkflowResponse -> Bool
(DeleteWorkflowResponse -> DeleteWorkflowResponse -> Bool)
-> (DeleteWorkflowResponse -> DeleteWorkflowResponse -> Bool)
-> Eq DeleteWorkflowResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteWorkflowResponse -> DeleteWorkflowResponse -> Bool
$c/= :: DeleteWorkflowResponse -> DeleteWorkflowResponse -> Bool
== :: DeleteWorkflowResponse -> DeleteWorkflowResponse -> Bool
$c== :: DeleteWorkflowResponse -> DeleteWorkflowResponse -> Bool
Prelude.Eq, ReadPrec [DeleteWorkflowResponse]
ReadPrec DeleteWorkflowResponse
Int -> ReadS DeleteWorkflowResponse
ReadS [DeleteWorkflowResponse]
(Int -> ReadS DeleteWorkflowResponse)
-> ReadS [DeleteWorkflowResponse]
-> ReadPrec DeleteWorkflowResponse
-> ReadPrec [DeleteWorkflowResponse]
-> Read DeleteWorkflowResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteWorkflowResponse]
$creadListPrec :: ReadPrec [DeleteWorkflowResponse]
readPrec :: ReadPrec DeleteWorkflowResponse
$creadPrec :: ReadPrec DeleteWorkflowResponse
readList :: ReadS [DeleteWorkflowResponse]
$creadList :: ReadS [DeleteWorkflowResponse]
readsPrec :: Int -> ReadS DeleteWorkflowResponse
$creadsPrec :: Int -> ReadS DeleteWorkflowResponse
Prelude.Read, Int -> DeleteWorkflowResponse -> ShowS
[DeleteWorkflowResponse] -> ShowS
DeleteWorkflowResponse -> String
(Int -> DeleteWorkflowResponse -> ShowS)
-> (DeleteWorkflowResponse -> String)
-> ([DeleteWorkflowResponse] -> ShowS)
-> Show DeleteWorkflowResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteWorkflowResponse] -> ShowS
$cshowList :: [DeleteWorkflowResponse] -> ShowS
show :: DeleteWorkflowResponse -> String
$cshow :: DeleteWorkflowResponse -> String
showsPrec :: Int -> DeleteWorkflowResponse -> ShowS
$cshowsPrec :: Int -> DeleteWorkflowResponse -> ShowS
Prelude.Show, (forall x. DeleteWorkflowResponse -> Rep DeleteWorkflowResponse x)
-> (forall x.
Rep DeleteWorkflowResponse x -> DeleteWorkflowResponse)
-> Generic DeleteWorkflowResponse
forall x. Rep DeleteWorkflowResponse x -> DeleteWorkflowResponse
forall x. DeleteWorkflowResponse -> Rep DeleteWorkflowResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteWorkflowResponse x -> DeleteWorkflowResponse
$cfrom :: forall x. DeleteWorkflowResponse -> Rep DeleteWorkflowResponse x
Prelude.Generic)
newDeleteWorkflowResponse ::
DeleteWorkflowResponse
newDeleteWorkflowResponse :: DeleteWorkflowResponse
newDeleteWorkflowResponse = DeleteWorkflowResponse
DeleteWorkflowResponse'
instance Prelude.NFData DeleteWorkflowResponse