{-# 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.LeaderboardConfigurations.Insert
(
LeaderboardConfigurationsInsertResource
, leaderboardConfigurationsInsert
, LeaderboardConfigurationsInsert
, lciPayload
, lciApplicationId
) where
import Network.Google.GamesConfiguration.Types
import Network.Google.Prelude
type LeaderboardConfigurationsInsertResource =
"games" :>
"v1configuration" :>
"applications" :>
Capture "applicationId" Text :>
"leaderboards" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LeaderboardConfiguration :>
Post '[JSON] LeaderboardConfiguration
data LeaderboardConfigurationsInsert = LeaderboardConfigurationsInsert'
{ _lciPayload :: !LeaderboardConfiguration
, _lciApplicationId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
leaderboardConfigurationsInsert
:: LeaderboardConfiguration
-> Text
-> LeaderboardConfigurationsInsert
leaderboardConfigurationsInsert pLciPayload_ pLciApplicationId_ =
LeaderboardConfigurationsInsert'
{ _lciPayload = pLciPayload_
, _lciApplicationId = pLciApplicationId_
}
lciPayload :: Lens' LeaderboardConfigurationsInsert LeaderboardConfiguration
lciPayload
= lens _lciPayload (\ s a -> s{_lciPayload = a})
lciApplicationId :: Lens' LeaderboardConfigurationsInsert Text
lciApplicationId
= lens _lciApplicationId
(\ s a -> s{_lciApplicationId = a})
instance GoogleRequest
LeaderboardConfigurationsInsert where
type Rs LeaderboardConfigurationsInsert =
LeaderboardConfiguration
type Scopes LeaderboardConfigurationsInsert =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient LeaderboardConfigurationsInsert'{..}
= go _lciApplicationId (Just AltJSON) _lciPayload
gamesConfigurationService
where go
= buildClient
(Proxy ::
Proxy LeaderboardConfigurationsInsertResource)
mempty