{-# 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.Rematch
(
TurnBasedMatchesRematchResource
, turnBasedMatchesRematch
, TurnBasedMatchesRematch
, tbmrRequestId
, tbmrLanguage
, tbmrMatchId
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type TurnBasedMatchesRematchResource =
"games" :>
"v1" :>
"turnbasedmatches" :>
Capture "matchId" Text :>
"rematch" :>
QueryParam "requestId" (Textual Int64) :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :>
Post '[JSON] TurnBasedMatchRematch
data TurnBasedMatchesRematch = TurnBasedMatchesRematch'
{ _tbmrRequestId :: !(Maybe (Textual Int64))
, _tbmrLanguage :: !(Maybe Text)
, _tbmrMatchId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
turnBasedMatchesRematch
:: Text
-> TurnBasedMatchesRematch
turnBasedMatchesRematch pTbmrMatchId_ =
TurnBasedMatchesRematch'
{ _tbmrRequestId = Nothing
, _tbmrLanguage = Nothing
, _tbmrMatchId = pTbmrMatchId_
}
tbmrRequestId :: Lens' TurnBasedMatchesRematch (Maybe Int64)
tbmrRequestId
= lens _tbmrRequestId
(\ s a -> s{_tbmrRequestId = a})
. mapping _Coerce
tbmrLanguage :: Lens' TurnBasedMatchesRematch (Maybe Text)
tbmrLanguage
= lens _tbmrLanguage (\ s a -> s{_tbmrLanguage = a})
tbmrMatchId :: Lens' TurnBasedMatchesRematch Text
tbmrMatchId
= lens _tbmrMatchId (\ s a -> s{_tbmrMatchId = a})
instance GoogleRequest TurnBasedMatchesRematch where
type Rs TurnBasedMatchesRematch =
TurnBasedMatchRematch
type Scopes TurnBasedMatchesRematch =
'["https://www.googleapis.com/auth/games"]
requestClient TurnBasedMatchesRematch'{..}
= go _tbmrMatchId _tbmrRequestId _tbmrLanguage
(Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy TurnBasedMatchesRematchResource)
mempty