{-# 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.Update
(
LeaderboardConfigurationsUpdateResource
, leaderboardConfigurationsUpdate
, LeaderboardConfigurationsUpdate
, lcuPayload
, lcuLeaderboardId
) where
import Network.Google.GamesConfiguration.Types
import Network.Google.Prelude
type LeaderboardConfigurationsUpdateResource =
"games" :>
"v1configuration" :>
"leaderboards" :>
Capture "leaderboardId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LeaderboardConfiguration :>
Put '[JSON] LeaderboardConfiguration
data LeaderboardConfigurationsUpdate = LeaderboardConfigurationsUpdate'
{ _lcuPayload :: !LeaderboardConfiguration
, _lcuLeaderboardId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
leaderboardConfigurationsUpdate
:: LeaderboardConfiguration
-> Text
-> LeaderboardConfigurationsUpdate
leaderboardConfigurationsUpdate pLcuPayload_ pLcuLeaderboardId_ =
LeaderboardConfigurationsUpdate'
{ _lcuPayload = pLcuPayload_
, _lcuLeaderboardId = pLcuLeaderboardId_
}
lcuPayload :: Lens' LeaderboardConfigurationsUpdate LeaderboardConfiguration
lcuPayload
= lens _lcuPayload (\ s a -> s{_lcuPayload = a})
lcuLeaderboardId :: Lens' LeaderboardConfigurationsUpdate Text
lcuLeaderboardId
= lens _lcuLeaderboardId
(\ s a -> s{_lcuLeaderboardId = a})
instance GoogleRequest
LeaderboardConfigurationsUpdate where
type Rs LeaderboardConfigurationsUpdate =
LeaderboardConfiguration
type Scopes LeaderboardConfigurationsUpdate =
'["https://www.googleapis.com/auth/androidpublisher"]
requestClient LeaderboardConfigurationsUpdate'{..}
= go _lcuLeaderboardId (Just AltJSON) _lcuPayload
gamesConfigurationService
where go
= buildClient
(Proxy ::
Proxy LeaderboardConfigurationsUpdateResource)
mempty