{-# 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.DeviceFarm.StopRemoteAccessSession
(
stopRemoteAccessSession
, StopRemoteAccessSession
, srasArn
, stopRemoteAccessSessionResponse
, StopRemoteAccessSessionResponse
, srasrsRemoteAccessSession
, srasrsResponseStatus
) where
import Network.AWS.DeviceFarm.Types
import Network.AWS.DeviceFarm.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype StopRemoteAccessSession = StopRemoteAccessSession'
{ _srasArn :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
stopRemoteAccessSession
:: Text
-> StopRemoteAccessSession
stopRemoteAccessSession pArn_ =
StopRemoteAccessSession'
{ _srasArn = pArn_
}
srasArn :: Lens' StopRemoteAccessSession Text
srasArn = lens _srasArn (\ s a -> s{_srasArn = a});
instance AWSRequest StopRemoteAccessSession where
type Rs StopRemoteAccessSession =
StopRemoteAccessSessionResponse
request = postJSON deviceFarm
response
= receiveJSON
(\ s h x ->
StopRemoteAccessSessionResponse' <$>
(x .?> "remoteAccessSession") <*>
(pure (fromEnum s)))
instance Hashable StopRemoteAccessSession
instance NFData StopRemoteAccessSession
instance ToHeaders StopRemoteAccessSession where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("DeviceFarm_20150623.StopRemoteAccessSession" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON StopRemoteAccessSession where
toJSON StopRemoteAccessSession'{..}
= object (catMaybes [Just ("arn" .= _srasArn)])
instance ToPath StopRemoteAccessSession where
toPath = const "/"
instance ToQuery StopRemoteAccessSession where
toQuery = const mempty
data StopRemoteAccessSessionResponse = StopRemoteAccessSessionResponse'
{ _srasrsRemoteAccessSession :: !(Maybe RemoteAccessSession)
, _srasrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
stopRemoteAccessSessionResponse
:: Int
-> StopRemoteAccessSessionResponse
stopRemoteAccessSessionResponse pResponseStatus_ =
StopRemoteAccessSessionResponse'
{ _srasrsRemoteAccessSession = Nothing
, _srasrsResponseStatus = pResponseStatus_
}
srasrsRemoteAccessSession :: Lens' StopRemoteAccessSessionResponse (Maybe RemoteAccessSession)
srasrsRemoteAccessSession = lens _srasrsRemoteAccessSession (\ s a -> s{_srasrsRemoteAccessSession = a});
srasrsResponseStatus :: Lens' StopRemoteAccessSessionResponse Int
srasrsResponseStatus = lens _srasrsResponseStatus (\ s a -> s{_srasrsResponseStatus = a});
instance NFData StopRemoteAccessSessionResponse