-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Google Freebase Search SDK.
--   
--   Find Freebase entities using textual queries and other constraints.
--   
--   <i>Warning:</i> This is an experimental prototype/preview release
--   which is still under exploratory development and not intended for
--   public use, caveat emptor!
--   
--   This library is compatible with version <tt>v1</tt> of the API.
@package gogol-freebasesearch
@version 0.3.0


module Network.Google.FreebaseSearch.Types

-- | Default request referring to version <tt>v1</tt> of the Freebase
--   Search. This contains the host and root path used as a starting point
--   for constructing service requests.
freebaseSearchService :: ServiceConfig

-- | Structural format of the json response.
data FreebaseSearchFormat

-- | <tt>ac</tt> Compact format useful for autocomplete/suggest UIs.
AC :: FreebaseSearchFormat

-- | <tt>classic</tt> [DEPRECATED] Same format as was returned by
--   api.freebase.com.
Classic :: FreebaseSearchFormat

-- | <tt>entity</tt> Basic information about the entities.
Entity :: FreebaseSearchFormat

-- | <tt>guids</tt> [DEPRECATED] Ordered list of a freebase guids.
Guids :: FreebaseSearchFormat

-- | <tt>ids</tt> Ordered list of freebase ids.
Ids :: FreebaseSearchFormat

-- | <tt>mids</tt> Ordered list of freebase mids.
Mids :: FreebaseSearchFormat
data ReconcileGetWarningItem

-- | Creates a value of <a>ReconcileGetWarningItem</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rgwiLocation</a></li>
--   <li><a>rgwiReason</a></li>
--   <li><a>rgwiMessage</a></li>
--   </ul>
reconcileGetWarningItem :: ReconcileGetWarningItem

-- | Location of warning in the request e.g. invalid predicate.
rgwiLocation :: Lens' ReconcileGetWarningItem (Maybe Text)

-- | Code for identifying classes of warnings.
rgwiReason :: Lens' ReconcileGetWarningItem (Maybe Text)

-- | Warning message to display to the user.
rgwiMessage :: Lens' ReconcileGetWarningItem (Maybe Text)

-- | Relevance scoring algorithm to use.
data FreebaseSearchScoring

-- | <tt>entity</tt> Use freebase and popularity entity ranking.
FSSEntity :: FreebaseSearchScoring

-- | <tt>freebase</tt> Use freebase entity ranking.
FSSFreebase :: FreebaseSearchScoring

-- | <tt>schema</tt> Use schema ranking for properties and types.
FSSSchema :: FreebaseSearchScoring

-- | Server costs for reconciling.
--   
--   <i>See:</i> <a>reconcileGetCosts</a> smart constructor.
data ReconcileGetCosts

-- | Creates a value of <a>ReconcileGetCosts</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rgcHits</a></li>
--   <li><a>rgcMs</a></li>
--   </ul>
reconcileGetCosts :: ReconcileGetCosts

-- | Total number of hits found.
rgcHits :: Lens' ReconcileGetCosts (Maybe Int32)

-- | Total milliseconds spent.
rgcMs :: Lens' ReconcileGetCosts (Maybe Int32)
data ReconcileGet

-- | Creates a value of <a>ReconcileGet</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rgCandidate</a></li>
--   <li><a>rgCosts</a></li>
--   <li><a>rgWarning</a></li>
--   <li><a>rgMatch</a></li>
--   </ul>
reconcileGet :: ReconcileGet

-- | If filled, then the listed candidates are potential matches, and such
--   should be evaluated by a more discerning algorithm or human. The
--   matches are ordered by confidence.
rgCandidate :: Lens' ReconcileGet [ReconcileCandidate]

-- | Server costs for reconciling.
rgCosts :: Lens' ReconcileGet (Maybe ReconcileGetCosts)

-- | If filled, then there were recoverable problems that affected the
--   request. For example, some of the properties were ignored because they
--   either are not valid Freebase predicates or are not indexed for
--   reconciliation. The candidates returned should be considered valid
--   results, with the caveat that sections of the request were ignored as
--   specified by the warning text.
rgWarning :: Lens' ReconcileGet [ReconcileGetWarningItem]

-- | If filled, this entity is guaranteed to match at requested confidence
--   probability (default 99%).
rgMatch :: Lens' ReconcileGet (Maybe ReconcileCandidate)

