{-# 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.QuestMilestones.Claim
(
QuestMilestonesClaimResource
, questMilestonesClaim
, QuestMilestonesClaim
, qmcRequestId
, qmcMilestoneId
, qmcQuestId
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type QuestMilestonesClaimResource =
"games" :>
"v1" :>
"quests" :>
Capture "questId" Text :>
"milestones" :>
Capture "milestoneId" Text :>
"claim" :>
QueryParam "requestId" (Textual Int64) :>
QueryParam "alt" AltJSON :> Put '[JSON] ()
data QuestMilestonesClaim = QuestMilestonesClaim'
{ _qmcRequestId :: !(Textual Int64)
, _qmcMilestoneId :: !Text
, _qmcQuestId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
questMilestonesClaim
:: Int64
-> Text
-> Text
-> QuestMilestonesClaim
questMilestonesClaim pQmcRequestId_ pQmcMilestoneId_ pQmcQuestId_ =
QuestMilestonesClaim'
{ _qmcRequestId = _Coerce # pQmcRequestId_
, _qmcMilestoneId = pQmcMilestoneId_
, _qmcQuestId = pQmcQuestId_
}
qmcRequestId :: Lens' QuestMilestonesClaim Int64
qmcRequestId
= lens _qmcRequestId (\ s a -> s{_qmcRequestId = a})
. _Coerce
qmcMilestoneId :: Lens' QuestMilestonesClaim Text
qmcMilestoneId
= lens _qmcMilestoneId
(\ s a -> s{_qmcMilestoneId = a})
qmcQuestId :: Lens' QuestMilestonesClaim Text
qmcQuestId
= lens _qmcQuestId (\ s a -> s{_qmcQuestId = a})
instance GoogleRequest QuestMilestonesClaim where
type Rs QuestMilestonesClaim = ()
type Scopes QuestMilestonesClaim =
'["https://www.googleapis.com/auth/games"]
requestClient QuestMilestonesClaim'{..}
= go _qmcQuestId _qmcMilestoneId (Just _qmcRequestId)
(Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy QuestMilestonesClaimResource)
mempty