Skip to content

Commit 1963834

Browse files
AutorestCIlmazuel
authored andcommitted
[AutoPR cognitiveservices/data-plane/LUIS/Runtime/cognitiveservices/data-plane/LUIS/Authoring] [Cognitive Services] Update endpoint URL template for LUIS. (#2995)
* Generated from 8dfedc91e10fb96edb9aff8158500e9d369ab36a [Cognitive Services] Update endpoint URL template for LUIS. * Generated from 8dfedc91e10fb96edb9aff8158500e9d369ab36a [Cognitive Services] Update endpoint URL template for LUIS. * Manual fix of LUIS enum * LUIS packaging * Release date * LUIS doesn't need msrestazure
1 parent 61234a3 commit 1963834

File tree

252 files changed

+20379
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

252 files changed

+20379
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. :changelog:
2+
3+
Release History
4+
===============
5+
6+
0.1.0 (2018-08-15)
7+
++++++++++++++++++
8+
9+
* Initial Release
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include *.rst
2+
include azure_bdist_wheel.py
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Microsoft Azure SDK for Python
2+
==============================
3+
4+
This is the Microsoft Azure Cognitive Services LUIS Client Library.
5+
6+
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
7+
8+
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.
9+
10+
11+
Compatibility
12+
=============
13+
14+
**IMPORTANT**: If you have an earlier version of the azure package
15+
(version < 1.0), you should uninstall it before installing this package.
16+
17+
You can check the version using pip:
18+
19+
.. code:: shell
20+
21+
pip freeze
22+
23+
If you see azure==0.11.0 (or any version below 1.0), uninstall it first:
24+
25+
.. code:: shell
26+
27+
pip uninstall azure
28+
29+
30+
Usage
31+
=====
32+
33+
For code examples, see `Cognitive Services LUIS
34+
<https://docs.microsoft.com/python/api/overview/azure/cognitive-services>`__
35+
on docs.microsoft.com.
36+
37+
38+
Provide Feedback
39+
================
40+
41+
If you encounter any bugs or have suggestions, please file an issue in the
42+
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
43+
section of the project.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__import__('pkg_resources').declare_namespace(__name__)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__import__('pkg_resources').declare_namespace(__name__)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__import__('pkg_resources').declare_namespace(__name__)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__import__('pkg_resources').declare_namespace(__name__)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .luis_authoring_client import LUISAuthoringClient
13+
from .version import VERSION
14+
15+
__all__ = ['LUISAuthoringClient']
16+
17+
__version__ = VERSION
18+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.service_client import SDKClient
13+
from msrest import Configuration, Serializer, Deserializer
14+
from .version import VERSION
15+
from msrest.exceptions import HttpOperationError
16+
from .operations.features_operations import FeaturesOperations
17+
from .operations.examples_operations import ExamplesOperations
18+
from .operations.model_operations import ModelOperations
19+
from .operations.apps_operations import AppsOperations
20+
from .operations.versions_operations import VersionsOperations
21+
from .operations.train_operations import TrainOperations
22+
from .operations.permissions_operations import PermissionsOperations
23+
from .operations.pattern_operations import PatternOperations
24+
from . import models
25+
26+
27+
class LUISAuthoringClientConfiguration(Configuration):
28+
"""Configuration for LUISAuthoringClient
29+
Note that all parameters used to create this instance are saved as instance
30+
attributes.
31+
32+
:param endpoint: Supported Cognitive Services endpoints (protocol and
33+
hostname, for example: https://westus.api.cognitive.microsoft.com).
34+
:type endpoint: str
35+
:param credentials: Subscription credentials which uniquely identify
36+
client subscription.
37+
:type credentials: None
38+
"""
39+
40+
def __init__(
41+
self, endpoint, credentials):
42+
43+
if endpoint is None:
44+
raise ValueError("Parameter 'endpoint' must not be None.")
45+
if credentials is None:
46+
raise ValueError("Parameter 'credentials' must not be None.")
47+
base_url = '{Endpoint}/luis/api/v2.0'
48+
49+
super(LUISAuthoringClientConfiguration, self).__init__(base_url)
50+
51+
self.add_user_agent('azure-cognitiveservices-language-luis/{}'.format(VERSION))
52+
53+
self.endpoint = endpoint
54+
self.credentials = credentials
55+
56+
57+
class LUISAuthoringClient(SDKClient):
58+
"""LUISAuthoringClient
59+
60+
:ivar config: Configuration for client.
61+
:vartype config: LUISAuthoringClientConfiguration
62+
63+
:ivar features: Features operations
64+
:vartype features: azure.cognitiveservices.language.luis.authoring.operations.FeaturesOperations
65+
:ivar examples: Examples operations
66+
:vartype examples: azure.cognitiveservices.language.luis.authoring.operations.ExamplesOperations
67+
:ivar model: Model operations
68+
:vartype model: azure.cognitiveservices.language.luis.authoring.operations.ModelOperations
69+
:ivar apps: Apps operations
70+
:vartype apps: azure.cognitiveservices.language.luis.authoring.operations.AppsOperations
71+
:ivar versions: Versions operations
72+
:vartype versions: azure.cognitiveservices.language.luis.authoring.operations.VersionsOperations
73+
:ivar train: Train operations
74+
:vartype train: azure.cognitiveservices.language.luis.authoring.operations.TrainOperations
75+
:ivar permissions: Permissions operations
76+
:vartype permissions: azure.cognitiveservices.language.luis.authoring.operations.PermissionsOperations
77+
:ivar pattern: Pattern operations
78+
:vartype pattern: azure.cognitiveservices.language.luis.authoring.operations.PatternOperations
79+
80+
:param endpoint: Supported Cognitive Services endpoints (protocol and
81+
hostname, for example: https://westus.api.cognitive.microsoft.com).
82+
:type endpoint: str
83+
:param credentials: Subscription credentials which uniquely identify
84+
client subscription.
85+
:type credentials: None
86+
"""
87+
88+
def __init__(
89+
self, endpoint, credentials):
90+
91+
self.config = LUISAuthoringClientConfiguration(endpoint, credentials)
92+
super(LUISAuthoringClient, self).__init__(self.config.credentials, self.config)
93+
94+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
95+
self.api_version = '2.0'
96+
self._serialize = Serializer(client_models)
97+
self._deserialize = Deserializer(client_models)
98+
99+
self.features = FeaturesOperations(
100+
self._client, self.config, self._serialize, self._deserialize)
101+
self.examples = ExamplesOperations(
102+
self._client, self.config, self._serialize, self._deserialize)
103+
self.model = ModelOperations(
104+
self._client, self.config, self._serialize, self._deserialize)
105+
self.apps = AppsOperations(
106+
self._client, self.config, self._serialize, self._deserialize)
107+
self.versions = VersionsOperations(
108+
self._client, self.config, self._serialize, self._deserialize)
109+
self.train = TrainOperations(
110+
self._client, self.config, self._serialize, self._deserialize)
111+
self.permissions = PermissionsOperations(
112+
self._client, self.config, self._serialize, self._deserialize)
113+
self.pattern = PatternOperations(
114+
self._client, self.config, self._serialize, self._deserialize)

0 commit comments

Comments
 (0)