-- | The encoding of the response. You can use this parameter to enable
--   html encoding.
data FreebaseSearchEncode

-- | <tt>html</tt> Encode certain characters in the response (such as tags
--   and ambersands) using html encoding.
HTML :: FreebaseSearchEncode

-- | <tt>off</tt> No encoding of the response. You should not print the
--   results directly on an web page without html-escaping the content
--   first.
Off :: FreebaseSearchEncode

-- | Type or profession the candidate is notable for.
--   
--   <i>See:</i> <a>reconcileCandidateNotable</a> smart constructor.
data ReconcileCandidateNotable

-- | Creates a value of <a>ReconcileCandidateNotable</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rcnName</a></li>
--   <li><a>rcnId</a></li>
--   </ul>
reconcileCandidateNotable :: ReconcileCandidateNotable

-- | Name of notable category in specified language.
rcnName :: Lens' ReconcileCandidateNotable (Maybe Text)

-- | MID of notable category.
rcnId :: Lens' ReconcileCandidateNotable (Maybe Text)
data ReconcileCandidate

-- | Creates a value of <a>ReconcileCandidate</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rcLang</a></li>
--   <li><a>rcConfidence</a></li>
--   <li><a>rcName</a></li>
--   <li><a>rcNotable</a></li>
--   <li><a>rcMid</a></li>
--   </ul>
reconcileCandidate :: ReconcileCandidate

-- | Language code that candidate and notable names are displayed in.
rcLang :: Lens' ReconcileCandidate (Maybe Text)

-- | Percentage likelihood that this candidate is the unique matching
--   entity. Value will be between 0.0 and 1.0
rcConfidence :: Lens' ReconcileCandidate (Maybe Double)

-- | Freebase name of matching entity in specified language.
rcName :: Lens' ReconcileCandidate (Maybe Text)

-- | Type or profession the candidate is notable for.
rcNotable :: Lens' ReconcileCandidate (Maybe ReconcileCandidateNotable)

-- | Freebase MID of candidate entity.
rcMid :: Lens' ReconcileCandidate (Maybe Text)

-- | The keyword to request help on.
data FreebaseSearchHelp

-- | <tt>langs</tt> The language codes served by the service.
Langs :: FreebaseSearchHelp

-- | <tt>mappings</tt> The property/path mappings supported by the filter
--   and output request parameters.
MAppings :: FreebaseSearchHelp

-- | <tt>predicates</tt> The predicates and path-terminating properties
--   supported by the filter and output request parameters.
Predicates :: FreebaseSearchHelp

-- | Request 'did you mean' suggestions
data FreebaseSearchSpell

-- | <tt>always</tt> Request spelling suggestions for any query at least
--   three characters long.
Always :: FreebaseSearchSpell

-- | <tt>no_results</tt> Request spelling suggestions if no results were
--   found.
NoResults :: FreebaseSearchSpell

-- | <tt>no_spelling</tt> Don't request spelling suggestions.
NoSpelling :: FreebaseSearchSpell


-- | Reconcile entities to Freebase open data.
--   
--   <i>See:</i> <a>Freebase Search Reference</a> for
--   <tt>freebase.reconcile</tt>.
module Network.Google.Method.Freebase.Reconcile

