Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-cognitiveservices-knowledge-qnamaker] Update QnAMaker.json - response code correction #2093

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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 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 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)

# 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 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