{-# 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.Insert
(
AchievementConfigurationsInsertResource
, achievementConfigurationsInsert
, AchievementConfigurationsInsert
, aciPayload
, aciApplicationId
) where
import Network.Google.GamesConfiguration.Types
import Network.Google.Prelude
type AchievementConfigurationsInsertResource =
"games" :>
"v1configuration" :>
"applications" :>
Capture "applicationId" Text :>
"achievements" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AchievementConfiguration :>
Post '[JSON] AchievementConfiguration
data AchievementConfigurationsInsert = AchievementConfigurationsInsert'
{ _aciPayload :: !AchievementConfiguration
, _aciApplicationId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
achievementConfigurationsInsert
:: AchievementConfiguration
-> Text
-> AchievementConfigurationsInsert
achievementConfigurationsInsert pAciPayload_ pAciApplicationId_ =
AchievementConfigurationsInsert'
{ _aciPayload = pAciPayload_
, _aciApplicationId = pAciApplicationId_
}
aciPayload :: Lens' AchievementConfigurationsInsert AchievementConfiguration
aciPayload
= lens _aciPayload (\ s a -> s{_aciPayload = a})
aciApplicationId :: Lens' AchievementConfigurationsInsert Text
aciApplicationId
= lens _aciApplicationId
(\ s a -> s{_aciApplicationId = a})
instance GoogleRequest
AchievementConfigurationsInsert where
type Rs AchievementConfigurationsInsert =
AchievementConfiguration
type Scopes AchievementConfigurationsInsert =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient AchievementConfigurationsInsert'{..}
= go _aciApplicationId (Just AltJSON) _aciPayload
gamesConfigurationService
where go
= buildClient
(Proxy ::
Proxy AchievementConfigurationsInsertResource)
mempty