{-# 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.CloudFormation.DeleteChangeSet
(
DeleteChangeSet (..),
newDeleteChangeSet,
deleteChangeSet_stackName,
deleteChangeSet_changeSetName,
DeleteChangeSetResponse (..),
newDeleteChangeSetResponse,
deleteChangeSetResponse_httpStatus,
)
where
import Amazonka.CloudFormation.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteChangeSet = DeleteChangeSet'
{
DeleteChangeSet -> Maybe Text
stackName :: Prelude.Maybe Prelude.Text,
DeleteChangeSet -> Text
changeSetName :: Prelude.Text
}
deriving (DeleteChangeSet -> DeleteChangeSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteChangeSet -> DeleteChangeSet -> Bool
$c/= :: DeleteChangeSet -> DeleteChangeSet -> Bool
== :: DeleteChangeSet -> DeleteChangeSet -> Bool
$c== :: DeleteChangeSet -> DeleteChangeSet -> Bool
Prelude.Eq, ReadPrec [DeleteChangeSet]
ReadPrec DeleteChangeSet
Int -> ReadS DeleteChangeSet
ReadS [DeleteChangeSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteChangeSet]
$creadListPrec :: ReadPrec [DeleteChangeSet]
readPrec :: ReadPrec DeleteChangeSet
$creadPrec :: ReadPrec DeleteChangeSet
readList :: ReadS [DeleteChangeSet]
$creadList :: ReadS [DeleteChangeSet]
readsPrec :: Int -> ReadS DeleteChangeSet
$creadsPrec :: Int -> ReadS DeleteChangeSet
Prelude.Read, Int -> DeleteChangeSet -> ShowS
[DeleteChangeSet] -> ShowS
DeleteChangeSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteChangeSet] -> ShowS
$cshowList :: [DeleteChangeSet] -> ShowS
show :: DeleteChangeSet -> String
$cshow :: DeleteChangeSet -> String
showsPrec :: Int -> DeleteChangeSet -> ShowS
$cshowsPrec :: Int -> DeleteChangeSet -> ShowS
Prelude.Show, forall x. Rep DeleteChangeSet x -> DeleteChangeSet
forall x. DeleteChangeSet -> Rep DeleteChangeSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteChangeSet x -> DeleteChangeSet
$cfrom :: forall x. DeleteChangeSet -> Rep DeleteChangeSet x
Prelude.Generic)
newDeleteChangeSet ::
Prelude.Text ->
DeleteChangeSet
newDeleteChangeSet :: Text -> DeleteChangeSet
newDeleteChangeSet Text
pChangeSetName_ =
DeleteChangeSet'
{ $sel:stackName:DeleteChangeSet' :: Maybe Text
stackName = forall a. Maybe a
Prelude.Nothing,
$sel:changeSetName:DeleteChangeSet' :: Text
changeSetName = Text
pChangeSetName_
}
deleteChangeSet_stackName :: Lens.Lens' DeleteChangeSet (Prelude.Maybe Prelude.Text)
deleteChangeSet_stackName :: Lens' DeleteChangeSet (Maybe Text)
deleteChangeSet_stackName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteChangeSet' {Maybe Text
stackName :: Maybe Text
$sel:stackName:DeleteChangeSet' :: DeleteChangeSet -> Maybe Text
stackName} -> Maybe Text
stackName) (\s :: DeleteChangeSet
s@DeleteChangeSet' {} Maybe Text
a -> DeleteChangeSet
s {$sel:stackName:DeleteChangeSet' :: Maybe Text
stackName = Maybe Text
a} :: DeleteChangeSet)
deleteChangeSet_changeSetName :: Lens.Lens' DeleteChangeSet Prelude.Text
deleteChangeSet_changeSetName :: Lens' DeleteChangeSet Text
deleteChangeSet_changeSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteChangeSet' {Text
changeSetName :: Text
$sel:changeSetName:DeleteChangeSet' :: DeleteChangeSet -> Text
changeSetName} -> Text
changeSetName) (\s :: DeleteChangeSet
s@DeleteChangeSet' {} Text
a -> DeleteChangeSet
s {$sel:changeSetName:DeleteChangeSet' :: Text
changeSetName = Text
a} :: DeleteChangeSet)
instance Core.AWSRequest DeleteChangeSet where
type
AWSResponse DeleteChangeSet =
DeleteChangeSetResponse
request :: (Service -> Service) -> DeleteChangeSet -> Request DeleteChangeSet
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteChangeSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteChangeSet)))
response =
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DeleteChangeSetResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> DeleteChangeSetResponse
DeleteChangeSetResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DeleteChangeSet where
hashWithSalt :: Int -> DeleteChangeSet -> Int
hashWithSalt Int
_salt DeleteChangeSet' {Maybe Text
Text
changeSetName :: Text
stackName :: Maybe Text
$sel:changeSetName:DeleteChangeSet' :: DeleteChangeSet -> Text
$sel:stackName:DeleteChangeSet' :: DeleteChangeSet -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
changeSetName
instance Prelude.NFData DeleteChangeSet where
rnf :: DeleteChangeSet -> ()
rnf DeleteChangeSet' {Maybe Text
Text
changeSetName :: Text
stackName :: Maybe Text
$sel:changeSetName:DeleteChangeSet' :: DeleteChangeSet -> Text
$sel:stackName:DeleteChangeSet' :: DeleteChangeSet -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
changeSetName
instance Data.ToHeaders DeleteChangeSet where
toHeaders :: DeleteChangeSet -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DeleteChangeSet where
toPath :: DeleteChangeSet -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteChangeSet where
toQuery :: DeleteChangeSet -> QueryString
toQuery DeleteChangeSet' {Maybe Text
Text
changeSetName :: Text
stackName :: Maybe Text
$sel:changeSetName:DeleteChangeSet' :: DeleteChangeSet -> Text
$sel:stackName:DeleteChangeSet' :: DeleteChangeSet -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DeleteChangeSet" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
ByteString
"StackName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
stackName,
ByteString
"ChangeSetName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
changeSetName
]
data DeleteChangeSetResponse = DeleteChangeSetResponse'
{
DeleteChangeSetResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteChangeSetResponse -> DeleteChangeSetResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteChangeSetResponse -> DeleteChangeSetResponse -> Bool
$c/= :: DeleteChangeSetResponse -> DeleteChangeSetResponse -> Bool
== :: DeleteChangeSetResponse -> DeleteChangeSetResponse -> Bool
$c== :: DeleteChangeSetResponse -> DeleteChangeSetResponse -> Bool
Prelude.Eq, ReadPrec [DeleteChangeSetResponse]
ReadPrec DeleteChangeSetResponse
Int -> ReadS DeleteChangeSetResponse
ReadS [DeleteChangeSetResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteChangeSetResponse]
$creadListPrec :: ReadPrec [DeleteChangeSetResponse]
readPrec :: ReadPrec DeleteChangeSetResponse
$creadPrec :: ReadPrec DeleteChangeSetResponse
readList :: ReadS [DeleteChangeSetResponse]
$creadList :: ReadS [DeleteChangeSetResponse]
readsPrec :: Int -> ReadS DeleteChangeSetResponse
$creadsPrec :: Int -> ReadS DeleteChangeSetResponse
Prelude.Read, Int -> DeleteChangeSetResponse -> ShowS
[DeleteChangeSetResponse] -> ShowS
DeleteChangeSetResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteChangeSetResponse] -> ShowS
$cshowList :: [DeleteChangeSetResponse] -> ShowS
show :: DeleteChangeSetResponse -> String
$cshow :: DeleteChangeSetResponse -> String
showsPrec :: Int -> DeleteChangeSetResponse -> ShowS
$cshowsPrec :: Int -> DeleteChangeSetResponse -> ShowS
Prelude.Show, forall x. Rep DeleteChangeSetResponse x -> DeleteChangeSetResponse
forall x. DeleteChangeSetResponse -> Rep DeleteChangeSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteChangeSetResponse x -> DeleteChangeSetResponse
$cfrom :: forall x. DeleteChangeSetResponse -> Rep DeleteChangeSetResponse x
Prelude.Generic)
newDeleteChangeSetResponse ::
Prelude.Int ->
DeleteChangeSetResponse
newDeleteChangeSetResponse :: Int -> DeleteChangeSetResponse
newDeleteChangeSetResponse Int
pHttpStatus_ =
DeleteChangeSetResponse' {$sel:httpStatus:DeleteChangeSetResponse' :: Int
httpStatus = Int
pHttpStatus_}
deleteChangeSetResponse_httpStatus :: Lens.Lens' DeleteChangeSetResponse Prelude.Int
deleteChangeSetResponse_httpStatus :: Lens' DeleteChangeSetResponse Int
deleteChangeSetResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteChangeSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteChangeSetResponse' :: DeleteChangeSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteChangeSetResponse
s@DeleteChangeSetResponse' {} Int
a -> DeleteChangeSetResponse
s {$sel:httpStatus:DeleteChangeSetResponse' :: Int
httpStatus = Int
a} :: DeleteChangeSetResponse)
instance Prelude.NFData DeleteChangeSetResponse where
rnf :: DeleteChangeSetResponse -> ()
rnf DeleteChangeSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteChangeSetResponse' :: DeleteChangeSetResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus