{-# 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.Alerts.List
(
AlertsListResource
, alertsList
, AlertsList
, alLocale
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AlertsListResource =
"adsense" :>
"v1.4" :>
"alerts" :>
QueryParam "locale" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Alerts
newtype AlertsList = AlertsList'
{ _alLocale :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
alertsList
:: AlertsList
alertsList =
AlertsList'
{ _alLocale = Nothing
}
alLocale :: Lens' AlertsList (Maybe Text)
alLocale = lens _alLocale (\ s a -> s{_alLocale = a})
instance GoogleRequest AlertsList where
type Rs AlertsList = Alerts
type Scopes AlertsList =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AlertsList'{..}
= go _alLocale (Just AltJSON) adSenseService
where go
= buildClient (Proxy :: Proxy AlertsListResource)
mempty