{-# 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.Create
(
ProjectsLocationsQueuesTasksCreateResource
, projectsLocationsQueuesTasksCreate
, ProjectsLocationsQueuesTasksCreate
, plqtcParent
, plqtcXgafv
, plqtcUploadProtocol
, plqtcAccessToken
, plqtcUploadType
, plqtcPayload
, plqtcCallback
) where
import Network.Google.CloudTasks.Types
import Network.Google.Prelude
type ProjectsLocationsQueuesTasksCreateResource =
"v2beta3" :>
Capture "parent" Text :>
"tasks" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreateTaskRequest :>
Post '[JSON] Task
data ProjectsLocationsQueuesTasksCreate = ProjectsLocationsQueuesTasksCreate'
{ _plqtcParent :: !Text
, _plqtcXgafv :: !(Maybe Xgafv)
, _plqtcUploadProtocol :: !(Maybe Text)
, _plqtcAccessToken :: !(Maybe Text)
, _plqtcUploadType :: !(Maybe Text)
, _plqtcPayload :: !CreateTaskRequest
, _plqtcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsQueuesTasksCreate
:: Text
-> CreateTaskRequest
-> ProjectsLocationsQueuesTasksCreate
projectsLocationsQueuesTasksCreate pPlqtcParent_ pPlqtcPayload_ =
ProjectsLocationsQueuesTasksCreate'
{ _plqtcParent = pPlqtcParent_
, _plqtcXgafv = Nothing
, _plqtcUploadProtocol = Nothing
, _plqtcAccessToken = Nothing
, _plqtcUploadType = Nothing
, _plqtcPayload = pPlqtcPayload_
, _plqtcCallback = Nothing
}
plqtcParent :: Lens' ProjectsLocationsQueuesTasksCreate Text
plqtcParent
= lens _plqtcParent (\ s a -> s{_plqtcParent = a})
plqtcXgafv :: Lens' ProjectsLocationsQueuesTasksCreate (Maybe Xgafv)
plqtcXgafv
= lens _plqtcXgafv (\ s a -> s{_plqtcXgafv = a})
plqtcUploadProtocol :: Lens' ProjectsLocationsQueuesTasksCreate (Maybe Text)
plqtcUploadProtocol
= lens _plqtcUploadProtocol
(\ s a -> s{_plqtcUploadProtocol = a})
plqtcAccessToken :: Lens' ProjectsLocationsQueuesTasksCreate (Maybe Text)
plqtcAccessToken
= lens _plqtcAccessToken
(\ s a -> s{_plqtcAccessToken = a})
plqtcUploadType :: Lens' ProjectsLocationsQueuesTasksCreate (Maybe Text)
plqtcUploadType
= lens _plqtcUploadType
(\ s a -> s{_plqtcUploadType = a})
plqtcPayload :: Lens' ProjectsLocationsQueuesTasksCreate CreateTaskRequest
plqtcPayload
= lens _plqtcPayload (\ s a -> s{_plqtcPayload = a})
plqtcCallback :: Lens' ProjectsLocationsQueuesTasksCreate (Maybe Text)
plqtcCallback
= lens _plqtcCallback
(\ s a -> s{_plqtcCallback = a})
instance GoogleRequest
ProjectsLocationsQueuesTasksCreate where
type Rs ProjectsLocationsQueuesTasksCreate = Task
type Scopes ProjectsLocationsQueuesTasksCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsLocationsQueuesTasksCreate'{..}
= go _plqtcParent _plqtcXgafv _plqtcUploadProtocol
_plqtcAccessToken
_plqtcUploadType
_plqtcCallback
(Just AltJSON)
_plqtcPayload
cloudTasksService
where go
= buildClient
(Proxy ::
Proxy ProjectsLocationsQueuesTasksCreateResource)
mempty