{-# 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.Storage.Notifications.List
(
NotificationsListResource
, notificationsList
, NotificationsList
, nlBucket
, nlUserProject
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type NotificationsListResource =
"storage" :>
"v1" :>
"b" :>
Capture "bucket" Text :>
"notificationConfigs" :>
QueryParam "userProject" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Notifications
data NotificationsList = NotificationsList'
{ _nlBucket :: !Text
, _nlUserProject :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
notificationsList
:: Text
-> NotificationsList
notificationsList pNlBucket_ =
NotificationsList'
{ _nlBucket = pNlBucket_
, _nlUserProject = Nothing
}
nlBucket :: Lens' NotificationsList Text
nlBucket = lens _nlBucket (\ s a -> s{_nlBucket = a})
nlUserProject :: Lens' NotificationsList (Maybe Text)
nlUserProject
= lens _nlUserProject
(\ s a -> s{_nlUserProject = a})
instance GoogleRequest NotificationsList where
type Rs NotificationsList = Notifications
type Scopes NotificationsList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only",
"https://www.googleapis.com/auth/devstorage.full_control",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/devstorage.read_write"]
requestClient NotificationsList'{..}
= go _nlBucket _nlUserProject (Just AltJSON)
storageService
where go
= buildClient
(Proxy :: Proxy NotificationsListResource)
mempty