{-# 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.Update
(
ReportsUpdateResource
, reportsUpdate
, ReportsUpdate
, ruReportId
, ruProFileId
, ruPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type ReportsUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"reports" :>
Capture "reportId" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Report :> Put '[JSON] Report
data ReportsUpdate = ReportsUpdate'
{ _ruReportId :: !(Textual Int64)
, _ruProFileId :: !(Textual Int64)
, _ruPayload :: !Report
} deriving (Eq,Show,Data,Typeable,Generic)
reportsUpdate
:: Int64
-> Int64
-> Report
-> ReportsUpdate
reportsUpdate pRuReportId_ pRuProFileId_ pRuPayload_ =
ReportsUpdate'
{ _ruReportId = _Coerce # pRuReportId_
, _ruProFileId = _Coerce # pRuProFileId_
, _ruPayload = pRuPayload_
}
ruReportId :: Lens' ReportsUpdate Int64
ruReportId
= lens _ruReportId (\ s a -> s{_ruReportId = a}) .
_Coerce
ruProFileId :: Lens' ReportsUpdate Int64
ruProFileId
= lens _ruProFileId (\ s a -> s{_ruProFileId = a}) .
_Coerce
ruPayload :: Lens' ReportsUpdate Report
ruPayload
= lens _ruPayload (\ s a -> s{_ruPayload = a})
instance GoogleRequest ReportsUpdate where
type Rs ReportsUpdate = Report
type Scopes ReportsUpdate =
'["https://www.googleapis.com/auth/dfareporting"]
requestClient ReportsUpdate'{..}
= go _ruProFileId _ruReportId (Just AltJSON)
_ruPayload
dFAReportingService
where go
= buildClient (Proxy :: Proxy ReportsUpdateResource)
mempty