{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Games.TurnBasedMatches.Leave
(
TurnBasedMatchesLeaveResource
, turnBasedMatchesLeave
, TurnBasedMatchesLeave
, tbmlLanguage
, tbmlMatchId
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type TurnBasedMatchesLeaveResource =
"games" :>
"v1" :>
"turnbasedmatches" :>
Capture "matchId" Text :>
"leave" :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :>
Put '[JSON] TurnBasedMatch
data TurnBasedMatchesLeave = TurnBasedMatchesLeave'
{ _tbmlLanguage :: !(Maybe Text)
, _tbmlMatchId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
turnBasedMatchesLeave
:: Text
-> TurnBasedMatchesLeave
turnBasedMatchesLeave pTbmlMatchId_ =
TurnBasedMatchesLeave'
{ _tbmlLanguage = Nothing
, _tbmlMatchId = pTbmlMatchId_
}
tbmlLanguage :: Lens' TurnBasedMatchesLeave (Maybe Text)
tbmlLanguage
= lens _tbmlLanguage (\ s a -> s{_tbmlLanguage = a})
tbmlMatchId :: Lens' TurnBasedMatchesLeave Text
tbmlMatchId
= lens _tbmlMatchId (\ s a -> s{_tbmlMatchId = a})
instance GoogleRequest TurnBasedMatchesLeave where
type Rs TurnBasedMatchesLeave = TurnBasedMatch
type Scopes TurnBasedMatchesLeave =
'["https://www.googleapis.com/auth/games"]
requestClient TurnBasedMatchesLeave'{..}
= go _tbmlMatchId _tbmlLanguage (Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy TurnBasedMatchesLeaveResource)
mempty