{-# 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.DataSets.Delete
(
DataSetsDeleteResource
, dataSetsDelete
, DataSetsDelete
, dsdDataSetId
, dsdProjectId
, dsdDeleteContents
) where
import Network.Google.BigQuery.Types
import Network.Google.Prelude
type DataSetsDeleteResource =
"bigquery" :>
"v2" :>
"projects" :>
Capture "projectId" Text :>
"datasets" :>
Capture "datasetId" Text :>
QueryParam "deleteContents" Bool :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
data DataSetsDelete = DataSetsDelete'
{ _dsdDataSetId :: !Text
, _dsdProjectId :: !Text
, _dsdDeleteContents :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
dataSetsDelete
:: Text
-> Text
-> DataSetsDelete
dataSetsDelete pDsdDataSetId_ pDsdProjectId_ =
DataSetsDelete'
{ _dsdDataSetId = pDsdDataSetId_
, _dsdProjectId = pDsdProjectId_
, _dsdDeleteContents = Nothing
}
dsdDataSetId :: Lens' DataSetsDelete Text
dsdDataSetId
= lens _dsdDataSetId (\ s a -> s{_dsdDataSetId = a})
dsdProjectId :: Lens' DataSetsDelete Text
dsdProjectId
= lens _dsdProjectId (\ s a -> s{_dsdProjectId = a})
dsdDeleteContents :: Lens' DataSetsDelete (Maybe Bool)
dsdDeleteContents
= lens _dsdDeleteContents
(\ s a -> s{_dsdDeleteContents = a})
instance GoogleRequest DataSetsDelete where
type Rs DataSetsDelete = ()
type Scopes DataSetsDelete =
'["https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient DataSetsDelete'{..}
= go _dsdProjectId _dsdDataSetId _dsdDeleteContents
(Just AltJSON)
bigQueryService
where go
= buildClient (Proxy :: Proxy DataSetsDeleteResource)
mempty