{-# 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.CreativeFields.Update
(
CreativeFieldsUpdateResource
, creativeFieldsUpdate
, CreativeFieldsUpdate
, cfuProFileId
, cfuPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CreativeFieldsUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"creativeFields" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreativeField :>
Put '[JSON] CreativeField
data CreativeFieldsUpdate = CreativeFieldsUpdate'
{ _cfuProFileId :: !(Textual Int64)
, _cfuPayload :: !CreativeField
} deriving (Eq,Show,Data,Typeable,Generic)
creativeFieldsUpdate
:: Int64
-> CreativeField
-> CreativeFieldsUpdate
creativeFieldsUpdate pCfuProFileId_ pCfuPayload_ =
CreativeFieldsUpdate'
{ _cfuProFileId = _Coerce # pCfuProFileId_
, _cfuPayload = pCfuPayload_
}
cfuProFileId :: Lens' CreativeFieldsUpdate Int64
cfuProFileId
= lens _cfuProFileId (\ s a -> s{_cfuProFileId = a})
. _Coerce
cfuPayload :: Lens' CreativeFieldsUpdate CreativeField
cfuPayload
= lens _cfuPayload (\ s a -> s{_cfuPayload = a})
instance GoogleRequest CreativeFieldsUpdate where
type Rs CreativeFieldsUpdate = CreativeField
type Scopes CreativeFieldsUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CreativeFieldsUpdate'{..}
= go _cfuProFileId (Just AltJSON) _cfuPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy CreativeFieldsUpdateResource)
mempty