{-# 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.Quests.Accept
(
QuestsAcceptResource
, questsAccept
, QuestsAccept
, qaLanguage
, qaQuestId
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type QuestsAcceptResource =
"games" :>
"v1" :>
"quests" :>
Capture "questId" Text :>
"accept" :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] Quest
data QuestsAccept = QuestsAccept'
{ _qaLanguage :: !(Maybe Text)
, _qaQuestId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
questsAccept
:: Text
-> QuestsAccept
questsAccept pQaQuestId_ =
QuestsAccept'
{ _qaLanguage = Nothing
, _qaQuestId = pQaQuestId_
}
qaLanguage :: Lens' QuestsAccept (Maybe Text)
qaLanguage
= lens _qaLanguage (\ s a -> s{_qaLanguage = a})
qaQuestId :: Lens' QuestsAccept Text
qaQuestId
= lens _qaQuestId (\ s a -> s{_qaQuestId = a})
instance GoogleRequest QuestsAccept where
type Rs QuestsAccept = Quest
type Scopes QuestsAccept =
'["https://www.googleapis.com/auth/games"]
requestClient QuestsAccept'{..}
= go _qaQuestId _qaLanguage (Just AltJSON)
gamesService
where go
= buildClient (Proxy :: Proxy QuestsAcceptResource)
mempty