{-# 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.Patch
(
LeaderboardConfigurationsPatchResource
, leaderboardConfigurationsPatch
, LeaderboardConfigurationsPatch
, lcpPayload
, lcpLeaderboardId
) where
import Network.Google.GamesConfiguration.Types
import Network.Google.Prelude
type LeaderboardConfigurationsPatchResource =
"games" :>
"v1configuration" :>
"leaderboards" :>
Capture "leaderboardId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LeaderboardConfiguration :>
Patch '[JSON] LeaderboardConfiguration
data LeaderboardConfigurationsPatch = LeaderboardConfigurationsPatch'
{ _lcpPayload :: !LeaderboardConfiguration
, _lcpLeaderboardId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
leaderboardConfigurationsPatch
:: LeaderboardConfiguration
-> Text
-> LeaderboardConfigurationsPatch
leaderboardConfigurationsPatch pLcpPayload_ pLcpLeaderboardId_ =
LeaderboardConfigurationsPatch'
{ _lcpPayload = pLcpPayload_
, _lcpLeaderboardId = pLcpLeaderboardId_
}
lcpPayload :: Lens' LeaderboardConfigurationsPatch LeaderboardConfiguration
lcpPayload
= lens _lcpPayload (\ s a -> s{_lcpPayload = a})
lcpLeaderboardId :: Lens' LeaderboardConfigurationsPatch Text
lcpLeaderboardId
= lens _lcpLeaderboardId
(\ s a -> s{_lcpLeaderboardId = a})
instance GoogleRequest LeaderboardConfigurationsPatch
where
type Rs LeaderboardConfigurationsPatch =
LeaderboardConfiguration
type Scopes LeaderboardConfigurationsPatch =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient LeaderboardConfigurationsPatch'{..}
= go _lcpLeaderboardId (Just AltJSON) _lcpPayload
gamesConfigurationService
where go
= buildClient
(Proxy ::
Proxy LeaderboardConfigurationsPatchResource)
mempty