{-# 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.Discovery.APIs.List
(
APIsListResource
, apisList
, APIsList
, alPreferred
, alName
) where
import Network.Google.Discovery.Types
import Network.Google.Prelude
type APIsListResource =
"discovery" :>
"v1" :>
"apis" :>
QueryParam "preferred" Bool :>
QueryParam "name" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] DirectoryList
data APIsList = APIsList'
{ _alPreferred :: !Bool
, _alName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
apisList
:: APIsList
apisList =
APIsList'
{ _alPreferred = False
, _alName = Nothing
}
alPreferred :: Lens' APIsList Bool
alPreferred
= lens _alPreferred (\ s a -> s{_alPreferred = a})
alName :: Lens' APIsList (Maybe Text)
alName = lens _alName (\ s a -> s{_alName = a})
instance GoogleRequest APIsList where
type Rs APIsList = DirectoryList
type Scopes APIsList = '[]
requestClient APIsList'{..}
= go (Just _alPreferred) _alName (Just AltJSON)
discoveryService
where go
= buildClient (Proxy :: Proxy APIsListResource)
mempty