{-# 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.Dataflow.Projects.Jobs.WorkItems.Lease
(
ProjectsJobsWorkItemsLeaseResource
, projectsJobsWorkItemsLease
, ProjectsJobsWorkItemsLease
, pjwilXgafv
, pjwilJobId
, pjwilUploadProtocol
, pjwilAccessToken
, pjwilUploadType
, pjwilPayload
, pjwilProjectId
, pjwilCallback
) where
import Network.Google.Dataflow.Types
import Network.Google.Prelude
type ProjectsJobsWorkItemsLeaseResource =
"v1b3" :>
"projects" :>
Capture "projectId" Text :>
"jobs" :>
Capture "jobId" Text :>
"workItems:lease" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] LeaseWorkItemRequest :>
Post '[JSON] LeaseWorkItemResponse
data ProjectsJobsWorkItemsLease = ProjectsJobsWorkItemsLease'
{ _pjwilXgafv :: !(Maybe Xgafv)
, _pjwilJobId :: !Text
, _pjwilUploadProtocol :: !(Maybe Text)
, _pjwilAccessToken :: !(Maybe Text)
, _pjwilUploadType :: !(Maybe Text)
, _pjwilPayload :: !LeaseWorkItemRequest
, _pjwilProjectId :: !Text
, _pjwilCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsJobsWorkItemsLease
:: Text
-> LeaseWorkItemRequest
-> Text
-> ProjectsJobsWorkItemsLease
projectsJobsWorkItemsLease pPjwilJobId_ pPjwilPayload_ pPjwilProjectId_ =
ProjectsJobsWorkItemsLease'
{ _pjwilXgafv = Nothing
, _pjwilJobId = pPjwilJobId_
, _pjwilUploadProtocol = Nothing
, _pjwilAccessToken = Nothing
, _pjwilUploadType = Nothing
, _pjwilPayload = pPjwilPayload_
, _pjwilProjectId = pPjwilProjectId_
, _pjwilCallback = Nothing
}
pjwilXgafv :: Lens' ProjectsJobsWorkItemsLease (Maybe Xgafv)
pjwilXgafv
= lens _pjwilXgafv (\ s a -> s{_pjwilXgafv = a})
pjwilJobId :: Lens' ProjectsJobsWorkItemsLease Text
pjwilJobId
= lens _pjwilJobId (\ s a -> s{_pjwilJobId = a})
pjwilUploadProtocol :: Lens' ProjectsJobsWorkItemsLease (Maybe Text)
pjwilUploadProtocol
= lens _pjwilUploadProtocol
(\ s a -> s{_pjwilUploadProtocol = a})
pjwilAccessToken :: Lens' ProjectsJobsWorkItemsLease (Maybe Text)
pjwilAccessToken
= lens _pjwilAccessToken
(\ s a -> s{_pjwilAccessToken = a})
pjwilUploadType :: Lens' ProjectsJobsWorkItemsLease (Maybe Text)
pjwilUploadType
= lens _pjwilUploadType
(\ s a -> s{_pjwilUploadType = a})
pjwilPayload :: Lens' ProjectsJobsWorkItemsLease LeaseWorkItemRequest
pjwilPayload
= lens _pjwilPayload (\ s a -> s{_pjwilPayload = a})
pjwilProjectId :: Lens' ProjectsJobsWorkItemsLease Text
pjwilProjectId
= lens _pjwilProjectId
(\ s a -> s{_pjwilProjectId = a})
pjwilCallback :: Lens' ProjectsJobsWorkItemsLease (Maybe Text)
pjwilCallback
= lens _pjwilCallback
(\ s a -> s{_pjwilCallback = a})
instance GoogleRequest ProjectsJobsWorkItemsLease
where
type Rs ProjectsJobsWorkItemsLease =
LeaseWorkItemResponse
type Scopes ProjectsJobsWorkItemsLease =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly",
"https://www.googleapis.com/auth/userinfo.email"]
requestClient ProjectsJobsWorkItemsLease'{..}
= go _pjwilProjectId _pjwilJobId _pjwilXgafv
_pjwilUploadProtocol
_pjwilAccessToken
_pjwilUploadType
_pjwilCallback
(Just AltJSON)
_pjwilPayload
dataflowService
where go
= buildClient
(Proxy :: Proxy ProjectsJobsWorkItemsLeaseResource)
mempty