module Network.AWS.DeviceFarm.GetRemoteAccessSession
(
getRemoteAccessSession
, GetRemoteAccessSession
, grasArn
, getRemoteAccessSessionResponse
, GetRemoteAccessSessionResponse
, grasrsRemoteAccessSession
, grasrsResponseStatus
) 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 GetRemoteAccessSession = GetRemoteAccessSession'
{ _grasArn :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getRemoteAccessSession
:: Text
-> GetRemoteAccessSession
getRemoteAccessSession pArn_ = GetRemoteAccessSession' {_grasArn = pArn_}
grasArn :: Lens' GetRemoteAccessSession Text
grasArn = lens _grasArn (\ s a -> s{_grasArn = a});
instance AWSRequest GetRemoteAccessSession where
type Rs GetRemoteAccessSession =
GetRemoteAccessSessionResponse
request = postJSON deviceFarm
response
= receiveJSON
(\ s h x ->
GetRemoteAccessSessionResponse' <$>
(x .?> "remoteAccessSession") <*>
(pure (fromEnum s)))
instance Hashable GetRemoteAccessSession where
instance NFData GetRemoteAccessSession where
instance ToHeaders GetRemoteAccessSession where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("DeviceFarm_20150623.GetRemoteAccessSession" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON GetRemoteAccessSession where
toJSON GetRemoteAccessSession'{..}
= object (catMaybes [Just ("arn" .= _grasArn)])
instance ToPath GetRemoteAccessSession where
toPath = const "/"
instance ToQuery GetRemoteAccessSession where
toQuery = const mempty
data GetRemoteAccessSessionResponse = GetRemoteAccessSessionResponse'
{ _grasrsRemoteAccessSession :: !(Maybe RemoteAccessSession)
, _grasrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getRemoteAccessSessionResponse
:: Int
-> GetRemoteAccessSessionResponse
getRemoteAccessSessionResponse pResponseStatus_ =
GetRemoteAccessSessionResponse'
{ _grasrsRemoteAccessSession = Nothing
, _grasrsResponseStatus = pResponseStatus_
}
grasrsRemoteAccessSession :: Lens' GetRemoteAccessSessionResponse (Maybe RemoteAccessSession)
grasrsRemoteAccessSession = lens _grasrsRemoteAccessSession (\ s a -> s{_grasrsRemoteAccessSession = a});
grasrsResponseStatus :: Lens' GetRemoteAccessSessionResponse Int
grasrsResponseStatus = lens _grasrsResponseStatus (\ s a -> s{_grasrsResponseStatus = a});
instance NFData GetRemoteAccessSessionResponse where