module Network.AWS.GameLift.GetGameSessionLogURL
(
getGameSessionLogURL
, GetGameSessionLogURL
, ggsluGameSessionId
, getGameSessionLogURLResponse
, GetGameSessionLogURLResponse
, ggslursPreSignedURL
, ggslursResponseStatus
) where
import Network.AWS.GameLift.Types
import Network.AWS.GameLift.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype GetGameSessionLogURL = GetGameSessionLogURL'
{ _ggsluGameSessionId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getGameSessionLogURL
:: Text
-> GetGameSessionLogURL
getGameSessionLogURL pGameSessionId_ =
GetGameSessionLogURL'
{ _ggsluGameSessionId = pGameSessionId_
}
ggsluGameSessionId :: Lens' GetGameSessionLogURL Text
ggsluGameSessionId = lens _ggsluGameSessionId (\ s a -> s{_ggsluGameSessionId = a});
instance AWSRequest GetGameSessionLogURL where
type Rs GetGameSessionLogURL =
GetGameSessionLogURLResponse
request = postJSON gameLift
response
= receiveJSON
(\ s h x ->
GetGameSessionLogURLResponse' <$>
(x .?> "PreSignedUrl") <*> (pure (fromEnum s)))
instance Hashable GetGameSessionLogURL
instance NFData GetGameSessionLogURL
instance ToHeaders GetGameSessionLogURL where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("GameLift.GetGameSessionLogUrl" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON GetGameSessionLogURL where
toJSON GetGameSessionLogURL'{..}
= object
(catMaybes
[Just ("GameSessionId" .= _ggsluGameSessionId)])
instance ToPath GetGameSessionLogURL where
toPath = const "/"
instance ToQuery GetGameSessionLogURL where
toQuery = const mempty
data GetGameSessionLogURLResponse = GetGameSessionLogURLResponse'
{ _ggslursPreSignedURL :: !(Maybe Text)
, _ggslursResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getGameSessionLogURLResponse
:: Int
-> GetGameSessionLogURLResponse
getGameSessionLogURLResponse pResponseStatus_ =
GetGameSessionLogURLResponse'
{ _ggslursPreSignedURL = Nothing
, _ggslursResponseStatus = pResponseStatus_
}
ggslursPreSignedURL :: Lens' GetGameSessionLogURLResponse (Maybe Text)
ggslursPreSignedURL = lens _ggslursPreSignedURL (\ s a -> s{_ggslursPreSignedURL = a});
ggslursResponseStatus :: Lens' GetGameSessionLogURLResponse Int
ggslursResponseStatus = lens _ggslursResponseStatus (\ s a -> s{_ggslursResponseStatus = a});
instance NFData GetGameSessionLogURLResponse