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