{-# 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.ListDefinitions
(
EventsListDefinitionsResource
, eventsListDefinitions
, EventsListDefinitions
, eldLanguage
, eldPageToken
, eldMaxResults
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type EventsListDefinitionsResource =
"games" :>
"v1" :>
"eventDefinitions" :>
QueryParam "language" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] EventDefinitionListResponse
data EventsListDefinitions = EventsListDefinitions'
{ _eldLanguage :: !(Maybe Text)
, _eldPageToken :: !(Maybe Text)
, _eldMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
eventsListDefinitions
:: EventsListDefinitions
eventsListDefinitions =
EventsListDefinitions'
{ _eldLanguage = Nothing
, _eldPageToken = Nothing
, _eldMaxResults = Nothing
}
eldLanguage :: Lens' EventsListDefinitions (Maybe Text)
eldLanguage
= lens _eldLanguage (\ s a -> s{_eldLanguage = a})
eldPageToken :: Lens' EventsListDefinitions (Maybe Text)
eldPageToken
= lens _eldPageToken (\ s a -> s{_eldPageToken = a})
eldMaxResults :: Lens' EventsListDefinitions (Maybe Int32)
eldMaxResults
= lens _eldMaxResults
(\ s a -> s{_eldMaxResults = a})
. mapping _Coerce
instance GoogleRequest EventsListDefinitions where
type Rs EventsListDefinitions =
EventDefinitionListResponse
type Scopes EventsListDefinitions =
'["https://www.googleapis.com/auth/games"]
requestClient EventsListDefinitions'{..}
= go _eldLanguage _eldPageToken _eldMaxResults
(Just AltJSON)
gamesService
where go
= buildClient
(Proxy :: Proxy EventsListDefinitionsResource)
mempty