{-# 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.Patch
(
AdvertisersPatchResource
, advertisersPatch
, AdvertisersPatch
, apProFileId
, apPayload
, apId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AdvertisersPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"advertisers" :>
QueryParam "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Advertiser :>
Patch '[JSON] Advertiser
data AdvertisersPatch = AdvertisersPatch'
{ _apProFileId :: !(Textual Int64)
, _apPayload :: !Advertiser
, _apId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
advertisersPatch
:: Int64
-> Advertiser
-> Int64
-> AdvertisersPatch
advertisersPatch pApProFileId_ pApPayload_ pApId_ =
AdvertisersPatch'
{ _apProFileId = _Coerce # pApProFileId_
, _apPayload = pApPayload_
, _apId = _Coerce # pApId_
}
apProFileId :: Lens' AdvertisersPatch Int64
apProFileId
= lens _apProFileId (\ s a -> s{_apProFileId = a}) .
_Coerce
apPayload :: Lens' AdvertisersPatch Advertiser
apPayload
= lens _apPayload (\ s a -> s{_apPayload = a})
apId :: Lens' AdvertisersPatch Int64
apId = lens _apId (\ s a -> s{_apId = a}) . _Coerce
instance GoogleRequest AdvertisersPatch where
type Rs AdvertisersPatch = Advertiser
type Scopes AdvertisersPatch =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AdvertisersPatch'{..}
= go _apProFileId (Just _apId) (Just AltJSON)
_apPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy AdvertisersPatchResource)
mempty