azure.cognitiveservices.search.autosuggest.models module¶
-
exception
azure.cognitiveservices.search.autosuggest.models.
ErrorResponseException
(deserialize, response, *args)[source]¶ Bases:
msrest.exceptions.HttpOperationError
Server responsed with exception of type: ‘ErrorResponse’.
- Parameters
deserialize – A deserializer
response – Server response to be deserialized.
-
class
azure.cognitiveservices.search.autosuggest.models.
Action
(**kwargs)[source]¶ Bases:
azure.cognitiveservices.search.autosuggest.models._models_py3.CreativeWork
Action.
You probably want to use the sub-classes and not this class directly. Known sub-classes are: SearchAction
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- Parameters
_type (str) – Required. Constant filled by server.
- Variables
read_link (str) – The URL that returns this resource.
web_search_url (str) – The URL To Bing’s search result for this item.
preferred_clickthrough_url (str) –
adaptive_card (str) –
url (str) – The URL to get more information about the thing represented by this object.
thumbnail_url (str) – The URL to a thumbnail of the item.
creator (Thing) –
text (str) – Text content of this creative work
discussion_url (str) –
comment_count (int) –
main_entity (Thing) –
head_line (str) –
copyright_holder (Thing) –
copyright_year (int) –
disclaimer (str) –
is_accessible_for_free (bool) –
is_family_friendly (bool) –
display_name (str) –
is_top_action (bool) –
service_url (str) –
-
class
azure.cognitiveservices.search.autosuggest.models.
Answer
(**kwargs)[source]¶ Bases:
azure.cognitiveservices.search.autosuggest.models._models_py3.Response
Defines an answer.
You probably want to use the sub-classes and not this class directly. Known sub-classes are: SearchResultsAnswer
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- Parameters
_type (str) – Required. Constant filled by server.
- Variables
-
class
azure.cognitiveservices.search.autosuggest.models.
CreativeWork
(**kwargs)[source]¶ Bases:
azure.cognitiveservices.search.autosuggest.models._models_py3.Thing
The most generic kind of creative work, including books, movies, photographs, software programs, etc.
You probably want to use the sub-classes and not this class directly. Known sub-classes are: Action
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- Parameters
_type (str) – Required. Constant filled by server.
- Variables
read_link (str) – The URL that returns this resource.
web_search_url (str) – The URL To Bing’s search result for this item.
preferred_clickthrough_url (str) –
adaptive_card (str) –
url (str) – The URL to get more information about the thing represented by this object.
thumbnail_url (str) – The URL to a thumbnail of the item.
creator (Thing) –
text (str) – Text content of this creative work
discussion_url (str) –
comment_count (int) –
main_entity (Thing) –
head_line (str) –
copyright_holder (Thing) –
copyright_year (int) –
disclaimer (str) –
is_accessible_for_free (bool) –
is_family_friendly (bool) –
-
class
azure.cognitiveservices.search.autosuggest.models.
Error
(*, message: str, code='None', **kwargs)[source]¶ Bases:
msrest.serialization.Model
Defines the error that occurred.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- Parameters
code (str or ErrorCode) – Required. The error code that identifies the category of error. Possible values include: ‘None’, ‘ServerError’, ‘InvalidRequest’, ‘RateLimitExceeded’, ‘InvalidAuthorization’, ‘InsufficientAuthorization’. Default value: “None” .
message (str) – Required. A description of the error.
_type (str) – Required. Constant filled by server.
- Variables
-
class
azure.cognitiveservices.search.autosuggest.models.
ErrorResponse
(*, errors, **kwargs)[source]¶ Bases:
azure.cognitiveservices.search.autosuggest.models._models_py3.Response
The top-level response that represents a failed request.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- Parameters
- Variables
-
class
azure.cognitiveservices.search.autosuggest.models.
Identifiable
(**kwargs)[source]¶ Bases:
azure.cognitiveservices.search.autosuggest.models._models_py3.ResponseBase
Defines the identity of a resource.
You probably want to use the sub-classes and not this class directly. Known sub-classes are: Response
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
-
class
azure.cognitiveservices.search.autosuggest.models.
QueryContext
(*, original_query: str, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Defines the query context that Bing used for the request.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- Parameters
- Variables
altered_query (str) – The query string used by Bing to perform the query. Bing uses the altered query string if the original query string contained spelling mistakes. For example, if the query string is “saling downwind”, the altered query string will be “sailing downwind”. This field is included only if the original query string contains a spelling mistake.
alteration_override_query (str) – The query string to use to force Bing to use the original string. For example, if the query string is “saling downwind”, the override query string will be “+saling downwind”. Remember to encode the query string which results in “%2Bsaling+downwind”. This field is included only if the original query string contains a spelling mistake.
adult_intent (bool) – A Boolean value that indicates whether the specified query has adult intent. The value is true if the query has adult intent; otherwise, false.
ask_user_for_location (bool) – A Boolean value that indicates whether Bing requires the user’s location to provide accurate results. If you specified the user’s location by using the X-MSEdge-ClientIP and X-Search-Location headers, you can ignore this field. For location aware queries, such as “today’s weather” or “restaurants near me” that need the user’s location to provide accurate results, this field is set to true. For location aware queries that include the location (for example, “Seattle weather”), this field is set to false. This field is also set to false for queries that are not location aware, such as “best sellers”.
is_transactional (bool) –
-
class
azure.cognitiveservices.search.autosuggest.models.
Response
(**kwargs)[source]¶ Bases:
azure.cognitiveservices.search.autosuggest.models._models_py3.Identifiable
Defines a response. All schemas that could be returned at the root of a response should inherit from this.
You probably want to use the sub-classes and not this class directly. Known sub-classes are: Answer, Thing, ErrorResponse
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- Parameters
_type (str) – Required. Constant filled by server.
- Variables
-
class
azure.cognitiveservices.search.autosuggest.models.
ResponseBase
(**kwargs)[source]¶ Bases:
msrest.serialization.Model
Response base.
You probably want to use the sub-classes and not this class directly. Known sub-classes are: Identifiable
All required parameters must be populated in order to send to Azure.
- Parameters
_type (str) – Required. Constant filled by server.
-
class
azure.cognitiveservices.search.autosuggest.models.
SearchAction
(**kwargs)[source]¶ Bases:
azure.cognitiveservices.search.autosuggest.models._models_py3.Action
SearchAction.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- Parameters
_type (str) – Required. Constant filled by server.
- Variables
read_link (str) – The URL that returns this resource.
web_search_url (str) – The URL To Bing’s search result for this item.
preferred_clickthrough_url (str) –
adaptive_card (str) –
url (str) – The URL to get more information about the thing represented by this object.
thumbnail_url (str) – The URL to a thumbnail of the item.
creator (Thing) –
text (str) – Text content of this creative work
discussion_url (str) –
comment_count (int) –
main_entity (Thing) –
head_line (str) –
copyright_holder (Thing) –
copyright_year (int) –
disclaimer (str) –
is_accessible_for_free (bool) –
is_family_friendly (bool) –
display_name (str) –
is_top_action (bool) –
service_url (str) –
display_text (str) –
query (str) –
search_kind (str or SearchKind) – Possible values include: ‘WebSearch’, ‘HistorySearch’, ‘DocumentSearch’, ‘TagSearch’, ‘LocationSearch’, ‘CustomSearch’. Default value: “WebSearch” .
-
class
azure.cognitiveservices.search.autosuggest.models.
SearchResultsAnswer
(**kwargs)[source]¶ Bases:
azure.cognitiveservices.search.autosuggest.models._models_py3.Answer
Defines a search result answer.
You probably want to use the sub-classes and not this class directly. Known sub-classes are: Suggestions
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
-
class
azure.cognitiveservices.search.autosuggest.models.
Suggestions
(*, suggestion_groups, **kwargs)[source]¶ Bases:
azure.cognitiveservices.search.autosuggest.models._models_py3.SearchResultsAnswer
Suggestions.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- Parameters
_type (str) – Required. Constant filled by server.
suggestion_groups (list[SuggestionsSuggestionGroup]) – Required.
- Variables
read_link (str) – The URL that returns this resource.
web_search_url (str) – The URL To Bing’s search result for this item.
preferred_clickthrough_url (str) –
adaptive_card (str) –
query_context (QueryContext) –
-
class
azure.cognitiveservices.search.autosuggest.models.
SuggestionsSuggestionGroup
(*, search_suggestions, name='Unknown', **kwargs)[source]¶ Bases:
msrest.serialization.Model
SuggestionsSuggestionGroup.
All required parameters must be populated in order to send to Azure.
- Parameters
name (str or ScenarioType) – Required. Possible values include: ‘Unknown’, ‘Web’, ‘StoreApps’, ‘SearchHistory’, ‘PersonalSearchDocuments’, ‘PersonalSearchTags’, ‘Custom’. Default value: “Unknown” .
search_suggestions (list[SearchAction]) – Required.
_type (str) – Required. Constant filled by server.
-
class
azure.cognitiveservices.search.autosuggest.models.
Thing
(**kwargs)[source]¶ Bases:
azure.cognitiveservices.search.autosuggest.models._models_py3.Response
Defines a thing.
You probably want to use the sub-classes and not this class directly. Known sub-classes are: CreativeWork
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- Parameters
_type (str) – Required. Constant filled by server.
- Variables
-
class
azure.cognitiveservices.search.autosuggest.models.
ScenarioType
[source]¶ -
An enumeration.
-
custom
= 'Custom'¶
-
personal_search_documents
= 'PersonalSearchDocuments'¶
-
search_history
= 'SearchHistory'¶
-
store_apps
= 'StoreApps'¶
-
unknown
= 'Unknown'¶
-
web
= 'Web'¶
-
-
class
azure.cognitiveservices.search.autosuggest.models.
SearchKind
[source]¶ -
An enumeration.
-
custom_search
= 'CustomSearch'¶
-
document_search
= 'DocumentSearch'¶
-
history_search
= 'HistorySearch'¶
-
location_search
= 'LocationSearch'¶
-
tag_search
= 'TagSearch'¶
-
web_search
= 'WebSearch'¶
-
-
class
azure.cognitiveservices.search.autosuggest.models.
ErrorCode
[source]¶ -
An enumeration.
-
invalid_request
= 'InvalidRequest'¶
-
none
= 'None'¶
-
rate_limit_exceeded
= 'RateLimitExceeded'¶
-
server_error
= 'ServerError'¶
-