module Network.AWS.AutoScaling.DescribeAdjustmentTypes
(
describeAdjustmentTypes
, DescribeAdjustmentTypes
, describeAdjustmentTypesResponse
, DescribeAdjustmentTypesResponse
, datrsAdjustmentTypes
, datrsResponseStatus
) where
import Network.AWS.AutoScaling.Types
import Network.AWS.AutoScaling.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DescribeAdjustmentTypes =
DescribeAdjustmentTypes'
deriving (Eq, Read, Show, Data, Typeable, Generic)
describeAdjustmentTypes
:: DescribeAdjustmentTypes
describeAdjustmentTypes = DescribeAdjustmentTypes'
instance AWSRequest DescribeAdjustmentTypes where
type Rs DescribeAdjustmentTypes =
DescribeAdjustmentTypesResponse
request = postQuery autoScaling
response
= receiveXMLWrapper "DescribeAdjustmentTypesResult"
(\ s h x ->
DescribeAdjustmentTypesResponse' <$>
(x .@? "AdjustmentTypes" .!@ mempty >>=
may (parseXMLList "member"))
<*> (pure (fromEnum s)))
instance Hashable DescribeAdjustmentTypes where
instance NFData DescribeAdjustmentTypes where
instance ToHeaders DescribeAdjustmentTypes where
toHeaders = const mempty
instance ToPath DescribeAdjustmentTypes where
toPath = const "/"
instance ToQuery DescribeAdjustmentTypes where
toQuery
= const
(mconcat
["Action" =:
("DescribeAdjustmentTypes" :: ByteString),
"Version" =: ("2011-01-01" :: ByteString)])
data DescribeAdjustmentTypesResponse = DescribeAdjustmentTypesResponse'
{ _datrsAdjustmentTypes :: !(Maybe [AdjustmentType])
, _datrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeAdjustmentTypesResponse
:: Int
-> DescribeAdjustmentTypesResponse
describeAdjustmentTypesResponse pResponseStatus_ =
DescribeAdjustmentTypesResponse'
{_datrsAdjustmentTypes = Nothing, _datrsResponseStatus = pResponseStatus_}
datrsAdjustmentTypes :: Lens' DescribeAdjustmentTypesResponse [AdjustmentType]
datrsAdjustmentTypes = lens _datrsAdjustmentTypes (\ s a -> s{_datrsAdjustmentTypes = a}) . _Default . _Coerce;
datrsResponseStatus :: Lens' DescribeAdjustmentTypesResponse Int
datrsResponseStatus = lens _datrsResponseStatus (\ s a -> s{_datrsResponseStatus = a});
instance NFData DescribeAdjustmentTypesResponse where