{-# 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.Ml.Projects.Jobs.Cancel
(
ProjectsJobsCancelResource
, projectsJobsCancel
, ProjectsJobsCancel
, pjcXgafv
, pjcUploadProtocol
, pjcAccessToken
, pjcUploadType
, pjcPayload
, pjcName
, pjcCallback
) where
import Network.Google.MachineLearning.Types
import Network.Google.Prelude
type ProjectsJobsCancelResource =
"v1" :>
CaptureMode "name" "cancel" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GoogleCloudMlV1__CancelJobRequest :>
Post '[JSON] GoogleProtobuf__Empty
data ProjectsJobsCancel = ProjectsJobsCancel'
{ _pjcXgafv :: !(Maybe Xgafv)
, _pjcUploadProtocol :: !(Maybe Text)
, _pjcAccessToken :: !(Maybe Text)
, _pjcUploadType :: !(Maybe Text)
, _pjcPayload :: !GoogleCloudMlV1__CancelJobRequest
, _pjcName :: !Text
, _pjcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsJobsCancel
:: GoogleCloudMlV1__CancelJobRequest
-> Text
-> ProjectsJobsCancel
projectsJobsCancel pPjcPayload_ pPjcName_ =
ProjectsJobsCancel'
{ _pjcXgafv = Nothing
, _pjcUploadProtocol = Nothing
, _pjcAccessToken = Nothing
, _pjcUploadType = Nothing
, _pjcPayload = pPjcPayload_
, _pjcName = pPjcName_
, _pjcCallback = Nothing
}
pjcXgafv :: Lens' ProjectsJobsCancel (Maybe Xgafv)
pjcXgafv = lens _pjcXgafv (\ s a -> s{_pjcXgafv = a})
pjcUploadProtocol :: Lens' ProjectsJobsCancel (Maybe Text)
pjcUploadProtocol
= lens _pjcUploadProtocol
(\ s a -> s{_pjcUploadProtocol = a})
pjcAccessToken :: Lens' ProjectsJobsCancel (Maybe Text)
pjcAccessToken
= lens _pjcAccessToken
(\ s a -> s{_pjcAccessToken = a})
pjcUploadType :: Lens' ProjectsJobsCancel (Maybe Text)
pjcUploadType
= lens _pjcUploadType
(\ s a -> s{_pjcUploadType = a})
pjcPayload :: Lens' ProjectsJobsCancel GoogleCloudMlV1__CancelJobRequest
pjcPayload
= lens _pjcPayload (\ s a -> s{_pjcPayload = a})
pjcName :: Lens' ProjectsJobsCancel Text
pjcName = lens _pjcName (\ s a -> s{_pjcName = a})
pjcCallback :: Lens' ProjectsJobsCancel (Maybe Text)
pjcCallback
= lens _pjcCallback (\ s a -> s{_pjcCallback = a})
instance GoogleRequest ProjectsJobsCancel where
type Rs ProjectsJobsCancel = GoogleProtobuf__Empty
type Scopes ProjectsJobsCancel =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsJobsCancel'{..}
= go _pjcName _pjcXgafv _pjcUploadProtocol
_pjcAccessToken
_pjcUploadType
_pjcCallback
(Just AltJSON)
_pjcPayload
machineLearningService
where go
= buildClient
(Proxy :: Proxy ProjectsJobsCancelResource)
mempty