{-# 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.Get
(
RoomsGetResource
, roomsGet
, RoomsGet
, rgRoomId
, rgLanguage
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type RoomsGetResource =
"games" :>
"v1" :>
"rooms" :>
Capture "roomId" Text :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Room
data RoomsGet = RoomsGet'
{ _rgRoomId :: !Text
, _rgLanguage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
roomsGet
:: Text
-> RoomsGet
roomsGet pRgRoomId_ =
RoomsGet'
{ _rgRoomId = pRgRoomId_
, _rgLanguage = Nothing
}
rgRoomId :: Lens' RoomsGet Text
rgRoomId = lens _rgRoomId (\ s a -> s{_rgRoomId = a})
rgLanguage :: Lens' RoomsGet (Maybe Text)
rgLanguage
= lens _rgLanguage (\ s a -> s{_rgLanguage = a})
instance GoogleRequest RoomsGet where
type Rs RoomsGet = Room
type Scopes RoomsGet =
'["https://www.googleapis.com/auth/games"]
requestClient RoomsGet'{..}
= go _rgRoomId _rgLanguage (Just AltJSON)
gamesService
where go
= buildClient (Proxy :: Proxy RoomsGetResource)
mempty