{-# 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.AdSense.CustomChannels.Get
(
CustomChannelsGetResource
, customChannelsGet
, CustomChannelsGet
, ccgCustomChannelId
, ccgAdClientId
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type CustomChannelsGetResource =
"adsense" :>
"v1.4" :>
"adclients" :>
Capture "adClientId" Text :>
"customchannels" :>
Capture "customChannelId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] CustomChannel
data CustomChannelsGet = CustomChannelsGet'
{ _ccgCustomChannelId :: !Text
, _ccgAdClientId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
customChannelsGet
:: Text
-> Text
-> CustomChannelsGet
customChannelsGet pCcgCustomChannelId_ pCcgAdClientId_ =
CustomChannelsGet'
{ _ccgCustomChannelId = pCcgCustomChannelId_
, _ccgAdClientId = pCcgAdClientId_
}
ccgCustomChannelId :: Lens' CustomChannelsGet Text
ccgCustomChannelId
= lens _ccgCustomChannelId
(\ s a -> s{_ccgCustomChannelId = a})
ccgAdClientId :: Lens' CustomChannelsGet Text
ccgAdClientId
= lens _ccgAdClientId
(\ s a -> s{_ccgAdClientId = a})
instance GoogleRequest CustomChannelsGet where
type Rs CustomChannelsGet = CustomChannel
type Scopes CustomChannelsGet =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient CustomChannelsGet'{..}
= go _ccgAdClientId _ccgCustomChannelId
(Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy CustomChannelsGetResource)
mempty