{-# 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.Sync
(
TurnBasedMatchesSyncResource
, turnBasedMatchesSync
, TurnBasedMatchesSync
, tbmsMaxCompletedMatches
, tbmsIncludeMatchData
, tbmsLanguage
, tbmsPageToken
, tbmsMaxResults
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type TurnBasedMatchesSyncResource =
"games" :>
"v1" :>
"turnbasedmatches" :>
"sync" :>
QueryParam "maxCompletedMatches" (Textual Int32) :>
QueryParam "includeMatchData" Bool :>
QueryParam "language" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] TurnBasedMatchSync
data TurnBasedMatchesSync = TurnBasedMatchesSync'
{ _tbmsMaxCompletedMatches :: !(Maybe (Textual Int32))
, _tbmsIncludeMatchData :: !(Maybe Bool)
, _tbmsLanguage :: !(Maybe Text)
, _tbmsPageToken :: !(Maybe Text)
, _tbmsMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
turnBasedMatchesSync
:: TurnBasedMatchesSync
turnBasedMatchesSync =
TurnBasedMatchesSync'
{ _tbmsMaxCompletedMatches = Nothing
, _tbmsIncludeMatchData = Nothing
, _tbmsLanguage = Nothing
, _tbmsPageToken = Nothing
, _tbmsMaxResults = Nothing
}
tbmsMaxCompletedMatches :: Lens' TurnBasedMatchesSync (Maybe Int32)
tbmsMaxCompletedMatches
= lens _tbmsMaxCompletedMatches
(\ s a -> s{_tbmsMaxCompletedMatches = a})
. mapping _Coerce
tbmsIncludeMatchData :: Lens' TurnBasedMatchesSync (Maybe Bool)
tbmsIncludeMatchData
= lens _tbmsIncludeMatchData
(\ s a -> s{_tbmsIncludeMatchData = a})
tbmsLanguage :: Lens' TurnBasedMatchesSync (Maybe Text)
tbmsLanguage
= lens _tbmsLanguage (\ s a -> s{_tbmsLanguage = a})
tbmsPageToken :: Lens' TurnBasedMatchesSync (Maybe Text)
tbmsPageToken
= lens _tbmsPageToken
(\ s a -> s{_tbmsPageToken = a})
tbmsMaxResults :: Lens' TurnBasedMatchesSync (Maybe Int32)
tbmsMaxResults
= lens _tbmsMaxResults
(\ s a -> s{_tbmsMaxResults = a})
. mapping _Coerce
instance GoogleRequest TurnBasedMatchesSync where
type Rs TurnBasedMatchesSync = TurnBasedMatchSync
type Scopes TurnBasedMatchesSync =
'["https://www.googleapis.com/auth/games"]
requestClient TurnBasedMatchesSync'{..}
= go _tbmsMaxCompletedMatches _tbmsIncludeMatchData
_tbmsLanguage
_tbmsPageToken
_tbmsMaxResults
(Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy TurnBasedMatchesSyncResource)
mempty