{-# 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.CloudSearch.UpdateScalingParameters
(
updateScalingParameters
, UpdateScalingParameters
, uspDomainName
, uspScalingParameters
, updateScalingParametersResponse
, UpdateScalingParametersResponse
, usprsResponseStatus
, usprsScalingParameters
) where
import Network.AWS.CloudSearch.Types
import Network.AWS.CloudSearch.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UpdateScalingParameters = UpdateScalingParameters'
{ _uspDomainName :: !Text
, _uspScalingParameters :: !ScalingParameters
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateScalingParameters
:: Text
-> ScalingParameters
-> UpdateScalingParameters
updateScalingParameters pDomainName_ pScalingParameters_ =
UpdateScalingParameters'
{_uspDomainName = pDomainName_, _uspScalingParameters = pScalingParameters_}
uspDomainName :: Lens' UpdateScalingParameters Text
uspDomainName = lens _uspDomainName (\ s a -> s{_uspDomainName = a})
uspScalingParameters :: Lens' UpdateScalingParameters ScalingParameters
uspScalingParameters = lens _uspScalingParameters (\ s a -> s{_uspScalingParameters = a})
instance AWSRequest UpdateScalingParameters where
type Rs UpdateScalingParameters =
UpdateScalingParametersResponse
request = postQuery cloudSearch
response
= receiveXMLWrapper "UpdateScalingParametersResult"
(\ s h x ->
UpdateScalingParametersResponse' <$>
(pure (fromEnum s)) <*> (x .@ "ScalingParameters"))
instance Hashable UpdateScalingParameters where
instance NFData UpdateScalingParameters where
instance ToHeaders UpdateScalingParameters where
toHeaders = const mempty
instance ToPath UpdateScalingParameters where
toPath = const "/"
instance ToQuery UpdateScalingParameters where
toQuery UpdateScalingParameters'{..}
= mconcat
["Action" =:
("UpdateScalingParameters" :: ByteString),
"Version" =: ("2013-01-01" :: ByteString),
"DomainName" =: _uspDomainName,
"ScalingParameters" =: _uspScalingParameters]
data UpdateScalingParametersResponse = UpdateScalingParametersResponse'
{ _usprsResponseStatus :: !Int
, _usprsScalingParameters :: !ScalingParametersStatus
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateScalingParametersResponse
:: Int
-> ScalingParametersStatus
-> UpdateScalingParametersResponse
updateScalingParametersResponse pResponseStatus_ pScalingParameters_ =
UpdateScalingParametersResponse'
{ _usprsResponseStatus = pResponseStatus_
, _usprsScalingParameters = pScalingParameters_
}
usprsResponseStatus :: Lens' UpdateScalingParametersResponse Int
usprsResponseStatus = lens _usprsResponseStatus (\ s a -> s{_usprsResponseStatus = a})
usprsScalingParameters :: Lens' UpdateScalingParametersResponse ScalingParametersStatus
usprsScalingParameters = lens _usprsScalingParameters (\ s a -> s{_usprsScalingParameters = a})
instance NFData UpdateScalingParametersResponse where