{-# 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.Events.Record
(
EventsRecordResource
, eventsRecord
, EventsRecord
, erPayload
, erLanguage
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type EventsRecordResource =
"games" :>
"v1" :>
"events" :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EventRecordRequest :>
Post '[JSON] EventUpdateResponse
data EventsRecord = EventsRecord'
{ _erPayload :: !EventRecordRequest
, _erLanguage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
eventsRecord
:: EventRecordRequest
-> EventsRecord
eventsRecord pErPayload_ =
EventsRecord'
{ _erPayload = pErPayload_
, _erLanguage = Nothing
}
erPayload :: Lens' EventsRecord EventRecordRequest
erPayload
= lens _erPayload (\ s a -> s{_erPayload = a})
erLanguage :: Lens' EventsRecord (Maybe Text)
erLanguage
= lens _erLanguage (\ s a -> s{_erLanguage = a})
instance GoogleRequest EventsRecord where
type Rs EventsRecord = EventUpdateResponse
type Scopes EventsRecord =
'["https://www.googleapis.com/auth/games"]
requestClient EventsRecord'{..}
= go _erLanguage (Just AltJSON) _erPayload
gamesService
where go
= buildClient (Proxy :: Proxy EventsRecordResource)
mempty