{-# 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.Decline
(
RoomsDeclineResource
, roomsDecline
, RoomsDecline
, rooRoomId
, rooLanguage
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type RoomsDeclineResource =
"games" :>
"v1" :>
"rooms" :>
Capture "roomId" Text :>
"decline" :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] Room
data RoomsDecline = RoomsDecline'
{ _rooRoomId :: !Text
, _rooLanguage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
roomsDecline
:: Text
-> RoomsDecline
roomsDecline pRooRoomId_ =
RoomsDecline'
{ _rooRoomId = pRooRoomId_
, _rooLanguage = Nothing
}
rooRoomId :: Lens' RoomsDecline Text
rooRoomId
= lens _rooRoomId (\ s a -> s{_rooRoomId = a})
rooLanguage :: Lens' RoomsDecline (Maybe Text)
rooLanguage
= lens _rooLanguage (\ s a -> s{_rooLanguage = a})
instance GoogleRequest RoomsDecline where
type Rs RoomsDecline = Room
type Scopes RoomsDecline =
'["https://www.googleapis.com/auth/games"]
requestClient RoomsDecline'{..}
= go _rooRoomId _rooLanguage (Just AltJSON)
gamesService
where go
= buildClient (Proxy :: Proxy RoomsDeclineResource)
mempty