{-# 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.CustomChannels.Update
(
CustomChannelsUpdateResource
, customChannelsUpdate
, CustomChannelsUpdate
, ccuPayload
, ccuAdClientId
) where
import Network.Google.AdSenseHost.Types
import Network.Google.Prelude
type CustomChannelsUpdateResource =
"adsensehost" :>
"v4.1" :>
"adclients" :>
Capture "adClientId" Text :>
"customchannels" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CustomChannel :>
Put '[JSON] CustomChannel
data CustomChannelsUpdate = CustomChannelsUpdate'
{ _ccuPayload :: !CustomChannel
, _ccuAdClientId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
customChannelsUpdate
:: CustomChannel
-> Text
-> CustomChannelsUpdate
customChannelsUpdate pCcuPayload_ pCcuAdClientId_ =
CustomChannelsUpdate'
{ _ccuPayload = pCcuPayload_
, _ccuAdClientId = pCcuAdClientId_
}
ccuPayload :: Lens' CustomChannelsUpdate CustomChannel
ccuPayload
= lens _ccuPayload (\ s a -> s{_ccuPayload = a})
ccuAdClientId :: Lens' CustomChannelsUpdate Text
ccuAdClientId
= lens _ccuAdClientId
(\ s a -> s{_ccuAdClientId = a})
instance GoogleRequest CustomChannelsUpdate where
type Rs CustomChannelsUpdate = CustomChannel
type Scopes CustomChannelsUpdate =
'["https://www.googleapis.com/auth/adsensehost"]
requestClient CustomChannelsUpdate'{..}
= go _ccuAdClientId (Just AltJSON) _ccuPayload
adSenseHostService
where go
= buildClient
(Proxy :: Proxy CustomChannelsUpdateResource)
mempty