{-# 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.Ads.Update
(
AdsUpdateResource
, adsUpdate
, AdsUpdate
, aProFileId
, aPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AdsUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"ads" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Ad :> Put '[JSON] Ad
data AdsUpdate = AdsUpdate'
{ _aProFileId :: !(Textual Int64)
, _aPayload :: !Ad
} deriving (Eq,Show,Data,Typeable,Generic)
adsUpdate
:: Int64
-> Ad
-> AdsUpdate
adsUpdate pAProFileId_ pAPayload_ =
AdsUpdate'
{ _aProFileId = _Coerce # pAProFileId_
, _aPayload = pAPayload_
}
aProFileId :: Lens' AdsUpdate Int64
aProFileId
= lens _aProFileId (\ s a -> s{_aProFileId = a}) .
_Coerce
aPayload :: Lens' AdsUpdate Ad
aPayload = lens _aPayload (\ s a -> s{_aPayload = a})
instance GoogleRequest AdsUpdate where
type Rs AdsUpdate = Ad
type Scopes AdsUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AdsUpdate'{..}
= go _aProFileId (Just AltJSON) _aPayload
dFAReportingService
where go
= buildClient (Proxy :: Proxy AdsUpdateResource)
mempty