{-# 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.Get
(
TurnBasedMatchesGetResource
, turnBasedMatchesGet
, TurnBasedMatchesGet
, tbmgIncludeMatchData
, tbmgLanguage
, tbmgMatchId
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type TurnBasedMatchesGetResource =
"games" :>
"v1" :>
"turnbasedmatches" :>
Capture "matchId" Text :>
QueryParam "includeMatchData" Bool :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] TurnBasedMatch
data TurnBasedMatchesGet = TurnBasedMatchesGet'
{ _tbmgIncludeMatchData :: !(Maybe Bool)
, _tbmgLanguage :: !(Maybe Text)
, _tbmgMatchId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
turnBasedMatchesGet
:: Text
-> TurnBasedMatchesGet
turnBasedMatchesGet pTbmgMatchId_ =
TurnBasedMatchesGet'
{ _tbmgIncludeMatchData = Nothing
, _tbmgLanguage = Nothing
, _tbmgMatchId = pTbmgMatchId_
}
tbmgIncludeMatchData :: Lens' TurnBasedMatchesGet (Maybe Bool)
tbmgIncludeMatchData
= lens _tbmgIncludeMatchData
(\ s a -> s{_tbmgIncludeMatchData = a})
tbmgLanguage :: Lens' TurnBasedMatchesGet (Maybe Text)
tbmgLanguage
= lens _tbmgLanguage (\ s a -> s{_tbmgLanguage = a})
tbmgMatchId :: Lens' TurnBasedMatchesGet Text
tbmgMatchId
= lens _tbmgMatchId (\ s a -> s{_tbmgMatchId = a})
instance GoogleRequest TurnBasedMatchesGet where
type Rs TurnBasedMatchesGet = TurnBasedMatch
type Scopes TurnBasedMatchesGet =
'["https://www.googleapis.com/auth/games"]
requestClient TurnBasedMatchesGet'{..}
= go _tbmgMatchId _tbmgIncludeMatchData _tbmgLanguage
(Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy TurnBasedMatchesGetResource)
mempty