{-# 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.Update
(
CreativesUpdateResource
, creativesUpdate
, CreativesUpdate
, creProFileId
, crePayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type CreativesUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"creatives" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Creative :> Put '[JSON] Creative
data CreativesUpdate = CreativesUpdate'
{ _creProFileId :: !(Textual Int64)
, _crePayload :: !Creative
} deriving (Eq,Show,Data,Typeable,Generic)
creativesUpdate
:: Int64
-> Creative
-> CreativesUpdate
creativesUpdate pCreProFileId_ pCrePayload_ =
CreativesUpdate'
{ _creProFileId = _Coerce # pCreProFileId_
, _crePayload = pCrePayload_
}
creProFileId :: Lens' CreativesUpdate Int64
creProFileId
= lens _creProFileId (\ s a -> s{_creProFileId = a})
. _Coerce
crePayload :: Lens' CreativesUpdate Creative
crePayload
= lens _crePayload (\ s a -> s{_crePayload = a})
instance GoogleRequest CreativesUpdate where
type Rs CreativesUpdate = Creative
type Scopes CreativesUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient CreativesUpdate'{..}
= go _creProFileId (Just AltJSON) _crePayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy CreativesUpdateResource)
mempty