{-# 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.Achievements.Increment
(
AchievementsIncrementResource
, achievementsIncrement
, AchievementsIncrement
, aiRequestId
, aiAchievementId
, aiStepsToIncrement
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type AchievementsIncrementResource =
"games" :>
"v1" :>
"achievements" :>
Capture "achievementId" Text :>
"increment" :>
QueryParam "stepsToIncrement" (Textual Int32) :>
QueryParam "requestId" (Textual Int64) :>
QueryParam "alt" AltJSON :>
Post '[JSON] AchievementIncrementResponse
data AchievementsIncrement = AchievementsIncrement'
{ _aiRequestId :: !(Maybe (Textual Int64))
, _aiAchievementId :: !Text
, _aiStepsToIncrement :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
achievementsIncrement
:: Text
-> Int32
-> AchievementsIncrement
achievementsIncrement pAiAchievementId_ pAiStepsToIncrement_ =
AchievementsIncrement'
{ _aiRequestId = Nothing
, _aiAchievementId = pAiAchievementId_
, _aiStepsToIncrement = _Coerce # pAiStepsToIncrement_
}
aiRequestId :: Lens' AchievementsIncrement (Maybe Int64)
aiRequestId
= lens _aiRequestId (\ s a -> s{_aiRequestId = a}) .
mapping _Coerce
aiAchievementId :: Lens' AchievementsIncrement Text
aiAchievementId
= lens _aiAchievementId
(\ s a -> s{_aiAchievementId = a})
aiStepsToIncrement :: Lens' AchievementsIncrement Int32
aiStepsToIncrement
= lens _aiStepsToIncrement
(\ s a -> s{_aiStepsToIncrement = a})
. _Coerce
instance GoogleRequest AchievementsIncrement where
type Rs AchievementsIncrement =
AchievementIncrementResponse
type Scopes AchievementsIncrement =
'["https://www.googleapis.com/auth/games"]
requestClient AchievementsIncrement'{..}
= go _aiAchievementId (Just _aiStepsToIncrement)
_aiRequestId
(Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy AchievementsIncrementResource)
mempty