{-# 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.Get
(
CustomChannelsGetResource
, customChannelsGet
, CustomChannelsGet
, ccgCustomChannelId
, ccgAdClientId
) where
import Network.Google.AdSenseHost.Types
import Network.Google.Prelude
type CustomChannelsGetResource =
"adsensehost" :>
"v4.1" :>
"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/adsensehost"]
requestClient CustomChannelsGet'{..}
= go _ccgAdClientId _ccgCustomChannelId
(Just AltJSON)
adSenseHostService
where go
= buildClient
(Proxy :: Proxy CustomChannelsGetResource)
mempty