{-# 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.MQ.RebootBroker
(
rebootBroker
, RebootBroker
, rbBrokerId
, rebootBrokerResponse
, RebootBrokerResponse
, rbrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.MQ.Types
import Network.AWS.MQ.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype RebootBroker = RebootBroker'
{ _rbBrokerId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
rebootBroker
:: Text
-> RebootBroker
rebootBroker pBrokerId_ = RebootBroker' {_rbBrokerId = pBrokerId_}
rbBrokerId :: Lens' RebootBroker Text
rbBrokerId = lens _rbBrokerId (\ s a -> s{_rbBrokerId = a})
instance AWSRequest RebootBroker where
type Rs RebootBroker = RebootBrokerResponse
request = postJSON mq
response
= receiveEmpty
(\ s h x ->
RebootBrokerResponse' <$> (pure (fromEnum s)))
instance Hashable RebootBroker where
instance NFData RebootBroker where
instance ToHeaders RebootBroker where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON RebootBroker where
toJSON = const (Object mempty)
instance ToPath RebootBroker where
toPath RebootBroker'{..}
= mconcat
["/v1/brokers/", toBS _rbBrokerId, "/reboot"]
instance ToQuery RebootBroker where
toQuery = const mempty
newtype RebootBrokerResponse = RebootBrokerResponse'
{ _rbrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
rebootBrokerResponse
:: Int
-> RebootBrokerResponse
rebootBrokerResponse pResponseStatus_ =
RebootBrokerResponse' {_rbrsResponseStatus = pResponseStatus_}
rbrsResponseStatus :: Lens' RebootBrokerResponse Int
rbrsResponseStatus = lens _rbrsResponseStatus (\ s a -> s{_rbrsResponseStatus = a})
instance NFData RebootBrokerResponse where