Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, **kwargs):
super(Response, self).__init__(**kwargs)
self.web_search_url = None
self._type = 'Response'
# 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 .response import Response
class SearchResponse(Response):
"""Defines the top-level object that the response includes when the request
succeeds.
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.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
:ivar query_context: An object that contains the query string that Bing
used for the request. This object contains the query string as entered by
# 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 .response import Response
class Answer(Response):
"""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.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
# 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 .response import Response
class Thing(Response):
"""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.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
def __init__(
self, credentials, base_url=None):
self.config = CustomSearchClientConfiguration(credentials, base_url)
super(CustomSearchClient, self).__init__(self.config.credentials, self.config)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '1.0'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self.custom_instance = CustomInstanceOperations(
self._client, self.config, self._serialize, self._deserialize)
def __init__(
self, credentials, base_url=None):
if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if not base_url:
base_url = 'https://api.cognitive.microsoft.com/bingcustomsearch/v7.0'
super(CustomSearchClientConfiguration, self).__init__(base_url)
self.add_user_agent('azure-cognitiveservices-search-customsearch/{}'.format(VERSION))
self.credentials = credentials
def __init__(
self, credentials, base_url=None):
self.config = CustomSearchClientConfiguration(credentials, base_url)
super(CustomSearchClient, self).__init__(self.config.credentials, self.config)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '1.0'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self.custom_instance = CustomInstanceOperations(
self._client, self.config, self._serialize, self._deserialize)
def __init__(self, **kwargs):
super(Answer, self).__init__(**kwargs)
self.follow_up_queries = None
self._type = 'Answer'
# 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 .answer import Answer
class SearchResultsAnswer(Answer):
"""SearchResultsAnswer.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: WebWebAnswer
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.
:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar web_search_url: The URL To Bing's search result for this item.
:vartype web_search_url: str
def __init__(self, **kwargs):
super(CreativeWork, self).__init__(**kwargs)
self.thumbnail_url = None
self.provider = None
self.text = None
self._type = 'CreativeWork'