module Network.Google.Resource.Games.TurnBasedMatches.Join
(
TurnBasedMatchesJoinResource
, turnBasedMatchesJoin
, TurnBasedMatchesJoin
, tbmjConsistencyToken
, tbmjLanguage
, tbmjMatchId
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type TurnBasedMatchesJoinResource =
"games" :>
"v1" :>
"turnbasedmatches" :>
Capture "matchId" Text :>
"join" :>
QueryParam "consistencyToken" (Textual Int64) :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :>
Put '[JSON] TurnBasedMatch
data TurnBasedMatchesJoin = TurnBasedMatchesJoin'
{ _tbmjConsistencyToken :: !(Maybe (Textual Int64))
, _tbmjLanguage :: !(Maybe Text)
, _tbmjMatchId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
turnBasedMatchesJoin
:: Text
-> TurnBasedMatchesJoin
turnBasedMatchesJoin pTbmjMatchId_ =
TurnBasedMatchesJoin'
{ _tbmjConsistencyToken = Nothing
, _tbmjLanguage = Nothing
, _tbmjMatchId = pTbmjMatchId_
}
tbmjConsistencyToken :: Lens' TurnBasedMatchesJoin (Maybe Int64)
tbmjConsistencyToken
= lens _tbmjConsistencyToken
(\ s a -> s{_tbmjConsistencyToken = a})
. mapping _Coerce
tbmjLanguage :: Lens' TurnBasedMatchesJoin (Maybe Text)
tbmjLanguage
= lens _tbmjLanguage (\ s a -> s{_tbmjLanguage = a})
tbmjMatchId :: Lens' TurnBasedMatchesJoin Text
tbmjMatchId
= lens _tbmjMatchId (\ s a -> s{_tbmjMatchId = a})
instance GoogleRequest TurnBasedMatchesJoin where
type Rs TurnBasedMatchesJoin = TurnBasedMatch
type Scopes TurnBasedMatchesJoin =
'["https://www.googleapis.com/auth/games",
"https://www.googleapis.com/auth/plus.login"]
requestClient TurnBasedMatchesJoin'{..}
= go _tbmjMatchId _tbmjConsistencyToken _tbmjLanguage
(Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy TurnBasedMatchesJoinResource)
mempty