-- | A resource alias for <tt>freebase.reconcile</tt> method which the
--   <a>Reconcile</a> request conforms to.
type ReconcileMethod = "freebase" :> ("v1" :> ("reconcile" :> (QueryParams "kind" Text :> (QueryParams "lang" Text :> (QueryParam "confidence" (Textual Double) :> (QueryParam "name" Text :> (QueryParam "limit" (Textual Int32) :> (QueryParams "prop" Text :> (QueryParam "alt" AltJSON :> Get '[JSON] ReconcileGet)))))))))

-- | Creates a value of <a>Reconcile</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rKind</a></li>
--   <li><a>rLang</a></li>
--   <li><a>rConfidence</a></li>
--   <li><a>rName</a></li>
--   <li><a>rLimit</a></li>
--   <li><a>rProp</a></li>
--   </ul>
reconcile :: Reconcile

-- | Reconcile entities to Freebase open data.
--   
--   <i>See:</i> <a>reconcile</a> smart constructor.
data Reconcile

-- | Classifications of entity e.g. type, category, title.
rKind :: Lens' Reconcile [Text]

-- | Languages for names and values. First language is used for display.
--   Default is 'en'.
rLang :: Lens' Reconcile [Text]

-- | Required confidence for a candidate to match. Must be between .5 and
--   1.0
rConfidence :: Lens' Reconcile Double

-- | Name of entity.
rName :: Lens' Reconcile (Maybe Text)

-- | Maximum number of candidates to return.
rLimit :: Lens' Reconcile Int32

-- | Property values for entity formatted as :
rProp :: Lens' Reconcile [Text]
instance GHC.Generics.Generic Network.Google.Method.Freebase.Reconcile.Reconcile
instance Data.Data.Data Network.Google.Method.Freebase.Reconcile.Reconcile
instance GHC.Show.Show Network.Google.Method.Freebase.Reconcile.Reconcile
instance GHC.Classes.Eq Network.Google.Method.Freebase.Reconcile.Reconcile
instance Network.Google.Types.GoogleRequest Network.Google.Method.Freebase.Reconcile.Reconcile


-- | Search Freebase open data.
--   
--   <i>See:</i> <a>Freebase Search Reference</a> for
--   <tt>freebase.search</tt>.
module Network.Google.Method.Freebase.Search

-- | A resource alias for <tt>freebase.search</tt> method which the
--   <a>Search</a> request conforms to.
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)))))))))))))))))))))))))))

-- | Creates a value of <a>Search</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>sWithout</a></li>
--   <li><a>sCursor</a></li>
--   <li><a>sWith</a></li>
--   <li><a>sDomain</a></li>
--   <li><a>sFormat</a></li>
--   <li><a>sHelp</a></li>
--   <li><a>sLang</a></li>
--   <li><a>sIndent</a></li>
--   <li><a>sOutput</a></li>
--   <li><a>sQuery</a></li>
--   <li><a>sScoring</a></li>
--   <li><a>sLimit</a></li>
--   <li><a>sFilter</a></li>
--   <li><a>sMqlOutput</a></li>
--   <li><a>sMid</a></li>
--   <li><a>sType</a></li>
--   <li><a>sStemmed</a></li>
--   <li><a>sExact</a></li>
--   <li><a>sSpell</a></li>
--   <li><a>sAsOfTime</a></li>
--   <li><a>sEncode</a></li>
--   <li><a>sPrefixed</a></li>
--   <li><a>sCallback</a></li>
--   </ul>
search :: Search

-- | Search Freebase open data.
--   
--   <i>See:</i> <a>search</a> smart constructor.
data Search

-- | A rule to not match against.
sWithout :: Lens' Search [Text]

-- | The cursor value to use for the next page of results.
sCursor :: Lens' Search (Maybe Int32)

-- | A rule to match against.
sWith :: Lens' Search [Text]

-- | Restrict to topics with this Freebase domain id.
sDomain :: Lens' Search [Text]

-- | Structural format of the json response.
sFormat :: Lens' Search FreebaseSearchFormat

-- | The keyword to request help on.
sHelp :: Lens' Search (Maybe FreebaseSearchHelp)

-- | The code of the language to run the query with. Default is 'en'.
sLang :: Lens' Search [Text]

-- | Whether to indent the json results or not.
sIndent :: Lens' Search (Maybe Bool)

-- | An output expression to request data from matches.
sOutput :: Lens' Search (Maybe Text)

-- | Query term to search for.
sQuery :: Lens' Search (Maybe Text)

-- | Relevance scoring algorithm to use.
sScoring :: Lens' Search FreebaseSearchScoring

-- | Maximum number of results to return.
sLimit :: Lens' Search Int32

-- | A filter to apply to the query.
sFilter :: Lens' Search [Text]

-- | The MQL query to run againist the results to extract more data.
sMqlOutput :: Lens' Search (Maybe Text)

-- | A mid to use instead of a query.
sMid :: Lens' Search [Text]

-- | Restrict to topics with this Freebase type id.
sType :: Lens' Search [Text]

-- | Query on stemmed names and aliases. May not be used with prefixed.
sStemmed :: Lens' Search (Maybe Bool)

