{-# 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.CloudScheduler.Projects.Locations.Jobs.Create
(
ProjectsLocationsJobsCreateResource
, projectsLocationsJobsCreate
, ProjectsLocationsJobsCreate
, pljcParent
, pljcXgafv
, pljcUploadProtocol
, pljcAccessToken
, pljcUploadType
, pljcPayload
, pljcCallback
) where
import Network.Google.CloudScheduler.Types
import Network.Google.Prelude
type ProjectsLocationsJobsCreateResource =
"v1beta1" :>
Capture "parent" Text :>
"jobs" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Job :> Post '[JSON] Job
data ProjectsLocationsJobsCreate = ProjectsLocationsJobsCreate'
{ _pljcParent :: !Text
, _pljcXgafv :: !(Maybe Xgafv)
, _pljcUploadProtocol :: !(Maybe Text)
, _pljcAccessToken :: !(Maybe Text)
, _pljcUploadType :: !(Maybe Text)
, _pljcPayload :: !Job
, _pljcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsJobsCreate
:: Text
-> Job
-> ProjectsLocationsJobsCreate
projectsLocationsJobsCreate pPljcParent_ pPljcPayload_ =
ProjectsLocationsJobsCreate'
{ _pljcParent = pPljcParent_
, _pljcXgafv = Nothing
, _pljcUploadProtocol = Nothing
, _pljcAccessToken = Nothing
, _pljcUploadType = Nothing
, _pljcPayload = pPljcPayload_
, _pljcCallback = Nothing
}
pljcParent :: Lens' ProjectsLocationsJobsCreate Text
pljcParent
= lens _pljcParent (\ s a -> s{_pljcParent = a})
pljcXgafv :: Lens' ProjectsLocationsJobsCreate (Maybe Xgafv)
pljcXgafv
= lens _pljcXgafv (\ s a -> s{_pljcXgafv = a})
pljcUploadProtocol :: Lens' ProjectsLocationsJobsCreate (Maybe Text)
pljcUploadProtocol
= lens _pljcUploadProtocol
(\ s a -> s{_pljcUploadProtocol = a})
pljcAccessToken :: Lens' ProjectsLocationsJobsCreate (Maybe Text)
pljcAccessToken
= lens _pljcAccessToken
(\ s a -> s{_pljcAccessToken = a})
pljcUploadType :: Lens' ProjectsLocationsJobsCreate (Maybe Text)
pljcUploadType
= lens _pljcUploadType
(\ s a -> s{_pljcUploadType = a})
pljcPayload :: Lens' ProjectsLocationsJobsCreate Job
pljcPayload
= lens _pljcPayload (\ s a -> s{_pljcPayload = a})
pljcCallback :: Lens' ProjectsLocationsJobsCreate (Maybe Text)
pljcCallback
= lens _pljcCallback (\ s a -> s{_pljcCallback = a})
instance GoogleRequest ProjectsLocationsJobsCreate
where
type Rs ProjectsLocationsJobsCreate = Job
type Scopes ProjectsLocationsJobsCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsLocationsJobsCreate'{..}
= go _pljcParent _pljcXgafv _pljcUploadProtocol
_pljcAccessToken
_pljcUploadType
_pljcCallback
(Just AltJSON)
_pljcPayload
cloudSchedulerService
where go
= buildClient
(Proxy :: Proxy ProjectsLocationsJobsCreateResource)
mempty