{-# 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.Run
(
ReportsRunResource
, reportsRun
, ReportsRun
, rrSynchronous
, rrReportId
, rrProFileId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type ReportsRunResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"reports" :>
Capture "reportId" (Textual Int64) :>
"run" :>
QueryParam "synchronous" Bool :>
QueryParam "alt" AltJSON :> Post '[JSON] File
data ReportsRun = ReportsRun'
{ _rrSynchronous :: !Bool
, _rrReportId :: !(Textual Int64)
, _rrProFileId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
reportsRun
:: Int64
-> Int64
-> ReportsRun
reportsRun pRrReportId_ pRrProFileId_ =
ReportsRun'
{ _rrSynchronous = False
, _rrReportId = _Coerce # pRrReportId_
, _rrProFileId = _Coerce # pRrProFileId_
}
rrSynchronous :: Lens' ReportsRun Bool
rrSynchronous
= lens _rrSynchronous
(\ s a -> s{_rrSynchronous = a})
rrReportId :: Lens' ReportsRun Int64
rrReportId
= lens _rrReportId (\ s a -> s{_rrReportId = a}) .
_Coerce
rrProFileId :: Lens' ReportsRun Int64
rrProFileId
= lens _rrProFileId (\ s a -> s{_rrProFileId = a}) .
_Coerce
instance GoogleRequest ReportsRun where
type Rs ReportsRun = File
type Scopes ReportsRun =
'["https://www.googleapis.com/auth/dfareporting"]
requestClient ReportsRun'{..}
= go _rrProFileId _rrReportId (Just _rrSynchronous)
(Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy ReportsRunResource)
mempty