module Network.AWS.Route53.ListChangeBatchesByRRSet
(
listChangeBatchesByRRSet
, ListChangeBatchesByRRSet
, lcbbrrsSetIdentifier
, lcbbrrsMarker
, lcbbrrsMaxItems
, lcbbrrsHostedZoneId
, lcbbrrsName
, lcbbrrsType
, lcbbrrsStartDate
, lcbbrrsEndDate
, listChangeBatchesByRRSetResponse
, ListChangeBatchesByRRSetResponse
, lcbbrrsrsNextMarker
, lcbbrrsrsIsTruncated
, lcbbrrsrsResponseStatus
, lcbbrrsrsMaxItems
, lcbbrrsrsMarker
, lcbbrrsrsChangeBatchRecords
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Route53.Types
import Network.AWS.Route53.Types.Product
data ListChangeBatchesByRRSet = ListChangeBatchesByRRSet'
{ _lcbbrrsSetIdentifier :: !(Maybe Text)
, _lcbbrrsMarker :: !(Maybe Text)
, _lcbbrrsMaxItems :: !(Maybe Text)
, _lcbbrrsHostedZoneId :: !Text
, _lcbbrrsName :: !Text
, _lcbbrrsType :: !RecordType
, _lcbbrrsStartDate :: !Text
, _lcbbrrsEndDate :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
listChangeBatchesByRRSet
:: Text
-> Text
-> RecordType
-> Text
-> Text
-> ListChangeBatchesByRRSet
listChangeBatchesByRRSet pHostedZoneId_ pName_ pType_ pStartDate_ pEndDate_ =
ListChangeBatchesByRRSet'
{ _lcbbrrsSetIdentifier = Nothing
, _lcbbrrsMarker = Nothing
, _lcbbrrsMaxItems = Nothing
, _lcbbrrsHostedZoneId = pHostedZoneId_
, _lcbbrrsName = pName_
, _lcbbrrsType = pType_
, _lcbbrrsStartDate = pStartDate_
, _lcbbrrsEndDate = pEndDate_
}
lcbbrrsSetIdentifier :: Lens' ListChangeBatchesByRRSet (Maybe Text)
lcbbrrsSetIdentifier = lens _lcbbrrsSetIdentifier (\ s a -> s{_lcbbrrsSetIdentifier = a});
lcbbrrsMarker :: Lens' ListChangeBatchesByRRSet (Maybe Text)
lcbbrrsMarker = lens _lcbbrrsMarker (\ s a -> s{_lcbbrrsMarker = a});
lcbbrrsMaxItems :: Lens' ListChangeBatchesByRRSet (Maybe Text)
lcbbrrsMaxItems = lens _lcbbrrsMaxItems (\ s a -> s{_lcbbrrsMaxItems = a});
lcbbrrsHostedZoneId :: Lens' ListChangeBatchesByRRSet Text
lcbbrrsHostedZoneId = lens _lcbbrrsHostedZoneId (\ s a -> s{_lcbbrrsHostedZoneId = a});
lcbbrrsName :: Lens' ListChangeBatchesByRRSet Text
lcbbrrsName = lens _lcbbrrsName (\ s a -> s{_lcbbrrsName = a});
lcbbrrsType :: Lens' ListChangeBatchesByRRSet RecordType
lcbbrrsType = lens _lcbbrrsType (\ s a -> s{_lcbbrrsType = a});
lcbbrrsStartDate :: Lens' ListChangeBatchesByRRSet Text
lcbbrrsStartDate = lens _lcbbrrsStartDate (\ s a -> s{_lcbbrrsStartDate = a});
lcbbrrsEndDate :: Lens' ListChangeBatchesByRRSet Text
lcbbrrsEndDate = lens _lcbbrrsEndDate (\ s a -> s{_lcbbrrsEndDate = a});
instance AWSRequest ListChangeBatchesByRRSet where
type Rs ListChangeBatchesByRRSet =
ListChangeBatchesByRRSetResponse
request = get route53
response
= receiveXML
(\ s h x ->
ListChangeBatchesByRRSetResponse' <$>
(x .@? "NextMarker") <*> (x .@? "IsTruncated") <*>
(pure (fromEnum s))
<*> (x .@ "MaxItems")
<*> (x .@ "Marker")
<*>
(x .@? "ChangeBatchRecords" .!@ mempty >>=
parseXMLList1 "ChangeBatchRecord"))
instance ToHeaders ListChangeBatchesByRRSet where
toHeaders = const mempty
instance ToPath ListChangeBatchesByRRSet where
toPath ListChangeBatchesByRRSet'{..}
= mconcat
["/2013-04-01/hostedzone/",
toBS _lcbbrrsHostedZoneId, "/rrsChanges"]
instance ToQuery ListChangeBatchesByRRSet where
toQuery ListChangeBatchesByRRSet'{..}
= mconcat
["identifier" =: _lcbbrrsSetIdentifier,
"marker" =: _lcbbrrsMarker,
"maxItems" =: _lcbbrrsMaxItems,
"rrSet_name" =: _lcbbrrsName, "type" =: _lcbbrrsType,
"startDate" =: _lcbbrrsStartDate,
"endDate" =: _lcbbrrsEndDate]
data ListChangeBatchesByRRSetResponse = ListChangeBatchesByRRSetResponse'
{ _lcbbrrsrsNextMarker :: !(Maybe Text)
, _lcbbrrsrsIsTruncated :: !(Maybe Bool)
, _lcbbrrsrsResponseStatus :: !Int
, _lcbbrrsrsMaxItems :: !Text
, _lcbbrrsrsMarker :: !Text
, _lcbbrrsrsChangeBatchRecords :: !(List1 ChangeBatchRecord)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
listChangeBatchesByRRSetResponse
:: Int
-> Text
-> Text
-> NonEmpty ChangeBatchRecord
-> ListChangeBatchesByRRSetResponse
listChangeBatchesByRRSetResponse pResponseStatus_ pMaxItems_ pMarker_ pChangeBatchRecords_ =
ListChangeBatchesByRRSetResponse'
{ _lcbbrrsrsNextMarker = Nothing
, _lcbbrrsrsIsTruncated = Nothing
, _lcbbrrsrsResponseStatus = pResponseStatus_
, _lcbbrrsrsMaxItems = pMaxItems_
, _lcbbrrsrsMarker = pMarker_
, _lcbbrrsrsChangeBatchRecords = _List1 # pChangeBatchRecords_
}
lcbbrrsrsNextMarker :: Lens' ListChangeBatchesByRRSetResponse (Maybe Text)
lcbbrrsrsNextMarker = lens _lcbbrrsrsNextMarker (\ s a -> s{_lcbbrrsrsNextMarker = a});
lcbbrrsrsIsTruncated :: Lens' ListChangeBatchesByRRSetResponse (Maybe Bool)
lcbbrrsrsIsTruncated = lens _lcbbrrsrsIsTruncated (\ s a -> s{_lcbbrrsrsIsTruncated = a});
lcbbrrsrsResponseStatus :: Lens' ListChangeBatchesByRRSetResponse Int
lcbbrrsrsResponseStatus = lens _lcbbrrsrsResponseStatus (\ s a -> s{_lcbbrrsrsResponseStatus = a});
lcbbrrsrsMaxItems :: Lens' ListChangeBatchesByRRSetResponse Text
lcbbrrsrsMaxItems = lens _lcbbrrsrsMaxItems (\ s a -> s{_lcbbrrsrsMaxItems = a});
lcbbrrsrsMarker :: Lens' ListChangeBatchesByRRSetResponse Text
lcbbrrsrsMarker = lens _lcbbrrsrsMarker (\ s a -> s{_lcbbrrsrsMarker = a});
lcbbrrsrsChangeBatchRecords :: Lens' ListChangeBatchesByRRSetResponse (NonEmpty ChangeBatchRecord)
lcbbrrsrsChangeBatchRecords = lens _lcbbrrsrsChangeBatchRecords (\ s a -> s{_lcbbrrsrsChangeBatchRecords = a}) . _List1;