{-# 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.Games.Scores.SubmitMultiple
(
ScoresSubmitMultipleResource
, scoresSubmitMultiple
, ScoresSubmitMultiple
, ssmPayload
, ssmLanguage
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type ScoresSubmitMultipleResource =
"games" :>
"v1" :>
"leaderboards" :>
"scores" :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PlayerScoreSubmissionList :>
Post '[JSON] PlayerScoreListResponse
data ScoresSubmitMultiple = ScoresSubmitMultiple'
{ _ssmPayload :: !PlayerScoreSubmissionList
, _ssmLanguage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
scoresSubmitMultiple
:: PlayerScoreSubmissionList
-> ScoresSubmitMultiple
scoresSubmitMultiple pSsmPayload_ =
ScoresSubmitMultiple'
{ _ssmPayload = pSsmPayload_
, _ssmLanguage = Nothing
}
ssmPayload :: Lens' ScoresSubmitMultiple PlayerScoreSubmissionList
ssmPayload
= lens _ssmPayload (\ s a -> s{_ssmPayload = a})
ssmLanguage :: Lens' ScoresSubmitMultiple (Maybe Text)
ssmLanguage
= lens _ssmLanguage (\ s a -> s{_ssmLanguage = a})
instance GoogleRequest ScoresSubmitMultiple where
type Rs ScoresSubmitMultiple =
PlayerScoreListResponse
type Scopes ScoresSubmitMultiple =
'["https://www.googleapis.com/auth/games"]
requestClient ScoresSubmitMultiple'{..}
= go _ssmLanguage (Just AltJSON) _ssmPayload
gamesService
where go
= buildClient
(Proxy :: Proxy ScoresSubmitMultipleResource)
mempty