{-# 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.AdExchangeBuyer.PretargetingConfig.Update
(
PretargetingConfigUpdateResource
, pretargetingConfigUpdate
, PretargetingConfigUpdate
, pcuPayload
, pcuAccountId
, pcuConfigId
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type PretargetingConfigUpdateResource =
"adexchangebuyer" :>
"v1.4" :>
"pretargetingconfigs" :>
Capture "accountId" (Textual Int64) :>
Capture "configId" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PretargetingConfig :>
Put '[JSON] PretargetingConfig
data PretargetingConfigUpdate = PretargetingConfigUpdate'
{ _pcuPayload :: !PretargetingConfig
, _pcuAccountId :: !(Textual Int64)
, _pcuConfigId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
pretargetingConfigUpdate
:: PretargetingConfig
-> Int64
-> Int64
-> PretargetingConfigUpdate
pretargetingConfigUpdate pPcuPayload_ pPcuAccountId_ pPcuConfigId_ =
PretargetingConfigUpdate'
{ _pcuPayload = pPcuPayload_
, _pcuAccountId = _Coerce # pPcuAccountId_
, _pcuConfigId = _Coerce # pPcuConfigId_
}
pcuPayload :: Lens' PretargetingConfigUpdate PretargetingConfig
pcuPayload
= lens _pcuPayload (\ s a -> s{_pcuPayload = a})
pcuAccountId :: Lens' PretargetingConfigUpdate Int64
pcuAccountId
= lens _pcuAccountId (\ s a -> s{_pcuAccountId = a})
. _Coerce
pcuConfigId :: Lens' PretargetingConfigUpdate Int64
pcuConfigId
= lens _pcuConfigId (\ s a -> s{_pcuConfigId = a}) .
_Coerce
instance GoogleRequest PretargetingConfigUpdate where
type Rs PretargetingConfigUpdate = PretargetingConfig
type Scopes PretargetingConfigUpdate =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient PretargetingConfigUpdate'{..}
= go _pcuAccountId _pcuConfigId (Just AltJSON)
_pcuPayload
adExchangeBuyerService
where go
= buildClient
(Proxy :: Proxy PretargetingConfigUpdateResource)
mempty