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