{-# 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.Patch
(
CreativeFieldValuesPatchResource
, creativeFieldValuesPatch
, CreativeFieldValuesPatch
, cfvpCreativeFieldId
, cfvpProFileId
, cfvpPayload
, cfvpId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CreativeFieldValuesPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"creativeFields" :>
Capture "creativeFieldId" (Textual Int64) :>
"creativeFieldValues" :>
QueryParam "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreativeFieldValue :>
Patch '[JSON] CreativeFieldValue
data CreativeFieldValuesPatch = CreativeFieldValuesPatch'
{ _cfvpCreativeFieldId :: !(Textual Int64)
, _cfvpProFileId :: !(Textual Int64)
, _cfvpPayload :: !CreativeFieldValue
, _cfvpId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
creativeFieldValuesPatch
:: Int64
-> Int64
-> CreativeFieldValue
-> Int64
-> CreativeFieldValuesPatch
creativeFieldValuesPatch pCfvpCreativeFieldId_ pCfvpProFileId_ pCfvpPayload_ pCfvpId_ =
CreativeFieldValuesPatch'
{ _cfvpCreativeFieldId = _Coerce # pCfvpCreativeFieldId_
, _cfvpProFileId = _Coerce # pCfvpProFileId_
, _cfvpPayload = pCfvpPayload_
, _cfvpId = _Coerce # pCfvpId_
}
cfvpCreativeFieldId :: Lens' CreativeFieldValuesPatch Int64
cfvpCreativeFieldId
= lens _cfvpCreativeFieldId
(\ s a -> s{_cfvpCreativeFieldId = a})
. _Coerce
cfvpProFileId :: Lens' CreativeFieldValuesPatch Int64
cfvpProFileId
= lens _cfvpProFileId
(\ s a -> s{_cfvpProFileId = a})
. _Coerce
cfvpPayload :: Lens' CreativeFieldValuesPatch CreativeFieldValue
cfvpPayload
= lens _cfvpPayload (\ s a -> s{_cfvpPayload = a})
cfvpId :: Lens' CreativeFieldValuesPatch Int64
cfvpId
= lens _cfvpId (\ s a -> s{_cfvpId = a}) . _Coerce
instance GoogleRequest CreativeFieldValuesPatch where
type Rs CreativeFieldValuesPatch = CreativeFieldValue
type Scopes CreativeFieldValuesPatch =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CreativeFieldValuesPatch'{..}
= go _cfvpProFileId _cfvpCreativeFieldId
(Just _cfvpId)
(Just AltJSON)
_cfvpPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy CreativeFieldValuesPatchResource)
mempty