{-# 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.Route53.GetHostedZoneCount
(
getHostedZoneCount
, GetHostedZoneCount
, getHostedZoneCountResponse
, GetHostedZoneCountResponse
, ghzcrsResponseStatus
, ghzcrsHostedZoneCount
) 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 GetHostedZoneCount =
GetHostedZoneCount'
deriving (Eq,Read,Show,Data,Typeable,Generic)
getHostedZoneCount
:: GetHostedZoneCount
getHostedZoneCount = GetHostedZoneCount'
instance AWSRequest GetHostedZoneCount where
type Rs GetHostedZoneCount =
GetHostedZoneCountResponse
request = get route53
response
= receiveXML
(\ s h x ->
GetHostedZoneCountResponse' <$>
(pure (fromEnum s)) <*> (x .@ "HostedZoneCount"))
instance Hashable GetHostedZoneCount
instance NFData GetHostedZoneCount
instance ToHeaders GetHostedZoneCount where
toHeaders = const mempty
instance ToPath GetHostedZoneCount where
toPath = const "/2013-04-01/hostedzonecount"
instance ToQuery GetHostedZoneCount where
toQuery = const mempty
data GetHostedZoneCountResponse = GetHostedZoneCountResponse'
{ _ghzcrsResponseStatus :: !Int
, _ghzcrsHostedZoneCount :: !Integer
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getHostedZoneCountResponse
:: Int
-> Integer
-> GetHostedZoneCountResponse
getHostedZoneCountResponse pResponseStatus_ pHostedZoneCount_ =
GetHostedZoneCountResponse'
{ _ghzcrsResponseStatus = pResponseStatus_
, _ghzcrsHostedZoneCount = pHostedZoneCount_
}
ghzcrsResponseStatus :: Lens' GetHostedZoneCountResponse Int
ghzcrsResponseStatus = lens _ghzcrsResponseStatus (\ s a -> s{_ghzcrsResponseStatus = a});
ghzcrsHostedZoneCount :: Lens' GetHostedZoneCountResponse Integer
ghzcrsHostedZoneCount = lens _ghzcrsHostedZoneCount (\ s a -> s{_ghzcrsHostedZoneCount = a});
instance NFData GetHostedZoneCountResponse