{-# 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.Rooms.List
(
RoomsListResource
, roomsList
, RoomsList
, rLanguage
, rPageToken
, rMaxResults
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type RoomsListResource =
"games" :>
"v1" :>
"rooms" :>
QueryParam "language" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] RoomList
data RoomsList = RoomsList'
{ _rLanguage :: !(Maybe Text)
, _rPageToken :: !(Maybe Text)
, _rMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
roomsList
:: RoomsList
roomsList =
RoomsList'
{ _rLanguage = Nothing
, _rPageToken = Nothing
, _rMaxResults = Nothing
}
rLanguage :: Lens' RoomsList (Maybe Text)
rLanguage
= lens _rLanguage (\ s a -> s{_rLanguage = a})
rPageToken :: Lens' RoomsList (Maybe Text)
rPageToken
= lens _rPageToken (\ s a -> s{_rPageToken = a})
rMaxResults :: Lens' RoomsList (Maybe Int32)
rMaxResults
= lens _rMaxResults (\ s a -> s{_rMaxResults = a}) .
mapping _Coerce
instance GoogleRequest RoomsList where
type Rs RoomsList = RoomList
type Scopes RoomsList =
'["https://www.googleapis.com/auth/games"]
requestClient RoomsList'{..}
= go _rLanguage _rPageToken _rMaxResults
(Just AltJSON)
gamesService
where go
= buildClient (Proxy :: Proxy RoomsListResource)
mempty