{-# 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.Join
(
TurnBasedMatchesJoinResource
, turnBasedMatchesJoin
, TurnBasedMatchesJoin
, tbmjLanguage
, tbmjMatchId
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type TurnBasedMatchesJoinResource =
"games" :>
"v1" :>
"turnbasedmatches" :>
Capture "matchId" Text :>
"join" :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :>
Put '[JSON] TurnBasedMatch
data TurnBasedMatchesJoin = TurnBasedMatchesJoin'
{ _tbmjLanguage :: !(Maybe Text)
, _tbmjMatchId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
turnBasedMatchesJoin
:: Text
-> TurnBasedMatchesJoin
turnBasedMatchesJoin pTbmjMatchId_ =
TurnBasedMatchesJoin'
{ _tbmjLanguage = Nothing
, _tbmjMatchId = pTbmjMatchId_
}
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"]
requestClient TurnBasedMatchesJoin'{..}
= go _tbmjMatchId _tbmjLanguage (Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy TurnBasedMatchesJoinResource)
mempty