module Network.AWS.AutoScaling.DescribeAdjustmentTypes
(
describeAdjustmentTypes
, DescribeAdjustmentTypes
, describeAdjustmentTypesResponse
, DescribeAdjustmentTypesResponse
, datrsAdjustmentTypes
, datrsStatus
) where
import Network.AWS.AutoScaling.Types
import Network.AWS.AutoScaling.Types.Product
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 Sv DescribeAdjustmentTypes = AutoScaling
type Rs DescribeAdjustmentTypes =
DescribeAdjustmentTypesResponse
request = postQuery
response
= receiveXMLWrapper "DescribeAdjustmentTypesResult"
(\ s h x ->
DescribeAdjustmentTypesResponse' <$>
(x .@? "AdjustmentTypes" .!@ mempty >>=
may (parseXMLList "member"))
<*> (pure (fromEnum s)))
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])
, _datrsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeAdjustmentTypesResponse
:: Int
-> DescribeAdjustmentTypesResponse
describeAdjustmentTypesResponse pStatus_ =
DescribeAdjustmentTypesResponse'
{ _datrsAdjustmentTypes = Nothing
, _datrsStatus = pStatus_
}
datrsAdjustmentTypes :: Lens' DescribeAdjustmentTypesResponse [AdjustmentType]
datrsAdjustmentTypes = lens _datrsAdjustmentTypes (\ s a -> s{_datrsAdjustmentTypes = a}) . _Default . _Coerce;
datrsStatus :: Lens' DescribeAdjustmentTypesResponse Int
datrsStatus = lens _datrsStatus (\ s a -> s{_datrsStatus = a});