Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
f6ce254
Update schema in swagger_to_sdk_config.json
Jul 10, 2019
915ecd6
Enable generation pull requests
Jul 11, 2019
0e1e21f
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-python
Jul 22, 2019
8ce6193
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-python
Jul 24, 2019
3aa8e66
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-python
Jul 24, 2019
c8bf0cb
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-python
Jul 24, 2019
80e8ca9
Generated from c3a8c9ef9ff4d5888c479fc665c3b0d48a85d1b6 (#66)
openapi-sdkautomation[bot] Aug 1, 2019
4725c60
Generated from 3d6f73607f9caee9054b290237825245306d7408 (#35)
openapi-sdkautomation[bot] Aug 1, 2019
2d63f7b
Trace identity (#6455)
SuyogSoti Jul 25, 2019
296bd30
Update root README.md
kaerm Jul 25, 2019
cf0db54
Update CODEOWNERS
kurtzeborn Jul 25, 2019
d92659e
more code owners
kurtzeborn Jul 25, 2019
5eaa311
add policy and decorators for secrets (#6453)
SuyogSoti Jul 25, 2019
1d7d504
Smoke test for Python (#6412)
JonathanCrd Jul 25, 2019
9f6a24f
Paging v2 (#6420)
lmazuel Jul 25, 2019
dd299fe
get rid of should only propagate (#6497)
SuyogSoti Jul 25, 2019
d5de3fe
Enable SDK Automation pull requests (#6498)
Jul 26, 2019
8d42e36
[AutoPR] devtestlabs/resource-manager (#6414)
AutorestCI Jul 26, 2019
f39a768
[azure-core] Small fixes for aiohttp (#6490)
annatisch Jul 26, 2019
adc2e78
decorator only trace very top level function (#6530)
SuyogSoti Jul 29, 2019
bcbe064
Import aiohttp only when necessary (#6496)
chlowell Jul 29, 2019
9607b65
document async transport requirement (#6541)
chlowell Jul 30, 2019
790a1d1
[AutoPR] alertsmanagement/resource-manager (#5697)
AutorestCI Jul 30, 2019
f4d5f20
Synchronous username/password auth (#6416)
chlowell Jul 30, 2019
990c5fc
Synchronous interactive browser authentication (#6466)
chlowell Jul 30, 2019
245dc29
we dont need thread locks (#6551)
SuyogSoti Jul 30, 2019
efbe345
KV aiohttp by default (#6563)
lmazuel Jul 31, 2019
16155c1
[AutoPR hanaonazure/resource-manager] Removing monitoring hana instan…
AutorestCI Jul 31, 2019
cdf3a69
KV moved paging return type to ItemPaged (#6558)
lmazuel Jul 31, 2019
b4793c0
azure-core history 1.0.0b2 (#6562)
lmazuel Jul 31, 2019
5442deb
Make private Cosmos modules private [WIP] (#6329)
bryevdv Jul 31, 2019
99a4932
Accept extension of JSON content-type (#6583)
lmazuel Jul 31, 2019
73c17e4
Remove docdb mgmt package from master (#6585)
lmazuel Jul 31, 2019
826a4ff
Revert "Remove docdb mgmt package from master (#6585)" (#6593)
lmazuel Jul 31, 2019
1626a07
azure-core black/pylint/mypy (#6581)
lmazuel Aug 1, 2019
cd22dcd
adjusting to allow default omission of packages for CI. (#6595)
scbedd Aug 1, 2019
8a5465d
Synchronous device code credential (#6464)
chlowell Aug 1, 2019
325b863
Generated from c3a8c9ef9ff4d5888c479fc665c3b0d48a85d1b6 (#66)
openapi-sdkautomation[bot] Aug 1, 2019
e157a0b
Merge branch 'sdkAutomation/azure-cognitiveservices-knowledge-qnamake…
Aug 6, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .qn_amaker_client import QnAMakerClient
from .version import VERSION
from ._configuration import QnAMakerRuntimeClientConfiguration
from ._qn_amaker_runtime_client import QnAMakerRuntimeClient
__all__ = ['QnAMakerRuntimeClient', 'QnAMakerRuntimeClientConfiguration']

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

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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 QnAMakerRuntimeClientConfiguration(Configuration):
"""Configuration for QnAMakerRuntimeClient
Note that all parameters used to create this instance are saved as instance
attributes.

:param runtime_endpoint: QnA Maker App Service endpoint (for example:
https://{qnaservice-hostname}.azurewebsites.net).
:type runtime_endpoint: str
:param credentials: Subscription credentials which uniquely identify
client subscription.
:type credentials: None
"""

def __init__(
self, runtime_endpoint, credentials):

if runtime_endpoint is None:
raise ValueError("Parameter 'runtime_endpoint' must not be None.")
if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
base_url = '{RuntimeEndpoint}/qnamaker'

super(QnAMakerRuntimeClientConfiguration, 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-knowledge-qnamaker/{}'.format(VERSION))

self.runtime_endpoint = runtime_endpoint
self.credentials = credentials
Original file line number Diff line number Diff line change
Expand Up @@ -10,51 +10,25 @@
# --------------------------------------------------------------------------

from msrest.service_client import SDKClient
from msrest import Configuration, Serializer, Deserializer
from .version import VERSION
from .operations.endpoint_keys_operations import EndpointKeysOperations
from .operations.alterations_operations import AlterationsOperations
from .operations.knowledgebase_operations import KnowledgebaseOperations
from .operations.operations import Operations
from msrest import Serializer, Deserializer

from ._configuration import QnAMakerClientConfiguration
from .operations import EndpointSettingsOperations
from .operations import EndpointKeysOperations
from .operations import AlterationsOperations
from .operations import KnowledgebaseOperations
from .operations import Operations
from . import models


class QnAMakerClientConfiguration(Configuration):
"""Configuration for QnAMakerClient
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).
: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}/qnamaker/v4.0'

super(QnAMakerClientConfiguration, self).__init__(base_url)

self.add_user_agent('azure-cognitiveservices-knowledge-qnamaker/{}'.format(VERSION))

self.endpoint = endpoint
self.credentials = credentials


class QnAMakerClient(SDKClient):
"""An API for QnAMaker Service

:ivar config: Configuration for client.
:vartype config: QnAMakerClientConfiguration

:ivar endpoint_settings: EndpointSettings operations
:vartype endpoint_settings: azure.cognitiveservices.knowledge.qnamaker.operations.EndpointSettingsOperations
:ivar endpoint_keys: EndpointKeys operations
:vartype endpoint_keys: azure.cognitiveservices.knowledge.qnamaker.operations.EndpointKeysOperations
:ivar alterations: Alterations operations
Expand Down Expand Up @@ -83,6 +57,8 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.endpoint_settings = EndpointSettingsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.endpoint_keys = EndpointKeysOperations(
self._client, self.config, self._serialize, self._deserialize)
self.alterations = AlterationsOperations(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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 QnAMakerRuntimeClientConfiguration
from .operations import RuntimeOperations
from . import models


class QnAMakerRuntimeClient(SDKClient):
"""An API for QnAMaker runtime

:ivar config: Configuration for client.
:vartype config: QnAMakerRuntimeClientConfiguration

:ivar runtime: Runtime operations
:vartype runtime: azure.cognitiveservices.knowledge.qnamaker.operations.RuntimeOperations

:param runtime_endpoint: QnA Maker App Service endpoint (for example:
https://{qnaservice-hostname}.azurewebsites.net).
:type runtime_endpoint: str
:param credentials: Subscription credentials which uniquely identify
client subscription.
:type credentials: None
"""

def __init__(
self, runtime_endpoint, credentials):

self.config = QnAMakerRuntimeClientConfiguration(runtime_endpoint, credentials)
super(QnAMakerRuntimeClient, 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 = '4.0'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.runtime = RuntimeOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -10,101 +10,65 @@
# --------------------------------------------------------------------------

try:
from .update_kb_operation_dto_add_py3 import UpdateKbOperationDTOAdd
from .update_kb_operation_dto_delete_py3 import UpdateKbOperationDTODelete
from .update_kb_operation_dto_update_py3 import UpdateKbOperationDTOUpdate
from .update_kb_operation_dto_py3 import UpdateKbOperationDTO
from .update_qna_dto_questions_py3 import UpdateQnaDTOQuestions
from .update_qna_dto_metadata_py3 import UpdateQnaDTOMetadata
from .update_qna_dto_py3 import UpdateQnaDTO
from .update_kb_contents_dto_py3 import UpdateKbContentsDTO
from .update_questions_dto_py3 import UpdateQuestionsDTO
from .metadata_dto_py3 import MetadataDTO
from .update_metadata_dto_py3 import UpdateMetadataDTO
from .delete_kb_contents_dto_py3 import DeleteKbContentsDTO
from .qn_adto_py3 import QnADTO
from .file_dto_py3 import FileDTO
from .create_kb_input_dto_py3 import CreateKbInputDTO
from .qn_adocuments_dto_py3 import QnADocumentsDTO
from .create_kb_dto_py3 import CreateKbDTO
from .replace_kb_dto_py3 import ReplaceKbDTO
from .error_response_error_py3 import ErrorResponseError
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .inner_error_model_py3 import InnerErrorModel
from .error_py3 import Error
from .operation_py3 import Operation
from .knowledgebase_dto_py3 import KnowledgebaseDTO
from .knowledgebases_dto_py3 import KnowledgebasesDTO
from .alterations_dto_py3 import AlterationsDTO
from .word_alterations_dto_py3 import WordAlterationsDTO
from .endpoint_keys_dto_py3 import EndpointKeysDTO
from ._models_py3 import ContextDTO
from ._models_py3 import Error
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import ErrorResponseError
from ._models_py3 import FeedbackRecordDTO
from ._models_py3 import FeedbackRecordsDTO
from ._models_py3 import InnerErrorModel
from ._models_py3 import MetadataDTO
from ._models_py3 import PromptDTO
from ._models_py3 import PromptDTOQna
from ._models_py3 import QnADTO
from ._models_py3 import QnADTOContext
from ._models_py3 import QnASearchResult
from ._models_py3 import QnASearchResultContext
from ._models_py3 import QnASearchResultList
from ._models_py3 import QueryContextDTO
from ._models_py3 import QueryDTO
from ._models_py3 import QueryDTOContext
except (SyntaxError, ImportError):
from .update_kb_operation_dto_add import UpdateKbOperationDTOAdd
from .update_kb_operation_dto_delete import UpdateKbOperationDTODelete
from .update_kb_operation_dto_update import UpdateKbOperationDTOUpdate
from .update_kb_operation_dto import UpdateKbOperationDTO
from .update_qna_dto_questions import UpdateQnaDTOQuestions
from .update_qna_dto_metadata import UpdateQnaDTOMetadata
from .update_qna_dto import UpdateQnaDTO
from .update_kb_contents_dto import UpdateKbContentsDTO
from .update_questions_dto import UpdateQuestionsDTO
from .metadata_dto import MetadataDTO
from .update_metadata_dto import UpdateMetadataDTO
from .delete_kb_contents_dto import DeleteKbContentsDTO
from .qn_adto import QnADTO
from .file_dto import FileDTO
from .create_kb_input_dto import CreateKbInputDTO
from .qn_adocuments_dto import QnADocumentsDTO
from .create_kb_dto import CreateKbDTO
from .replace_kb_dto import ReplaceKbDTO
from .error_response_error import ErrorResponseError
from .error_response import ErrorResponse, ErrorResponseException
from .inner_error_model import InnerErrorModel
from .error import Error
from .operation import Operation
from .knowledgebase_dto import KnowledgebaseDTO
from .knowledgebases_dto import KnowledgebasesDTO
from .alterations_dto import AlterationsDTO
from .word_alterations_dto import WordAlterationsDTO
from .endpoint_keys_dto import EndpointKeysDTO
from .qn_amaker_client_enums import (
KnowledgebaseEnvironmentType,
from ._models import ContextDTO
from ._models import Error
from ._models import ErrorResponse, ErrorResponseException
from ._models import ErrorResponseError
from ._models import FeedbackRecordDTO
from ._models import FeedbackRecordsDTO
from ._models import InnerErrorModel
from ._models import MetadataDTO
from ._models import PromptDTO
from ._models import PromptDTOQna
from ._models import QnADTO
from ._models import QnADTOContext
from ._models import QnASearchResult
from ._models import QnASearchResultContext
from ._models import QnASearchResultList
from ._models import QueryContextDTO
from ._models import QueryDTO
from ._models import QueryDTOContext
from ._qn_amaker_runtime_client_enums import (
ErrorCodeType,
OperationStateType,
EnvironmentType,
)

__all__ = [
'UpdateKbOperationDTOAdd',
'UpdateKbOperationDTODelete',
'UpdateKbOperationDTOUpdate',
'UpdateKbOperationDTO',
'UpdateQnaDTOQuestions',
'UpdateQnaDTOMetadata',
'UpdateQnaDTO',
'UpdateKbContentsDTO',
'UpdateQuestionsDTO',
'MetadataDTO',
'UpdateMetadataDTO',
'DeleteKbContentsDTO',
'QnADTO',
'FileDTO',
'CreateKbInputDTO',
'QnADocumentsDTO',
'CreateKbDTO',
'ReplaceKbDTO',
'ErrorResponseError',
'ContextDTO',
'Error',
'ErrorResponse', 'ErrorResponseException',
'ErrorResponseError',
'FeedbackRecordDTO',
'FeedbackRecordsDTO',
'InnerErrorModel',
'Error',
'Operation',
'KnowledgebaseDTO',
'KnowledgebasesDTO',
'AlterationsDTO',
'WordAlterationsDTO',
'EndpointKeysDTO',
'KnowledgebaseEnvironmentType',
'MetadataDTO',
'PromptDTO',
'PromptDTOQna',
'QnADTO',
'QnADTOContext',
'QnASearchResult',
'QnASearchResultContext',
'QnASearchResultList',
'QueryContextDTO',
'QueryDTO',
'QueryDTOContext',
'ErrorCodeType',
'OperationStateType',
'EnvironmentType',
]
Loading