{-# 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.Decline
(
TurnBasedMatchesDeclineResource
, turnBasedMatchesDecline
, TurnBasedMatchesDecline
, tbmdLanguage
, tbmdMatchId
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type TurnBasedMatchesDeclineResource =
"games" :>
"v1" :>
"turnbasedmatches" :>
Capture "matchId" Text :>
"decline" :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :>
Put '[JSON] TurnBasedMatch
data TurnBasedMatchesDecline = TurnBasedMatchesDecline'
{ _tbmdLanguage :: !(Maybe Text)
, _tbmdMatchId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
turnBasedMatchesDecline
:: Text
-> TurnBasedMatchesDecline
turnBasedMatchesDecline pTbmdMatchId_ =
TurnBasedMatchesDecline'
{ _tbmdLanguage = Nothing
, _tbmdMatchId = pTbmdMatchId_
}
tbmdLanguage :: Lens' TurnBasedMatchesDecline (Maybe Text)
tbmdLanguage
= lens _tbmdLanguage (\ s a -> s{_tbmdLanguage = a})
tbmdMatchId :: Lens' TurnBasedMatchesDecline Text
tbmdMatchId
= lens _tbmdMatchId (\ s a -> s{_tbmdMatchId = a})
instance GoogleRequest TurnBasedMatchesDecline where
type Rs TurnBasedMatchesDecline = TurnBasedMatch
type Scopes TurnBasedMatchesDecline =
'["https://www.googleapis.com/auth/games"]
requestClient TurnBasedMatchesDecline'{..}
= go _tbmdMatchId _tbmdLanguage (Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy TurnBasedMatchesDeclineResource)
mempty