{-# 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.TableData.InsertAll
(
TableDataInsertAllResource
, tableDataInsertAll
, TableDataInsertAll
, tdiaPayload
, tdiaDataSetId
, tdiaProjectId
, tdiaTableId
) where
import Network.Google.BigQuery.Types
import Network.Google.Prelude
type TableDataInsertAllResource =
"bigquery" :>
"v2" :>
"projects" :>
Capture "projectId" Text :>
"datasets" :>
Capture "datasetId" Text :>
"tables" :>
Capture "tableId" Text :>
"insertAll" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TableDataInsertAllRequest :>
Post '[JSON] TableDataInsertAllResponse
data TableDataInsertAll = TableDataInsertAll'
{ _tdiaPayload :: !TableDataInsertAllRequest
, _tdiaDataSetId :: !Text
, _tdiaProjectId :: !Text
, _tdiaTableId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
tableDataInsertAll
:: TableDataInsertAllRequest
-> Text
-> Text
-> Text
-> TableDataInsertAll
tableDataInsertAll pTdiaPayload_ pTdiaDataSetId_ pTdiaProjectId_ pTdiaTableId_ =
TableDataInsertAll'
{ _tdiaPayload = pTdiaPayload_
, _tdiaDataSetId = pTdiaDataSetId_
, _tdiaProjectId = pTdiaProjectId_
, _tdiaTableId = pTdiaTableId_
}
tdiaPayload :: Lens' TableDataInsertAll TableDataInsertAllRequest
tdiaPayload
= lens _tdiaPayload (\ s a -> s{_tdiaPayload = a})
tdiaDataSetId :: Lens' TableDataInsertAll Text
tdiaDataSetId
= lens _tdiaDataSetId
(\ s a -> s{_tdiaDataSetId = a})
tdiaProjectId :: Lens' TableDataInsertAll Text
tdiaProjectId
= lens _tdiaProjectId
(\ s a -> s{_tdiaProjectId = a})
tdiaTableId :: Lens' TableDataInsertAll Text
tdiaTableId
= lens _tdiaTableId (\ s a -> s{_tdiaTableId = a})
instance GoogleRequest TableDataInsertAll where
type Rs TableDataInsertAll =
TableDataInsertAllResponse
type Scopes TableDataInsertAll =
'["https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/bigquery.insertdata",
"https://www.googleapis.com/auth/cloud-platform"]
requestClient TableDataInsertAll'{..}
= go _tdiaProjectId _tdiaDataSetId _tdiaTableId
(Just AltJSON)
_tdiaPayload
bigQueryService
where go
= buildClient
(Proxy :: Proxy TableDataInsertAllResource)
mempty