{-# 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.Directory.Notifications.List
(
NotificationsListResource
, notificationsList
, NotificationsList
, nlCustomer
, nlLanguage
, nlPageToken
, nlMaxResults
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type NotificationsListResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"notifications" :>
QueryParam "language" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Notifications
data NotificationsList = NotificationsList'
{ _nlCustomer :: !Text
, _nlLanguage :: !(Maybe Text)
, _nlPageToken :: !(Maybe Text)
, _nlMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
notificationsList
:: Text
-> NotificationsList
notificationsList pNlCustomer_ =
NotificationsList'
{ _nlCustomer = pNlCustomer_
, _nlLanguage = Nothing
, _nlPageToken = Nothing
, _nlMaxResults = Nothing
}
nlCustomer :: Lens' NotificationsList Text
nlCustomer
= lens _nlCustomer (\ s a -> s{_nlCustomer = a})
nlLanguage :: Lens' NotificationsList (Maybe Text)
nlLanguage
= lens _nlLanguage (\ s a -> s{_nlLanguage = a})
nlPageToken :: Lens' NotificationsList (Maybe Text)
nlPageToken
= lens _nlPageToken (\ s a -> s{_nlPageToken = a})
nlMaxResults :: Lens' NotificationsList (Maybe Word32)
nlMaxResults
= lens _nlMaxResults (\ s a -> s{_nlMaxResults = a})
. mapping _Coerce
instance GoogleRequest NotificationsList where
type Rs NotificationsList = Notifications
type Scopes NotificationsList =
'["https://www.googleapis.com/auth/admin.directory.notifications"]
requestClient NotificationsList'{..}
= go _nlCustomer _nlLanguage _nlPageToken
_nlMaxResults
(Just AltJSON)
directoryService
where go
= buildClient
(Proxy :: Proxy NotificationsListResource)
mempty