Skip to content

Commit

Permalink
Generated from 771a3b26df8ce4602832c92223eda0cf71129355
Browse files Browse the repository at this point in the history
Update from latest master
  • Loading branch information
SDK Automation committed Oct 29, 2019
1 parent b42ad27 commit 8716e0d
Show file tree
Hide file tree
Showing 37 changed files with 2,419 additions and 2,669 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .auto_suggest_search_api import AutoSuggestSearchAPI
from .version import VERSION
from ._configuration import AutoSuggestClientConfiguration
from ._auto_suggest_client import AutoSuggestClient
__all__ = ['AutoSuggestClient', 'AutoSuggestClientConfiguration']

__all__ = ['AutoSuggestSearchAPI']
from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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.service_client import SDKClient
from msrest import Serializer, Deserializer

from ._configuration import AutoSuggestClientConfiguration
from .operations import AutoSuggestClientOperationsMixin
from . import models


class AutoSuggestClient(AutoSuggestClientOperationsMixin, SDKClient):
"""Autosuggest supplies search terms derived from a root text sent to the service. The terms Autosuggest supplies are related to the root text based on similarity and their frequency or ratings of usefulness in other searches. For examples that show how to use Autosuggest, see [Search using AutoSuggest](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference).
:ivar config: Configuration for client.
:vartype config: AutoSuggestClientConfiguration
:param endpoint: Supported Cognitive Services endpoints (protocol and
hostname, for example: "https://westus.api.cognitive.microsoft.com",
"https://api.cognitive.microsoft.com").
:type endpoint: str
:param credentials: Subscription credentials which uniquely identify
client subscription.
:type credentials: None
"""

def __init__(
self, endpoint, credentials):

self.config = AutoSuggestClientConfiguration(endpoint, credentials)
super(AutoSuggestClient, 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)

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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 import Configuration

from .version import VERSION


class AutoSuggestClientConfiguration(Configuration):
"""Configuration for AutoSuggestClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param endpoint: Supported Cognitive Services endpoints (protocol and
hostname, for example: "https://westus.api.cognitive.microsoft.com",
"https://api.cognitive.microsoft.com").
:type endpoint: str
:param credentials: Subscription credentials which uniquely identify
client subscription.
:type credentials: None
"""

def __init__(
self, endpoint, credentials):

if endpoint is None:
raise ValueError("Parameter 'endpoint' must not be None.")
if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
base_url = '{Endpoint}/bing/v7.0'

super(AutoSuggestClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-cognitiveservices-search-autosuggest/{}'.format(VERSION))

self.endpoint = endpoint
self.credentials = credentials
Original file line number Diff line number Diff line change
Expand Up @@ -10,58 +10,58 @@
# --------------------------------------------------------------------------

try:
from .search_action_py3 import SearchAction
from .suggestions_suggestion_group_py3 import SuggestionsSuggestionGroup
from .suggestions_py3 import Suggestions
from .query_context_py3 import QueryContext
from .search_results_answer_py3 import SearchResultsAnswer
from .answer_py3 import Answer
from .thing_py3 import Thing
from .action_py3 import Action
from .response_py3 import Response
from .identifiable_py3 import Identifiable
from .error_py3 import Error
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .creative_work_py3 import CreativeWork
from .response_base_py3 import ResponseBase
from ._models_py3 import Action
from ._models_py3 import Answer
from ._models_py3 import CreativeWork
from ._models_py3 import Error
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import Identifiable
from ._models_py3 import QueryContext
from ._models_py3 import Response
from ._models_py3 import ResponseBase
from ._models_py3 import SearchAction
from ._models_py3 import SearchResultsAnswer
from ._models_py3 import Suggestions
from ._models_py3 import SuggestionsSuggestionGroup
from ._models_py3 import Thing
except (SyntaxError, ImportError):
from .search_action import SearchAction
from .suggestions_suggestion_group import SuggestionsSuggestionGroup
from .suggestions import Suggestions
from .query_context import QueryContext
from .search_results_answer import SearchResultsAnswer
from .answer import Answer
from .thing import Thing
from .action import Action
from .response import Response
from .identifiable import Identifiable
from .error import Error
from .error_response import ErrorResponse, ErrorResponseException
from .creative_work import CreativeWork
from .response_base import ResponseBase
from .auto_suggest_search_api_enums import (
ScenarioType,
SearchKind,
from ._models import Action
from ._models import Answer
from ._models import CreativeWork
from ._models import Error
from ._models import ErrorResponse, ErrorResponseException
from ._models import Identifiable
from ._models import QueryContext
from ._models import Response
from ._models import ResponseBase
from ._models import SearchAction
from ._models import SearchResultsAnswer
from ._models import Suggestions
from ._models import SuggestionsSuggestionGroup
from ._models import Thing
from ._auto_suggest_client_enums import (
ErrorCode,
SafeSearch,
ResponseFormat,
SafeSearch,
ScenarioType,
SearchKind,
)

__all__ = [
'SearchAction',
'SuggestionsSuggestionGroup',
'Suggestions',
'QueryContext',
'SearchResultsAnswer',
'Answer',
'Thing',
'Action',
'Response',
'Identifiable',
'Answer',
'CreativeWork',
'Error',
'ErrorResponse', 'ErrorResponseException',
'CreativeWork',
'Identifiable',
'QueryContext',
'Response',
'ResponseBase',
'SearchAction',
'SearchResultsAnswer',
'Suggestions',
'SuggestionsSuggestionGroup',
'Thing',
'ScenarioType',
'SearchKind',
'ErrorCode',
Expand Down
Loading

0 comments on commit 8716e0d

Please sign in to comment.