{-# 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.Patch
(
CreativeFieldsPatchResource
, creativeFieldsPatch
, CreativeFieldsPatch
, cfpProFileId
, cfpPayload
, cfpId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CreativeFieldsPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"creativeFields" :>
QueryParam "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreativeField :>
Patch '[JSON] CreativeField
data CreativeFieldsPatch = CreativeFieldsPatch'
{ _cfpProFileId :: !(Textual Int64)
, _cfpPayload :: !CreativeField
, _cfpId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
creativeFieldsPatch
:: Int64
-> CreativeField
-> Int64
-> CreativeFieldsPatch
creativeFieldsPatch pCfpProFileId_ pCfpPayload_ pCfpId_ =
CreativeFieldsPatch'
{ _cfpProFileId = _Coerce # pCfpProFileId_
, _cfpPayload = pCfpPayload_
, _cfpId = _Coerce # pCfpId_
}
cfpProFileId :: Lens' CreativeFieldsPatch Int64
cfpProFileId
= lens _cfpProFileId (\ s a -> s{_cfpProFileId = a})
. _Coerce
cfpPayload :: Lens' CreativeFieldsPatch CreativeField
cfpPayload
= lens _cfpPayload (\ s a -> s{_cfpPayload = a})
cfpId :: Lens' CreativeFieldsPatch Int64
cfpId
= lens _cfpId (\ s a -> s{_cfpId = a}) . _Coerce
instance GoogleRequest CreativeFieldsPatch where
type Rs CreativeFieldsPatch = CreativeField
type Scopes CreativeFieldsPatch =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CreativeFieldsPatch'{..}
= go _cfpProFileId (Just _cfpId) (Just AltJSON)
_cfpPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy CreativeFieldsPatchResource)
mempty