{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.IoT.EnableTopicRule
(
enableTopicRule
, EnableTopicRule
, etrRuleName
, enableTopicRuleResponse
, EnableTopicRuleResponse
) where
import Network.AWS.IoT.Types
import Network.AWS.IoT.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype EnableTopicRule = EnableTopicRule'
{ _etrRuleName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
enableTopicRule
:: Text
-> EnableTopicRule
enableTopicRule pRuleName_ = EnableTopicRule' {_etrRuleName = pRuleName_}
etrRuleName :: Lens' EnableTopicRule Text
etrRuleName = lens _etrRuleName (\ s a -> s{_etrRuleName = a})
instance AWSRequest EnableTopicRule where
type Rs EnableTopicRule = EnableTopicRuleResponse
request = postJSON ioT
response = receiveNull EnableTopicRuleResponse'
instance Hashable EnableTopicRule where
instance NFData EnableTopicRule where
instance ToHeaders EnableTopicRule where
toHeaders = const mempty
instance ToJSON EnableTopicRule where
toJSON = const (Object mempty)
instance ToPath EnableTopicRule where
toPath EnableTopicRule'{..}
= mconcat ["/rules/", toBS _etrRuleName, "/enable"]
instance ToQuery EnableTopicRule where
toQuery = const mempty
data EnableTopicRuleResponse =
EnableTopicRuleResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
enableTopicRuleResponse
:: EnableTopicRuleResponse
enableTopicRuleResponse = EnableTopicRuleResponse'
instance NFData EnableTopicRuleResponse where