{-# 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.ReportStatus
(
RoomsReportStatusResource
, roomsReportStatus
, RoomsReportStatus
, rrsPayload
, rrsRoomId
, rrsLanguage
) where
import Network.Google.Games.Types
import Network.Google.Prelude
type RoomsReportStatusResource =
"games" :>
"v1" :>
"rooms" :>
Capture "roomId" Text :>
"reportstatus" :>
QueryParam "language" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] RoomP2PStatuses :>
Post '[JSON] RoomStatus
data RoomsReportStatus = RoomsReportStatus'
{ _rrsPayload :: !RoomP2PStatuses
, _rrsRoomId :: !Text
, _rrsLanguage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
roomsReportStatus
:: RoomP2PStatuses
-> Text
-> RoomsReportStatus
roomsReportStatus pRrsPayload_ pRrsRoomId_ =
RoomsReportStatus'
{ _rrsPayload = pRrsPayload_
, _rrsRoomId = pRrsRoomId_
, _rrsLanguage = Nothing
}
rrsPayload :: Lens' RoomsReportStatus RoomP2PStatuses
rrsPayload
= lens _rrsPayload (\ s a -> s{_rrsPayload = a})
rrsRoomId :: Lens' RoomsReportStatus Text
rrsRoomId
= lens _rrsRoomId (\ s a -> s{_rrsRoomId = a})
rrsLanguage :: Lens' RoomsReportStatus (Maybe Text)
rrsLanguage
= lens _rrsLanguage (\ s a -> s{_rrsLanguage = a})
instance GoogleRequest RoomsReportStatus where
type Rs RoomsReportStatus = RoomStatus
type Scopes RoomsReportStatus =
'["https://www.googleapis.com/auth/games"]
requestClient RoomsReportStatus'{..}
= go _rrsRoomId _rrsLanguage (Just AltJSON)
_rrsPayload
gamesService
where go
= buildClient
(Proxy :: Proxy RoomsReportStatusResource)
mempty