{-# 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.DoubleClickSearch.Reports.Generate
(
ReportsGenerateResource
, reportsGenerate
, ReportsGenerate
, rgPayload
) where
import Network.Google.DoubleClickSearch.Types
import Network.Google.Prelude
type ReportsGenerateResource =
"doubleclicksearch" :>
"v2" :>
"reports" :>
"generate" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ReportRequest :> Post '[JSON] Report
newtype ReportsGenerate = ReportsGenerate'
{ _rgPayload :: ReportRequest
} deriving (Eq,Show,Data,Typeable,Generic)
reportsGenerate
:: ReportRequest
-> ReportsGenerate
reportsGenerate pRgPayload_ =
ReportsGenerate'
{ _rgPayload = pRgPayload_
}
rgPayload :: Lens' ReportsGenerate ReportRequest
rgPayload
= lens _rgPayload (\ s a -> s{_rgPayload = a})
instance GoogleRequest ReportsGenerate where
type Rs ReportsGenerate = Report
type Scopes ReportsGenerate =
'["https://www.googleapis.com/auth/doubleclicksearch"]
requestClient ReportsGenerate'{..}
= go (Just AltJSON) _rgPayload
doubleClickSearchService
where go
= buildClient
(Proxy :: Proxy ReportsGenerateResource)
mempty