-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cognitive Services stable version (#2515)
* Latest VideoSearch * Latest NewsSearch * Latest ImageSearch * Latest EntitySearch * Latest Spellcheck * Latest WebSearch * CS with Autorest 3.0.50 * Packaging * Documentation * Remove deprecated build.json * VisualSearch 0.1.0 (#2489) * Packaging of VisualSearch
- Loading branch information
Showing
486 changed files
with
22,393 additions
and
3,515 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...ices-language-spellcheck/azure/cognitiveservices/language/spellcheck/models/answer_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 .response import Response | ||
|
||
|
||
class Answer(Response): | ||
"""Answer. | ||
You probably want to use the sub-classes and not this class directly. Known | ||
sub-classes are: SpellCheck | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
All required parameters must be populated in order to send to Azure. | ||
:param _type: Required. Constant filled by server. | ||
:type _type: str | ||
:ivar id: A String identifier. | ||
:vartype id: str | ||
""" | ||
|
||
_validation = { | ||
'_type': {'required': True}, | ||
'id': {'readonly': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'_type': {'key': '_type', 'type': 'str'}, | ||
'id': {'key': 'id', 'type': 'str'}, | ||
} | ||
|
||
_subtype_map = { | ||
'_type': {'SpellCheck': 'SpellCheck'} | ||
} | ||
|
||
def __init__(self, **kwargs) -> None: | ||
super(Answer, self).__init__(**kwargs) | ||
self._type = 'Answer' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
...vices-language-spellcheck/azure/cognitiveservices/language/spellcheck/models/error_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# 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.serialization import Model | ||
|
||
|
||
class Error(Model): | ||
"""Defines the error that occurred. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
All required parameters must be populated in order to send to Azure. | ||
:param code: Required. The error code that identifies the category of | ||
error. Possible values include: 'None', 'ServerError', 'InvalidRequest', | ||
'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. | ||
Default value: "None" . | ||
:type code: str or | ||
~azure.cognitiveservices.language.spellcheck.models.ErrorCode | ||
:ivar sub_code: The error code that further helps to identify the error. | ||
Possible values include: 'UnexpectedError', 'ResourceError', | ||
'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', | ||
'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', | ||
'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' | ||
:vartype sub_code: str or | ||
~azure.cognitiveservices.language.spellcheck.models.ErrorSubCode | ||
:param message: Required. A description of the error. | ||
:type message: str | ||
:ivar more_details: A description that provides additional information | ||
about the error. | ||
:vartype more_details: str | ||
:ivar parameter: The parameter in the request that caused the error. | ||
:vartype parameter: str | ||
:ivar value: The parameter's value in the request that was not valid. | ||
:vartype value: str | ||
""" | ||
|
||
_validation = { | ||
'code': {'required': True}, | ||
'sub_code': {'readonly': True}, | ||
'message': {'required': True}, | ||
'more_details': {'readonly': True}, | ||
'parameter': {'readonly': True}, | ||
'value': {'readonly': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'code': {'key': 'code', 'type': 'str'}, | ||
'sub_code': {'key': 'subCode', 'type': 'str'}, | ||
'message': {'key': 'message', 'type': 'str'}, | ||
'more_details': {'key': 'moreDetails', 'type': 'str'}, | ||
'parameter': {'key': 'parameter', 'type': 'str'}, | ||
'value': {'key': 'value', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, *, message: str, code="None", **kwargs) -> None: | ||
super(Error, self).__init__(**kwargs) | ||
self.code = code | ||
self.sub_code = None | ||
self.message = message | ||
self.more_details = None | ||
self.parameter = None | ||
self.value = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...guage-spellcheck/azure/cognitiveservices/language/spellcheck/models/error_response_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# 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 .response import Response | ||
from msrest.exceptions import HttpOperationError | ||
|
||
|
||
class ErrorResponse(Response): | ||
"""The top-level response that represents a failed request. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
All required parameters must be populated in order to send to Azure. | ||
:param _type: Required. Constant filled by server. | ||
:type _type: str | ||
:ivar id: A String identifier. | ||
:vartype id: str | ||
:param errors: Required. A list of errors that describe the reasons why | ||
the request failed. | ||
:type errors: | ||
list[~azure.cognitiveservices.language.spellcheck.models.Error] | ||
""" | ||
|
||
_validation = { | ||
'_type': {'required': True}, | ||
'id': {'readonly': True}, | ||
'errors': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'_type': {'key': '_type', 'type': 'str'}, | ||
'id': {'key': 'id', 'type': 'str'}, | ||
'errors': {'key': 'errors', 'type': '[Error]'}, | ||
} | ||
|
||
def __init__(self, *, errors, **kwargs) -> None: | ||
super(ErrorResponse, self).__init__(**kwargs) | ||
self.errors = errors | ||
self._type = 'ErrorResponse' | ||
|
||
|
||
class ErrorResponseException(HttpOperationError): | ||
"""Server responsed with exception of type: 'ErrorResponse'. | ||
:param deserialize: A deserializer | ||
:param response: Server response to be deserialized. | ||
""" | ||
|
||
def __init__(self, deserialize, response, *args): | ||
|
||
super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) |
Oops, something went wrong.