{-# 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.AdSenseHost.Accounts.AdUnits.Patch
(
AccountsAdUnitsPatchResource
, accountsAdUnitsPatch
, AccountsAdUnitsPatch
, aaupAdUnitId
, aaupPayload
, aaupAdClientId
, aaupAccountId
) where
import Network.Google.AdSenseHost.Types
import Network.Google.Prelude
type AccountsAdUnitsPatchResource =
"adsensehost" :>
"v4.1" :>
"accounts" :>
Capture "accountId" Text :>
"adclients" :>
Capture "adClientId" Text :>
"adunits" :>
QueryParam "adUnitId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AdUnit :> Patch '[JSON] AdUnit
data AccountsAdUnitsPatch = AccountsAdUnitsPatch'
{ _aaupAdUnitId :: !Text
, _aaupPayload :: !AdUnit
, _aaupAdClientId :: !Text
, _aaupAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountsAdUnitsPatch
:: Text
-> AdUnit
-> Text
-> Text
-> AccountsAdUnitsPatch
accountsAdUnitsPatch pAaupAdUnitId_ pAaupPayload_ pAaupAdClientId_ pAaupAccountId_ =
AccountsAdUnitsPatch'
{ _aaupAdUnitId = pAaupAdUnitId_
, _aaupPayload = pAaupPayload_
, _aaupAdClientId = pAaupAdClientId_
, _aaupAccountId = pAaupAccountId_
}
aaupAdUnitId :: Lens' AccountsAdUnitsPatch Text
aaupAdUnitId
= lens _aaupAdUnitId (\ s a -> s{_aaupAdUnitId = a})
aaupPayload :: Lens' AccountsAdUnitsPatch AdUnit
aaupPayload
= lens _aaupPayload (\ s a -> s{_aaupPayload = a})
aaupAdClientId :: Lens' AccountsAdUnitsPatch Text
aaupAdClientId
= lens _aaupAdClientId
(\ s a -> s{_aaupAdClientId = a})
aaupAccountId :: Lens' AccountsAdUnitsPatch Text
aaupAccountId
= lens _aaupAccountId
(\ s a -> s{_aaupAccountId = a})
instance GoogleRequest AccountsAdUnitsPatch where
type Rs AccountsAdUnitsPatch = AdUnit
type Scopes AccountsAdUnitsPatch =
'["https://www.googleapis.com/auth/adsensehost"]
requestClient AccountsAdUnitsPatch'{..}
= go _aaupAccountId _aaupAdClientId
(Just _aaupAdUnitId)
(Just AltJSON)
_aaupPayload
adSenseHostService
where go
= buildClient
(Proxy :: Proxy AccountsAdUnitsPatchResource)
mempty