{-# 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.CreativeFieldValues.Update
(
CreativeFieldValuesUpdateResource
, creativeFieldValuesUpdate
, CreativeFieldValuesUpdate
, cfvuCreativeFieldId
, cfvuProFileId
, cfvuPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CreativeFieldValuesUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"creativeFields" :>
Capture "creativeFieldId" (Textual Int64) :>
"creativeFieldValues" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreativeFieldValue :>
Put '[JSON] CreativeFieldValue
data CreativeFieldValuesUpdate = CreativeFieldValuesUpdate'
{ _cfvuCreativeFieldId :: !(Textual Int64)
, _cfvuProFileId :: !(Textual Int64)
, _cfvuPayload :: !CreativeFieldValue
} deriving (Eq,Show,Data,Typeable,Generic)
creativeFieldValuesUpdate
:: Int64
-> Int64
-> CreativeFieldValue
-> CreativeFieldValuesUpdate
creativeFieldValuesUpdate pCfvuCreativeFieldId_ pCfvuProFileId_ pCfvuPayload_ =
CreativeFieldValuesUpdate'
{ _cfvuCreativeFieldId = _Coerce # pCfvuCreativeFieldId_
, _cfvuProFileId = _Coerce # pCfvuProFileId_
, _cfvuPayload = pCfvuPayload_
}
cfvuCreativeFieldId :: Lens' CreativeFieldValuesUpdate Int64
cfvuCreativeFieldId
= lens _cfvuCreativeFieldId
(\ s a -> s{_cfvuCreativeFieldId = a})
. _Coerce
cfvuProFileId :: Lens' CreativeFieldValuesUpdate Int64
cfvuProFileId
= lens _cfvuProFileId
(\ s a -> s{_cfvuProFileId = a})
. _Coerce
cfvuPayload :: Lens' CreativeFieldValuesUpdate CreativeFieldValue
cfvuPayload
= lens _cfvuPayload (\ s a -> s{_cfvuPayload = a})
instance GoogleRequest CreativeFieldValuesUpdate
where
type Rs CreativeFieldValuesUpdate =
CreativeFieldValue
type Scopes CreativeFieldValuesUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CreativeFieldValuesUpdate'{..}
= go _cfvuProFileId _cfvuCreativeFieldId
(Just AltJSON)
_cfvuPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy CreativeFieldValuesUpdateResource)
mempty