{-# 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.Search
(
ProjectsJobsSearchResource
, projectsJobsSearch
, ProjectsJobsSearch
, pjsParent
, pjsXgafv
, pjsUploadProtocol
, pjsAccessToken
, pjsUploadType
, pjsPayload
, pjsCallback
) where
import Network.Google.Jobs.Types
import Network.Google.Prelude
type ProjectsJobsSearchResource =
"v3p1beta1" :>
Capture "parent" Text :>
"jobs:search" :>
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 ProjectsJobsSearch = ProjectsJobsSearch'
{ _pjsParent :: !Text
, _pjsXgafv :: !(Maybe Xgafv)
, _pjsUploadProtocol :: !(Maybe Text)
, _pjsAccessToken :: !(Maybe Text)
, _pjsUploadType :: !(Maybe Text)
, _pjsPayload :: !SearchJobsRequest
, _pjsCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsJobsSearch
:: Text
-> SearchJobsRequest
-> ProjectsJobsSearch
projectsJobsSearch pPjsParent_ pPjsPayload_ =
ProjectsJobsSearch'
{ _pjsParent = pPjsParent_
, _pjsXgafv = Nothing
, _pjsUploadProtocol = Nothing
, _pjsAccessToken = Nothing
, _pjsUploadType = Nothing
, _pjsPayload = pPjsPayload_
, _pjsCallback = Nothing
}
pjsParent :: Lens' ProjectsJobsSearch Text
pjsParent
= lens _pjsParent (\ s a -> s{_pjsParent = a})
pjsXgafv :: Lens' ProjectsJobsSearch (Maybe Xgafv)
pjsXgafv = lens _pjsXgafv (\ s a -> s{_pjsXgafv = a})
pjsUploadProtocol :: Lens' ProjectsJobsSearch (Maybe Text)
pjsUploadProtocol
= lens _pjsUploadProtocol
(\ s a -> s{_pjsUploadProtocol = a})
pjsAccessToken :: Lens' ProjectsJobsSearch (Maybe Text)
pjsAccessToken
= lens _pjsAccessToken
(\ s a -> s{_pjsAccessToken = a})
pjsUploadType :: Lens' ProjectsJobsSearch (Maybe Text)
pjsUploadType
= lens _pjsUploadType
(\ s a -> s{_pjsUploadType = a})
pjsPayload :: Lens' ProjectsJobsSearch SearchJobsRequest
pjsPayload
= lens _pjsPayload (\ s a -> s{_pjsPayload = a})
pjsCallback :: Lens' ProjectsJobsSearch (Maybe Text)
pjsCallback
= lens _pjsCallback (\ s a -> s{_pjsCallback = a})
instance GoogleRequest ProjectsJobsSearch where
type Rs ProjectsJobsSearch = SearchJobsResponse
type Scopes ProjectsJobsSearch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/jobs"]
requestClient ProjectsJobsSearch'{..}
= go _pjsParent _pjsXgafv _pjsUploadProtocol
_pjsAccessToken
_pjsUploadType
_pjsCallback
(Just AltJSON)
_pjsPayload
jobsService
where go
= buildClient
(Proxy :: Proxy ProjectsJobsSearchResource)
mempty