module Network.Google.Resource.Games.TurnBasedMatches.Decline
(
TurnBasedMatchesDeclineResource
, turnBasedMatchesDecline
, TurnBasedMatchesDecline
, tbmdConsistencyToken
, tbmdLanguage
, tbmdMatchId
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type TurnBasedMatchesDeclineResource =
"games" :>
"v1" :>
"turnbasedmatches" :>
Capture "matchId" Text :>
"decline" :>
QueryParam "consistencyToken" (Textual Int64) :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :>
Put '[JSON] TurnBasedMatch
data TurnBasedMatchesDecline = TurnBasedMatchesDecline'
{ _tbmdConsistencyToken :: !(Maybe (Textual Int64))
, _tbmdLanguage :: !(Maybe Text)
, _tbmdMatchId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
turnBasedMatchesDecline
:: Text
-> TurnBasedMatchesDecline
turnBasedMatchesDecline pTbmdMatchId_ =
TurnBasedMatchesDecline'
{ _tbmdConsistencyToken = Nothing
, _tbmdLanguage = Nothing
, _tbmdMatchId = pTbmdMatchId_
}
tbmdConsistencyToken :: Lens' TurnBasedMatchesDecline (Maybe Int64)
tbmdConsistencyToken
= lens _tbmdConsistencyToken
(\ s a -> s{_tbmdConsistencyToken = a})
. mapping _Coerce
tbmdLanguage :: Lens' TurnBasedMatchesDecline (Maybe Text)
tbmdLanguage
= lens _tbmdLanguage (\ s a -> s{_tbmdLanguage = a})
tbmdMatchId :: Lens' TurnBasedMatchesDecline Text
tbmdMatchId
= lens _tbmdMatchId (\ s a -> s{_tbmdMatchId = a})
instance GoogleRequest TurnBasedMatchesDecline where
type Rs TurnBasedMatchesDecline = TurnBasedMatch
type Scopes TurnBasedMatchesDecline =
'["https://www.googleapis.com/auth/games",
"https://www.googleapis.com/auth/plus.login"]
requestClient TurnBasedMatchesDecline'{..}
= go _tbmdMatchId _tbmdConsistencyToken _tbmdLanguage
(Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy TurnBasedMatchesDeclineResource)
mempty