-- | Query on exact name and keys only.
sExact :: Lens' Search (Maybe Bool)

-- | Request 'did you mean' suggestions
sSpell :: Lens' Search FreebaseSearchSpell

-- | A mql as_of_time value to use with mql_output queries.
sAsOfTime :: Lens' Search (Maybe Text)

-- | The encoding of the response. You can use this parameter to enable
--   html encoding.
sEncode :: Lens' Search FreebaseSearchEncode

-- | Prefix match against names and aliases.
sPrefixed :: Lens' Search (Maybe Bool)

-- | JS method name for JSONP callbacks.
sCallback :: Lens' Search (Maybe Text)
instance GHC.Generics.Generic Network.Google.Method.Freebase.Search.Search
instance Data.Data.Data Network.Google.Method.Freebase.Search.Search
instance GHC.Show.Show Network.Google.Method.Freebase.Search.Search
instance GHC.Classes.Eq Network.Google.Method.Freebase.Search.Search
instance Network.Google.Types.GoogleRequest Network.Google.Method.Freebase.Search.Search
instance Network.Google.Types.GoogleRequest (Network.Google.Types.MediaDownload Network.Google.Method.Freebase.Search.Search)


-- | Find Freebase entities using textual queries and other constraints.
--   
--   <i>See:</i> <a>Freebase Search Reference</a>
module Network.Google.FreebaseSearch

-- | Default request referring to version <tt>v1</tt> of the Freebase
--   Search. This contains the host and root path used as a starting point
--   for constructing service requests.
freebaseSearchService :: ServiceConfig

-- | Represents the entirety of the methods and resources available for the
--   Freebase Search service.
type FreebaseSearchAPI = ReconcileMethod :<|> SearchMethod

-- | Structural format of the json response.
data FreebaseSearchFormat

-- | <tt>ac</tt> Compact format useful for autocomplete/suggest UIs.
AC :: FreebaseSearchFormat

-- | <tt>classic</tt> [DEPRECATED] Same format as was returned by
--   api.freebase.com.
Classic :: FreebaseSearchFormat

-- | <tt>entity</tt> Basic information about the entities.
Entity :: FreebaseSearchFormat

-- | <tt>guids</tt> [DEPRECATED] Ordered list of a freebase guids.
Guids :: FreebaseSearchFormat

-- | <tt>ids</tt> Ordered list of freebase ids.
Ids :: FreebaseSearchFormat

-- | <tt>mids</tt> Ordered list of freebase mids.
Mids :: FreebaseSearchFormat
data ReconcileGetWarningItem

-- | Creates a value of <a>ReconcileGetWarningItem</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rgwiLocation</a></li>
--   <li><a>rgwiReason</a></li>
--   <li><a>rgwiMessage</a></li>
--   </ul>
reconcileGetWarningItem :: ReconcileGetWarningItem

-- | Location of warning in the request e.g. invalid predicate.
rgwiLocation :: Lens' ReconcileGetWarningItem (Maybe Text)

-- | Code for identifying classes of warnings.
rgwiReason :: Lens' ReconcileGetWarningItem (Maybe Text)

-- | Warning message to display to the user.
rgwiMessage :: Lens' ReconcileGetWarningItem (Maybe Text)

-- | Relevance scoring algorithm to use.
data FreebaseSearchScoring

-- | <tt>entity</tt> Use freebase and popularity entity ranking.
FSSEntity :: FreebaseSearchScoring

-- | <tt>freebase</tt> Use freebase entity ranking.
FSSFreebase :: FreebaseSearchScoring

-- | <tt>schema</tt> Use schema ranking for properties and types.
FSSSchema :: FreebaseSearchScoring

-- | Server costs for reconciling.
--   
--   <i>See:</i> <a>reconcileGetCosts</a> smart constructor.
data ReconcileGetCosts

-- | Creates a value of <a>ReconcileGetCosts</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rgcHits</a></li>
--   <li><a>rgcMs</a></li>
--   </ul>
reconcileGetCosts :: ReconcileGetCosts

-- | Total number of hits found.
rgcHits :: Lens' ReconcileGetCosts (Maybe Int32)

-- | Total milliseconds spent.
rgcMs :: Lens' ReconcileGetCosts (Maybe Int32)
data ReconcileGet

