{-# 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.AdExchangeSeller.Accounts.Alerts.List
(
AccountsAlertsListResource
, accountsAlertsList
, AccountsAlertsList
, aalLocale
, aalAccountId
) where
import Network.Google.AdExchangeSeller.Types
import Network.Google.Prelude
type AccountsAlertsListResource =
"adexchangeseller" :>
"v2.0" :>
"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/adexchange.seller",
"https://www.googleapis.com/auth/adexchange.seller.readonly"]
requestClient AccountsAlertsList'{..}
= go _aalAccountId _aalLocale (Just AltJSON)
adExchangeSellerService
where go
= buildClient
(Proxy :: Proxy AccountsAlertsListResource)
mempty