Skip to content

Commit

Permalink
CodeGen from PR 13444 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
QnaMaker v5.0-preview.2 (Azure#13444)

* iinitial commit

* avacado fix

* modelValidationFix

* prettier fix

* try fix for lintDiff

* fix attempt

* fix lint diff 2

* swaggerLintfix

* minor updates

* fix sdk error
  • Loading branch information
SDKAuto committed Mar 30, 2021
1 parent 37380a4 commit a895152
Show file tree
Hide file tree
Showing 147 changed files with 8,665 additions and 4,893 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "V2",
"use": "@microsoft.azure/autorest.python@~4.0.71",
"commit": "230844b2d3439b1be01f0abab28fb1226033748a",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/cognitiveservices/data-plane/QnAMaker/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2",
"readme": "specification/cognitiveservices/data-plane/QnAMaker/readme.md"
}
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 QnAMakerClientConfiguration
from ._qn_amaker_client import QnAMakerClient
__all__ = ['QnAMakerClient', 'QnAMakerClientConfiguration']

__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 QnAMakerClientConfiguration(Configuration):
"""Configuration for QnAMakerClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param endpoint: Supported Cognitive Services endpoint (e.g., https://<
qnamaker-resource-name> .api.cognitiveservices.azure.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)

# 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.endpoint = endpoint
self.credentials = credentials
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,17 @@
# --------------------------------------------------------------------------

from msrest.service_client import SDKClient
from msrest import Configuration, Serializer, Deserializer
from .version import VERSION
from .operations.endpoint_settings_operations import EndpointSettingsOperations
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
Expand All @@ -67,8 +38,8 @@ class QnAMakerClient(SDKClient):
:ivar operations: Operations operations
:vartype operations: azure.cognitiveservices.knowledge.qnamaker.authoring.operations.Operations
:param endpoint: Supported Cognitive Services endpoints (protocol and
hostname, for example: https://westus.api.cognitive.microsoft.com).
:param endpoint: Supported Cognitive Services endpoint (e.g., https://<
qnamaker-resource-name> .api.cognitiveservices.azure.com).
:type endpoint: str
:param credentials: Subscription credentials which uniquely identify
client subscription.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,125 +10,125 @@
# --------------------------------------------------------------------------

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_context_py3 import UpdateQnaDTOContext
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 .prompt_dto_qna_py3 import PromptDTOQna
from .prompt_dto_py3 import PromptDTO
from .update_context_dto_py3 import UpdateContextDTO
from .delete_kb_contents_dto_py3 import DeleteKbContentsDTO
from .qn_adto_context_py3 import QnADTOContext
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 .context_dto_py3 import ContextDTO
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 .endpoint_settings_dto_active_learning_py3 import EndpointSettingsDTOActiveLearning
from .endpoint_settings_dto_py3 import EndpointSettingsDTO
from .active_learning_settings_dto_py3 import ActiveLearningSettingsDTO
from .alterations_dto_py3 import AlterationsDTO
from .word_alterations_dto_py3 import WordAlterationsDTO
from .endpoint_keys_dto_py3 import EndpointKeysDTO
from ._models_py3 import ActiveLearningSettingsDTO
from ._models_py3 import AlterationsDTO
from ._models_py3 import ContextDTO
from ._models_py3 import CreateKbDTO
from ._models_py3 import CreateKbInputDTO
from ._models_py3 import DeleteKbContentsDTO
from ._models_py3 import EndpointKeysDTO
from ._models_py3 import EndpointSettingsDTO
from ._models_py3 import EndpointSettingsDTOActiveLearning
from ._models_py3 import Error
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import ErrorResponseError
from ._models_py3 import FileDTO
from ._models_py3 import InnerErrorModel
from ._models_py3 import KnowledgebaseDTO
from ._models_py3 import KnowledgebasesDTO
from ._models_py3 import MetadataDTO
from ._models_py3 import Operation
from ._models_py3 import PromptDTO
from ._models_py3 import PromptDTOQna
from ._models_py3 import QnADocumentsDTO
from ._models_py3 import QnADTO
from ._models_py3 import QnADTOContext
from ._models_py3 import ReplaceKbDTO
from ._models_py3 import UpdateContextDTO
from ._models_py3 import UpdateKbContentsDTO
from ._models_py3 import UpdateKbOperationDTO
from ._models_py3 import UpdateKbOperationDTOAdd
from ._models_py3 import UpdateKbOperationDTODelete
from ._models_py3 import UpdateKbOperationDTOUpdate
from ._models_py3 import UpdateMetadataDTO
from ._models_py3 import UpdateQnaDTO
from ._models_py3 import UpdateQnaDTOContext
from ._models_py3 import UpdateQnaDTOMetadata
from ._models_py3 import UpdateQnaDTOQuestions
from ._models_py3 import UpdateQuestionsDTO
from ._models_py3 import WordAlterationsDTO
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_context import UpdateQnaDTOContext
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 .prompt_dto_qna import PromptDTOQna
from .prompt_dto import PromptDTO
from .update_context_dto import UpdateContextDTO
from .delete_kb_contents_dto import DeleteKbContentsDTO
from .qn_adto_context import QnADTOContext
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 .context_dto import ContextDTO
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 .endpoint_settings_dto_active_learning import EndpointSettingsDTOActiveLearning
from .endpoint_settings_dto import EndpointSettingsDTO
from .active_learning_settings_dto import ActiveLearningSettingsDTO
from .alterations_dto import AlterationsDTO
from .word_alterations_dto import WordAlterationsDTO
from .endpoint_keys_dto import EndpointKeysDTO
from .qn_amaker_client_enums import (
from ._models import ActiveLearningSettingsDTO
from ._models import AlterationsDTO
from ._models import ContextDTO
from ._models import CreateKbDTO
from ._models import CreateKbInputDTO
from ._models import DeleteKbContentsDTO
from ._models import EndpointKeysDTO
from ._models import EndpointSettingsDTO
from ._models import EndpointSettingsDTOActiveLearning
from ._models import Error
from ._models import ErrorResponse, ErrorResponseException
from ._models import ErrorResponseError
from ._models import FileDTO
from ._models import InnerErrorModel
from ._models import KnowledgebaseDTO
from ._models import KnowledgebasesDTO
from ._models import MetadataDTO
from ._models import Operation
from ._models import PromptDTO
from ._models import PromptDTOQna
from ._models import QnADocumentsDTO
from ._models import QnADTO
from ._models import QnADTOContext
from ._models import ReplaceKbDTO
from ._models import UpdateContextDTO
from ._models import UpdateKbContentsDTO
from ._models import UpdateKbOperationDTO
from ._models import UpdateKbOperationDTOAdd
from ._models import UpdateKbOperationDTODelete
from ._models import UpdateKbOperationDTOUpdate
from ._models import UpdateMetadataDTO
from ._models import UpdateQnaDTO
from ._models import UpdateQnaDTOContext
from ._models import UpdateQnaDTOMetadata
from ._models import UpdateQnaDTOQuestions
from ._models import UpdateQuestionsDTO
from ._models import WordAlterationsDTO
from ._qn_amaker_client_enums import (
EnvironmentType,
ErrorCodeType,
OperationStateType,
EnvironmentType,
)

__all__ = [
'UpdateKbOperationDTOAdd',
'UpdateKbOperationDTODelete',
'UpdateKbOperationDTOUpdate',
'UpdateKbOperationDTO',
'UpdateQnaDTOQuestions',
'UpdateQnaDTOMetadata',
'UpdateQnaDTOContext',
'UpdateQnaDTO',
'UpdateKbContentsDTO',
'UpdateQuestionsDTO',
'MetadataDTO',
'UpdateMetadataDTO',
'PromptDTOQna',
'PromptDTO',
'UpdateContextDTO',
'DeleteKbContentsDTO',
'QnADTOContext',
'QnADTO',
'FileDTO',
'CreateKbInputDTO',
'QnADocumentsDTO',
'CreateKbDTO',
'ReplaceKbDTO',
'ActiveLearningSettingsDTO',
'AlterationsDTO',
'ContextDTO',
'ErrorResponseError',
'CreateKbDTO',
'CreateKbInputDTO',
'DeleteKbContentsDTO',
'EndpointKeysDTO',
'EndpointSettingsDTO',
'EndpointSettingsDTOActiveLearning',
'Error',
'ErrorResponse', 'ErrorResponseException',
'ErrorResponseError',
'FileDTO',
'InnerErrorModel',
'Error',
'Operation',
'KnowledgebaseDTO',
'KnowledgebasesDTO',
'EndpointSettingsDTOActiveLearning',
'EndpointSettingsDTO',
'ActiveLearningSettingsDTO',
'AlterationsDTO',
'MetadataDTO',
'Operation',
'PromptDTO',
'PromptDTOQna',
'QnADocumentsDTO',
'QnADTO',
'QnADTOContext',
'ReplaceKbDTO',
'UpdateContextDTO',
'UpdateKbContentsDTO',
'UpdateKbOperationDTO',
'UpdateKbOperationDTOAdd',
'UpdateKbOperationDTODelete',
'UpdateKbOperationDTOUpdate',
'UpdateMetadataDTO',
'UpdateQnaDTO',
'UpdateQnaDTOContext',
'UpdateQnaDTOMetadata',
'UpdateQnaDTOQuestions',
'UpdateQuestionsDTO',
'WordAlterationsDTO',
'EndpointKeysDTO',
'ErrorCodeType',
'OperationStateType',
'EnvironmentType',
Expand Down
Loading

0 comments on commit a895152

Please sign in to comment.