{-# 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.CreativeGroups.Update
(
CreativeGroupsUpdateResource
, creativeGroupsUpdate
, CreativeGroupsUpdate
, cguProFileId
, cguPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CreativeGroupsUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"creativeGroups" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreativeGroup :>
Put '[JSON] CreativeGroup
data CreativeGroupsUpdate = CreativeGroupsUpdate'
{ _cguProFileId :: !(Textual Int64)
, _cguPayload :: !CreativeGroup
} deriving (Eq,Show,Data,Typeable,Generic)
creativeGroupsUpdate
:: Int64
-> CreativeGroup
-> CreativeGroupsUpdate
creativeGroupsUpdate pCguProFileId_ pCguPayload_ =
CreativeGroupsUpdate'
{ _cguProFileId = _Coerce # pCguProFileId_
, _cguPayload = pCguPayload_
}
cguProFileId :: Lens' CreativeGroupsUpdate Int64
cguProFileId
= lens _cguProFileId (\ s a -> s{_cguProFileId = a})
. _Coerce
cguPayload :: Lens' CreativeGroupsUpdate CreativeGroup
cguPayload
= lens _cguPayload (\ s a -> s{_cguPayload = a})
instance GoogleRequest CreativeGroupsUpdate where
type Rs CreativeGroupsUpdate = CreativeGroup
type Scopes CreativeGroupsUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CreativeGroupsUpdate'{..}
= go _cguProFileId (Just AltJSON) _cguPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy CreativeGroupsUpdateResource)
mempty