{-# 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.FusionTables.Table.List
(
TableListResource
, tableList'
, TableList'
, tPageToken
, tMaxResults
) where
import Network.Google.FusionTables.Types
import Network.Google.Prelude
type TableListResource =
"fusiontables" :>
"v2" :>
"tables" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] TableList
-- | Retrieves a list of tables a user owns.
--
-- /See:/ 'tableList'' smart constructor.
data TableList' = TableList''
{ _tPageToken :: !(Maybe Text)
, _tMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'TableList'' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tPageToken'
--
-- * 'tMaxResults'
tableList'
:: TableList'
tableList' =
TableList''
{ _tPageToken = Nothing
, _tMaxResults = Nothing
}
-- | Continuation token specifying which result page to return.
tPageToken :: Lens' TableList' (Maybe Text)
tPageToken
= lens _tPageToken (\ s a -> s{_tPageToken = a})
-- | Maximum number of tables to return. Default is 5.
tMaxResults :: Lens' TableList' (Maybe Word32)
tMaxResults
= lens _tMaxResults (\ s a -> s{_tMaxResults = a}) .
mapping _Coerce
instance GoogleRequest TableList' where
type Rs TableList' = TableList
type Scopes TableList' =
'["https://www.googleapis.com/auth/fusiontables",
"https://www.googleapis.com/auth/fusiontables.readonly"]
requestClient TableList''{..}
= go _tPageToken _tMaxResults (Just AltJSON)
fusionTablesService
where go
= buildClient (Proxy :: Proxy TableListResource)
mempty