{-# 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.Tables.Update
(
TablesUpdateResource
, tablesUpdate
, TablesUpdate
, tuPayload
, tuDataSetId
, tuProjectId
, tuTableId
) where
import Network.Google.BigQuery.Types
import Network.Google.Prelude
type TablesUpdateResource =
"bigquery" :>
"v2" :>
"projects" :>
Capture "projectId" Text :>
"datasets" :>
Capture "datasetId" Text :>
"tables" :>
Capture "tableId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Table :> Put '[JSON] Table
data TablesUpdate = TablesUpdate'
{ _tuPayload :: !Table
, _tuDataSetId :: !Text
, _tuProjectId :: !Text
, _tuTableId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
tablesUpdate
:: Table
-> Text
-> Text
-> Text
-> TablesUpdate
tablesUpdate pTuPayload_ pTuDataSetId_ pTuProjectId_ pTuTableId_ =
TablesUpdate'
{ _tuPayload = pTuPayload_
, _tuDataSetId = pTuDataSetId_
, _tuProjectId = pTuProjectId_
, _tuTableId = pTuTableId_
}
tuPayload :: Lens' TablesUpdate Table
tuPayload
= lens _tuPayload (\ s a -> s{_tuPayload = a})
tuDataSetId :: Lens' TablesUpdate Text
tuDataSetId
= lens _tuDataSetId (\ s a -> s{_tuDataSetId = a})
tuProjectId :: Lens' TablesUpdate Text
tuProjectId
= lens _tuProjectId (\ s a -> s{_tuProjectId = a})
tuTableId :: Lens' TablesUpdate Text
tuTableId
= lens _tuTableId (\ s a -> s{_tuTableId = a})
instance GoogleRequest TablesUpdate where
type Rs TablesUpdate = Table
type Scopes TablesUpdate =
'["https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient TablesUpdate'{..}
= go _tuProjectId _tuDataSetId _tuTableId
(Just AltJSON)
_tuPayload
bigQueryService
where go
= buildClient (Proxy :: Proxy TablesUpdateResource)
mempty