{-# 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.Patch
(
DataSetsPatchResource
, dataSetsPatch
, DataSetsPatch
, dspPayload
, dspDataSetId
, dspProjectId
) where
import Network.Google.BigQuery.Types
import Network.Google.Prelude
type DataSetsPatchResource =
"bigquery" :>
"v2" :>
"projects" :>
Capture "projectId" Text :>
"datasets" :>
Capture "datasetId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DataSet :> Patch '[JSON] DataSet
data DataSetsPatch = DataSetsPatch'
{ _dspPayload :: !DataSet
, _dspDataSetId :: !Text
, _dspProjectId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
dataSetsPatch
:: DataSet
-> Text
-> Text
-> DataSetsPatch
dataSetsPatch pDspPayload_ pDspDataSetId_ pDspProjectId_ =
DataSetsPatch'
{ _dspPayload = pDspPayload_
, _dspDataSetId = pDspDataSetId_
, _dspProjectId = pDspProjectId_
}
dspPayload :: Lens' DataSetsPatch DataSet
dspPayload
= lens _dspPayload (\ s a -> s{_dspPayload = a})
dspDataSetId :: Lens' DataSetsPatch Text
dspDataSetId
= lens _dspDataSetId (\ s a -> s{_dspDataSetId = a})
dspProjectId :: Lens' DataSetsPatch Text
dspProjectId
= lens _dspProjectId (\ s a -> s{_dspProjectId = a})
instance GoogleRequest DataSetsPatch where
type Rs DataSetsPatch = DataSet
type Scopes DataSetsPatch =
'["https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient DataSetsPatch'{..}
= go _dspProjectId _dspDataSetId (Just AltJSON)
_dspPayload
bigQueryService
where go
= buildClient (Proxy :: Proxy DataSetsPatchResource)
mempty