{-# 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.DFAReporting.Reports.Get
(
ReportsGetResource
, reportsGet
, ReportsGet
, rgReportId
, rgProFileId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type ReportsGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"reports" :>
Capture "reportId" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] Report
data ReportsGet = ReportsGet'
{ _rgReportId :: !(Textual Int64)
, _rgProFileId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
reportsGet
:: Int64
-> Int64
-> ReportsGet
reportsGet pRgReportId_ pRgProFileId_ =
ReportsGet'
{ _rgReportId = _Coerce # pRgReportId_
, _rgProFileId = _Coerce # pRgProFileId_
}
rgReportId :: Lens' ReportsGet Int64
rgReportId
= lens _rgReportId (\ s a -> s{_rgReportId = a}) .
_Coerce
rgProFileId :: Lens' ReportsGet Int64
rgProFileId
= lens _rgProFileId (\ s a -> s{_rgProFileId = a}) .
_Coerce
instance GoogleRequest ReportsGet where
type Rs ReportsGet = Report
type Scopes ReportsGet =
'["https://www.googleapis.com/auth/dfareporting"]
requestClient ReportsGet'{..}
= go _rgProFileId _rgReportId (Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy ReportsGetResource)
mempty