{-# 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.Patch
(
PretargetingConfigPatchResource
, pretargetingConfigPatch
, PretargetingConfigPatch
, pcpPayload
, pcpAccountId
, pcpConfigId
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type PretargetingConfigPatchResource =
"adexchangebuyer" :>
"v1.4" :>
"pretargetingconfigs" :>
Capture "accountId" (Textual Int64) :>
Capture "configId" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] PretargetingConfig :>
Patch '[JSON] PretargetingConfig
data PretargetingConfigPatch = PretargetingConfigPatch'
{ _pcpPayload :: !PretargetingConfig
, _pcpAccountId :: !(Textual Int64)
, _pcpConfigId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
pretargetingConfigPatch
:: PretargetingConfig
-> Int64
-> Int64
-> PretargetingConfigPatch
pretargetingConfigPatch pPcpPayload_ pPcpAccountId_ pPcpConfigId_ =
PretargetingConfigPatch'
{ _pcpPayload = pPcpPayload_
, _pcpAccountId = _Coerce # pPcpAccountId_
, _pcpConfigId = _Coerce # pPcpConfigId_
}
pcpPayload :: Lens' PretargetingConfigPatch PretargetingConfig
pcpPayload
= lens _pcpPayload (\ s a -> s{_pcpPayload = a})
pcpAccountId :: Lens' PretargetingConfigPatch Int64
pcpAccountId
= lens _pcpAccountId (\ s a -> s{_pcpAccountId = a})
. _Coerce
pcpConfigId :: Lens' PretargetingConfigPatch Int64
pcpConfigId
= lens _pcpConfigId (\ s a -> s{_pcpConfigId = a}) .
_Coerce
instance GoogleRequest PretargetingConfigPatch where
type Rs PretargetingConfigPatch = PretargetingConfig
type Scopes PretargetingConfigPatch =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient PretargetingConfigPatch'{..}
= go _pcpAccountId _pcpConfigId (Just AltJSON)
_pcpPayload
adExchangeBuyerService
where go
= buildClient
(Proxy :: Proxy PretargetingConfigPatchResource)
mempty