-- | Creates a value of <a>ReconcileGet</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rgCandidate</a></li>
--   <li><a>rgCosts</a></li>
--   <li><a>rgWarning</a></li>
--   <li><a>rgMatch</a></li>
--   </ul>
reconcileGet :: ReconcileGet

-- | If filled, then the listed candidates are potential matches, and such
--   should be evaluated by a more discerning algorithm or human. The
--   matches are ordered by confidence.
rgCandidate :: Lens' ReconcileGet [ReconcileCandidate]

-- | Server costs for reconciling.
rgCosts :: Lens' ReconcileGet (Maybe ReconcileGetCosts)

-- | If filled, then there were recoverable problems that affected the
--   request. For example, some of the properties were ignored because they
--   either are not valid Freebase predicates or are not indexed for
--   reconciliation. The candidates returned should be considered valid
--   results, with the caveat that sections of the request were ignored as
--   specified by the warning text.
rgWarning :: Lens' ReconcileGet [ReconcileGetWarningItem]

-- | If filled, this entity is guaranteed to match at requested confidence
--   probability (default 99%).
rgMatch :: Lens' ReconcileGet (Maybe ReconcileCandidate)

-- | The encoding of the response. You can use this parameter to enable
--   html encoding.
data FreebaseSearchEncode

-- | <tt>html</tt> Encode certain characters in the response (such as tags
--   and ambersands) using html encoding.
HTML :: FreebaseSearchEncode

-- | <tt>off</tt> No encoding of the response. You should not print the
--   results directly on an web page without html-escaping the content
--   first.
Off :: FreebaseSearchEncode

-- | Type or profession the candidate is notable for.
--   
--   <i>See:</i> <a>reconcileCandidateNotable</a> smart constructor.
data ReconcileCandidateNotable

-- | Creates a value of <a>ReconcileCandidateNotable</a> with the minimum
--   fields required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rcnName</a></li>
--   <li><a>rcnId</a></li>
--   </ul>
reconcileCandidateNotable :: ReconcileCandidateNotable

-- | Name of notable category in specified language.
rcnName :: Lens' ReconcileCandidateNotable (Maybe Text)

-- | MID of notable category.
rcnId :: Lens' ReconcileCandidateNotable (Maybe Text)
data ReconcileCandidate

-- | Creates a value of <a>ReconcileCandidate</a> with the minimum fields
--   required to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>rcLang</a></li>
--   <li><a>rcConfidence</a></li>
--   <li><a>rcName</a></li>
--   <li><a>rcNotable</a></li>
--   <li><a>rcMid</a></li>
--   </ul>
reconcileCandidate :: ReconcileCandidate

-- | Language code that candidate and notable names are displayed in.
rcLang :: Lens' ReconcileCandidate (Maybe Text)

-- | Percentage likelihood that this candidate is the unique matching
--   entity. Value will be between 0.0 and 1.0
rcConfidence :: Lens' ReconcileCandidate (Maybe Double)

-- | Freebase name of matching entity in specified language.
rcName :: Lens' ReconcileCandidate (Maybe Text)

-- | Type or profession the candidate is notable for.
rcNotable :: Lens' ReconcileCandidate (Maybe ReconcileCandidateNotable)

-- | Freebase MID of candidate entity.
rcMid :: Lens' ReconcileCandidate (Maybe Text)

-- | The keyword to request help on.
data FreebaseSearchHelp

-- | <tt>langs</tt> The language codes served by the service.
Langs :: FreebaseSearchHelp

-- | <tt>mappings</tt> The property/path mappings supported by the filter
--   and output request parameters.
MAppings :: FreebaseSearchHelp

-- | <tt>predicates</tt> The predicates and path-terminating properties
--   supported by the filter and output request parameters.
Predicates :: FreebaseSearchHelp

-- | Request 'did you mean' suggestions
data FreebaseSearchSpell

-- | <tt>always</tt> Request spelling suggestions for any query at least
--   three characters long.
Always :: FreebaseSearchSpell

-- | <tt>no_results</tt> Request spelling suggestions if no results were
--   found.
NoResults :: FreebaseSearchSpell

-- | <tt>no_spelling</tt> Don't request spelling suggestions.
NoSpelling :: FreebaseSearchSpell
