module Network.Google.Method.Freebase.Search
(
SearchMethod
, search
, Search
, sWithout
, sCursor
, sWith
, sDomain
, sFormat
, sHelp
, sLang
, sIndent
, sOutput
, sQuery
, sScoring
, sLimit
, sFilter
, sMqlOutput
, sMid
, sType
, sStemmed
, sExact
, sSpell
, sAsOfTime
, sEncode
, sPrefixed
, sCallback
) where
import Network.Google.FreebaseSearch.Types
import Network.Google.Prelude
type SearchMethod =
"freebase" :>
"v1" :>
"search" :>
QueryParams "without" Text :>
QueryParam "cursor" (Textual Int32) :>
QueryParams "with" Text :>
QueryParams "domain" Text :>
QueryParam "format" FreebaseSearchFormat :>
QueryParam "help" FreebaseSearchHelp :>
QueryParams "lang" Text :>
QueryParam "indent" Bool :>
QueryParam "output" Text :>
QueryParam "query" Text :>
QueryParam "scoring" FreebaseSearchScoring :>
QueryParam "limit" (Textual Int32) :>
QueryParams "filter" Text :>
QueryParam "mql_output" Text :>
QueryParams "mid" Text :>
QueryParams "type" Text :>
QueryParam "stemmed" Bool :>
QueryParam "exact" Bool :>
QueryParam "spell"
FreebaseSearchSpell
:>
QueryParam "as_of_time" Text :>
QueryParam "encode"
FreebaseSearchEncode
:>
QueryParam "prefixed" Bool
:>
QueryParam "callback"
Text
:>
QueryParam "alt"
AltJSON
:> Get '[JSON] ()
:<|>
"freebase" :>
"v1" :>
"search" :>
QueryParams "without" Text :>
QueryParam "cursor" (Textual Int32) :>
QueryParams "with" Text :>
QueryParams "domain" Text :>
QueryParam "format" FreebaseSearchFormat :>
QueryParam "help" FreebaseSearchHelp :>
QueryParams "lang" Text :>
QueryParam "indent" Bool :>
QueryParam "output" Text :>
QueryParam "query" Text :>
QueryParam "scoring" FreebaseSearchScoring :>
QueryParam "limit" (Textual Int32) :>
QueryParams "filter" Text :>
QueryParam "mql_output" Text :>
QueryParams "mid" Text :>
QueryParams "type" Text :>
QueryParam "stemmed" Bool :>
QueryParam "exact" Bool :>
QueryParam "spell"
FreebaseSearchSpell
:>
QueryParam "as_of_time" Text
:>
QueryParam "encode"
FreebaseSearchEncode
:>
QueryParam "prefixed"
Bool
:>
QueryParam "callback"
Text
:>
QueryParam "alt"
AltMedia
:>
Get '[OctetStream]
Stream
data Search = Search
{ _sWithout :: !(Maybe [Text])
, _sCursor :: !(Maybe (Textual Int32))
, _sWith :: !(Maybe [Text])
, _sDomain :: !(Maybe [Text])
, _sFormat :: !FreebaseSearchFormat
, _sHelp :: !(Maybe FreebaseSearchHelp)
, _sLang :: !(Maybe [Text])
, _sIndent :: !(Maybe Bool)
, _sOutput :: !(Maybe Text)
, _sQuery :: !(Maybe Text)
, _sScoring :: !FreebaseSearchScoring
, _sLimit :: !(Textual Int32)
, _sFilter :: !(Maybe [Text])
, _sMqlOutput :: !(Maybe Text)
, _sMid :: !(Maybe [Text])
, _sType :: !(Maybe [Text])
, _sStemmed :: !(Maybe Bool)
, _sExact :: !(Maybe Bool)
, _sSpell :: !FreebaseSearchSpell
, _sAsOfTime :: !(Maybe Text)
, _sEncode :: !FreebaseSearchEncode
, _sPrefixed :: !(Maybe Bool)
, _sCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
search
:: Search
search =
Search
{ _sWithout = Nothing
, _sCursor = Nothing
, _sWith = Nothing
, _sDomain = Nothing
, _sFormat = Entity
, _sHelp = Nothing
, _sLang = Nothing
, _sIndent = Nothing
, _sOutput = Nothing
, _sQuery = Nothing
, _sScoring = FSSEntity
, _sLimit = 20
, _sFilter = Nothing
, _sMqlOutput = Nothing
, _sMid = Nothing
, _sType = Nothing
, _sStemmed = Nothing
, _sExact = Nothing
, _sSpell = NoSpelling
, _sAsOfTime = Nothing
, _sEncode = Off
, _sPrefixed = Nothing
, _sCallback = Nothing
}
sWithout :: Lens' Search [Text]
sWithout
= lens _sWithout (\ s a -> s{_sWithout = a}) .
_Default
. _Coerce
sCursor :: Lens' Search (Maybe Int32)
sCursor
= lens _sCursor (\ s a -> s{_sCursor = a}) .
mapping _Coerce
sWith :: Lens' Search [Text]
sWith
= lens _sWith (\ s a -> s{_sWith = a}) . _Default .
_Coerce
sDomain :: Lens' Search [Text]
sDomain
= lens _sDomain (\ s a -> s{_sDomain = a}) . _Default
. _Coerce
sFormat :: Lens' Search FreebaseSearchFormat
sFormat = lens _sFormat (\ s a -> s{_sFormat = a})
sHelp :: Lens' Search (Maybe FreebaseSearchHelp)
sHelp = lens _sHelp (\ s a -> s{_sHelp = a})
sLang :: Lens' Search [Text]
sLang
= lens _sLang (\ s a -> s{_sLang = a}) . _Default .
_Coerce
sIndent :: Lens' Search (Maybe Bool)
sIndent = lens _sIndent (\ s a -> s{_sIndent = a})
sOutput :: Lens' Search (Maybe Text)
sOutput = lens _sOutput (\ s a -> s{_sOutput = a})
sQuery :: Lens' Search (Maybe Text)
sQuery = lens _sQuery (\ s a -> s{_sQuery = a})
sScoring :: Lens' Search FreebaseSearchScoring
sScoring = lens _sScoring (\ s a -> s{_sScoring = a})
sLimit :: Lens' Search Int32
sLimit
= lens _sLimit (\ s a -> s{_sLimit = a}) . _Coerce
sFilter :: Lens' Search [Text]
sFilter
= lens _sFilter (\ s a -> s{_sFilter = a}) . _Default
. _Coerce
sMqlOutput :: Lens' Search (Maybe Text)
sMqlOutput
= lens _sMqlOutput (\ s a -> s{_sMqlOutput = a})
sMid :: Lens' Search [Text]
sMid
= lens _sMid (\ s a -> s{_sMid = a}) . _Default .
_Coerce
sType :: Lens' Search [Text]
sType
= lens _sType (\ s a -> s{_sType = a}) . _Default .
_Coerce
sStemmed :: Lens' Search (Maybe Bool)
sStemmed = lens _sStemmed (\ s a -> s{_sStemmed = a})
sExact :: Lens' Search (Maybe Bool)
sExact = lens _sExact (\ s a -> s{_sExact = a})
sSpell :: Lens' Search FreebaseSearchSpell
sSpell = lens _sSpell (\ s a -> s{_sSpell = a})
sAsOfTime :: Lens' Search (Maybe Text)
sAsOfTime
= lens _sAsOfTime (\ s a -> s{_sAsOfTime = a})
sEncode :: Lens' Search FreebaseSearchEncode
sEncode = lens _sEncode (\ s a -> s{_sEncode = a})
sPrefixed :: Lens' Search (Maybe Bool)
sPrefixed
= lens _sPrefixed (\ s a -> s{_sPrefixed = a})
sCallback :: Lens' Search (Maybe Text)
sCallback
= lens _sCallback (\ s a -> s{_sCallback = a})
instance GoogleRequest Search where
type Rs Search = ()
requestClient Search{..}
= go (_sWithout ^. _Default) _sCursor
(_sWith ^. _Default)
(_sDomain ^. _Default)
(Just _sFormat)
_sHelp
(_sLang ^. _Default)
_sIndent
_sOutput
_sQuery
(Just _sScoring)
(Just _sLimit)
(_sFilter ^. _Default)
_sMqlOutput
(_sMid ^. _Default)
(_sType ^. _Default)
_sStemmed
_sExact
(Just _sSpell)
_sAsOfTime
(Just _sEncode)
_sPrefixed
_sCallback
(Just AltJSON)
freebaseSearchService
where go :<|> _
= buildClient (Proxy :: Proxy SearchMethod) mempty
instance GoogleRequest (MediaDownload Search) where
type Rs (MediaDownload Search) = Stream
requestClient (MediaDownload Search{..})
= go (_sWithout ^. _Default) _sCursor
(_sWith ^. _Default)
(_sDomain ^. _Default)
(Just _sFormat)
_sHelp
(_sLang ^. _Default)
_sIndent
_sOutput
_sQuery
(Just _sScoring)
(Just _sLimit)
(_sFilter ^. _Default)
_sMqlOutput
(_sMid ^. _Default)
(_sType ^. _Default)
_sStemmed
_sExact
(Just _sSpell)
_sAsOfTime
(Just _sEncode)
_sPrefixed
_sCallback
(Just AltMedia)
freebaseSearchService
where _ :<|> go
= buildClient (Proxy :: Proxy SearchMethod) mempty