{-# 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.IoT.DeleteTopicRule
(
DeleteTopicRule (..),
newDeleteTopicRule,
deleteTopicRule_ruleName,
DeleteTopicRuleResponse (..),
newDeleteTopicRuleResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IoT.Types
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 DeleteTopicRule = DeleteTopicRule'
{
DeleteTopicRule -> Text
ruleName :: Prelude.Text
}
deriving (DeleteTopicRule -> DeleteTopicRule -> Bool
(DeleteTopicRule -> DeleteTopicRule -> Bool)
-> (DeleteTopicRule -> DeleteTopicRule -> Bool)
-> Eq DeleteTopicRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteTopicRule -> DeleteTopicRule -> Bool
$c/= :: DeleteTopicRule -> DeleteTopicRule -> Bool
== :: DeleteTopicRule -> DeleteTopicRule -> Bool
$c== :: DeleteTopicRule -> DeleteTopicRule -> Bool
Prelude.Eq, ReadPrec [DeleteTopicRule]
ReadPrec DeleteTopicRule
Int -> ReadS DeleteTopicRule
ReadS [DeleteTopicRule]
(Int -> ReadS DeleteTopicRule)
-> ReadS [DeleteTopicRule]
-> ReadPrec DeleteTopicRule
-> ReadPrec [DeleteTopicRule]
-> Read DeleteTopicRule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteTopicRule]
$creadListPrec :: ReadPrec [DeleteTopicRule]
readPrec :: ReadPrec DeleteTopicRule
$creadPrec :: ReadPrec DeleteTopicRule
readList :: ReadS [DeleteTopicRule]
$creadList :: ReadS [DeleteTopicRule]
readsPrec :: Int -> ReadS DeleteTopicRule
$creadsPrec :: Int -> ReadS DeleteTopicRule
Prelude.Read, Int -> DeleteTopicRule -> ShowS
[DeleteTopicRule] -> ShowS
DeleteTopicRule -> String
(Int -> DeleteTopicRule -> ShowS)
-> (DeleteTopicRule -> String)
-> ([DeleteTopicRule] -> ShowS)
-> Show DeleteTopicRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteTopicRule] -> ShowS
$cshowList :: [DeleteTopicRule] -> ShowS
show :: DeleteTopicRule -> String
$cshow :: DeleteTopicRule -> String
showsPrec :: Int -> DeleteTopicRule -> ShowS
$cshowsPrec :: Int -> DeleteTopicRule -> ShowS
Prelude.Show, (forall x. DeleteTopicRule -> Rep DeleteTopicRule x)
-> (forall x. Rep DeleteTopicRule x -> DeleteTopicRule)
-> Generic DeleteTopicRule
forall x. Rep DeleteTopicRule x -> DeleteTopicRule
forall x. DeleteTopicRule -> Rep DeleteTopicRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteTopicRule x -> DeleteTopicRule
$cfrom :: forall x. DeleteTopicRule -> Rep DeleteTopicRule x
Prelude.Generic)
newDeleteTopicRule ::
Prelude.Text ->
DeleteTopicRule
newDeleteTopicRule :: Text -> DeleteTopicRule
newDeleteTopicRule Text
pRuleName_ =
DeleteTopicRule' :: Text -> DeleteTopicRule
DeleteTopicRule' {$sel:ruleName:DeleteTopicRule' :: Text
ruleName = Text
pRuleName_}
deleteTopicRule_ruleName :: Lens.Lens' DeleteTopicRule Prelude.Text
deleteTopicRule_ruleName :: (Text -> f Text) -> DeleteTopicRule -> f DeleteTopicRule
deleteTopicRule_ruleName = (DeleteTopicRule -> Text)
-> (DeleteTopicRule -> Text -> DeleteTopicRule)
-> Lens DeleteTopicRule DeleteTopicRule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteTopicRule' {Text
ruleName :: Text
$sel:ruleName:DeleteTopicRule' :: DeleteTopicRule -> Text
ruleName} -> Text
ruleName) (\s :: DeleteTopicRule
s@DeleteTopicRule' {} Text
a -> DeleteTopicRule
s {$sel:ruleName:DeleteTopicRule' :: Text
ruleName = Text
a} :: DeleteTopicRule)
instance Core.AWSRequest DeleteTopicRule where
type
AWSResponse DeleteTopicRule =
DeleteTopicRuleResponse
request :: DeleteTopicRule -> Request DeleteTopicRule
request = Service -> DeleteTopicRule -> Request DeleteTopicRule
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteTopicRule
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteTopicRule)))
response =
AWSResponse DeleteTopicRule
-> Logger
-> Service
-> Proxy DeleteTopicRule
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteTopicRule)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteTopicRule
DeleteTopicRuleResponse
DeleteTopicRuleResponse'
instance Prelude.Hashable DeleteTopicRule
instance Prelude.NFData DeleteTopicRule
instance Core.ToHeaders DeleteTopicRule where
toHeaders :: DeleteTopicRule -> [Header]
toHeaders = [Header] -> DeleteTopicRule -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteTopicRule where
toPath :: DeleteTopicRule -> ByteString
toPath DeleteTopicRule' {Text
ruleName :: Text
$sel:ruleName:DeleteTopicRule' :: DeleteTopicRule -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/rules/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
ruleName]
instance Core.ToQuery DeleteTopicRule where
toQuery :: DeleteTopicRule -> QueryString
toQuery = QueryString -> DeleteTopicRule -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteTopicRuleResponse = DeleteTopicRuleResponse'
{
}
deriving (DeleteTopicRuleResponse -> DeleteTopicRuleResponse -> Bool
(DeleteTopicRuleResponse -> DeleteTopicRuleResponse -> Bool)
-> (DeleteTopicRuleResponse -> DeleteTopicRuleResponse -> Bool)
-> Eq DeleteTopicRuleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteTopicRuleResponse -> DeleteTopicRuleResponse -> Bool
$c/= :: DeleteTopicRuleResponse -> DeleteTopicRuleResponse -> Bool
== :: DeleteTopicRuleResponse -> DeleteTopicRuleResponse -> Bool
$c== :: DeleteTopicRuleResponse -> DeleteTopicRuleResponse -> Bool
Prelude.Eq, ReadPrec [DeleteTopicRuleResponse]
ReadPrec DeleteTopicRuleResponse
Int -> ReadS DeleteTopicRuleResponse
ReadS [DeleteTopicRuleResponse]
(Int -> ReadS DeleteTopicRuleResponse)
-> ReadS [DeleteTopicRuleResponse]
-> ReadPrec DeleteTopicRuleResponse
-> ReadPrec [DeleteTopicRuleResponse]
-> Read DeleteTopicRuleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteTopicRuleResponse]
$creadListPrec :: ReadPrec [DeleteTopicRuleResponse]
readPrec :: ReadPrec DeleteTopicRuleResponse
$creadPrec :: ReadPrec DeleteTopicRuleResponse
readList :: ReadS [DeleteTopicRuleResponse]
$creadList :: ReadS [DeleteTopicRuleResponse]
readsPrec :: Int -> ReadS DeleteTopicRuleResponse
$creadsPrec :: Int -> ReadS DeleteTopicRuleResponse
Prelude.Read, Int -> DeleteTopicRuleResponse -> ShowS
[DeleteTopicRuleResponse] -> ShowS
DeleteTopicRuleResponse -> String
(Int -> DeleteTopicRuleResponse -> ShowS)
-> (DeleteTopicRuleResponse -> String)
-> ([DeleteTopicRuleResponse] -> ShowS)
-> Show DeleteTopicRuleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteTopicRuleResponse] -> ShowS
$cshowList :: [DeleteTopicRuleResponse] -> ShowS
show :: DeleteTopicRuleResponse -> String
$cshow :: DeleteTopicRuleResponse -> String
showsPrec :: Int -> DeleteTopicRuleResponse -> ShowS
$cshowsPrec :: Int -> DeleteTopicRuleResponse -> ShowS
Prelude.Show, (forall x.
DeleteTopicRuleResponse -> Rep DeleteTopicRuleResponse x)
-> (forall x.
Rep DeleteTopicRuleResponse x -> DeleteTopicRuleResponse)
-> Generic DeleteTopicRuleResponse
forall x. Rep DeleteTopicRuleResponse x -> DeleteTopicRuleResponse
forall x. DeleteTopicRuleResponse -> Rep DeleteTopicRuleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteTopicRuleResponse x -> DeleteTopicRuleResponse
$cfrom :: forall x. DeleteTopicRuleResponse -> Rep DeleteTopicRuleResponse x
Prelude.Generic)
newDeleteTopicRuleResponse ::
DeleteTopicRuleResponse
newDeleteTopicRuleResponse :: DeleteTopicRuleResponse
newDeleteTopicRuleResponse = DeleteTopicRuleResponse
DeleteTopicRuleResponse'
instance Prelude.NFData DeleteTopicRuleResponse