{-# 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.GameLift.DeleteGameSessionQueue
(
deleteGameSessionQueue
, DeleteGameSessionQueue
, dgsqName
, deleteGameSessionQueueResponse
, DeleteGameSessionQueueResponse
, dgsqrsResponseStatus
) 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 DeleteGameSessionQueue = DeleteGameSessionQueue'
{ _dgsqName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteGameSessionQueue
:: Text
-> DeleteGameSessionQueue
deleteGameSessionQueue pName_ = DeleteGameSessionQueue' {_dgsqName = pName_}
dgsqName :: Lens' DeleteGameSessionQueue Text
dgsqName = lens _dgsqName (\ s a -> s{_dgsqName = a})
instance AWSRequest DeleteGameSessionQueue where
type Rs DeleteGameSessionQueue =
DeleteGameSessionQueueResponse
request = postJSON gameLift
response
= receiveEmpty
(\ s h x ->
DeleteGameSessionQueueResponse' <$>
(pure (fromEnum s)))
instance Hashable DeleteGameSessionQueue where
instance NFData DeleteGameSessionQueue where
instance ToHeaders DeleteGameSessionQueue where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("GameLift.DeleteGameSessionQueue" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteGameSessionQueue where
toJSON DeleteGameSessionQueue'{..}
= object (catMaybes [Just ("Name" .= _dgsqName)])
instance ToPath DeleteGameSessionQueue where
toPath = const "/"
instance ToQuery DeleteGameSessionQueue where
toQuery = const mempty
newtype DeleteGameSessionQueueResponse = DeleteGameSessionQueueResponse'
{ _dgsqrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteGameSessionQueueResponse
:: Int
-> DeleteGameSessionQueueResponse
deleteGameSessionQueueResponse pResponseStatus_ =
DeleteGameSessionQueueResponse' {_dgsqrsResponseStatus = pResponseStatus_}
dgsqrsResponseStatus :: Lens' DeleteGameSessionQueueResponse Int
dgsqrsResponseStatus = lens _dgsqrsResponseStatus (\ s a -> s{_dgsqrsResponseStatus = a})
instance NFData DeleteGameSessionQueueResponse where