{-# 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.Jobs.Projects.Jobs.SearchForAlert
(
ProjectsJobsSearchForAlertResource
, projectsJobsSearchForAlert
, ProjectsJobsSearchForAlert
, pjsfaParent
, pjsfaXgafv
, pjsfaUploadProtocol
, pjsfaAccessToken
, pjsfaUploadType
, pjsfaPayload
, pjsfaCallback
) where
import Network.Google.Jobs.Types
import Network.Google.Prelude
type ProjectsJobsSearchForAlertResource =
"v3p1beta1" :>
Capture "parent" Text :>
"jobs:searchForAlert" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SearchJobsRequest :>
Post '[JSON] SearchJobsResponse
data ProjectsJobsSearchForAlert = ProjectsJobsSearchForAlert'
{ _pjsfaParent :: !Text
, _pjsfaXgafv :: !(Maybe Xgafv)
, _pjsfaUploadProtocol :: !(Maybe Text)
, _pjsfaAccessToken :: !(Maybe Text)
, _pjsfaUploadType :: !(Maybe Text)
, _pjsfaPayload :: !SearchJobsRequest
, _pjsfaCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsJobsSearchForAlert
:: Text
-> SearchJobsRequest
-> ProjectsJobsSearchForAlert
projectsJobsSearchForAlert pPjsfaParent_ pPjsfaPayload_ =
ProjectsJobsSearchForAlert'
{ _pjsfaParent = pPjsfaParent_
, _pjsfaXgafv = Nothing
, _pjsfaUploadProtocol = Nothing
, _pjsfaAccessToken = Nothing
, _pjsfaUploadType = Nothing
, _pjsfaPayload = pPjsfaPayload_
, _pjsfaCallback = Nothing
}
pjsfaParent :: Lens' ProjectsJobsSearchForAlert Text
pjsfaParent
= lens _pjsfaParent (\ s a -> s{_pjsfaParent = a})
pjsfaXgafv :: Lens' ProjectsJobsSearchForAlert (Maybe Xgafv)
pjsfaXgafv
= lens _pjsfaXgafv (\ s a -> s{_pjsfaXgafv = a})
pjsfaUploadProtocol :: Lens' ProjectsJobsSearchForAlert (Maybe Text)
pjsfaUploadProtocol
= lens _pjsfaUploadProtocol
(\ s a -> s{_pjsfaUploadProtocol = a})
pjsfaAccessToken :: Lens' ProjectsJobsSearchForAlert (Maybe Text)
pjsfaAccessToken
= lens _pjsfaAccessToken
(\ s a -> s{_pjsfaAccessToken = a})
pjsfaUploadType :: Lens' ProjectsJobsSearchForAlert (Maybe Text)
pjsfaUploadType
= lens _pjsfaUploadType
(\ s a -> s{_pjsfaUploadType = a})
pjsfaPayload :: Lens' ProjectsJobsSearchForAlert SearchJobsRequest
pjsfaPayload
= lens _pjsfaPayload (\ s a -> s{_pjsfaPayload = a})
pjsfaCallback :: Lens' ProjectsJobsSearchForAlert (Maybe Text)
pjsfaCallback
= lens _pjsfaCallback
(\ s a -> s{_pjsfaCallback = a})
instance GoogleRequest ProjectsJobsSearchForAlert
where
type Rs ProjectsJobsSearchForAlert =
SearchJobsResponse
type Scopes ProjectsJobsSearchForAlert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/jobs"]
requestClient ProjectsJobsSearchForAlert'{..}
= go _pjsfaParent _pjsfaXgafv _pjsfaUploadProtocol
_pjsfaAccessToken
_pjsfaUploadType
_pjsfaCallback
(Just AltJSON)
_pjsfaPayload
jobsService
where go
= buildClient
(Proxy :: Proxy ProjectsJobsSearchForAlertResource)
mempty