{-# 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.Patch
(
ReportsPatchResource
, reportsPatch
, ReportsPatch
, rpReportId
, rpProFileId
, rpPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type ReportsPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"reports" :>
Capture "reportId" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Report :> Patch '[JSON] Report
data ReportsPatch = ReportsPatch'
{ _rpReportId :: !(Textual Int64)
, _rpProFileId :: !(Textual Int64)
, _rpPayload :: !Report
} deriving (Eq,Show,Data,Typeable,Generic)
reportsPatch
:: Int64
-> Int64
-> Report
-> ReportsPatch
reportsPatch pRpReportId_ pRpProFileId_ pRpPayload_ =
ReportsPatch'
{ _rpReportId = _Coerce # pRpReportId_
, _rpProFileId = _Coerce # pRpProFileId_
, _rpPayload = pRpPayload_
}
rpReportId :: Lens' ReportsPatch Int64
rpReportId
= lens _rpReportId (\ s a -> s{_rpReportId = a}) .
_Coerce
rpProFileId :: Lens' ReportsPatch Int64
rpProFileId
= lens _rpProFileId (\ s a -> s{_rpProFileId = a}) .
_Coerce
rpPayload :: Lens' ReportsPatch Report
rpPayload
= lens _rpPayload (\ s a -> s{_rpPayload = a})
instance GoogleRequest ReportsPatch where
type Rs ReportsPatch = Report
type Scopes ReportsPatch =
'["https://www.googleapis.com/auth/dfareporting"]
requestClient ReportsPatch'{..}
= go _rpProFileId _rpReportId (Just AltJSON)
_rpPayload
dFAReportingService
where go
= buildClient (Proxy :: Proxy ReportsPatchResource)
mempty