{-# 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.ImageBuilder.DeleteImagePipeline
(
DeleteImagePipeline (..),
newDeleteImagePipeline,
deleteImagePipeline_imagePipelineArn,
DeleteImagePipelineResponse (..),
newDeleteImagePipelineResponse,
deleteImagePipelineResponse_requestId,
deleteImagePipelineResponse_imagePipelineArn,
deleteImagePipelineResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.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 DeleteImagePipeline = DeleteImagePipeline'
{
DeleteImagePipeline -> Text
imagePipelineArn :: Prelude.Text
}
deriving (DeleteImagePipeline -> DeleteImagePipeline -> Bool
(DeleteImagePipeline -> DeleteImagePipeline -> Bool)
-> (DeleteImagePipeline -> DeleteImagePipeline -> Bool)
-> Eq DeleteImagePipeline
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteImagePipeline -> DeleteImagePipeline -> Bool
$c/= :: DeleteImagePipeline -> DeleteImagePipeline -> Bool
== :: DeleteImagePipeline -> DeleteImagePipeline -> Bool
$c== :: DeleteImagePipeline -> DeleteImagePipeline -> Bool
Prelude.Eq, ReadPrec [DeleteImagePipeline]
ReadPrec DeleteImagePipeline
Int -> ReadS DeleteImagePipeline
ReadS [DeleteImagePipeline]
(Int -> ReadS DeleteImagePipeline)
-> ReadS [DeleteImagePipeline]
-> ReadPrec DeleteImagePipeline
-> ReadPrec [DeleteImagePipeline]
-> Read DeleteImagePipeline
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteImagePipeline]
$creadListPrec :: ReadPrec [DeleteImagePipeline]
readPrec :: ReadPrec DeleteImagePipeline
$creadPrec :: ReadPrec DeleteImagePipeline
readList :: ReadS [DeleteImagePipeline]
$creadList :: ReadS [DeleteImagePipeline]
readsPrec :: Int -> ReadS DeleteImagePipeline
$creadsPrec :: Int -> ReadS DeleteImagePipeline
Prelude.Read, Int -> DeleteImagePipeline -> ShowS
[DeleteImagePipeline] -> ShowS
DeleteImagePipeline -> String
(Int -> DeleteImagePipeline -> ShowS)
-> (DeleteImagePipeline -> String)
-> ([DeleteImagePipeline] -> ShowS)
-> Show DeleteImagePipeline
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteImagePipeline] -> ShowS
$cshowList :: [DeleteImagePipeline] -> ShowS
show :: DeleteImagePipeline -> String
$cshow :: DeleteImagePipeline -> String
showsPrec :: Int -> DeleteImagePipeline -> ShowS
$cshowsPrec :: Int -> DeleteImagePipeline -> ShowS
Prelude.Show, (forall x. DeleteImagePipeline -> Rep DeleteImagePipeline x)
-> (forall x. Rep DeleteImagePipeline x -> DeleteImagePipeline)
-> Generic DeleteImagePipeline
forall x. Rep DeleteImagePipeline x -> DeleteImagePipeline
forall x. DeleteImagePipeline -> Rep DeleteImagePipeline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteImagePipeline x -> DeleteImagePipeline
$cfrom :: forall x. DeleteImagePipeline -> Rep DeleteImagePipeline x
Prelude.Generic)
newDeleteImagePipeline ::
Prelude.Text ->
DeleteImagePipeline
newDeleteImagePipeline :: Text -> DeleteImagePipeline
newDeleteImagePipeline Text
pImagePipelineArn_ =
DeleteImagePipeline' :: Text -> DeleteImagePipeline
DeleteImagePipeline'
{ $sel:imagePipelineArn:DeleteImagePipeline' :: Text
imagePipelineArn =
Text
pImagePipelineArn_
}
deleteImagePipeline_imagePipelineArn :: Lens.Lens' DeleteImagePipeline Prelude.Text
deleteImagePipeline_imagePipelineArn :: (Text -> f Text) -> DeleteImagePipeline -> f DeleteImagePipeline
deleteImagePipeline_imagePipelineArn = (DeleteImagePipeline -> Text)
-> (DeleteImagePipeline -> Text -> DeleteImagePipeline)
-> Lens DeleteImagePipeline DeleteImagePipeline Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteImagePipeline' {Text
imagePipelineArn :: Text
$sel:imagePipelineArn:DeleteImagePipeline' :: DeleteImagePipeline -> Text
imagePipelineArn} -> Text
imagePipelineArn) (\s :: DeleteImagePipeline
s@DeleteImagePipeline' {} Text
a -> DeleteImagePipeline
s {$sel:imagePipelineArn:DeleteImagePipeline' :: Text
imagePipelineArn = Text
a} :: DeleteImagePipeline)
instance Core.AWSRequest DeleteImagePipeline where
type
AWSResponse DeleteImagePipeline =
DeleteImagePipelineResponse
request :: DeleteImagePipeline -> Request DeleteImagePipeline
request = Service -> DeleteImagePipeline -> Request DeleteImagePipeline
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteImagePipeline
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteImagePipeline)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeleteImagePipeline))
-> Logger
-> Service
-> Proxy DeleteImagePipeline
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteImagePipeline)))
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 Text -> Int -> DeleteImagePipelineResponse
DeleteImagePipelineResponse'
(Maybe Text -> Maybe Text -> Int -> DeleteImagePipelineResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> DeleteImagePipelineResponse)
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
"requestId")
Either String (Maybe Text -> Int -> DeleteImagePipelineResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DeleteImagePipelineResponse)
forall (f :: * -> *) a b. Applicative f => 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
"imagePipelineArn")
Either String (Int -> DeleteImagePipelineResponse)
-> Either String Int -> Either String DeleteImagePipelineResponse
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 DeleteImagePipeline
instance Prelude.NFData DeleteImagePipeline
instance Core.ToHeaders DeleteImagePipeline where
toHeaders :: DeleteImagePipeline -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteImagePipeline -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.ToPath DeleteImagePipeline where
toPath :: DeleteImagePipeline -> ByteString
toPath = ByteString -> DeleteImagePipeline -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/DeleteImagePipeline"
instance Core.ToQuery DeleteImagePipeline where
toQuery :: DeleteImagePipeline -> QueryString
toQuery DeleteImagePipeline' {Text
imagePipelineArn :: Text
$sel:imagePipelineArn:DeleteImagePipeline' :: DeleteImagePipeline -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"imagePipelineArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
imagePipelineArn]
data DeleteImagePipelineResponse = DeleteImagePipelineResponse'
{
DeleteImagePipelineResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
DeleteImagePipelineResponse -> Maybe Text
imagePipelineArn :: Prelude.Maybe Prelude.Text,
DeleteImagePipelineResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteImagePipelineResponse -> DeleteImagePipelineResponse -> Bool
(DeleteImagePipelineResponse
-> DeleteImagePipelineResponse -> Bool)
-> (DeleteImagePipelineResponse
-> DeleteImagePipelineResponse -> Bool)
-> Eq DeleteImagePipelineResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteImagePipelineResponse -> DeleteImagePipelineResponse -> Bool
$c/= :: DeleteImagePipelineResponse -> DeleteImagePipelineResponse -> Bool
== :: DeleteImagePipelineResponse -> DeleteImagePipelineResponse -> Bool
$c== :: DeleteImagePipelineResponse -> DeleteImagePipelineResponse -> Bool
Prelude.Eq, ReadPrec [DeleteImagePipelineResponse]
ReadPrec DeleteImagePipelineResponse
Int -> ReadS DeleteImagePipelineResponse
ReadS [DeleteImagePipelineResponse]
(Int -> ReadS DeleteImagePipelineResponse)
-> ReadS [DeleteImagePipelineResponse]
-> ReadPrec DeleteImagePipelineResponse
-> ReadPrec [DeleteImagePipelineResponse]
-> Read DeleteImagePipelineResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteImagePipelineResponse]
$creadListPrec :: ReadPrec [DeleteImagePipelineResponse]
readPrec :: ReadPrec DeleteImagePipelineResponse
$creadPrec :: ReadPrec DeleteImagePipelineResponse
readList :: ReadS [DeleteImagePipelineResponse]
$creadList :: ReadS [DeleteImagePipelineResponse]
readsPrec :: Int -> ReadS DeleteImagePipelineResponse
$creadsPrec :: Int -> ReadS DeleteImagePipelineResponse
Prelude.Read, Int -> DeleteImagePipelineResponse -> ShowS
[DeleteImagePipelineResponse] -> ShowS
DeleteImagePipelineResponse -> String
(Int -> DeleteImagePipelineResponse -> ShowS)
-> (DeleteImagePipelineResponse -> String)
-> ([DeleteImagePipelineResponse] -> ShowS)
-> Show DeleteImagePipelineResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteImagePipelineResponse] -> ShowS
$cshowList :: [DeleteImagePipelineResponse] -> ShowS
show :: DeleteImagePipelineResponse -> String
$cshow :: DeleteImagePipelineResponse -> String
showsPrec :: Int -> DeleteImagePipelineResponse -> ShowS
$cshowsPrec :: Int -> DeleteImagePipelineResponse -> ShowS
Prelude.Show, (forall x.
DeleteImagePipelineResponse -> Rep DeleteImagePipelineResponse x)
-> (forall x.
Rep DeleteImagePipelineResponse x -> DeleteImagePipelineResponse)
-> Generic DeleteImagePipelineResponse
forall x.
Rep DeleteImagePipelineResponse x -> DeleteImagePipelineResponse
forall x.
DeleteImagePipelineResponse -> Rep DeleteImagePipelineResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteImagePipelineResponse x -> DeleteImagePipelineResponse
$cfrom :: forall x.
DeleteImagePipelineResponse -> Rep DeleteImagePipelineResponse x
Prelude.Generic)
newDeleteImagePipelineResponse ::
Prelude.Int ->
DeleteImagePipelineResponse
newDeleteImagePipelineResponse :: Int -> DeleteImagePipelineResponse
newDeleteImagePipelineResponse Int
pHttpStatus_ =
DeleteImagePipelineResponse' :: Maybe Text -> Maybe Text -> Int -> DeleteImagePipelineResponse
DeleteImagePipelineResponse'
{ $sel:requestId:DeleteImagePipelineResponse' :: Maybe Text
requestId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imagePipelineArn:DeleteImagePipelineResponse' :: Maybe Text
imagePipelineArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteImagePipelineResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteImagePipelineResponse_requestId :: Lens.Lens' DeleteImagePipelineResponse (Prelude.Maybe Prelude.Text)
deleteImagePipelineResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> DeleteImagePipelineResponse -> f DeleteImagePipelineResponse
deleteImagePipelineResponse_requestId = (DeleteImagePipelineResponse -> Maybe Text)
-> (DeleteImagePipelineResponse
-> Maybe Text -> DeleteImagePipelineResponse)
-> Lens
DeleteImagePipelineResponse
DeleteImagePipelineResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteImagePipelineResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:DeleteImagePipelineResponse' :: DeleteImagePipelineResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: DeleteImagePipelineResponse
s@DeleteImagePipelineResponse' {} Maybe Text
a -> DeleteImagePipelineResponse
s {$sel:requestId:DeleteImagePipelineResponse' :: Maybe Text
requestId = Maybe Text
a} :: DeleteImagePipelineResponse)
deleteImagePipelineResponse_imagePipelineArn :: Lens.Lens' DeleteImagePipelineResponse (Prelude.Maybe Prelude.Text)
deleteImagePipelineResponse_imagePipelineArn :: (Maybe Text -> f (Maybe Text))
-> DeleteImagePipelineResponse -> f DeleteImagePipelineResponse
deleteImagePipelineResponse_imagePipelineArn = (DeleteImagePipelineResponse -> Maybe Text)
-> (DeleteImagePipelineResponse
-> Maybe Text -> DeleteImagePipelineResponse)
-> Lens
DeleteImagePipelineResponse
DeleteImagePipelineResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteImagePipelineResponse' {Maybe Text
imagePipelineArn :: Maybe Text
$sel:imagePipelineArn:DeleteImagePipelineResponse' :: DeleteImagePipelineResponse -> Maybe Text
imagePipelineArn} -> Maybe Text
imagePipelineArn) (\s :: DeleteImagePipelineResponse
s@DeleteImagePipelineResponse' {} Maybe Text
a -> DeleteImagePipelineResponse
s {$sel:imagePipelineArn:DeleteImagePipelineResponse' :: Maybe Text
imagePipelineArn = Maybe Text
a} :: DeleteImagePipelineResponse)
deleteImagePipelineResponse_httpStatus :: Lens.Lens' DeleteImagePipelineResponse Prelude.Int
deleteImagePipelineResponse_httpStatus :: (Int -> f Int)
-> DeleteImagePipelineResponse -> f DeleteImagePipelineResponse
deleteImagePipelineResponse_httpStatus = (DeleteImagePipelineResponse -> Int)
-> (DeleteImagePipelineResponse
-> Int -> DeleteImagePipelineResponse)
-> Lens
DeleteImagePipelineResponse DeleteImagePipelineResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteImagePipelineResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteImagePipelineResponse' :: DeleteImagePipelineResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteImagePipelineResponse
s@DeleteImagePipelineResponse' {} Int
a -> DeleteImagePipelineResponse
s {$sel:httpStatus:DeleteImagePipelineResponse' :: Int
httpStatus = Int
a} :: DeleteImagePipelineResponse)
instance Prelude.NFData DeleteImagePipelineResponse