{-# 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.Accounts.List
(
AccountsListResource
, accountsList
, AccountsList
, alFilterAdClientId
) where
import Network.Google.AdSenseHost.Types
import Network.Google.Prelude
type AccountsListResource =
"adsensehost" :>
"v4.1" :>
"accounts" :>
QueryParams "filterAdClientId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Accounts
newtype AccountsList = AccountsList'
{ _alFilterAdClientId :: [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
accountsList
:: [Text]
-> AccountsList
accountsList pAlFilterAdClientId_ =
AccountsList'
{ _alFilterAdClientId = _Coerce # pAlFilterAdClientId_
}
alFilterAdClientId :: Lens' AccountsList [Text]
alFilterAdClientId
= lens _alFilterAdClientId
(\ s a -> s{_alFilterAdClientId = a})
. _Coerce
instance GoogleRequest AccountsList where
type Rs AccountsList = Accounts
type Scopes AccountsList =
'["https://www.googleapis.com/auth/adsensehost"]
requestClient AccountsList'{..}
= go _alFilterAdClientId (Just AltJSON)
adSenseHostService
where go
= buildClient (Proxy :: Proxy AccountsListResource)
mempty