{-# 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.Get
(
DataSetsGetResource
, dataSetsGet
, DataSetsGet
, dsgDataSetId
, dsgProjectId
) where
import Network.Google.BigQuery.Types
import Network.Google.Prelude
type DataSetsGetResource =
"bigquery" :>
"v2" :>
"projects" :>
Capture "projectId" Text :>
"datasets" :>
Capture "datasetId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] DataSet
data DataSetsGet = DataSetsGet'
{ _dsgDataSetId :: !Text
, _dsgProjectId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
dataSetsGet
:: Text
-> Text
-> DataSetsGet
dataSetsGet pDsgDataSetId_ pDsgProjectId_ =
DataSetsGet'
{ _dsgDataSetId = pDsgDataSetId_
, _dsgProjectId = pDsgProjectId_
}
dsgDataSetId :: Lens' DataSetsGet Text
dsgDataSetId
= lens _dsgDataSetId (\ s a -> s{_dsgDataSetId = a})
dsgProjectId :: Lens' DataSetsGet Text
dsgProjectId
= lens _dsgProjectId (\ s a -> s{_dsgProjectId = a})
instance GoogleRequest DataSetsGet where
type Rs DataSetsGet = DataSet
type Scopes DataSetsGet =
'["https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only"]
requestClient DataSetsGet'{..}
= go _dsgProjectId _dsgDataSetId (Just AltJSON)
bigQueryService
where go
= buildClient (Proxy :: Proxy DataSetsGetResource)
mempty