{-# 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.IoT.GetLoggingOptions
(
getLoggingOptions
, GetLoggingOptions
, getLoggingOptionsResponse
, GetLoggingOptionsResponse
, glorsLogLevel
, glorsRoleARN
, glorsResponseStatus
) where
import Network.AWS.IoT.Types
import Network.AWS.IoT.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data GetLoggingOptions =
GetLoggingOptions'
deriving (Eq, Read, Show, Data, Typeable, Generic)
getLoggingOptions
:: GetLoggingOptions
getLoggingOptions = GetLoggingOptions'
instance AWSRequest GetLoggingOptions where
type Rs GetLoggingOptions = GetLoggingOptionsResponse
request = get ioT
response
= receiveJSON
(\ s h x ->
GetLoggingOptionsResponse' <$>
(x .?> "logLevel") <*> (x .?> "roleArn") <*>
(pure (fromEnum s)))
instance Hashable GetLoggingOptions where
instance NFData GetLoggingOptions where
instance ToHeaders GetLoggingOptions where
toHeaders = const mempty
instance ToPath GetLoggingOptions where
toPath = const "/loggingOptions"
instance ToQuery GetLoggingOptions where
toQuery = const mempty
data GetLoggingOptionsResponse = GetLoggingOptionsResponse'
{ _glorsLogLevel :: !(Maybe LogLevel)
, _glorsRoleARN :: !(Maybe Text)
, _glorsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getLoggingOptionsResponse
:: Int
-> GetLoggingOptionsResponse
getLoggingOptionsResponse pResponseStatus_ =
GetLoggingOptionsResponse'
{ _glorsLogLevel = Nothing
, _glorsRoleARN = Nothing
, _glorsResponseStatus = pResponseStatus_
}
glorsLogLevel :: Lens' GetLoggingOptionsResponse (Maybe LogLevel)
glorsLogLevel = lens _glorsLogLevel (\ s a -> s{_glorsLogLevel = a})
glorsRoleARN :: Lens' GetLoggingOptionsResponse (Maybe Text)
glorsRoleARN = lens _glorsRoleARN (\ s a -> s{_glorsRoleARN = a})
glorsResponseStatus :: Lens' GetLoggingOptionsResponse Int
glorsResponseStatus = lens _glorsResponseStatus (\ s a -> s{_glorsResponseStatus = a})
instance NFData GetLoggingOptionsResponse where