{-# 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.Create
(
ProjectsLocationsQueuesCreateResource
, projectsLocationsQueuesCreate
, ProjectsLocationsQueuesCreate
, plqcParent
, plqcXgafv
, plqcUploadProtocol
, plqcAccessToken
, plqcUploadType
, plqcPayload
, plqcCallback
) where
import Network.Google.CloudTasks.Types
import Network.Google.Prelude
type ProjectsLocationsQueuesCreateResource =
"v2beta3" :>
Capture "parent" Text :>
"queues" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Queue :> Post '[JSON] Queue
data ProjectsLocationsQueuesCreate = ProjectsLocationsQueuesCreate'
{ _plqcParent :: !Text
, _plqcXgafv :: !(Maybe Xgafv)
, _plqcUploadProtocol :: !(Maybe Text)
, _plqcAccessToken :: !(Maybe Text)
, _plqcUploadType :: !(Maybe Text)
, _plqcPayload :: !Queue
, _plqcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsQueuesCreate
:: Text
-> Queue
-> ProjectsLocationsQueuesCreate
projectsLocationsQueuesCreate pPlqcParent_ pPlqcPayload_ =
ProjectsLocationsQueuesCreate'
{ _plqcParent = pPlqcParent_
, _plqcXgafv = Nothing
, _plqcUploadProtocol = Nothing
, _plqcAccessToken = Nothing
, _plqcUploadType = Nothing
, _plqcPayload = pPlqcPayload_
, _plqcCallback = Nothing
}
plqcParent :: Lens' ProjectsLocationsQueuesCreate Text
plqcParent
= lens _plqcParent (\ s a -> s{_plqcParent = a})
plqcXgafv :: Lens' ProjectsLocationsQueuesCreate (Maybe Xgafv)
plqcXgafv
= lens _plqcXgafv (\ s a -> s{_plqcXgafv = a})
plqcUploadProtocol :: Lens' ProjectsLocationsQueuesCreate (Maybe Text)
plqcUploadProtocol
= lens _plqcUploadProtocol
(\ s a -> s{_plqcUploadProtocol = a})
plqcAccessToken :: Lens' ProjectsLocationsQueuesCreate (Maybe Text)
plqcAccessToken
= lens _plqcAccessToken
(\ s a -> s{_plqcAccessToken = a})
plqcUploadType :: Lens' ProjectsLocationsQueuesCreate (Maybe Text)
plqcUploadType
= lens _plqcUploadType
(\ s a -> s{_plqcUploadType = a})
plqcPayload :: Lens' ProjectsLocationsQueuesCreate Queue
plqcPayload
= lens _plqcPayload (\ s a -> s{_plqcPayload = a})
plqcCallback :: Lens' ProjectsLocationsQueuesCreate (Maybe Text)
plqcCallback
= lens _plqcCallback (\ s a -> s{_plqcCallback = a})
instance GoogleRequest ProjectsLocationsQueuesCreate
where
type Rs ProjectsLocationsQueuesCreate = Queue
type Scopes ProjectsLocationsQueuesCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsLocationsQueuesCreate'{..}
= go _plqcParent _plqcXgafv _plqcUploadProtocol
_plqcAccessToken
_plqcUploadType
_plqcCallback
(Just AltJSON)
_plqcPayload
cloudTasksService
where go
= buildClient
(Proxy ::
Proxy ProjectsLocationsQueuesCreateResource)
mempty