{-# 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
-- | Update the metadata of the leaderboard configuration with the given ID.
-- This method supports patch semantics.
--
-- /See:/ 'leaderboardConfigurationsPatch' smart constructor.
data LeaderboardConfigurationsPatch = LeaderboardConfigurationsPatch'
{ _lcpPayload :: !LeaderboardConfiguration
, _lcpLeaderboardId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'LeaderboardConfigurationsPatch' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lcpPayload'
--
-- * 'lcpLeaderboardId'
leaderboardConfigurationsPatch
:: LeaderboardConfiguration -- ^ 'lcpPayload'
-> Text -- ^ 'lcpLeaderboardId'
-> LeaderboardConfigurationsPatch
leaderboardConfigurationsPatch pLcpPayload_ pLcpLeaderboardId_ =
LeaderboardConfigurationsPatch'
{ _lcpPayload = pLcpPayload_
, _lcpLeaderboardId = pLcpLeaderboardId_
}
-- | Multipart request metadata.
lcpPayload :: Lens' LeaderboardConfigurationsPatch LeaderboardConfiguration
lcpPayload
= lens _lcpPayload (\ s a -> s{_lcpPayload = a})
-- | The ID of the leaderboard.
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