{-# 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.Patch
(
CustomChannelsPatchResource
, customChannelsPatch
, CustomChannelsPatch
, ccpCustomChannelId
, ccpPayload
, ccpAdClientId
) where
import Network.Google.AdSenseHost.Types
import Network.Google.Prelude
type CustomChannelsPatchResource =
"adsensehost" :>
"v4.1" :>
"adclients" :>
Capture "adClientId" Text :>
"customchannels" :>
QueryParam "customChannelId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CustomChannel :>
Patch '[JSON] CustomChannel
data CustomChannelsPatch = CustomChannelsPatch'
{ _ccpCustomChannelId :: !Text
, _ccpPayload :: !CustomChannel
, _ccpAdClientId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
customChannelsPatch
:: Text
-> CustomChannel
-> Text
-> CustomChannelsPatch
customChannelsPatch pCcpCustomChannelId_ pCcpPayload_ pCcpAdClientId_ =
CustomChannelsPatch'
{ _ccpCustomChannelId = pCcpCustomChannelId_
, _ccpPayload = pCcpPayload_
, _ccpAdClientId = pCcpAdClientId_
}
ccpCustomChannelId :: Lens' CustomChannelsPatch Text
ccpCustomChannelId
= lens _ccpCustomChannelId
(\ s a -> s{_ccpCustomChannelId = a})
ccpPayload :: Lens' CustomChannelsPatch CustomChannel
ccpPayload
= lens _ccpPayload (\ s a -> s{_ccpPayload = a})
ccpAdClientId :: Lens' CustomChannelsPatch Text
ccpAdClientId
= lens _ccpAdClientId
(\ s a -> s{_ccpAdClientId = a})
instance GoogleRequest CustomChannelsPatch where
type Rs CustomChannelsPatch = CustomChannel
type Scopes CustomChannelsPatch =
'["https://www.googleapis.com/auth/adsensehost"]
requestClient CustomChannelsPatch'{..}
= go _ccpAdClientId (Just _ccpCustomChannelId)
(Just AltJSON)
_ccpPayload
adSenseHostService
where go
= buildClient
(Proxy :: Proxy CustomChannelsPatchResource)
mempty