{-# 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.Advertisers.Update
(
AdvertisersUpdateResource
, advertisersUpdate
, AdvertisersUpdate
, auProFileId
, auPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AdvertisersUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"advertisers" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Advertiser :> Put '[JSON] Advertiser
data AdvertisersUpdate = AdvertisersUpdate'
{ _auProFileId :: !(Textual Int64)
, _auPayload :: !Advertiser
} deriving (Eq,Show,Data,Typeable,Generic)
advertisersUpdate
:: Int64
-> Advertiser
-> AdvertisersUpdate
advertisersUpdate pAuProFileId_ pAuPayload_ =
AdvertisersUpdate'
{ _auProFileId = _Coerce # pAuProFileId_
, _auPayload = pAuPayload_
}
auProFileId :: Lens' AdvertisersUpdate Int64
auProFileId
= lens _auProFileId (\ s a -> s{_auProFileId = a}) .
_Coerce
auPayload :: Lens' AdvertisersUpdate Advertiser
auPayload
= lens _auPayload (\ s a -> s{_auPayload = a})
instance GoogleRequest AdvertisersUpdate where
type Rs AdvertisersUpdate = Advertiser
type Scopes AdvertisersUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AdvertisersUpdate'{..}
= go _auProFileId (Just AltJSON) _auPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy AdvertisersUpdateResource)
mempty