{-# 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.URLChannels.List
(
URLChannelsListResource
, urlChannelsList
, URLChannelsList
, uclAdClientId
, uclPageToken
, uclMaxResults
) where
import Network.Google.AdSenseHost.Types
import Network.Google.Prelude
type URLChannelsListResource =
"adsensehost" :>
"v4.1" :>
"adclients" :>
Capture "adClientId" Text :>
"urlchannels" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] URLChannels
data URLChannelsList = URLChannelsList'
{ _uclAdClientId :: !Text
, _uclPageToken :: !(Maybe Text)
, _uclMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
urlChannelsList
:: Text
-> URLChannelsList
urlChannelsList pUclAdClientId_ =
URLChannelsList'
{ _uclAdClientId = pUclAdClientId_
, _uclPageToken = Nothing
, _uclMaxResults = Nothing
}
uclAdClientId :: Lens' URLChannelsList Text
uclAdClientId
= lens _uclAdClientId
(\ s a -> s{_uclAdClientId = a})
uclPageToken :: Lens' URLChannelsList (Maybe Text)
uclPageToken
= lens _uclPageToken (\ s a -> s{_uclPageToken = a})
uclMaxResults :: Lens' URLChannelsList (Maybe Word32)
uclMaxResults
= lens _uclMaxResults
(\ s a -> s{_uclMaxResults = a})
. mapping _Coerce
instance GoogleRequest URLChannelsList where
type Rs URLChannelsList = URLChannels
type Scopes URLChannelsList =
'["https://www.googleapis.com/auth/adsensehost"]
requestClient URLChannelsList'{..}
= go _uclAdClientId _uclPageToken _uclMaxResults
(Just AltJSON)
adSenseHostService
where go
= buildClient
(Proxy :: Proxy URLChannelsListResource)
mempty