Source code for azure.cognitiveservices.search.customsearch.models.query

# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


[docs]class Query(Model): """Defines a search query. Variables are only populated by the server, and will be ignored when sending a request. :param text: The query string. Use this string as the query term in a new search request. :type text: str :ivar display_text: The display version of the query term. This version of the query term may contain special characters that highlight the search term found in the query string. The string contains the highlighting characters only if the query enabled hit highlighting :vartype display_text: str :ivar web_search_url: The URL that takes the user to the Bing search results page for the query.Only related search results include this field. :vartype web_search_url: str :ivar search_link: :vartype search_link: str """ _validation = { 'text': {'required': True}, 'display_text': {'readonly': True}, 'web_search_url': {'readonly': True}, 'search_link': {'readonly': True}, } _attribute_map = { 'text': {'key': 'text', 'type': 'str'}, 'display_text': {'key': 'displayText', 'type': 'str'}, 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, 'search_link': {'key': 'searchLink', 'type': 'str'}, } def __init__(self, text): super(Query, self).__init__() self.text = text self.display_text = None self.web_search_url = None self.search_link = None