{-# 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.Config.StopConfigurationRecorder
(
StopConfigurationRecorder (..),
newStopConfigurationRecorder,
stopConfigurationRecorder_configurationRecorderName,
StopConfigurationRecorderResponse (..),
newStopConfigurationRecorderResponse,
)
where
import Amazonka.Config.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 StopConfigurationRecorder = StopConfigurationRecorder'
{
StopConfigurationRecorder -> Text
configurationRecorderName :: Prelude.Text
}
deriving (StopConfigurationRecorder -> StopConfigurationRecorder -> Bool
(StopConfigurationRecorder -> StopConfigurationRecorder -> Bool)
-> (StopConfigurationRecorder -> StopConfigurationRecorder -> Bool)
-> Eq StopConfigurationRecorder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopConfigurationRecorder -> StopConfigurationRecorder -> Bool
$c/= :: StopConfigurationRecorder -> StopConfigurationRecorder -> Bool
== :: StopConfigurationRecorder -> StopConfigurationRecorder -> Bool
$c== :: StopConfigurationRecorder -> StopConfigurationRecorder -> Bool
Prelude.Eq, ReadPrec [StopConfigurationRecorder]
ReadPrec StopConfigurationRecorder
Int -> ReadS StopConfigurationRecorder
ReadS [StopConfigurationRecorder]
(Int -> ReadS StopConfigurationRecorder)
-> ReadS [StopConfigurationRecorder]
-> ReadPrec StopConfigurationRecorder
-> ReadPrec [StopConfigurationRecorder]
-> Read StopConfigurationRecorder
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopConfigurationRecorder]
$creadListPrec :: ReadPrec [StopConfigurationRecorder]
readPrec :: ReadPrec StopConfigurationRecorder
$creadPrec :: ReadPrec StopConfigurationRecorder
readList :: ReadS [StopConfigurationRecorder]
$creadList :: ReadS [StopConfigurationRecorder]
readsPrec :: Int -> ReadS StopConfigurationRecorder
$creadsPrec :: Int -> ReadS StopConfigurationRecorder
Prelude.Read, Int -> StopConfigurationRecorder -> ShowS
[StopConfigurationRecorder] -> ShowS
StopConfigurationRecorder -> String
(Int -> StopConfigurationRecorder -> ShowS)
-> (StopConfigurationRecorder -> String)
-> ([StopConfigurationRecorder] -> ShowS)
-> Show StopConfigurationRecorder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopConfigurationRecorder] -> ShowS
$cshowList :: [StopConfigurationRecorder] -> ShowS
show :: StopConfigurationRecorder -> String
$cshow :: StopConfigurationRecorder -> String
showsPrec :: Int -> StopConfigurationRecorder -> ShowS
$cshowsPrec :: Int -> StopConfigurationRecorder -> ShowS
Prelude.Show, (forall x.
StopConfigurationRecorder -> Rep StopConfigurationRecorder x)
-> (forall x.
Rep StopConfigurationRecorder x -> StopConfigurationRecorder)
-> Generic StopConfigurationRecorder
forall x.
Rep StopConfigurationRecorder x -> StopConfigurationRecorder
forall x.
StopConfigurationRecorder -> Rep StopConfigurationRecorder x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StopConfigurationRecorder x -> StopConfigurationRecorder
$cfrom :: forall x.
StopConfigurationRecorder -> Rep StopConfigurationRecorder x
Prelude.Generic)
newStopConfigurationRecorder ::
Prelude.Text ->
StopConfigurationRecorder
newStopConfigurationRecorder :: Text -> StopConfigurationRecorder
newStopConfigurationRecorder
Text
pConfigurationRecorderName_ =
StopConfigurationRecorder' :: Text -> StopConfigurationRecorder
StopConfigurationRecorder'
{ $sel:configurationRecorderName:StopConfigurationRecorder' :: Text
configurationRecorderName =
Text
pConfigurationRecorderName_
}
stopConfigurationRecorder_configurationRecorderName :: Lens.Lens' StopConfigurationRecorder Prelude.Text
stopConfigurationRecorder_configurationRecorderName :: (Text -> f Text)
-> StopConfigurationRecorder -> f StopConfigurationRecorder
stopConfigurationRecorder_configurationRecorderName = (StopConfigurationRecorder -> Text)
-> (StopConfigurationRecorder -> Text -> StopConfigurationRecorder)
-> Lens
StopConfigurationRecorder StopConfigurationRecorder Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopConfigurationRecorder' {Text
configurationRecorderName :: Text
$sel:configurationRecorderName:StopConfigurationRecorder' :: StopConfigurationRecorder -> Text
configurationRecorderName} -> Text
configurationRecorderName) (\s :: StopConfigurationRecorder
s@StopConfigurationRecorder' {} Text
a -> StopConfigurationRecorder
s {$sel:configurationRecorderName:StopConfigurationRecorder' :: Text
configurationRecorderName = Text
a} :: StopConfigurationRecorder)
instance Core.AWSRequest StopConfigurationRecorder where
type
AWSResponse StopConfigurationRecorder =
StopConfigurationRecorderResponse
request :: StopConfigurationRecorder -> Request StopConfigurationRecorder
request = Service
-> StopConfigurationRecorder -> Request StopConfigurationRecorder
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StopConfigurationRecorder
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StopConfigurationRecorder)))
response =
AWSResponse StopConfigurationRecorder
-> Logger
-> Service
-> Proxy StopConfigurationRecorder
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StopConfigurationRecorder)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse StopConfigurationRecorder
StopConfigurationRecorderResponse
StopConfigurationRecorderResponse'
instance Prelude.Hashable StopConfigurationRecorder
instance Prelude.NFData StopConfigurationRecorder
instance Core.ToHeaders StopConfigurationRecorder where
toHeaders :: StopConfigurationRecorder -> [Header]
toHeaders =
[Header] -> StopConfigurationRecorder -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"StarlingDoveService.StopConfigurationRecorder" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON StopConfigurationRecorder where
toJSON :: StopConfigurationRecorder -> Value
toJSON StopConfigurationRecorder' {Text
configurationRecorderName :: Text
$sel:configurationRecorderName:StopConfigurationRecorder' :: StopConfigurationRecorder -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"ConfigurationRecorderName"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
configurationRecorderName
)
]
)
instance Core.ToPath StopConfigurationRecorder where
toPath :: StopConfigurationRecorder -> ByteString
toPath = ByteString -> StopConfigurationRecorder -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StopConfigurationRecorder where
toQuery :: StopConfigurationRecorder -> QueryString
toQuery = QueryString -> StopConfigurationRecorder -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StopConfigurationRecorderResponse = StopConfigurationRecorderResponse'
{
}
deriving (StopConfigurationRecorderResponse
-> StopConfigurationRecorderResponse -> Bool
(StopConfigurationRecorderResponse
-> StopConfigurationRecorderResponse -> Bool)
-> (StopConfigurationRecorderResponse
-> StopConfigurationRecorderResponse -> Bool)
-> Eq StopConfigurationRecorderResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopConfigurationRecorderResponse
-> StopConfigurationRecorderResponse -> Bool
$c/= :: StopConfigurationRecorderResponse
-> StopConfigurationRecorderResponse -> Bool
== :: StopConfigurationRecorderResponse
-> StopConfigurationRecorderResponse -> Bool
$c== :: StopConfigurationRecorderResponse
-> StopConfigurationRecorderResponse -> Bool
Prelude.Eq, ReadPrec [StopConfigurationRecorderResponse]
ReadPrec StopConfigurationRecorderResponse
Int -> ReadS StopConfigurationRecorderResponse
ReadS [StopConfigurationRecorderResponse]
(Int -> ReadS StopConfigurationRecorderResponse)
-> ReadS [StopConfigurationRecorderResponse]
-> ReadPrec StopConfigurationRecorderResponse
-> ReadPrec [StopConfigurationRecorderResponse]
-> Read StopConfigurationRecorderResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopConfigurationRecorderResponse]
$creadListPrec :: ReadPrec [StopConfigurationRecorderResponse]
readPrec :: ReadPrec StopConfigurationRecorderResponse
$creadPrec :: ReadPrec StopConfigurationRecorderResponse
readList :: ReadS [StopConfigurationRecorderResponse]
$creadList :: ReadS [StopConfigurationRecorderResponse]
readsPrec :: Int -> ReadS StopConfigurationRecorderResponse
$creadsPrec :: Int -> ReadS StopConfigurationRecorderResponse
Prelude.Read, Int -> StopConfigurationRecorderResponse -> ShowS
[StopConfigurationRecorderResponse] -> ShowS
StopConfigurationRecorderResponse -> String
(Int -> StopConfigurationRecorderResponse -> ShowS)
-> (StopConfigurationRecorderResponse -> String)
-> ([StopConfigurationRecorderResponse] -> ShowS)
-> Show StopConfigurationRecorderResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopConfigurationRecorderResponse] -> ShowS
$cshowList :: [StopConfigurationRecorderResponse] -> ShowS
show :: StopConfigurationRecorderResponse -> String
$cshow :: StopConfigurationRecorderResponse -> String
showsPrec :: Int -> StopConfigurationRecorderResponse -> ShowS
$cshowsPrec :: Int -> StopConfigurationRecorderResponse -> ShowS
Prelude.Show, (forall x.
StopConfigurationRecorderResponse
-> Rep StopConfigurationRecorderResponse x)
-> (forall x.
Rep StopConfigurationRecorderResponse x
-> StopConfigurationRecorderResponse)
-> Generic StopConfigurationRecorderResponse
forall x.
Rep StopConfigurationRecorderResponse x
-> StopConfigurationRecorderResponse
forall x.
StopConfigurationRecorderResponse
-> Rep StopConfigurationRecorderResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StopConfigurationRecorderResponse x
-> StopConfigurationRecorderResponse
$cfrom :: forall x.
StopConfigurationRecorderResponse
-> Rep StopConfigurationRecorderResponse x
Prelude.Generic)
newStopConfigurationRecorderResponse ::
StopConfigurationRecorderResponse
newStopConfigurationRecorderResponse :: StopConfigurationRecorderResponse
newStopConfigurationRecorderResponse =
StopConfigurationRecorderResponse
StopConfigurationRecorderResponse'
instance
Prelude.NFData
StopConfigurationRecorderResponse