{-# 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.DeleteContainerRecipe
(
DeleteContainerRecipe (..),
newDeleteContainerRecipe,
deleteContainerRecipe_containerRecipeArn,
DeleteContainerRecipeResponse (..),
newDeleteContainerRecipeResponse,
deleteContainerRecipeResponse_requestId,
deleteContainerRecipeResponse_containerRecipeArn,
deleteContainerRecipeResponse_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 DeleteContainerRecipe = DeleteContainerRecipe'
{
DeleteContainerRecipe -> Text
containerRecipeArn :: Prelude.Text
}
deriving (DeleteContainerRecipe -> DeleteContainerRecipe -> Bool
(DeleteContainerRecipe -> DeleteContainerRecipe -> Bool)
-> (DeleteContainerRecipe -> DeleteContainerRecipe -> Bool)
-> Eq DeleteContainerRecipe
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteContainerRecipe -> DeleteContainerRecipe -> Bool
$c/= :: DeleteContainerRecipe -> DeleteContainerRecipe -> Bool
== :: DeleteContainerRecipe -> DeleteContainerRecipe -> Bool
$c== :: DeleteContainerRecipe -> DeleteContainerRecipe -> Bool
Prelude.Eq, ReadPrec [DeleteContainerRecipe]
ReadPrec DeleteContainerRecipe
Int -> ReadS DeleteContainerRecipe
ReadS [DeleteContainerRecipe]
(Int -> ReadS DeleteContainerRecipe)
-> ReadS [DeleteContainerRecipe]
-> ReadPrec DeleteContainerRecipe
-> ReadPrec [DeleteContainerRecipe]
-> Read DeleteContainerRecipe
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteContainerRecipe]
$creadListPrec :: ReadPrec [DeleteContainerRecipe]
readPrec :: ReadPrec DeleteContainerRecipe
$creadPrec :: ReadPrec DeleteContainerRecipe
readList :: ReadS [DeleteContainerRecipe]
$creadList :: ReadS [DeleteContainerRecipe]
readsPrec :: Int -> ReadS DeleteContainerRecipe
$creadsPrec :: Int -> ReadS DeleteContainerRecipe
Prelude.Read, Int -> DeleteContainerRecipe -> ShowS
[DeleteContainerRecipe] -> ShowS
DeleteContainerRecipe -> String
(Int -> DeleteContainerRecipe -> ShowS)
-> (DeleteContainerRecipe -> String)
-> ([DeleteContainerRecipe] -> ShowS)
-> Show DeleteContainerRecipe
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteContainerRecipe] -> ShowS
$cshowList :: [DeleteContainerRecipe] -> ShowS
show :: DeleteContainerRecipe -> String
$cshow :: DeleteContainerRecipe -> String
showsPrec :: Int -> DeleteContainerRecipe -> ShowS
$cshowsPrec :: Int -> DeleteContainerRecipe -> ShowS
Prelude.Show, (forall x. DeleteContainerRecipe -> Rep DeleteContainerRecipe x)
-> (forall x. Rep DeleteContainerRecipe x -> DeleteContainerRecipe)
-> Generic DeleteContainerRecipe
forall x. Rep DeleteContainerRecipe x -> DeleteContainerRecipe
forall x. DeleteContainerRecipe -> Rep DeleteContainerRecipe x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteContainerRecipe x -> DeleteContainerRecipe
$cfrom :: forall x. DeleteContainerRecipe -> Rep DeleteContainerRecipe x
Prelude.Generic)
newDeleteContainerRecipe ::
Prelude.Text ->
DeleteContainerRecipe
newDeleteContainerRecipe :: Text -> DeleteContainerRecipe
newDeleteContainerRecipe Text
pContainerRecipeArn_ =
DeleteContainerRecipe' :: Text -> DeleteContainerRecipe
DeleteContainerRecipe'
{ $sel:containerRecipeArn:DeleteContainerRecipe' :: Text
containerRecipeArn =
Text
pContainerRecipeArn_
}
deleteContainerRecipe_containerRecipeArn :: Lens.Lens' DeleteContainerRecipe Prelude.Text
deleteContainerRecipe_containerRecipeArn :: (Text -> f Text)
-> DeleteContainerRecipe -> f DeleteContainerRecipe
deleteContainerRecipe_containerRecipeArn = (DeleteContainerRecipe -> Text)
-> (DeleteContainerRecipe -> Text -> DeleteContainerRecipe)
-> Lens DeleteContainerRecipe DeleteContainerRecipe Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteContainerRecipe' {Text
containerRecipeArn :: Text
$sel:containerRecipeArn:DeleteContainerRecipe' :: DeleteContainerRecipe -> Text
containerRecipeArn} -> Text
containerRecipeArn) (\s :: DeleteContainerRecipe
s@DeleteContainerRecipe' {} Text
a -> DeleteContainerRecipe
s {$sel:containerRecipeArn:DeleteContainerRecipe' :: Text
containerRecipeArn = Text
a} :: DeleteContainerRecipe)
instance Core.AWSRequest DeleteContainerRecipe where
type
AWSResponse DeleteContainerRecipe =
DeleteContainerRecipeResponse
request :: DeleteContainerRecipe -> Request DeleteContainerRecipe
request = Service -> DeleteContainerRecipe -> Request DeleteContainerRecipe
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteContainerRecipe
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteContainerRecipe)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeleteContainerRecipe))
-> Logger
-> Service
-> Proxy DeleteContainerRecipe
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteContainerRecipe)))
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 -> DeleteContainerRecipeResponse
DeleteContainerRecipeResponse'
(Maybe Text -> Maybe Text -> Int -> DeleteContainerRecipeResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Int -> DeleteContainerRecipeResponse)
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 -> DeleteContainerRecipeResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DeleteContainerRecipeResponse)
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
"containerRecipeArn")
Either String (Int -> DeleteContainerRecipeResponse)
-> Either String Int -> Either String DeleteContainerRecipeResponse
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 DeleteContainerRecipe
instance Prelude.NFData DeleteContainerRecipe
instance Core.ToHeaders DeleteContainerRecipe where
toHeaders :: DeleteContainerRecipe -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteContainerRecipe -> 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 DeleteContainerRecipe where
toPath :: DeleteContainerRecipe -> ByteString
toPath = ByteString -> DeleteContainerRecipe -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/DeleteContainerRecipe"
instance Core.ToQuery DeleteContainerRecipe where
toQuery :: DeleteContainerRecipe -> QueryString
toQuery DeleteContainerRecipe' {Text
containerRecipeArn :: Text
$sel:containerRecipeArn:DeleteContainerRecipe' :: DeleteContainerRecipe -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"containerRecipeArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
containerRecipeArn]
data DeleteContainerRecipeResponse = DeleteContainerRecipeResponse'
{
DeleteContainerRecipeResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
DeleteContainerRecipeResponse -> Maybe Text
containerRecipeArn :: Prelude.Maybe Prelude.Text,
DeleteContainerRecipeResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteContainerRecipeResponse
-> DeleteContainerRecipeResponse -> Bool
(DeleteContainerRecipeResponse
-> DeleteContainerRecipeResponse -> Bool)
-> (DeleteContainerRecipeResponse
-> DeleteContainerRecipeResponse -> Bool)
-> Eq DeleteContainerRecipeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteContainerRecipeResponse
-> DeleteContainerRecipeResponse -> Bool
$c/= :: DeleteContainerRecipeResponse
-> DeleteContainerRecipeResponse -> Bool
== :: DeleteContainerRecipeResponse
-> DeleteContainerRecipeResponse -> Bool
$c== :: DeleteContainerRecipeResponse
-> DeleteContainerRecipeResponse -> Bool
Prelude.Eq, ReadPrec [DeleteContainerRecipeResponse]
ReadPrec DeleteContainerRecipeResponse
Int -> ReadS DeleteContainerRecipeResponse
ReadS [DeleteContainerRecipeResponse]
(Int -> ReadS DeleteContainerRecipeResponse)
-> ReadS [DeleteContainerRecipeResponse]
-> ReadPrec DeleteContainerRecipeResponse
-> ReadPrec [DeleteContainerRecipeResponse]
-> Read DeleteContainerRecipeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteContainerRecipeResponse]
$creadListPrec :: ReadPrec [DeleteContainerRecipeResponse]
readPrec :: ReadPrec DeleteContainerRecipeResponse
$creadPrec :: ReadPrec DeleteContainerRecipeResponse
readList :: ReadS [DeleteContainerRecipeResponse]
$creadList :: ReadS [DeleteContainerRecipeResponse]
readsPrec :: Int -> ReadS DeleteContainerRecipeResponse
$creadsPrec :: Int -> ReadS DeleteContainerRecipeResponse
Prelude.Read, Int -> DeleteContainerRecipeResponse -> ShowS
[DeleteContainerRecipeResponse] -> ShowS
DeleteContainerRecipeResponse -> String
(Int -> DeleteContainerRecipeResponse -> ShowS)
-> (DeleteContainerRecipeResponse -> String)
-> ([DeleteContainerRecipeResponse] -> ShowS)
-> Show DeleteContainerRecipeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteContainerRecipeResponse] -> ShowS
$cshowList :: [DeleteContainerRecipeResponse] -> ShowS
show :: DeleteContainerRecipeResponse -> String
$cshow :: DeleteContainerRecipeResponse -> String
showsPrec :: Int -> DeleteContainerRecipeResponse -> ShowS
$cshowsPrec :: Int -> DeleteContainerRecipeResponse -> ShowS
Prelude.Show, (forall x.
DeleteContainerRecipeResponse
-> Rep DeleteContainerRecipeResponse x)
-> (forall x.
Rep DeleteContainerRecipeResponse x
-> DeleteContainerRecipeResponse)
-> Generic DeleteContainerRecipeResponse
forall x.
Rep DeleteContainerRecipeResponse x
-> DeleteContainerRecipeResponse
forall x.
DeleteContainerRecipeResponse
-> Rep DeleteContainerRecipeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteContainerRecipeResponse x
-> DeleteContainerRecipeResponse
$cfrom :: forall x.
DeleteContainerRecipeResponse
-> Rep DeleteContainerRecipeResponse x
Prelude.Generic)
newDeleteContainerRecipeResponse ::
Prelude.Int ->
DeleteContainerRecipeResponse
newDeleteContainerRecipeResponse :: Int -> DeleteContainerRecipeResponse
newDeleteContainerRecipeResponse Int
pHttpStatus_ =
DeleteContainerRecipeResponse' :: Maybe Text -> Maybe Text -> Int -> DeleteContainerRecipeResponse
DeleteContainerRecipeResponse'
{ $sel:requestId:DeleteContainerRecipeResponse' :: Maybe Text
requestId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:containerRecipeArn:DeleteContainerRecipeResponse' :: Maybe Text
containerRecipeArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteContainerRecipeResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteContainerRecipeResponse_requestId :: Lens.Lens' DeleteContainerRecipeResponse (Prelude.Maybe Prelude.Text)
deleteContainerRecipeResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> DeleteContainerRecipeResponse -> f DeleteContainerRecipeResponse
deleteContainerRecipeResponse_requestId = (DeleteContainerRecipeResponse -> Maybe Text)
-> (DeleteContainerRecipeResponse
-> Maybe Text -> DeleteContainerRecipeResponse)
-> Lens
DeleteContainerRecipeResponse
DeleteContainerRecipeResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteContainerRecipeResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:DeleteContainerRecipeResponse' :: DeleteContainerRecipeResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: DeleteContainerRecipeResponse
s@DeleteContainerRecipeResponse' {} Maybe Text
a -> DeleteContainerRecipeResponse
s {$sel:requestId:DeleteContainerRecipeResponse' :: Maybe Text
requestId = Maybe Text
a} :: DeleteContainerRecipeResponse)
deleteContainerRecipeResponse_containerRecipeArn :: Lens.Lens' DeleteContainerRecipeResponse (Prelude.Maybe Prelude.Text)
deleteContainerRecipeResponse_containerRecipeArn :: (Maybe Text -> f (Maybe Text))
-> DeleteContainerRecipeResponse -> f DeleteContainerRecipeResponse
deleteContainerRecipeResponse_containerRecipeArn = (DeleteContainerRecipeResponse -> Maybe Text)
-> (DeleteContainerRecipeResponse
-> Maybe Text -> DeleteContainerRecipeResponse)
-> Lens
DeleteContainerRecipeResponse
DeleteContainerRecipeResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteContainerRecipeResponse' {Maybe Text
containerRecipeArn :: Maybe Text
$sel:containerRecipeArn:DeleteContainerRecipeResponse' :: DeleteContainerRecipeResponse -> Maybe Text
containerRecipeArn} -> Maybe Text
containerRecipeArn) (\s :: DeleteContainerRecipeResponse
s@DeleteContainerRecipeResponse' {} Maybe Text
a -> DeleteContainerRecipeResponse
s {$sel:containerRecipeArn:DeleteContainerRecipeResponse' :: Maybe Text
containerRecipeArn = Maybe Text
a} :: DeleteContainerRecipeResponse)
deleteContainerRecipeResponse_httpStatus :: Lens.Lens' DeleteContainerRecipeResponse Prelude.Int
deleteContainerRecipeResponse_httpStatus :: (Int -> f Int)
-> DeleteContainerRecipeResponse -> f DeleteContainerRecipeResponse
deleteContainerRecipeResponse_httpStatus = (DeleteContainerRecipeResponse -> Int)
-> (DeleteContainerRecipeResponse
-> Int -> DeleteContainerRecipeResponse)
-> Lens
DeleteContainerRecipeResponse DeleteContainerRecipeResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteContainerRecipeResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteContainerRecipeResponse' :: DeleteContainerRecipeResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteContainerRecipeResponse
s@DeleteContainerRecipeResponse' {} Int
a -> DeleteContainerRecipeResponse
s {$sel:httpStatus:DeleteContainerRecipeResponse' :: Int
httpStatus = Int
a} :: DeleteContainerRecipeResponse)
instance Prelude.NFData DeleteContainerRecipeResponse