{-# 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.GetQueryLoggingConfig
(
getQueryLoggingConfig
, GetQueryLoggingConfig
, gqlcId
, getQueryLoggingConfigResponse
, GetQueryLoggingConfigResponse
, gqlcrsResponseStatus
, gqlcrsQueryLoggingConfig
) 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
newtype GetQueryLoggingConfig = GetQueryLoggingConfig'
{ _gqlcId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getQueryLoggingConfig
:: Text
-> GetQueryLoggingConfig
getQueryLoggingConfig pId_ = GetQueryLoggingConfig' {_gqlcId = pId_}
gqlcId :: Lens' GetQueryLoggingConfig Text
gqlcId = lens _gqlcId (\ s a -> s{_gqlcId = a})
instance AWSRequest GetQueryLoggingConfig where
type Rs GetQueryLoggingConfig =
GetQueryLoggingConfigResponse
request = get route53
response
= receiveXML
(\ s h x ->
GetQueryLoggingConfigResponse' <$>
(pure (fromEnum s)) <*> (x .@ "QueryLoggingConfig"))
instance Hashable GetQueryLoggingConfig where
instance NFData GetQueryLoggingConfig where
instance ToHeaders GetQueryLoggingConfig where
toHeaders = const mempty
instance ToPath GetQueryLoggingConfig where
toPath GetQueryLoggingConfig'{..}
= mconcat
["/2013-04-01/queryloggingconfig/", toBS _gqlcId]
instance ToQuery GetQueryLoggingConfig where
toQuery = const mempty
data GetQueryLoggingConfigResponse = GetQueryLoggingConfigResponse'
{ _gqlcrsResponseStatus :: !Int
, _gqlcrsQueryLoggingConfig :: !QueryLoggingConfig
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getQueryLoggingConfigResponse
:: Int
-> QueryLoggingConfig
-> GetQueryLoggingConfigResponse
getQueryLoggingConfigResponse pResponseStatus_ pQueryLoggingConfig_ =
GetQueryLoggingConfigResponse'
{ _gqlcrsResponseStatus = pResponseStatus_
, _gqlcrsQueryLoggingConfig = pQueryLoggingConfig_
}
gqlcrsResponseStatus :: Lens' GetQueryLoggingConfigResponse Int
gqlcrsResponseStatus = lens _gqlcrsResponseStatus (\ s a -> s{_gqlcrsResponseStatus = a})
gqlcrsQueryLoggingConfig :: Lens' GetQueryLoggingConfigResponse QueryLoggingConfig
gqlcrsQueryLoggingConfig = lens _gqlcrsQueryLoggingConfig (\ s a -> s{_gqlcrsQueryLoggingConfig = a})
instance NFData GetQueryLoggingConfigResponse where