module Network.AWS.GameLift.StopMatchmaking
(
stopMatchmaking
, StopMatchmaking
, smTicketId
, stopMatchmakingResponse
, StopMatchmakingResponse
, smrsResponseStatus
) 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 StopMatchmaking = StopMatchmaking'
{ _smTicketId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
stopMatchmaking
:: Text
-> StopMatchmaking
stopMatchmaking pTicketId_ = StopMatchmaking' {_smTicketId = pTicketId_}
smTicketId :: Lens' StopMatchmaking Text
smTicketId = lens _smTicketId (\ s a -> s{_smTicketId = a});
instance AWSRequest StopMatchmaking where
type Rs StopMatchmaking = StopMatchmakingResponse
request = postJSON gameLift
response
= receiveEmpty
(\ s h x ->
StopMatchmakingResponse' <$> (pure (fromEnum s)))
instance Hashable StopMatchmaking where
instance NFData StopMatchmaking where
instance ToHeaders StopMatchmaking where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("GameLift.StopMatchmaking" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON StopMatchmaking where
toJSON StopMatchmaking'{..}
= object
(catMaybes [Just ("TicketId" .= _smTicketId)])
instance ToPath StopMatchmaking where
toPath = const "/"
instance ToQuery StopMatchmaking where
toQuery = const mempty
newtype StopMatchmakingResponse = StopMatchmakingResponse'
{ _smrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
stopMatchmakingResponse
:: Int
-> StopMatchmakingResponse
stopMatchmakingResponse pResponseStatus_ =
StopMatchmakingResponse' {_smrsResponseStatus = pResponseStatus_}
smrsResponseStatus :: Lens' StopMatchmakingResponse Int
smrsResponseStatus = lens _smrsResponseStatus (\ s a -> s{_smrsResponseStatus = a});
instance NFData StopMatchmakingResponse where