{-# 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.Update
(
DataSetsUpdateResource
, dataSetsUpdate
, DataSetsUpdate
, dsuPayload
, dsuDataSetId
, dsuProjectId
) where
import Network.Google.BigQuery.Types
import Network.Google.Prelude
type DataSetsUpdateResource =
"bigquery" :>
"v2" :>
"projects" :>
Capture "projectId" Text :>
"datasets" :>
Capture "datasetId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DataSet :> Put '[JSON] DataSet
data DataSetsUpdate = DataSetsUpdate'
{ _dsuPayload :: !DataSet
, _dsuDataSetId :: !Text
, _dsuProjectId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
dataSetsUpdate
:: DataSet
-> Text
-> Text
-> DataSetsUpdate
dataSetsUpdate pDsuPayload_ pDsuDataSetId_ pDsuProjectId_ =
DataSetsUpdate'
{ _dsuPayload = pDsuPayload_
, _dsuDataSetId = pDsuDataSetId_
, _dsuProjectId = pDsuProjectId_
}
dsuPayload :: Lens' DataSetsUpdate DataSet
dsuPayload
= lens _dsuPayload (\ s a -> s{_dsuPayload = a})
dsuDataSetId :: Lens' DataSetsUpdate Text
dsuDataSetId
= lens _dsuDataSetId (\ s a -> s{_dsuDataSetId = a})
dsuProjectId :: Lens' DataSetsUpdate Text
dsuProjectId
= lens _dsuProjectId (\ s a -> s{_dsuProjectId = a})
instance GoogleRequest DataSetsUpdate where
type Rs DataSetsUpdate = DataSet
type Scopes DataSetsUpdate =
'["https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient DataSetsUpdate'{..}
= go _dsuProjectId _dsuDataSetId (Just AltJSON)
_dsuPayload
bigQueryService
where go
= buildClient (Proxy :: Proxy DataSetsUpdateResource)
mempty