{-# 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.GamesConfiguration.AchievementConfigurations.Update
(
AchievementConfigurationsUpdateResource
, achievementConfigurationsUpdate
, AchievementConfigurationsUpdate
, acuAchievementId
, acuPayload
) where
import Network.Google.GamesConfiguration.Types
import Network.Google.Prelude
type AchievementConfigurationsUpdateResource =
"games" :>
"v1configuration" :>
"achievements" :>
Capture "achievementId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AchievementConfiguration :>
Put '[JSON] AchievementConfiguration
data AchievementConfigurationsUpdate = AchievementConfigurationsUpdate'
{ _acuAchievementId :: !Text
, _acuPayload :: !AchievementConfiguration
} deriving (Eq,Show,Data,Typeable,Generic)
achievementConfigurationsUpdate
:: Text
-> AchievementConfiguration
-> AchievementConfigurationsUpdate
achievementConfigurationsUpdate pAcuAchievementId_ pAcuPayload_ =
AchievementConfigurationsUpdate'
{ _acuAchievementId = pAcuAchievementId_
, _acuPayload = pAcuPayload_
}
acuAchievementId :: Lens' AchievementConfigurationsUpdate Text
acuAchievementId
= lens _acuAchievementId
(\ s a -> s{_acuAchievementId = a})
acuPayload :: Lens' AchievementConfigurationsUpdate AchievementConfiguration
acuPayload
= lens _acuPayload (\ s a -> s{_acuPayload = a})
instance GoogleRequest
AchievementConfigurationsUpdate where
type Rs AchievementConfigurationsUpdate =
AchievementConfiguration
type Scopes AchievementConfigurationsUpdate =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient AchievementConfigurationsUpdate'{..}
= go _acuAchievementId (Just AltJSON) _acuPayload
gamesConfigurationService
where go
= buildClient
(Proxy ::
Proxy AchievementConfigurationsUpdateResource)
mempty