{-# 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.AdvertiserGroups.Update
(
AdvertiserGroupsUpdateResource
, advertiserGroupsUpdate
, AdvertiserGroupsUpdate
, aguProFileId
, aguPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AdvertiserGroupsUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"advertiserGroups" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AdvertiserGroup :>
Put '[JSON] AdvertiserGroup
data AdvertiserGroupsUpdate = AdvertiserGroupsUpdate'
{ _aguProFileId :: !(Textual Int64)
, _aguPayload :: !AdvertiserGroup
} deriving (Eq,Show,Data,Typeable,Generic)
advertiserGroupsUpdate
:: Int64
-> AdvertiserGroup
-> AdvertiserGroupsUpdate
advertiserGroupsUpdate pAguProFileId_ pAguPayload_ =
AdvertiserGroupsUpdate'
{ _aguProFileId = _Coerce # pAguProFileId_
, _aguPayload = pAguPayload_
}
aguProFileId :: Lens' AdvertiserGroupsUpdate Int64
aguProFileId
= lens _aguProFileId (\ s a -> s{_aguProFileId = a})
. _Coerce
aguPayload :: Lens' AdvertiserGroupsUpdate AdvertiserGroup
aguPayload
= lens _aguPayload (\ s a -> s{_aguPayload = a})
instance GoogleRequest AdvertiserGroupsUpdate where
type Rs AdvertiserGroupsUpdate = AdvertiserGroup
type Scopes AdvertiserGroupsUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AdvertiserGroupsUpdate'{..}
= go _aguProFileId (Just AltJSON) _aguPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy AdvertiserGroupsUpdateResource)
mempty