Skip to content

Commit

Permalink
[AutoPR cognitiveservices/data-plane/TextAnalytics] Users/laramume/ad…
Browse files Browse the repository at this point in the history
…dv2.1 swagger (#4351)

* Generated from 331f6c0edfc37987212f6b0225f8a43f9d170f1f

added v2.1 swagger

* Packaging update of azure-cognitiveservices-language-textanalytics

* Generated from dc4e4938a9cd32fb0ac32ec42cd343c966e1e8c9

added v2.1 swagger

* Generated from 53ebd5722c6775bfb96190b1246d93921ac7a8c2

resolved PR comments
  • Loading branch information
AutorestCI authored Feb 22, 2019
1 parent 8579bb1 commit 5eb879c
Show file tree
Hide file tree
Showing 32 changed files with 540 additions and 275 deletions.
19 changes: 0 additions & 19 deletions azure-cognitiveservices-language-textanalytics/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,6 @@ This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell
pip freeze
If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell
pip uninstall azure
Usage
=====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,59 +12,65 @@
try:
from .multi_language_input_py3 import MultiLanguageInput
from .multi_language_batch_input_py3 import MultiLanguageBatchInput
from .key_phrase_batch_result_item_py3 import KeyPhraseBatchResultItem
from .match_record_py3 import MatchRecord
from .entity_record_py3 import EntityRecord
from .document_statistics_py3 import DocumentStatistics
from .entities_batch_result_item_py3 import EntitiesBatchResultItem
from .error_record_py3 import ErrorRecord
from .key_phrase_batch_result_py3 import KeyPhraseBatchResult
from .request_statistics_py3 import RequestStatistics
from .entities_batch_result_py3 import EntitiesBatchResult
from .internal_error_py3 import InternalError
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .input_py3 import Input
from .batch_input_py3 import BatchInput
from .key_phrase_batch_result_item_py3 import KeyPhraseBatchResultItem
from .key_phrase_batch_result_py3 import KeyPhraseBatchResult
from .language_input_py3 import LanguageInput
from .language_batch_input_py3 import LanguageBatchInput
from .detected_language_py3 import DetectedLanguage
from .language_batch_result_item_py3 import LanguageBatchResultItem
from .language_batch_result_py3 import LanguageBatchResult
from .sentiment_batch_result_item_py3 import SentimentBatchResultItem
from .sentiment_batch_result_py3 import SentimentBatchResult
from .match_record_v2dot1_py3 import MatchRecordV2dot1
from .entity_record_v2dot1_py3 import EntityRecordV2dot1
from .entities_batch_result_item_v2dot1_py3 import EntitiesBatchResultItemV2dot1
from .entities_batch_result_v2dot1_py3 import EntitiesBatchResultV2dot1
except (SyntaxError, ImportError):
from .multi_language_input import MultiLanguageInput
from .multi_language_batch_input import MultiLanguageBatchInput
from .key_phrase_batch_result_item import KeyPhraseBatchResultItem
from .match_record import MatchRecord
from .entity_record import EntityRecord
from .document_statistics import DocumentStatistics
from .entities_batch_result_item import EntitiesBatchResultItem
from .error_record import ErrorRecord
from .key_phrase_batch_result import KeyPhraseBatchResult
from .request_statistics import RequestStatistics
from .entities_batch_result import EntitiesBatchResult
from .internal_error import InternalError
from .error_response import ErrorResponse, ErrorResponseException
from .input import Input
from .batch_input import BatchInput
from .key_phrase_batch_result_item import KeyPhraseBatchResultItem
from .key_phrase_batch_result import KeyPhraseBatchResult
from .language_input import LanguageInput
from .language_batch_input import LanguageBatchInput
from .detected_language import DetectedLanguage
from .language_batch_result_item import LanguageBatchResultItem
from .language_batch_result import LanguageBatchResult
from .sentiment_batch_result_item import SentimentBatchResultItem
from .sentiment_batch_result import SentimentBatchResult
from .match_record_v2dot1 import MatchRecordV2dot1
from .entity_record_v2dot1 import EntityRecordV2dot1
from .entities_batch_result_item_v2dot1 import EntitiesBatchResultItemV2dot1
from .entities_batch_result_v2dot1 import EntitiesBatchResultV2dot1

__all__ = [
'MultiLanguageInput',
'MultiLanguageBatchInput',
'KeyPhraseBatchResultItem',
'MatchRecord',
'EntityRecord',
'DocumentStatistics',
'EntitiesBatchResultItem',
'ErrorRecord',
'KeyPhraseBatchResult',
'RequestStatistics',
'EntitiesBatchResult',
'InternalError',
'ErrorResponse', 'ErrorResponseException',
'Input',
'BatchInput',
'KeyPhraseBatchResultItem',
'KeyPhraseBatchResult',
'LanguageInput',
'LanguageBatchInput',
'DetectedLanguage',
'LanguageBatchResultItem',
'LanguageBatchResult',
'SentimentBatchResultItem',
'SentimentBatchResult',
'MatchRecordV2dot1',
'EntityRecordV2dot1',
'EntitiesBatchResultItemV2dot1',
'EntitiesBatchResultV2dot1',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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 DocumentStatistics(Model):
"""DocumentStatistics.
:param characters_count: Number of text elements recognized in the
document.
:type characters_count: int
:param transactions_count: Number of transactions for the document.
:type transactions_count: int
"""

_attribute_map = {
'characters_count': {'key': 'charactersCount', 'type': 'int'},
'transactions_count': {'key': 'transactionsCount', 'type': 'int'},
}

def __init__(self, **kwargs):
super(DocumentStatistics, self).__init__(**kwargs)
self.characters_count = kwargs.get('characters_count', None)
self.transactions_count = kwargs.get('transactions_count', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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 DocumentStatistics(Model):
"""DocumentStatistics.
:param characters_count: Number of text elements recognized in the
document.
:type characters_count: int
:param transactions_count: Number of transactions for the document.
:type transactions_count: int
"""

_attribute_map = {
'characters_count': {'key': 'charactersCount', 'type': 'int'},
'transactions_count': {'key': 'transactionsCount', 'type': 'int'},
}

def __init__(self, *, characters_count: int=None, transactions_count: int=None, **kwargs) -> None:
super(DocumentStatistics, self).__init__(**kwargs)
self.characters_count = characters_count
self.transactions_count = transactions_count
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,38 @@
from msrest.serialization import Model


class EntitiesBatchResultV2dot1(Model):
"""EntitiesBatchResultV2dot1.
class EntitiesBatchResult(Model):
"""EntitiesBatchResult.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar documents:
:ivar documents: Response by document
:vartype documents:
list[~azure.cognitiveservices.language.textanalytics.models.EntitiesBatchResultItemV2dot1]
:ivar errors:
list[~azure.cognitiveservices.language.textanalytics.models.EntitiesBatchResultItem]
:ivar errors: Errors and Warnings by document
:vartype errors:
list[~azure.cognitiveservices.language.textanalytics.models.ErrorRecord]
:ivar statistics: (Optional) if showStats=true was specified in the
request this field will contain information about the request payload.
:vartype statistics:
~azure.cognitiveservices.language.textanalytics.models.RequestStatistics
"""

_validation = {
'documents': {'readonly': True},
'errors': {'readonly': True},
'statistics': {'readonly': True},
}

_attribute_map = {
'documents': {'key': 'documents', 'type': '[EntitiesBatchResultItemV2dot1]'},
'documents': {'key': 'documents', 'type': '[EntitiesBatchResultItem]'},
'errors': {'key': 'errors', 'type': '[ErrorRecord]'},
'statistics': {'key': 'statistics', 'type': 'RequestStatistics'},
}

def __init__(self, **kwargs):
super(EntitiesBatchResultV2dot1, self).__init__(**kwargs)
super(EntitiesBatchResult, self).__init__(**kwargs)
self.documents = None
self.errors = None
self.statistics = None
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,35 @@
from msrest.serialization import Model


class EntitiesBatchResultItemV2dot1(Model):
"""EntitiesBatchResultItemV2dot1.
class EntitiesBatchResultItem(Model):
"""EntitiesBatchResultItem.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Unique document identifier.
:vartype id: str
:param id: Unique, non-empty document identifier.
:type id: str
:ivar entities: Recognized entities in the document.
:vartype entities:
list[~azure.cognitiveservices.language.textanalytics.models.EntityRecordV2dot1]
list[~azure.cognitiveservices.language.textanalytics.models.EntityRecord]
:param statistics: (Optional) if showStats=true was specified in the
request this field will contain information about the document payload.
:type statistics:
~azure.cognitiveservices.language.textanalytics.models.DocumentStatistics
"""

_validation = {
'id': {'readonly': True},
'entities': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'entities': {'key': 'entities', 'type': '[EntityRecordV2dot1]'},
'entities': {'key': 'entities', 'type': '[EntityRecord]'},
'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'},
}

def __init__(self, **kwargs):
super(EntitiesBatchResultItemV2dot1, self).__init__(**kwargs)
self.id = None
super(EntitiesBatchResultItem, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.entities = None
self.statistics = kwargs.get('statistics', None)
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,35 @@
from msrest.serialization import Model


class EntitiesBatchResultItemV2dot1(Model):
"""EntitiesBatchResultItemV2dot1.
class EntitiesBatchResultItem(Model):
"""EntitiesBatchResultItem.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Unique document identifier.
:vartype id: str
:param id: Unique, non-empty document identifier.
:type id: str
:ivar entities: Recognized entities in the document.
:vartype entities:
list[~azure.cognitiveservices.language.textanalytics.models.EntityRecordV2dot1]
list[~azure.cognitiveservices.language.textanalytics.models.EntityRecord]
:param statistics: (Optional) if showStats=true was specified in the
request this field will contain information about the document payload.
:type statistics:
~azure.cognitiveservices.language.textanalytics.models.DocumentStatistics
"""

_validation = {
'id': {'readonly': True},
'entities': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'entities': {'key': 'entities', 'type': '[EntityRecordV2dot1]'},
'entities': {'key': 'entities', 'type': '[EntityRecord]'},
'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'},
}

def __init__(self, **kwargs) -> None:
super(EntitiesBatchResultItemV2dot1, self).__init__(**kwargs)
self.id = None
def __init__(self, *, id: str=None, statistics=None, **kwargs) -> None:
super(EntitiesBatchResultItem, self).__init__(**kwargs)
self.id = id
self.entities = None
self.statistics = statistics
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,38 @@
from msrest.serialization import Model


class EntitiesBatchResultV2dot1(Model):
"""EntitiesBatchResultV2dot1.
class EntitiesBatchResult(Model):
"""EntitiesBatchResult.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar documents:
:ivar documents: Response by document
:vartype documents:
list[~azure.cognitiveservices.language.textanalytics.models.EntitiesBatchResultItemV2dot1]
:ivar errors:
list[~azure.cognitiveservices.language.textanalytics.models.EntitiesBatchResultItem]
:ivar errors: Errors and Warnings by document
:vartype errors:
list[~azure.cognitiveservices.language.textanalytics.models.ErrorRecord]
:ivar statistics: (Optional) if showStats=true was specified in the
request this field will contain information about the request payload.
:vartype statistics:
~azure.cognitiveservices.language.textanalytics.models.RequestStatistics
"""

_validation = {
'documents': {'readonly': True},
'errors': {'readonly': True},
'statistics': {'readonly': True},
}

_attribute_map = {
'documents': {'key': 'documents', 'type': '[EntitiesBatchResultItemV2dot1]'},
'documents': {'key': 'documents', 'type': '[EntitiesBatchResultItem]'},
'errors': {'key': 'errors', 'type': '[ErrorRecord]'},
'statistics': {'key': 'statistics', 'type': 'RequestStatistics'},
}

def __init__(self, **kwargs) -> None:
super(EntitiesBatchResultV2dot1, self).__init__(**kwargs)
super(EntitiesBatchResult, self).__init__(**kwargs)
self.documents = None
self.errors = None
self.statistics = None
Loading

0 comments on commit 5eb879c

Please sign in to comment.