{-# 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.StopStackSetOperation
(
StopStackSetOperation (..),
newStopStackSetOperation,
stopStackSetOperation_callAs,
stopStackSetOperation_stackSetName,
stopStackSetOperation_operationId,
StopStackSetOperationResponse (..),
newStopStackSetOperationResponse,
stopStackSetOperationResponse_httpStatus,
)
where
import Amazonka.CloudFormation.Types
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
data StopStackSetOperation = StopStackSetOperation'
{
StopStackSetOperation -> Maybe CallAs
callAs :: Prelude.Maybe CallAs,
StopStackSetOperation -> Text
stackSetName :: Prelude.Text,
StopStackSetOperation -> Text
operationId :: Prelude.Text
}
deriving (StopStackSetOperation -> StopStackSetOperation -> Bool
(StopStackSetOperation -> StopStackSetOperation -> Bool)
-> (StopStackSetOperation -> StopStackSetOperation -> Bool)
-> Eq StopStackSetOperation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopStackSetOperation -> StopStackSetOperation -> Bool
$c/= :: StopStackSetOperation -> StopStackSetOperation -> Bool
== :: StopStackSetOperation -> StopStackSetOperation -> Bool
$c== :: StopStackSetOperation -> StopStackSetOperation -> Bool
Prelude.Eq, ReadPrec [StopStackSetOperation]
ReadPrec StopStackSetOperation
Int -> ReadS StopStackSetOperation
ReadS [StopStackSetOperation]
(Int -> ReadS StopStackSetOperation)
-> ReadS [StopStackSetOperation]
-> ReadPrec StopStackSetOperation
-> ReadPrec [StopStackSetOperation]
-> Read StopStackSetOperation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopStackSetOperation]
$creadListPrec :: ReadPrec [StopStackSetOperation]
readPrec :: ReadPrec StopStackSetOperation
$creadPrec :: ReadPrec StopStackSetOperation
readList :: ReadS [StopStackSetOperation]
$creadList :: ReadS [StopStackSetOperation]
readsPrec :: Int -> ReadS StopStackSetOperation
$creadsPrec :: Int -> ReadS StopStackSetOperation
Prelude.Read, Int -> StopStackSetOperation -> ShowS
[StopStackSetOperation] -> ShowS
StopStackSetOperation -> String
(Int -> StopStackSetOperation -> ShowS)
-> (StopStackSetOperation -> String)
-> ([StopStackSetOperation] -> ShowS)
-> Show StopStackSetOperation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopStackSetOperation] -> ShowS
$cshowList :: [StopStackSetOperation] -> ShowS
show :: StopStackSetOperation -> String
$cshow :: StopStackSetOperation -> String
showsPrec :: Int -> StopStackSetOperation -> ShowS
$cshowsPrec :: Int -> StopStackSetOperation -> ShowS
Prelude.Show, (forall x. StopStackSetOperation -> Rep StopStackSetOperation x)
-> (forall x. Rep StopStackSetOperation x -> StopStackSetOperation)
-> Generic StopStackSetOperation
forall x. Rep StopStackSetOperation x -> StopStackSetOperation
forall x. StopStackSetOperation -> Rep StopStackSetOperation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StopStackSetOperation x -> StopStackSetOperation
$cfrom :: forall x. StopStackSetOperation -> Rep StopStackSetOperation x
Prelude.Generic)
newStopStackSetOperation ::
Prelude.Text ->
Prelude.Text ->
StopStackSetOperation
newStopStackSetOperation :: Text -> Text -> StopStackSetOperation
newStopStackSetOperation Text
pStackSetName_ Text
pOperationId_ =
StopStackSetOperation' :: Maybe CallAs -> Text -> Text -> StopStackSetOperation
StopStackSetOperation'
{ $sel:callAs:StopStackSetOperation' :: Maybe CallAs
callAs = Maybe CallAs
forall a. Maybe a
Prelude.Nothing,
$sel:stackSetName:StopStackSetOperation' :: Text
stackSetName = Text
pStackSetName_,
$sel:operationId:StopStackSetOperation' :: Text
operationId = Text
pOperationId_
}
stopStackSetOperation_callAs :: Lens.Lens' StopStackSetOperation (Prelude.Maybe CallAs)
stopStackSetOperation_callAs :: (Maybe CallAs -> f (Maybe CallAs))
-> StopStackSetOperation -> f StopStackSetOperation
stopStackSetOperation_callAs = (StopStackSetOperation -> Maybe CallAs)
-> (StopStackSetOperation -> Maybe CallAs -> StopStackSetOperation)
-> Lens
StopStackSetOperation
StopStackSetOperation
(Maybe CallAs)
(Maybe CallAs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopStackSetOperation' {Maybe CallAs
callAs :: Maybe CallAs
$sel:callAs:StopStackSetOperation' :: StopStackSetOperation -> Maybe CallAs
callAs} -> Maybe CallAs
callAs) (\s :: StopStackSetOperation
s@StopStackSetOperation' {} Maybe CallAs
a -> StopStackSetOperation
s {$sel:callAs:StopStackSetOperation' :: Maybe CallAs
callAs = Maybe CallAs
a} :: StopStackSetOperation)
stopStackSetOperation_stackSetName :: Lens.Lens' StopStackSetOperation Prelude.Text
stopStackSetOperation_stackSetName :: (Text -> f Text)
-> StopStackSetOperation -> f StopStackSetOperation
stopStackSetOperation_stackSetName = (StopStackSetOperation -> Text)
-> (StopStackSetOperation -> Text -> StopStackSetOperation)
-> Lens StopStackSetOperation StopStackSetOperation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopStackSetOperation' {Text
stackSetName :: Text
$sel:stackSetName:StopStackSetOperation' :: StopStackSetOperation -> Text
stackSetName} -> Text
stackSetName) (\s :: StopStackSetOperation
s@StopStackSetOperation' {} Text
a -> StopStackSetOperation
s {$sel:stackSetName:StopStackSetOperation' :: Text
stackSetName = Text
a} :: StopStackSetOperation)
stopStackSetOperation_operationId :: Lens.Lens' StopStackSetOperation Prelude.Text
stopStackSetOperation_operationId :: (Text -> f Text)
-> StopStackSetOperation -> f StopStackSetOperation
stopStackSetOperation_operationId = (StopStackSetOperation -> Text)
-> (StopStackSetOperation -> Text -> StopStackSetOperation)
-> Lens StopStackSetOperation StopStackSetOperation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopStackSetOperation' {Text
operationId :: Text
$sel:operationId:StopStackSetOperation' :: StopStackSetOperation -> Text
operationId} -> Text
operationId) (\s :: StopStackSetOperation
s@StopStackSetOperation' {} Text
a -> StopStackSetOperation
s {$sel:operationId:StopStackSetOperation' :: Text
operationId = Text
a} :: StopStackSetOperation)
instance Core.AWSRequest StopStackSetOperation where
type
AWSResponse StopStackSetOperation =
StopStackSetOperationResponse
request :: StopStackSetOperation -> Request StopStackSetOperation
request = Service -> StopStackSetOperation -> Request StopStackSetOperation
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy StopStackSetOperation
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StopStackSetOperation)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse StopStackSetOperation))
-> Logger
-> Service
-> Proxy StopStackSetOperation
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StopStackSetOperation)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"StopStackSetOperationResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> StopStackSetOperationResponse
StopStackSetOperationResponse'
(Int -> StopStackSetOperationResponse)
-> Either String Int -> Either String StopStackSetOperationResponse
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 StopStackSetOperation
instance Prelude.NFData StopStackSetOperation
instance Core.ToHeaders StopStackSetOperation where
toHeaders :: StopStackSetOperation -> ResponseHeaders
toHeaders = ResponseHeaders -> StopStackSetOperation -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath StopStackSetOperation where
toPath :: StopStackSetOperation -> ByteString
toPath = ByteString -> StopStackSetOperation -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StopStackSetOperation where
toQuery :: StopStackSetOperation -> QueryString
toQuery StopStackSetOperation' {Maybe CallAs
Text
operationId :: Text
stackSetName :: Text
callAs :: Maybe CallAs
$sel:operationId:StopStackSetOperation' :: StopStackSetOperation -> Text
$sel:stackSetName:StopStackSetOperation' :: StopStackSetOperation -> Text
$sel:callAs:StopStackSetOperation' :: StopStackSetOperation -> Maybe CallAs
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"StopStackSetOperation" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
ByteString
"CallAs" ByteString -> Maybe CallAs -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe CallAs
callAs,
ByteString
"StackSetName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
stackSetName,
ByteString
"OperationId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
operationId
]
data StopStackSetOperationResponse = StopStackSetOperationResponse'
{
StopStackSetOperationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StopStackSetOperationResponse
-> StopStackSetOperationResponse -> Bool
(StopStackSetOperationResponse
-> StopStackSetOperationResponse -> Bool)
-> (StopStackSetOperationResponse
-> StopStackSetOperationResponse -> Bool)
-> Eq StopStackSetOperationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopStackSetOperationResponse
-> StopStackSetOperationResponse -> Bool
$c/= :: StopStackSetOperationResponse
-> StopStackSetOperationResponse -> Bool
== :: StopStackSetOperationResponse
-> StopStackSetOperationResponse -> Bool
$c== :: StopStackSetOperationResponse
-> StopStackSetOperationResponse -> Bool
Prelude.Eq, ReadPrec [StopStackSetOperationResponse]
ReadPrec StopStackSetOperationResponse
Int -> ReadS StopStackSetOperationResponse
ReadS [StopStackSetOperationResponse]
(Int -> ReadS StopStackSetOperationResponse)
-> ReadS [StopStackSetOperationResponse]
-> ReadPrec StopStackSetOperationResponse
-> ReadPrec [StopStackSetOperationResponse]
-> Read StopStackSetOperationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopStackSetOperationResponse]
$creadListPrec :: ReadPrec [StopStackSetOperationResponse]
readPrec :: ReadPrec StopStackSetOperationResponse
$creadPrec :: ReadPrec StopStackSetOperationResponse
readList :: ReadS [StopStackSetOperationResponse]
$creadList :: ReadS [StopStackSetOperationResponse]
readsPrec :: Int -> ReadS StopStackSetOperationResponse
$creadsPrec :: Int -> ReadS StopStackSetOperationResponse
Prelude.Read, Int -> StopStackSetOperationResponse -> ShowS
[StopStackSetOperationResponse] -> ShowS
StopStackSetOperationResponse -> String
(Int -> StopStackSetOperationResponse -> ShowS)
-> (StopStackSetOperationResponse -> String)
-> ([StopStackSetOperationResponse] -> ShowS)
-> Show StopStackSetOperationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopStackSetOperationResponse] -> ShowS
$cshowList :: [StopStackSetOperationResponse] -> ShowS
show :: StopStackSetOperationResponse -> String
$cshow :: StopStackSetOperationResponse -> String
showsPrec :: Int -> StopStackSetOperationResponse -> ShowS
$cshowsPrec :: Int -> StopStackSetOperationResponse -> ShowS
Prelude.Show, (forall x.
StopStackSetOperationResponse
-> Rep StopStackSetOperationResponse x)
-> (forall x.
Rep StopStackSetOperationResponse x
-> StopStackSetOperationResponse)
-> Generic StopStackSetOperationResponse
forall x.
Rep StopStackSetOperationResponse x
-> StopStackSetOperationResponse
forall x.
StopStackSetOperationResponse
-> Rep StopStackSetOperationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StopStackSetOperationResponse x
-> StopStackSetOperationResponse
$cfrom :: forall x.
StopStackSetOperationResponse
-> Rep StopStackSetOperationResponse x
Prelude.Generic)
newStopStackSetOperationResponse ::
Prelude.Int ->
StopStackSetOperationResponse
newStopStackSetOperationResponse :: Int -> StopStackSetOperationResponse
newStopStackSetOperationResponse Int
pHttpStatus_ =
StopStackSetOperationResponse' :: Int -> StopStackSetOperationResponse
StopStackSetOperationResponse'
{ $sel:httpStatus:StopStackSetOperationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
stopStackSetOperationResponse_httpStatus :: Lens.Lens' StopStackSetOperationResponse Prelude.Int
stopStackSetOperationResponse_httpStatus :: (Int -> f Int)
-> StopStackSetOperationResponse -> f StopStackSetOperationResponse
stopStackSetOperationResponse_httpStatus = (StopStackSetOperationResponse -> Int)
-> (StopStackSetOperationResponse
-> Int -> StopStackSetOperationResponse)
-> Lens
StopStackSetOperationResponse StopStackSetOperationResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopStackSetOperationResponse' {Int
httpStatus :: Int
$sel:httpStatus:StopStackSetOperationResponse' :: StopStackSetOperationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StopStackSetOperationResponse
s@StopStackSetOperationResponse' {} Int
a -> StopStackSetOperationResponse
s {$sel:httpStatus:StopStackSetOperationResponse' :: Int
httpStatus = Int
a} :: StopStackSetOperationResponse)
instance Prelude.NFData StopStackSetOperationResponse