{-# 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.DeleteRetentionConfiguration
(
DeleteRetentionConfiguration (..),
newDeleteRetentionConfiguration,
deleteRetentionConfiguration_retentionConfigurationName,
DeleteRetentionConfigurationResponse (..),
newDeleteRetentionConfigurationResponse,
)
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 DeleteRetentionConfiguration = DeleteRetentionConfiguration'
{
DeleteRetentionConfiguration -> Text
retentionConfigurationName :: Prelude.Text
}
deriving (DeleteRetentionConfiguration
-> DeleteRetentionConfiguration -> Bool
(DeleteRetentionConfiguration
-> DeleteRetentionConfiguration -> Bool)
-> (DeleteRetentionConfiguration
-> DeleteRetentionConfiguration -> Bool)
-> Eq DeleteRetentionConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRetentionConfiguration
-> DeleteRetentionConfiguration -> Bool
$c/= :: DeleteRetentionConfiguration
-> DeleteRetentionConfiguration -> Bool
== :: DeleteRetentionConfiguration
-> DeleteRetentionConfiguration -> Bool
$c== :: DeleteRetentionConfiguration
-> DeleteRetentionConfiguration -> Bool
Prelude.Eq, ReadPrec [DeleteRetentionConfiguration]
ReadPrec DeleteRetentionConfiguration
Int -> ReadS DeleteRetentionConfiguration
ReadS [DeleteRetentionConfiguration]
(Int -> ReadS DeleteRetentionConfiguration)
-> ReadS [DeleteRetentionConfiguration]
-> ReadPrec DeleteRetentionConfiguration
-> ReadPrec [DeleteRetentionConfiguration]
-> Read DeleteRetentionConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRetentionConfiguration]
$creadListPrec :: ReadPrec [DeleteRetentionConfiguration]
readPrec :: ReadPrec DeleteRetentionConfiguration
$creadPrec :: ReadPrec DeleteRetentionConfiguration
readList :: ReadS [DeleteRetentionConfiguration]
$creadList :: ReadS [DeleteRetentionConfiguration]
readsPrec :: Int -> ReadS DeleteRetentionConfiguration
$creadsPrec :: Int -> ReadS DeleteRetentionConfiguration
Prelude.Read, Int -> DeleteRetentionConfiguration -> ShowS
[DeleteRetentionConfiguration] -> ShowS
DeleteRetentionConfiguration -> String
(Int -> DeleteRetentionConfiguration -> ShowS)
-> (DeleteRetentionConfiguration -> String)
-> ([DeleteRetentionConfiguration] -> ShowS)
-> Show DeleteRetentionConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRetentionConfiguration] -> ShowS
$cshowList :: [DeleteRetentionConfiguration] -> ShowS
show :: DeleteRetentionConfiguration -> String
$cshow :: DeleteRetentionConfiguration -> String
showsPrec :: Int -> DeleteRetentionConfiguration -> ShowS
$cshowsPrec :: Int -> DeleteRetentionConfiguration -> ShowS
Prelude.Show, (forall x.
DeleteRetentionConfiguration -> Rep DeleteRetentionConfiguration x)
-> (forall x.
Rep DeleteRetentionConfiguration x -> DeleteRetentionConfiguration)
-> Generic DeleteRetentionConfiguration
forall x.
Rep DeleteRetentionConfiguration x -> DeleteRetentionConfiguration
forall x.
DeleteRetentionConfiguration -> Rep DeleteRetentionConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteRetentionConfiguration x -> DeleteRetentionConfiguration
$cfrom :: forall x.
DeleteRetentionConfiguration -> Rep DeleteRetentionConfiguration x
Prelude.Generic)
newDeleteRetentionConfiguration ::
Prelude.Text ->
DeleteRetentionConfiguration
newDeleteRetentionConfiguration :: Text -> DeleteRetentionConfiguration
newDeleteRetentionConfiguration
Text
pRetentionConfigurationName_ =
DeleteRetentionConfiguration' :: Text -> DeleteRetentionConfiguration
DeleteRetentionConfiguration'
{ $sel:retentionConfigurationName:DeleteRetentionConfiguration' :: Text
retentionConfigurationName =
Text
pRetentionConfigurationName_
}
deleteRetentionConfiguration_retentionConfigurationName :: Lens.Lens' DeleteRetentionConfiguration Prelude.Text
deleteRetentionConfiguration_retentionConfigurationName :: (Text -> f Text)
-> DeleteRetentionConfiguration -> f DeleteRetentionConfiguration
deleteRetentionConfiguration_retentionConfigurationName = (DeleteRetentionConfiguration -> Text)
-> (DeleteRetentionConfiguration
-> Text -> DeleteRetentionConfiguration)
-> Lens
DeleteRetentionConfiguration DeleteRetentionConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRetentionConfiguration' {Text
retentionConfigurationName :: Text
$sel:retentionConfigurationName:DeleteRetentionConfiguration' :: DeleteRetentionConfiguration -> Text
retentionConfigurationName} -> Text
retentionConfigurationName) (\s :: DeleteRetentionConfiguration
s@DeleteRetentionConfiguration' {} Text
a -> DeleteRetentionConfiguration
s {$sel:retentionConfigurationName:DeleteRetentionConfiguration' :: Text
retentionConfigurationName = Text
a} :: DeleteRetentionConfiguration)
instance Core.AWSRequest DeleteRetentionConfiguration where
type
AWSResponse DeleteRetentionConfiguration =
DeleteRetentionConfigurationResponse
request :: DeleteRetentionConfiguration
-> Request DeleteRetentionConfiguration
request = Service
-> DeleteRetentionConfiguration
-> Request DeleteRetentionConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteRetentionConfiguration
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteRetentionConfiguration)))
response =
AWSResponse DeleteRetentionConfiguration
-> Logger
-> Service
-> Proxy DeleteRetentionConfiguration
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteRetentionConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteRetentionConfiguration
DeleteRetentionConfigurationResponse
DeleteRetentionConfigurationResponse'
instance
Prelude.Hashable
DeleteRetentionConfiguration
instance Prelude.NFData DeleteRetentionConfiguration
instance Core.ToHeaders DeleteRetentionConfiguration where
toHeaders :: DeleteRetentionConfiguration -> [Header]
toHeaders =
[Header] -> DeleteRetentionConfiguration -> [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.DeleteRetentionConfiguration" ::
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 DeleteRetentionConfiguration where
toJSON :: DeleteRetentionConfiguration -> Value
toJSON DeleteRetentionConfiguration' {Text
retentionConfigurationName :: Text
$sel:retentionConfigurationName:DeleteRetentionConfiguration' :: DeleteRetentionConfiguration -> 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
"RetentionConfigurationName"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
retentionConfigurationName
)
]
)
instance Core.ToPath DeleteRetentionConfiguration where
toPath :: DeleteRetentionConfiguration -> ByteString
toPath = ByteString -> DeleteRetentionConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteRetentionConfiguration where
toQuery :: DeleteRetentionConfiguration -> QueryString
toQuery = QueryString -> DeleteRetentionConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteRetentionConfigurationResponse = DeleteRetentionConfigurationResponse'
{
}
deriving (DeleteRetentionConfigurationResponse
-> DeleteRetentionConfigurationResponse -> Bool
(DeleteRetentionConfigurationResponse
-> DeleteRetentionConfigurationResponse -> Bool)
-> (DeleteRetentionConfigurationResponse
-> DeleteRetentionConfigurationResponse -> Bool)
-> Eq DeleteRetentionConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRetentionConfigurationResponse
-> DeleteRetentionConfigurationResponse -> Bool
$c/= :: DeleteRetentionConfigurationResponse
-> DeleteRetentionConfigurationResponse -> Bool
== :: DeleteRetentionConfigurationResponse
-> DeleteRetentionConfigurationResponse -> Bool
$c== :: DeleteRetentionConfigurationResponse
-> DeleteRetentionConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [DeleteRetentionConfigurationResponse]
ReadPrec DeleteRetentionConfigurationResponse
Int -> ReadS DeleteRetentionConfigurationResponse
ReadS [DeleteRetentionConfigurationResponse]
(Int -> ReadS DeleteRetentionConfigurationResponse)
-> ReadS [DeleteRetentionConfigurationResponse]
-> ReadPrec DeleteRetentionConfigurationResponse
-> ReadPrec [DeleteRetentionConfigurationResponse]
-> Read DeleteRetentionConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRetentionConfigurationResponse]
$creadListPrec :: ReadPrec [DeleteRetentionConfigurationResponse]
readPrec :: ReadPrec DeleteRetentionConfigurationResponse
$creadPrec :: ReadPrec DeleteRetentionConfigurationResponse
readList :: ReadS [DeleteRetentionConfigurationResponse]
$creadList :: ReadS [DeleteRetentionConfigurationResponse]
readsPrec :: Int -> ReadS DeleteRetentionConfigurationResponse
$creadsPrec :: Int -> ReadS DeleteRetentionConfigurationResponse
Prelude.Read, Int -> DeleteRetentionConfigurationResponse -> ShowS
[DeleteRetentionConfigurationResponse] -> ShowS
DeleteRetentionConfigurationResponse -> String
(Int -> DeleteRetentionConfigurationResponse -> ShowS)
-> (DeleteRetentionConfigurationResponse -> String)
-> ([DeleteRetentionConfigurationResponse] -> ShowS)
-> Show DeleteRetentionConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRetentionConfigurationResponse] -> ShowS
$cshowList :: [DeleteRetentionConfigurationResponse] -> ShowS
show :: DeleteRetentionConfigurationResponse -> String
$cshow :: DeleteRetentionConfigurationResponse -> String
showsPrec :: Int -> DeleteRetentionConfigurationResponse -> ShowS
$cshowsPrec :: Int -> DeleteRetentionConfigurationResponse -> ShowS
Prelude.Show, (forall x.
DeleteRetentionConfigurationResponse
-> Rep DeleteRetentionConfigurationResponse x)
-> (forall x.
Rep DeleteRetentionConfigurationResponse x
-> DeleteRetentionConfigurationResponse)
-> Generic DeleteRetentionConfigurationResponse
forall x.
Rep DeleteRetentionConfigurationResponse x
-> DeleteRetentionConfigurationResponse
forall x.
DeleteRetentionConfigurationResponse
-> Rep DeleteRetentionConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteRetentionConfigurationResponse x
-> DeleteRetentionConfigurationResponse
$cfrom :: forall x.
DeleteRetentionConfigurationResponse
-> Rep DeleteRetentionConfigurationResponse x
Prelude.Generic)
newDeleteRetentionConfigurationResponse ::
DeleteRetentionConfigurationResponse
newDeleteRetentionConfigurationResponse :: DeleteRetentionConfigurationResponse
newDeleteRetentionConfigurationResponse =
DeleteRetentionConfigurationResponse
DeleteRetentionConfigurationResponse'
instance
Prelude.NFData
DeleteRetentionConfigurationResponse