{-# 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.Update
(
AccountsAdUnitsUpdateResource
, accountsAdUnitsUpdate
, AccountsAdUnitsUpdate
, aauuPayload
, aauuAdClientId
, aauuAccountId
) where
import Network.Google.AdSenseHost.Types
import Network.Google.Prelude
type AccountsAdUnitsUpdateResource =
"adsensehost" :>
"v4.1" :>
"accounts" :>
Capture "accountId" Text :>
"adclients" :>
Capture "adClientId" Text :>
"adunits" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AdUnit :> Put '[JSON] AdUnit
data AccountsAdUnitsUpdate = AccountsAdUnitsUpdate'
{ _aauuPayload :: !AdUnit
, _aauuAdClientId :: !Text
, _aauuAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountsAdUnitsUpdate
:: AdUnit
-> Text
-> Text
-> AccountsAdUnitsUpdate
accountsAdUnitsUpdate pAauuPayload_ pAauuAdClientId_ pAauuAccountId_ =
AccountsAdUnitsUpdate'
{ _aauuPayload = pAauuPayload_
, _aauuAdClientId = pAauuAdClientId_
, _aauuAccountId = pAauuAccountId_
}
aauuPayload :: Lens' AccountsAdUnitsUpdate AdUnit
aauuPayload
= lens _aauuPayload (\ s a -> s{_aauuPayload = a})
aauuAdClientId :: Lens' AccountsAdUnitsUpdate Text
aauuAdClientId
= lens _aauuAdClientId
(\ s a -> s{_aauuAdClientId = a})
aauuAccountId :: Lens' AccountsAdUnitsUpdate Text
aauuAccountId
= lens _aauuAccountId
(\ s a -> s{_aauuAccountId = a})
instance GoogleRequest AccountsAdUnitsUpdate where
type Rs AccountsAdUnitsUpdate = AdUnit
type Scopes AccountsAdUnitsUpdate =
'["https://www.googleapis.com/auth/adsensehost"]
requestClient AccountsAdUnitsUpdate'{..}
= go _aauuAccountId _aauuAdClientId (Just AltJSON)
_aauuPayload
adSenseHostService
where go
= buildClient
(Proxy :: Proxy AccountsAdUnitsUpdateResource)
mempty