{-# 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.Monitoring.Projects.AlertPolicies.List
(
ProjectsAlertPoliciesListResource
, projectsAlertPoliciesList
, ProjectsAlertPoliciesList
, paplXgafv
, paplUploadProtocol
, paplOrderBy
, paplAccessToken
, paplUploadType
, paplName
, paplFilter
, paplPageToken
, paplPageSize
, paplCallback
) where
import Network.Google.Monitoring.Types
import Network.Google.Prelude
type ProjectsAlertPoliciesListResource =
"v3" :>
Capture "name" Text :>
"alertPolicies" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "orderBy" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "filter" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListAlertPoliciesResponse
data ProjectsAlertPoliciesList = ProjectsAlertPoliciesList'
{ _paplXgafv :: !(Maybe Xgafv)
, _paplUploadProtocol :: !(Maybe Text)
, _paplOrderBy :: !(Maybe Text)
, _paplAccessToken :: !(Maybe Text)
, _paplUploadType :: !(Maybe Text)
, _paplName :: !Text
, _paplFilter :: !(Maybe Text)
, _paplPageToken :: !(Maybe Text)
, _paplPageSize :: !(Maybe (Textual Int32))
, _paplCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAlertPoliciesList
:: Text
-> ProjectsAlertPoliciesList
projectsAlertPoliciesList pPaplName_ =
ProjectsAlertPoliciesList'
{ _paplXgafv = Nothing
, _paplUploadProtocol = Nothing
, _paplOrderBy = Nothing
, _paplAccessToken = Nothing
, _paplUploadType = Nothing
, _paplName = pPaplName_
, _paplFilter = Nothing
, _paplPageToken = Nothing
, _paplPageSize = Nothing
, _paplCallback = Nothing
}
paplXgafv :: Lens' ProjectsAlertPoliciesList (Maybe Xgafv)
paplXgafv
= lens _paplXgafv (\ s a -> s{_paplXgafv = a})
paplUploadProtocol :: Lens' ProjectsAlertPoliciesList (Maybe Text)
paplUploadProtocol
= lens _paplUploadProtocol
(\ s a -> s{_paplUploadProtocol = a})
paplOrderBy :: Lens' ProjectsAlertPoliciesList (Maybe Text)
paplOrderBy
= lens _paplOrderBy (\ s a -> s{_paplOrderBy = a})
paplAccessToken :: Lens' ProjectsAlertPoliciesList (Maybe Text)
paplAccessToken
= lens _paplAccessToken
(\ s a -> s{_paplAccessToken = a})
paplUploadType :: Lens' ProjectsAlertPoliciesList (Maybe Text)
paplUploadType
= lens _paplUploadType
(\ s a -> s{_paplUploadType = a})
paplName :: Lens' ProjectsAlertPoliciesList Text
paplName = lens _paplName (\ s a -> s{_paplName = a})
paplFilter :: Lens' ProjectsAlertPoliciesList (Maybe Text)
paplFilter
= lens _paplFilter (\ s a -> s{_paplFilter = a})
paplPageToken :: Lens' ProjectsAlertPoliciesList (Maybe Text)
paplPageToken
= lens _paplPageToken
(\ s a -> s{_paplPageToken = a})
paplPageSize :: Lens' ProjectsAlertPoliciesList (Maybe Int32)
paplPageSize
= lens _paplPageSize (\ s a -> s{_paplPageSize = a})
. mapping _Coerce
paplCallback :: Lens' ProjectsAlertPoliciesList (Maybe Text)
paplCallback
= lens _paplCallback (\ s a -> s{_paplCallback = a})
instance GoogleRequest ProjectsAlertPoliciesList
where
type Rs ProjectsAlertPoliciesList =
ListAlertPoliciesResponse
type Scopes ProjectsAlertPoliciesList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/monitoring.read"]
requestClient ProjectsAlertPoliciesList'{..}
= go _paplName _paplXgafv _paplUploadProtocol
_paplOrderBy
_paplAccessToken
_paplUploadType
_paplFilter
_paplPageToken
_paplPageSize
_paplCallback
(Just AltJSON)
monitoringService
where go
= buildClient
(Proxy :: Proxy ProjectsAlertPoliciesListResource)
mempty