{-# 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.AdUnits.List
(
AdUnitsListResource
, adUnitsList
, AdUnitsList
, aulIncludeInactive
, aulAdClientId
, aulPageToken
, aulMaxResults
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AdUnitsListResource =
"adsense" :>
"v1.4" :>
"adclients" :>
Capture "adClientId" Text :>
"adunits" :>
QueryParam "includeInactive" Bool :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] AdUnits
data AdUnitsList = AdUnitsList'
{ _aulIncludeInactive :: !(Maybe Bool)
, _aulAdClientId :: !Text
, _aulPageToken :: !(Maybe Text)
, _aulMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
adUnitsList
:: Text
-> AdUnitsList
adUnitsList pAulAdClientId_ =
AdUnitsList'
{ _aulIncludeInactive = Nothing
, _aulAdClientId = pAulAdClientId_
, _aulPageToken = Nothing
, _aulMaxResults = Nothing
}
aulIncludeInactive :: Lens' AdUnitsList (Maybe Bool)
aulIncludeInactive
= lens _aulIncludeInactive
(\ s a -> s{_aulIncludeInactive = a})
aulAdClientId :: Lens' AdUnitsList Text
aulAdClientId
= lens _aulAdClientId
(\ s a -> s{_aulAdClientId = a})
aulPageToken :: Lens' AdUnitsList (Maybe Text)
aulPageToken
= lens _aulPageToken (\ s a -> s{_aulPageToken = a})
aulMaxResults :: Lens' AdUnitsList (Maybe Int32)
aulMaxResults
= lens _aulMaxResults
(\ s a -> s{_aulMaxResults = a})
. mapping _Coerce
instance GoogleRequest AdUnitsList where
type Rs AdUnitsList = AdUnits
type Scopes AdUnitsList =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AdUnitsList'{..}
= go _aulAdClientId _aulIncludeInactive _aulPageToken
_aulMaxResults
(Just AltJSON)
adSenseService
where go
= buildClient (Proxy :: Proxy AdUnitsListResource)
mempty