{-# 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.Files.Get
(
ReportsFilesGetResource
, reportsFilesGet
, ReportsFilesGet
, rfgReportId
, rfgProFileId
, rfgFileId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type ReportsFilesGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"reports" :>
Capture "reportId" (Textual Int64) :>
"files" :>
Capture "fileId" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] File
:<|>
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"reports" :>
Capture "reportId" (Textual Int64) :>
"files" :>
Capture "fileId" (Textual Int64) :>
QueryParam "alt" AltMedia :>
Get '[OctetStream] Stream
data ReportsFilesGet = ReportsFilesGet'
{ _rfgReportId :: !(Textual Int64)
, _rfgProFileId :: !(Textual Int64)
, _rfgFileId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
reportsFilesGet
:: Int64
-> Int64
-> Int64
-> ReportsFilesGet
reportsFilesGet pRfgReportId_ pRfgProFileId_ pRfgFileId_ =
ReportsFilesGet'
{ _rfgReportId = _Coerce # pRfgReportId_
, _rfgProFileId = _Coerce # pRfgProFileId_
, _rfgFileId = _Coerce # pRfgFileId_
}
rfgReportId :: Lens' ReportsFilesGet Int64
rfgReportId
= lens _rfgReportId (\ s a -> s{_rfgReportId = a}) .
_Coerce
rfgProFileId :: Lens' ReportsFilesGet Int64
rfgProFileId
= lens _rfgProFileId (\ s a -> s{_rfgProFileId = a})
. _Coerce
rfgFileId :: Lens' ReportsFilesGet Int64
rfgFileId
= lens _rfgFileId (\ s a -> s{_rfgFileId = a}) .
_Coerce
instance GoogleRequest ReportsFilesGet where
type Rs ReportsFilesGet = File
type Scopes ReportsFilesGet =
'["https://www.googleapis.com/auth/dfareporting"]
requestClient ReportsFilesGet'{..}
= go _rfgProFileId _rfgReportId _rfgFileId
(Just AltJSON)
dFAReportingService
where go :<|> _
= buildClient
(Proxy :: Proxy ReportsFilesGetResource)
mempty
instance GoogleRequest
(MediaDownload ReportsFilesGet) where
type Rs (MediaDownload ReportsFilesGet) = Stream
type Scopes (MediaDownload ReportsFilesGet) =
Scopes ReportsFilesGet
requestClient (MediaDownload ReportsFilesGet'{..})
= go _rfgProFileId _rfgReportId _rfgFileId
(Just AltMedia)
dFAReportingService
where _ :<|> go
= buildClient
(Proxy :: Proxy ReportsFilesGetResource)
mempty