{-# 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.Accounts.Alerts.List
(
AccountsAlertsListResource
, accountsAlertsList
, AccountsAlertsList
, aalLocale
, aalAccountId
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AccountsAlertsListResource =
"adsense" :>
"v1.4" :>
"accounts" :>
Capture "accountId" Text :>
"alerts" :>
QueryParam "locale" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Alerts
data AccountsAlertsList = AccountsAlertsList'
{ _aalLocale :: !(Maybe Text)
, _aalAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountsAlertsList
:: Text
-> AccountsAlertsList
accountsAlertsList pAalAccountId_ =
AccountsAlertsList'
{ _aalLocale = Nothing
, _aalAccountId = pAalAccountId_
}
aalLocale :: Lens' AccountsAlertsList (Maybe Text)
aalLocale
= lens _aalLocale (\ s a -> s{_aalLocale = a})
aalAccountId :: Lens' AccountsAlertsList Text
aalAccountId
= lens _aalAccountId (\ s a -> s{_aalAccountId = a})
instance GoogleRequest AccountsAlertsList where
type Rs AccountsAlertsList = Alerts
type Scopes AccountsAlertsList =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AccountsAlertsList'{..}
= go _aalAccountId _aalLocale (Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy AccountsAlertsListResource)
mempty