{-# 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.TargetingTemplates.Update
(
TargetingTemplatesUpdateResource
, targetingTemplatesUpdate
, TargetingTemplatesUpdate
, ttuProFileId
, ttuPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type TargetingTemplatesUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"targetingTemplates" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TargetingTemplate :>
Put '[JSON] TargetingTemplate
data TargetingTemplatesUpdate = TargetingTemplatesUpdate'
{ _ttuProFileId :: !(Textual Int64)
, _ttuPayload :: !TargetingTemplate
} deriving (Eq,Show,Data,Typeable,Generic)
targetingTemplatesUpdate
:: Int64
-> TargetingTemplate
-> TargetingTemplatesUpdate
targetingTemplatesUpdate pTtuProFileId_ pTtuPayload_ =
TargetingTemplatesUpdate'
{ _ttuProFileId = _Coerce # pTtuProFileId_
, _ttuPayload = pTtuPayload_
}
ttuProFileId :: Lens' TargetingTemplatesUpdate Int64
ttuProFileId
= lens _ttuProFileId (\ s a -> s{_ttuProFileId = a})
. _Coerce
ttuPayload :: Lens' TargetingTemplatesUpdate TargetingTemplate
ttuPayload
= lens _ttuPayload (\ s a -> s{_ttuPayload = a})
instance GoogleRequest TargetingTemplatesUpdate where
type Rs TargetingTemplatesUpdate = TargetingTemplate
type Scopes TargetingTemplatesUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient TargetingTemplatesUpdate'{..}
= go _ttuProFileId (Just AltJSON) _ttuPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy TargetingTemplatesUpdateResource)
mempty