{-# 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.CloudTasks.Projects.Locations.Queues.Tasks.Run
(
ProjectsLocationsQueuesTasksRunResource
, projectsLocationsQueuesTasksRun
, ProjectsLocationsQueuesTasksRun
, plqtrXgafv
, plqtrUploadProtocol
, plqtrAccessToken
, plqtrUploadType
, plqtrPayload
, plqtrName
, plqtrCallback
) where
import Network.Google.CloudTasks.Types
import Network.Google.Prelude
type ProjectsLocationsQueuesTasksRunResource =
"v2beta3" :>
CaptureMode "name" "run" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] RunTaskRequest :> Post '[JSON] Task
data ProjectsLocationsQueuesTasksRun = ProjectsLocationsQueuesTasksRun'
{ _plqtrXgafv :: !(Maybe Xgafv)
, _plqtrUploadProtocol :: !(Maybe Text)
, _plqtrAccessToken :: !(Maybe Text)
, _plqtrUploadType :: !(Maybe Text)
, _plqtrPayload :: !RunTaskRequest
, _plqtrName :: !Text
, _plqtrCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsQueuesTasksRun
:: RunTaskRequest
-> Text
-> ProjectsLocationsQueuesTasksRun
projectsLocationsQueuesTasksRun pPlqtrPayload_ pPlqtrName_ =
ProjectsLocationsQueuesTasksRun'
{ _plqtrXgafv = Nothing
, _plqtrUploadProtocol = Nothing
, _plqtrAccessToken = Nothing
, _plqtrUploadType = Nothing
, _plqtrPayload = pPlqtrPayload_
, _plqtrName = pPlqtrName_
, _plqtrCallback = Nothing
}
plqtrXgafv :: Lens' ProjectsLocationsQueuesTasksRun (Maybe Xgafv)
plqtrXgafv
= lens _plqtrXgafv (\ s a -> s{_plqtrXgafv = a})
plqtrUploadProtocol :: Lens' ProjectsLocationsQueuesTasksRun (Maybe Text)
plqtrUploadProtocol
= lens _plqtrUploadProtocol
(\ s a -> s{_plqtrUploadProtocol = a})
plqtrAccessToken :: Lens' ProjectsLocationsQueuesTasksRun (Maybe Text)
plqtrAccessToken
= lens _plqtrAccessToken
(\ s a -> s{_plqtrAccessToken = a})
plqtrUploadType :: Lens' ProjectsLocationsQueuesTasksRun (Maybe Text)
plqtrUploadType
= lens _plqtrUploadType
(\ s a -> s{_plqtrUploadType = a})
plqtrPayload :: Lens' ProjectsLocationsQueuesTasksRun RunTaskRequest
plqtrPayload
= lens _plqtrPayload (\ s a -> s{_plqtrPayload = a})
plqtrName :: Lens' ProjectsLocationsQueuesTasksRun Text
plqtrName
= lens _plqtrName (\ s a -> s{_plqtrName = a})
plqtrCallback :: Lens' ProjectsLocationsQueuesTasksRun (Maybe Text)
plqtrCallback
= lens _plqtrCallback
(\ s a -> s{_plqtrCallback = a})
instance GoogleRequest
ProjectsLocationsQueuesTasksRun where
type Rs ProjectsLocationsQueuesTasksRun = Task
type Scopes ProjectsLocationsQueuesTasksRun =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsLocationsQueuesTasksRun'{..}
= go _plqtrName _plqtrXgafv _plqtrUploadProtocol
_plqtrAccessToken
_plqtrUploadType
_plqtrCallback
(Just AltJSON)
_plqtrPayload
cloudTasksService
where go
= buildClient
(Proxy ::
Proxy ProjectsLocationsQueuesTasksRunResource)
mempty