{-# 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.Locations.Jobs.WorkItems.Lease
(
ProjectsLocationsJobsWorkItemsLeaseResource
, projectsLocationsJobsWorkItemsLease
, ProjectsLocationsJobsWorkItemsLease
, pljwilXgafv
, pljwilJobId
, pljwilUploadProtocol
, pljwilLocation
, pljwilAccessToken
, pljwilUploadType
, pljwilPayload
, pljwilProjectId
, pljwilCallback
) where
import Network.Google.Dataflow.Types
import Network.Google.Prelude
type ProjectsLocationsJobsWorkItemsLeaseResource =
"v1b3" :>
"projects" :>
Capture "projectId" Text :>
"locations" :>
Capture "location" 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 ProjectsLocationsJobsWorkItemsLease = ProjectsLocationsJobsWorkItemsLease'
{ _pljwilXgafv :: !(Maybe Xgafv)
, _pljwilJobId :: !Text
, _pljwilUploadProtocol :: !(Maybe Text)
, _pljwilLocation :: !Text
, _pljwilAccessToken :: !(Maybe Text)
, _pljwilUploadType :: !(Maybe Text)
, _pljwilPayload :: !LeaseWorkItemRequest
, _pljwilProjectId :: !Text
, _pljwilCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsJobsWorkItemsLease
:: Text
-> Text
-> LeaseWorkItemRequest
-> Text
-> ProjectsLocationsJobsWorkItemsLease
projectsLocationsJobsWorkItemsLease pPljwilJobId_ pPljwilLocation_ pPljwilPayload_ pPljwilProjectId_ =
ProjectsLocationsJobsWorkItemsLease'
{ _pljwilXgafv = Nothing
, _pljwilJobId = pPljwilJobId_
, _pljwilUploadProtocol = Nothing
, _pljwilLocation = pPljwilLocation_
, _pljwilAccessToken = Nothing
, _pljwilUploadType = Nothing
, _pljwilPayload = pPljwilPayload_
, _pljwilProjectId = pPljwilProjectId_
, _pljwilCallback = Nothing
}
pljwilXgafv :: Lens' ProjectsLocationsJobsWorkItemsLease (Maybe Xgafv)
pljwilXgafv
= lens _pljwilXgafv (\ s a -> s{_pljwilXgafv = a})
pljwilJobId :: Lens' ProjectsLocationsJobsWorkItemsLease Text
pljwilJobId
= lens _pljwilJobId (\ s a -> s{_pljwilJobId = a})
pljwilUploadProtocol :: Lens' ProjectsLocationsJobsWorkItemsLease (Maybe Text)
pljwilUploadProtocol
= lens _pljwilUploadProtocol
(\ s a -> s{_pljwilUploadProtocol = a})
pljwilLocation :: Lens' ProjectsLocationsJobsWorkItemsLease Text
pljwilLocation
= lens _pljwilLocation
(\ s a -> s{_pljwilLocation = a})
pljwilAccessToken :: Lens' ProjectsLocationsJobsWorkItemsLease (Maybe Text)
pljwilAccessToken
= lens _pljwilAccessToken
(\ s a -> s{_pljwilAccessToken = a})
pljwilUploadType :: Lens' ProjectsLocationsJobsWorkItemsLease (Maybe Text)
pljwilUploadType
= lens _pljwilUploadType
(\ s a -> s{_pljwilUploadType = a})
pljwilPayload :: Lens' ProjectsLocationsJobsWorkItemsLease LeaseWorkItemRequest
pljwilPayload
= lens _pljwilPayload
(\ s a -> s{_pljwilPayload = a})
pljwilProjectId :: Lens' ProjectsLocationsJobsWorkItemsLease Text
pljwilProjectId
= lens _pljwilProjectId
(\ s a -> s{_pljwilProjectId = a})
pljwilCallback :: Lens' ProjectsLocationsJobsWorkItemsLease (Maybe Text)
pljwilCallback
= lens _pljwilCallback
(\ s a -> s{_pljwilCallback = a})
instance GoogleRequest
ProjectsLocationsJobsWorkItemsLease where
type Rs ProjectsLocationsJobsWorkItemsLease =
LeaseWorkItemResponse
type Scopes ProjectsLocationsJobsWorkItemsLease =
'["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
ProjectsLocationsJobsWorkItemsLease'{..}
= go _pljwilProjectId _pljwilLocation _pljwilJobId
_pljwilXgafv
_pljwilUploadProtocol
_pljwilAccessToken
_pljwilUploadType
_pljwilCallback
(Just AltJSON)
_pljwilPayload
dataflowService
where go
= buildClient
(Proxy ::
Proxy ProjectsLocationsJobsWorkItemsLeaseResource)
mempty