{-# 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.Creatives.Patch
(
CreativesPatchResource
, creativesPatch
, CreativesPatch
, cppProFileId
, cppPayload
, cppId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CreativesPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"creatives" :>
QueryParam "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Creative :> Patch '[JSON] Creative
data CreativesPatch = CreativesPatch'
{ _cppProFileId :: !(Textual Int64)
, _cppPayload :: !Creative
, _cppId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
creativesPatch
:: Int64
-> Creative
-> Int64
-> CreativesPatch
creativesPatch pCppProFileId_ pCppPayload_ pCppId_ =
CreativesPatch'
{ _cppProFileId = _Coerce # pCppProFileId_
, _cppPayload = pCppPayload_
, _cppId = _Coerce # pCppId_
}
cppProFileId :: Lens' CreativesPatch Int64
cppProFileId
= lens _cppProFileId (\ s a -> s{_cppProFileId = a})
. _Coerce
cppPayload :: Lens' CreativesPatch Creative
cppPayload
= lens _cppPayload (\ s a -> s{_cppPayload = a})
cppId :: Lens' CreativesPatch Int64
cppId
= lens _cppId (\ s a -> s{_cppId = a}) . _Coerce
instance GoogleRequest CreativesPatch where
type Rs CreativesPatch = Creative
type Scopes CreativesPatch =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CreativesPatch'{..}
= go _cppProFileId (Just _cppId) (Just AltJSON)
_cppPayload
dFAReportingService
where go
= buildClient (Proxy :: Proxy CreativesPatchResource)
mempty