{-# 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.BigQuery.Jobs.Cancel
(
JobsCancelResource
, jobsCancel
, JobsCancel
, jcJobId
, jcLocation
, jcProjectId
) where
import Network.Google.BigQuery.Types
import Network.Google.Prelude
type JobsCancelResource =
"bigquery" :>
"v2" :>
"projects" :>
Capture "projectId" Text :>
"jobs" :>
Capture "jobId" Text :>
"cancel" :>
QueryParam "location" Text :>
QueryParam "alt" AltJSON :>
Post '[JSON] JobCancelResponse
data JobsCancel = JobsCancel'
{ _jcJobId :: !Text
, _jcLocation :: !(Maybe Text)
, _jcProjectId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
jobsCancel
:: Text
-> Text
-> JobsCancel
jobsCancel pJcJobId_ pJcProjectId_ =
JobsCancel'
{ _jcJobId = pJcJobId_
, _jcLocation = Nothing
, _jcProjectId = pJcProjectId_
}
jcJobId :: Lens' JobsCancel Text
jcJobId = lens _jcJobId (\ s a -> s{_jcJobId = a})
jcLocation :: Lens' JobsCancel (Maybe Text)
jcLocation
= lens _jcLocation (\ s a -> s{_jcLocation = a})
jcProjectId :: Lens' JobsCancel Text
jcProjectId
= lens _jcProjectId (\ s a -> s{_jcProjectId = a})
instance GoogleRequest JobsCancel where
type Rs JobsCancel = JobCancelResponse
type Scopes JobsCancel =
'["https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient JobsCancel'{..}
= go _jcProjectId _jcJobId _jcLocation (Just AltJSON)
bigQueryService
where go
= buildClient (Proxy :: Proxy JobsCancelResource)
mempty