{-# 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.DetectStackSetDrift
(
DetectStackSetDrift (..),
newDetectStackSetDrift,
detectStackSetDrift_callAs,
detectStackSetDrift_operationId,
detectStackSetDrift_operationPreferences,
detectStackSetDrift_stackSetName,
DetectStackSetDriftResponse (..),
newDetectStackSetDriftResponse,
detectStackSetDriftResponse_operationId,
detectStackSetDriftResponse_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 DetectStackSetDrift = DetectStackSetDrift'
{
DetectStackSetDrift -> Maybe CallAs
callAs :: Prelude.Maybe CallAs,
DetectStackSetDrift -> Maybe Text
operationId :: Prelude.Maybe Prelude.Text,
DetectStackSetDrift -> Maybe StackSetOperationPreferences
operationPreferences :: Prelude.Maybe StackSetOperationPreferences,
DetectStackSetDrift -> Text
stackSetName :: Prelude.Text
}
deriving (DetectStackSetDrift -> DetectStackSetDrift -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetectStackSetDrift -> DetectStackSetDrift -> Bool
$c/= :: DetectStackSetDrift -> DetectStackSetDrift -> Bool
== :: DetectStackSetDrift -> DetectStackSetDrift -> Bool
$c== :: DetectStackSetDrift -> DetectStackSetDrift -> Bool
Prelude.Eq, ReadPrec [DetectStackSetDrift]
ReadPrec DetectStackSetDrift
Int -> ReadS DetectStackSetDrift
ReadS [DetectStackSetDrift]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetectStackSetDrift]
$creadListPrec :: ReadPrec [DetectStackSetDrift]
readPrec :: ReadPrec DetectStackSetDrift
$creadPrec :: ReadPrec DetectStackSetDrift
readList :: ReadS [DetectStackSetDrift]
$creadList :: ReadS [DetectStackSetDrift]
readsPrec :: Int -> ReadS DetectStackSetDrift
$creadsPrec :: Int -> ReadS DetectStackSetDrift
Prelude.Read, Int -> DetectStackSetDrift -> ShowS
[DetectStackSetDrift] -> ShowS
DetectStackSetDrift -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetectStackSetDrift] -> ShowS
$cshowList :: [DetectStackSetDrift] -> ShowS
show :: DetectStackSetDrift -> String
$cshow :: DetectStackSetDrift -> String
showsPrec :: Int -> DetectStackSetDrift -> ShowS
$cshowsPrec :: Int -> DetectStackSetDrift -> ShowS
Prelude.Show, forall x. Rep DetectStackSetDrift x -> DetectStackSetDrift
forall x. DetectStackSetDrift -> Rep DetectStackSetDrift x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DetectStackSetDrift x -> DetectStackSetDrift
$cfrom :: forall x. DetectStackSetDrift -> Rep DetectStackSetDrift x
Prelude.Generic)
newDetectStackSetDrift ::
Prelude.Text ->
DetectStackSetDrift
newDetectStackSetDrift :: Text -> DetectStackSetDrift
newDetectStackSetDrift Text
pStackSetName_ =
DetectStackSetDrift'
{ $sel:callAs:DetectStackSetDrift' :: Maybe CallAs
callAs = forall a. Maybe a
Prelude.Nothing,
$sel:operationId:DetectStackSetDrift' :: Maybe Text
operationId = forall a. Maybe a
Prelude.Nothing,
$sel:operationPreferences:DetectStackSetDrift' :: Maybe StackSetOperationPreferences
operationPreferences = forall a. Maybe a
Prelude.Nothing,
$sel:stackSetName:DetectStackSetDrift' :: Text
stackSetName = Text
pStackSetName_
}
detectStackSetDrift_callAs :: Lens.Lens' DetectStackSetDrift (Prelude.Maybe CallAs)
detectStackSetDrift_callAs :: Lens' DetectStackSetDrift (Maybe CallAs)
detectStackSetDrift_callAs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackSetDrift' {Maybe CallAs
callAs :: Maybe CallAs
$sel:callAs:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe CallAs
callAs} -> Maybe CallAs
callAs) (\s :: DetectStackSetDrift
s@DetectStackSetDrift' {} Maybe CallAs
a -> DetectStackSetDrift
s {$sel:callAs:DetectStackSetDrift' :: Maybe CallAs
callAs = Maybe CallAs
a} :: DetectStackSetDrift)
detectStackSetDrift_operationId :: Lens.Lens' DetectStackSetDrift (Prelude.Maybe Prelude.Text)
detectStackSetDrift_operationId :: Lens' DetectStackSetDrift (Maybe Text)
detectStackSetDrift_operationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackSetDrift' {Maybe Text
operationId :: Maybe Text
$sel:operationId:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe Text
operationId} -> Maybe Text
operationId) (\s :: DetectStackSetDrift
s@DetectStackSetDrift' {} Maybe Text
a -> DetectStackSetDrift
s {$sel:operationId:DetectStackSetDrift' :: Maybe Text
operationId = Maybe Text
a} :: DetectStackSetDrift)
detectStackSetDrift_operationPreferences :: Lens.Lens' DetectStackSetDrift (Prelude.Maybe StackSetOperationPreferences)
detectStackSetDrift_operationPreferences :: Lens' DetectStackSetDrift (Maybe StackSetOperationPreferences)
detectStackSetDrift_operationPreferences = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackSetDrift' {Maybe StackSetOperationPreferences
operationPreferences :: Maybe StackSetOperationPreferences
$sel:operationPreferences:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe StackSetOperationPreferences
operationPreferences} -> Maybe StackSetOperationPreferences
operationPreferences) (\s :: DetectStackSetDrift
s@DetectStackSetDrift' {} Maybe StackSetOperationPreferences
a -> DetectStackSetDrift
s {$sel:operationPreferences:DetectStackSetDrift' :: Maybe StackSetOperationPreferences
operationPreferences = Maybe StackSetOperationPreferences
a} :: DetectStackSetDrift)
detectStackSetDrift_stackSetName :: Lens.Lens' DetectStackSetDrift Prelude.Text
detectStackSetDrift_stackSetName :: Lens' DetectStackSetDrift Text
detectStackSetDrift_stackSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackSetDrift' {Text
stackSetName :: Text
$sel:stackSetName:DetectStackSetDrift' :: DetectStackSetDrift -> Text
stackSetName} -> Text
stackSetName) (\s :: DetectStackSetDrift
s@DetectStackSetDrift' {} Text
a -> DetectStackSetDrift
s {$sel:stackSetName:DetectStackSetDrift' :: Text
stackSetName = Text
a} :: DetectStackSetDrift)
instance Core.AWSRequest DetectStackSetDrift where
type
AWSResponse DetectStackSetDrift =
DetectStackSetDriftResponse
request :: (Service -> Service)
-> DetectStackSetDrift -> Request DetectStackSetDrift
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 DetectStackSetDrift
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DetectStackSetDrift)))
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
"DetectStackSetDriftResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text -> Int -> DetectStackSetDriftResponse
DetectStackSetDriftResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"OperationId")
forall (f :: * -> *) a b. Applicative f => 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 DetectStackSetDrift where
hashWithSalt :: Int -> DetectStackSetDrift -> Int
hashWithSalt Int
_salt DetectStackSetDrift' {Maybe Text
Maybe CallAs
Maybe StackSetOperationPreferences
Text
stackSetName :: Text
operationPreferences :: Maybe StackSetOperationPreferences
operationId :: Maybe Text
callAs :: Maybe CallAs
$sel:stackSetName:DetectStackSetDrift' :: DetectStackSetDrift -> Text
$sel:operationPreferences:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe StackSetOperationPreferences
$sel:operationId:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe Text
$sel:callAs:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe CallAs
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CallAs
callAs
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
operationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StackSetOperationPreferences
operationPreferences
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stackSetName
instance Prelude.NFData DetectStackSetDrift where
rnf :: DetectStackSetDrift -> ()
rnf DetectStackSetDrift' {Maybe Text
Maybe CallAs
Maybe StackSetOperationPreferences
Text
stackSetName :: Text
operationPreferences :: Maybe StackSetOperationPreferences
operationId :: Maybe Text
callAs :: Maybe CallAs
$sel:stackSetName:DetectStackSetDrift' :: DetectStackSetDrift -> Text
$sel:operationPreferences:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe StackSetOperationPreferences
$sel:operationId:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe Text
$sel:callAs:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe CallAs
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe CallAs
callAs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
operationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StackSetOperationPreferences
operationPreferences
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
stackSetName
instance Data.ToHeaders DetectStackSetDrift where
toHeaders :: DetectStackSetDrift -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DetectStackSetDrift where
toPath :: DetectStackSetDrift -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DetectStackSetDrift where
toQuery :: DetectStackSetDrift -> QueryString
toQuery DetectStackSetDrift' {Maybe Text
Maybe CallAs
Maybe StackSetOperationPreferences
Text
stackSetName :: Text
operationPreferences :: Maybe StackSetOperationPreferences
operationId :: Maybe Text
callAs :: Maybe CallAs
$sel:stackSetName:DetectStackSetDrift' :: DetectStackSetDrift -> Text
$sel:operationPreferences:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe StackSetOperationPreferences
$sel:operationId:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe Text
$sel:callAs:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe CallAs
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DetectStackSetDrift" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
ByteString
"CallAs" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe CallAs
callAs,
ByteString
"OperationId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
operationId,
ByteString
"OperationPreferences" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe StackSetOperationPreferences
operationPreferences,
ByteString
"StackSetName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
stackSetName
]
data DetectStackSetDriftResponse = DetectStackSetDriftResponse'
{
DetectStackSetDriftResponse -> Maybe Text
operationId :: Prelude.Maybe Prelude.Text,
DetectStackSetDriftResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DetectStackSetDriftResponse -> DetectStackSetDriftResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetectStackSetDriftResponse -> DetectStackSetDriftResponse -> Bool
$c/= :: DetectStackSetDriftResponse -> DetectStackSetDriftResponse -> Bool
== :: DetectStackSetDriftResponse -> DetectStackSetDriftResponse -> Bool
$c== :: DetectStackSetDriftResponse -> DetectStackSetDriftResponse -> Bool
Prelude.Eq, ReadPrec [DetectStackSetDriftResponse]
ReadPrec DetectStackSetDriftResponse
Int -> ReadS DetectStackSetDriftResponse
ReadS [DetectStackSetDriftResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetectStackSetDriftResponse]
$creadListPrec :: ReadPrec [DetectStackSetDriftResponse]
readPrec :: ReadPrec DetectStackSetDriftResponse
$creadPrec :: ReadPrec DetectStackSetDriftResponse
readList :: ReadS [DetectStackSetDriftResponse]
$creadList :: ReadS [DetectStackSetDriftResponse]
readsPrec :: Int -> ReadS DetectStackSetDriftResponse
$creadsPrec :: Int -> ReadS DetectStackSetDriftResponse
Prelude.Read, Int -> DetectStackSetDriftResponse -> ShowS
[DetectStackSetDriftResponse] -> ShowS
DetectStackSetDriftResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetectStackSetDriftResponse] -> ShowS
$cshowList :: [DetectStackSetDriftResponse] -> ShowS
show :: DetectStackSetDriftResponse -> String
$cshow :: DetectStackSetDriftResponse -> String
showsPrec :: Int -> DetectStackSetDriftResponse -> ShowS
$cshowsPrec :: Int -> DetectStackSetDriftResponse -> ShowS
Prelude.Show, forall x.
Rep DetectStackSetDriftResponse x -> DetectStackSetDriftResponse
forall x.
DetectStackSetDriftResponse -> Rep DetectStackSetDriftResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DetectStackSetDriftResponse x -> DetectStackSetDriftResponse
$cfrom :: forall x.
DetectStackSetDriftResponse -> Rep DetectStackSetDriftResponse x
Prelude.Generic)
newDetectStackSetDriftResponse ::
Prelude.Int ->
DetectStackSetDriftResponse
newDetectStackSetDriftResponse :: Int -> DetectStackSetDriftResponse
newDetectStackSetDriftResponse Int
pHttpStatus_ =
DetectStackSetDriftResponse'
{ $sel:operationId:DetectStackSetDriftResponse' :: Maybe Text
operationId =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DetectStackSetDriftResponse' :: Int
httpStatus = Int
pHttpStatus_
}
detectStackSetDriftResponse_operationId :: Lens.Lens' DetectStackSetDriftResponse (Prelude.Maybe Prelude.Text)
detectStackSetDriftResponse_operationId :: Lens' DetectStackSetDriftResponse (Maybe Text)
detectStackSetDriftResponse_operationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackSetDriftResponse' {Maybe Text
operationId :: Maybe Text
$sel:operationId:DetectStackSetDriftResponse' :: DetectStackSetDriftResponse -> Maybe Text
operationId} -> Maybe Text
operationId) (\s :: DetectStackSetDriftResponse
s@DetectStackSetDriftResponse' {} Maybe Text
a -> DetectStackSetDriftResponse
s {$sel:operationId:DetectStackSetDriftResponse' :: Maybe Text
operationId = Maybe Text
a} :: DetectStackSetDriftResponse)
detectStackSetDriftResponse_httpStatus :: Lens.Lens' DetectStackSetDriftResponse Prelude.Int
detectStackSetDriftResponse_httpStatus :: Lens' DetectStackSetDriftResponse Int
detectStackSetDriftResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackSetDriftResponse' {Int
httpStatus :: Int
$sel:httpStatus:DetectStackSetDriftResponse' :: DetectStackSetDriftResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DetectStackSetDriftResponse
s@DetectStackSetDriftResponse' {} Int
a -> DetectStackSetDriftResponse
s {$sel:httpStatus:DetectStackSetDriftResponse' :: Int
httpStatus = Int
a} :: DetectStackSetDriftResponse)
instance Prelude.NFData DetectStackSetDriftResponse where
rnf :: DetectStackSetDriftResponse -> ()
rnf DetectStackSetDriftResponse' {Int
Maybe Text
httpStatus :: Int
operationId :: Maybe Text
$sel:httpStatus:DetectStackSetDriftResponse' :: DetectStackSetDriftResponse -> Int
$sel:operationId:DetectStackSetDriftResponse' :: DetectStackSetDriftResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
operationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus