Skip to content

Commit

Permalink
Generated from 0c66ba7bcfca68e6e6cbc98f38f1ab5b9c7e0ed6 (#3852)
Browse files Browse the repository at this point in the history
Change default generation to TextAnalytics 2.1
  • Loading branch information
AutorestCI authored Nov 21, 2018
1 parent f48ef0c commit a7c83e9
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
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_py3 import MatchRecord
from .entity_record_py3 import EntityRecord
from .entities_batch_result_item_py3 import EntitiesBatchResultItem
from .entities_batch_result_py3 import EntitiesBatchResult
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
Expand All @@ -43,10 +43,10 @@
from .language_batch_result import LanguageBatchResult
from .sentiment_batch_result_item import SentimentBatchResultItem
from .sentiment_batch_result import SentimentBatchResult
from .match_record import MatchRecord
from .entity_record import EntityRecord
from .entities_batch_result_item import EntitiesBatchResultItem
from .entities_batch_result import EntitiesBatchResult
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',
Expand All @@ -63,8 +63,8 @@
'LanguageBatchResult',
'SentimentBatchResultItem',
'SentimentBatchResult',
'MatchRecord',
'EntityRecord',
'EntitiesBatchResultItem',
'EntitiesBatchResult',
'MatchRecordV2dot1',
'EntityRecordV2dot1',
'EntitiesBatchResultItemV2dot1',
'EntitiesBatchResultV2dot1',
]
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from msrest.serialization import Model


class EntitiesBatchResultItem(Model):
"""EntitiesBatchResultItem.
class EntitiesBatchResultItemV2dot1(Model):
"""EntitiesBatchResultItemV2dot1.
Variables are only populated by the server, and will be ignored when
sending a request.
Expand All @@ -22,7 +22,7 @@ class EntitiesBatchResultItem(Model):
:vartype id: str
:ivar entities: Recognized entities in the document.
:vartype entities:
list[~azure.cognitiveservices.language.textanalytics.models.EntityRecord]
list[~azure.cognitiveservices.language.textanalytics.models.EntityRecordV2dot1]
"""

_validation = {
Expand All @@ -32,10 +32,10 @@ class EntitiesBatchResultItem(Model):

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

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


class EntitiesBatchResultItem(Model):
"""EntitiesBatchResultItem.
class EntitiesBatchResultItemV2dot1(Model):
"""EntitiesBatchResultItemV2dot1.
Variables are only populated by the server, and will be ignored when
sending a request.
Expand All @@ -22,7 +22,7 @@ class EntitiesBatchResultItem(Model):
:vartype id: str
:ivar entities: Recognized entities in the document.
:vartype entities:
list[~azure.cognitiveservices.language.textanalytics.models.EntityRecord]
list[~azure.cognitiveservices.language.textanalytics.models.EntityRecordV2dot1]
"""

_validation = {
Expand All @@ -32,10 +32,10 @@ class EntitiesBatchResultItem(Model):

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

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


class EntitiesBatchResult(Model):
"""EntitiesBatchResult.
class EntitiesBatchResultV2dot1(Model):
"""EntitiesBatchResultV2dot1.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar documents:
:vartype documents:
list[~azure.cognitiveservices.language.textanalytics.models.EntitiesBatchResultItem]
list[~azure.cognitiveservices.language.textanalytics.models.EntitiesBatchResultItemV2dot1]
:ivar errors:
:vartype errors:
list[~azure.cognitiveservices.language.textanalytics.models.ErrorRecord]
Expand All @@ -32,11 +32,11 @@ class EntitiesBatchResult(Model):
}

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

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


class EntitiesBatchResult(Model):
"""EntitiesBatchResult.
class EntitiesBatchResultV2dot1(Model):
"""EntitiesBatchResultV2dot1.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar documents:
:vartype documents:
list[~azure.cognitiveservices.language.textanalytics.models.EntitiesBatchResultItem]
list[~azure.cognitiveservices.language.textanalytics.models.EntitiesBatchResultItemV2dot1]
:ivar errors:
:vartype errors:
list[~azure.cognitiveservices.language.textanalytics.models.ErrorRecord]
Expand All @@ -32,11 +32,11 @@ class EntitiesBatchResult(Model):
}

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

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


class EntityRecord(Model):
"""EntityRecord.
class EntityRecordV2dot1(Model):
"""EntityRecordV2dot1.
Variables are only populated by the server, and will be ignored when
sending a request.
:param name: Entity formal name.
:type name: str
:ivar matches: List of instances this entity appears in the text.
:vartype matches:
list[~azure.cognitiveservices.language.textanalytics.models.MatchRecord]
:param matches: List of instances this entity appears in the text.
:type matches:
list[~azure.cognitiveservices.language.textanalytics.models.MatchRecordV2dot1]
:param wikipedia_language: Wikipedia language for which the WikipediaId
and WikipediaUrl refers to.
:type wikipedia_language: str
Expand All @@ -34,27 +34,34 @@ class EntityRecord(Model):
conjunction with the Bing Entity Search API to fetch additional relevant
information.
:type bing_id: str
:param type: Entity type from Named Entity Recognition model
:type type: str
:param sub_type: Entity sub type from Named Entity Recognition model
:type sub_type: str
"""

_validation = {
'matches': {'readonly': True},
'wikipedia_url': {'readonly': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'matches': {'key': 'matches', 'type': '[MatchRecord]'},
'matches': {'key': 'matches', 'type': '[MatchRecordV2dot1]'},
'wikipedia_language': {'key': 'wikipediaLanguage', 'type': 'str'},
'wikipedia_id': {'key': 'wikipediaId', 'type': 'str'},
'wikipedia_url': {'key': 'wikipediaUrl', 'type': 'str'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'sub_type': {'key': 'subType', 'type': 'str'},
}

def __init__(self, **kwargs):
super(EntityRecord, self).__init__(**kwargs)
super(EntityRecordV2dot1, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.matches = None
self.matches = kwargs.get('matches', None)
self.wikipedia_language = kwargs.get('wikipedia_language', None)
self.wikipedia_id = kwargs.get('wikipedia_id', None)
self.wikipedia_url = None
self.bing_id = kwargs.get('bing_id', None)
self.type = kwargs.get('type', None)
self.sub_type = kwargs.get('sub_type', None)
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
from msrest.serialization import Model


class EntityRecord(Model):
"""EntityRecord.
class EntityRecordV2dot1(Model):
"""EntityRecordV2dot1.
Variables are only populated by the server, and will be ignored when
sending a request.
:param name: Entity formal name.
:type name: str
:ivar matches: List of instances this entity appears in the text.
:vartype matches:
list[~azure.cognitiveservices.language.textanalytics.models.MatchRecord]
:param matches: List of instances this entity appears in the text.
:type matches:
list[~azure.cognitiveservices.language.textanalytics.models.MatchRecordV2dot1]
:param wikipedia_language: Wikipedia language for which the WikipediaId
and WikipediaUrl refers to.
:type wikipedia_language: str
Expand All @@ -34,27 +34,34 @@ class EntityRecord(Model):
conjunction with the Bing Entity Search API to fetch additional relevant
information.
:type bing_id: str
:param type: Entity type from Named Entity Recognition model
:type type: str
:param sub_type: Entity sub type from Named Entity Recognition model
:type sub_type: str
"""

_validation = {
'matches': {'readonly': True},
'wikipedia_url': {'readonly': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'matches': {'key': 'matches', 'type': '[MatchRecord]'},
'matches': {'key': 'matches', 'type': '[MatchRecordV2dot1]'},
'wikipedia_language': {'key': 'wikipediaLanguage', 'type': 'str'},
'wikipedia_id': {'key': 'wikipediaId', 'type': 'str'},
'wikipedia_url': {'key': 'wikipediaUrl', 'type': 'str'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'sub_type': {'key': 'subType', 'type': 'str'},
}

def __init__(self, *, name: str=None, wikipedia_language: str=None, wikipedia_id: str=None, bing_id: str=None, **kwargs) -> None:
super(EntityRecord, self).__init__(**kwargs)
def __init__(self, *, name: str=None, matches=None, wikipedia_language: str=None, wikipedia_id: str=None, bing_id: str=None, type: str=None, sub_type: str=None, **kwargs) -> None:
super(EntityRecordV2dot1, self).__init__(**kwargs)
self.name = name
self.matches = None
self.matches = matches
self.wikipedia_language = wikipedia_language
self.wikipedia_id = wikipedia_id
self.wikipedia_url = None
self.bing_id = bing_id
self.type = type
self.sub_type = sub_type
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from msrest.serialization import Model


class MatchRecord(Model):
"""MatchRecord.
class MatchRecordV2dot1(Model):
"""MatchRecordV2dot1.
:param text: Entity text as appears in the request.
:type text: str
Expand All @@ -31,7 +31,7 @@ class MatchRecord(Model):
}

def __init__(self, **kwargs):
super(MatchRecord, self).__init__(**kwargs)
super(MatchRecordV2dot1, self).__init__(**kwargs)
self.text = kwargs.get('text', None)
self.offset = kwargs.get('offset', None)
self.length = kwargs.get('length', None)
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from msrest.serialization import Model


class MatchRecord(Model):
"""MatchRecord.
class MatchRecordV2dot1(Model):
"""MatchRecordV2dot1.
:param text: Entity text as appears in the request.
:type text: str
Expand All @@ -31,7 +31,7 @@ class MatchRecord(Model):
}

def __init__(self, *, text: str=None, offset: int=None, length: int=None, **kwargs) -> None:
super(MatchRecord, self).__init__(**kwargs)
super(MatchRecordV2dot1, self).__init__(**kwargs)
self.text = text
self.offset = offset
self.length = length
Loading

0 comments on commit a7c83e9

Please sign in to comment.