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

[ReleasePR azure-cognitiveservices-language-luis] Remove keys from LUIS swagger files #16633

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 @@ -20,7 +20,6 @@
from .operations import AppsOperations
from .operations import VersionsOperations
from .operations import TrainOperations
from .operations import PermissionsOperations
from .operations import PatternOperations
from .operations import SettingsOperations
from .operations import AzureAccountsOperations
Expand All @@ -45,8 +44,6 @@ class LUISAuthoringClient(SDKClient):
:vartype versions: azure.cognitiveservices.language.luis.authoring.operations.VersionsOperations
:ivar train: Train operations
:vartype train: azure.cognitiveservices.language.luis.authoring.operations.TrainOperations
:ivar permissions: Permissions operations
:vartype permissions: azure.cognitiveservices.language.luis.authoring.operations.PermissionsOperations
:ivar pattern: Pattern operations
:vartype pattern: azure.cognitiveservices.language.luis.authoring.operations.PatternOperations
:ivar settings: Settings operations
Expand Down Expand Up @@ -85,8 +82,6 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.train = TrainOperations(
self._client, self.config, self._serialize, self._deserialize)
self.permissions = PermissionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.pattern = PatternOperations(
self._client, self.config, self._serialize, self._deserialize)
self.settings = SettingsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ class TrainingStatus(str, Enum):
class OperationStatusType(str, Enum):

failed = "Failed"
failed = "FAILED"
success = "Success"
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,9 @@ class EntityLabel(Model):
:type role: str
:param role_id: The role id for the predicted entity.
:type role_id: str
:param children:
:type children:
list[~azure.cognitiveservices.language.luis.authoring.models.EntityLabel]
"""

_validation = {
Expand All @@ -876,6 +879,7 @@ class EntityLabel(Model):
'end_token_index': {'key': 'endTokenIndex', 'type': 'int'},
'role': {'key': 'role', 'type': 'str'},
'role_id': {'key': 'roleId', 'type': 'str'},
'children': {'key': 'children', 'type': '[EntityLabel]'},
}

def __init__(self, **kwargs):
Expand All @@ -885,6 +889,7 @@ def __init__(self, **kwargs):
self.end_token_index = kwargs.get('end_token_index', None)
self.role = kwargs.get('role', None)
self.role_id = kwargs.get('role_id', None)
self.children = kwargs.get('children', None)


class EntityLabelObject(Model):
Expand All @@ -903,6 +908,9 @@ class EntityLabelObject(Model):
:type end_char_index: int
:param role: The role the entity plays in the utterance.
:type role: str
:param children: The identified entities within the example utterance.
:type children:
list[~azure.cognitiveservices.language.luis.authoring.models.EntityLabelObject]
"""

_validation = {
Expand All @@ -916,6 +924,7 @@ class EntityLabelObject(Model):
'start_char_index': {'key': 'startCharIndex', 'type': 'int'},
'end_char_index': {'key': 'endCharIndex', 'type': 'int'},
'role': {'key': 'role', 'type': 'str'},
'children': {'key': 'children', 'type': '[EntityLabelObject]'},
}

def __init__(self, **kwargs):
Expand All @@ -924,6 +933,7 @@ def __init__(self, **kwargs):
self.start_char_index = kwargs.get('start_char_index', None)
self.end_char_index = kwargs.get('end_char_index', None)
self.role = kwargs.get('role', None)
self.children = kwargs.get('children', None)


class EntityModelCreateObject(Model):
Expand Down Expand Up @@ -1065,6 +1075,9 @@ class EntityPrediction(Model):
:type end_token_index: int
:param phrase: Required. The actual token(s) that comprise the entity.
:type phrase: str
:param children:
:type children:
list[~azure.cognitiveservices.language.luis.authoring.models.EntityPrediction]
"""

_validation = {
Expand All @@ -1079,6 +1092,7 @@ class EntityPrediction(Model):
'start_token_index': {'key': 'startTokenIndex', 'type': 'int'},
'end_token_index': {'key': 'endTokenIndex', 'type': 'int'},
'phrase': {'key': 'phrase', 'type': 'str'},
'children': {'key': 'children', 'type': '[EntityPrediction]'},
}

def __init__(self, **kwargs):
Expand All @@ -1087,6 +1101,7 @@ def __init__(self, **kwargs):
self.start_token_index = kwargs.get('start_token_index', None)
self.end_token_index = kwargs.get('end_token_index', None)
self.phrase = kwargs.get('phrase', None)
self.children = kwargs.get('children', None)


class EntityRole(Model):
Expand Down Expand Up @@ -1618,6 +1633,9 @@ class JSONEntity(Model):
:type entity: str
:param role: The role the entity plays in the utterance.
:type role: str
:param children:
:type children:
list[~azure.cognitiveservices.language.luis.authoring.models.JSONEntity]
"""

_validation = {
Expand All @@ -1631,6 +1649,7 @@ class JSONEntity(Model):
'end_pos': {'key': 'endPos', 'type': 'int'},
'entity': {'key': 'entity', 'type': 'str'},
'role': {'key': 'role', 'type': 'str'},
'children': {'key': 'children', 'type': '[JSONEntity]'},
}

def __init__(self, **kwargs):
Expand All @@ -1639,6 +1658,7 @@ def __init__(self, **kwargs):
self.end_pos = kwargs.get('end_pos', None)
self.entity = kwargs.get('entity', None)
self.role = kwargs.get('role', None)
self.children = kwargs.get('children', None)


class JSONModelFeature(Model):
Expand Down Expand Up @@ -1802,12 +1822,12 @@ class LabelExampleResponse(Model):
:param utterance_text: The example utterance.
:type utterance_text: str
:param example_id: The newly created sample ID.
:type example_id: int
:type example_id: long
"""

_attribute_map = {
'utterance_text': {'key': 'UtteranceText', 'type': 'str'},
'example_id': {'key': 'ExampleId', 'type': 'int'},
'example_id': {'key': 'ExampleId', 'type': 'long'},
}

def __init__(self, **kwargs):
Expand Down Expand Up @@ -2045,17 +2065,21 @@ class ModelFeatureInformation(Model):
:type model_name: str
:param feature_name: The name of the feature used.
:type feature_name: str
:param is_required:
:type is_required: bool
"""

_attribute_map = {
'model_name': {'key': 'modelName', 'type': 'str'},
'feature_name': {'key': 'featureName', 'type': 'str'},
'is_required': {'key': 'isRequired', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(ModelFeatureInformation, self).__init__(**kwargs)
self.model_name = kwargs.get('model_name', None)
self.feature_name = kwargs.get('feature_name', None)
self.is_required = kwargs.get('is_required', None)


class ModelInfoResponse(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,9 @@ class EntityLabel(Model):
:type role: str
:param role_id: The role id for the predicted entity.
:type role_id: str
:param children:
:type children:
list[~azure.cognitiveservices.language.luis.authoring.models.EntityLabel]
"""

_validation = {
Expand All @@ -876,15 +879,17 @@ class EntityLabel(Model):
'end_token_index': {'key': 'endTokenIndex', 'type': 'int'},
'role': {'key': 'role', 'type': 'str'},
'role_id': {'key': 'roleId', 'type': 'str'},
'children': {'key': 'children', 'type': '[EntityLabel]'},
}

def __init__(self, *, entity_name: str, start_token_index: int, end_token_index: int, role: str=None, role_id: str=None, **kwargs) -> None:
def __init__(self, *, entity_name: str, start_token_index: int, end_token_index: int, role: str=None, role_id: str=None, children=None, **kwargs) -> None:
super(EntityLabel, self).__init__(**kwargs)
self.entity_name = entity_name
self.start_token_index = start_token_index
self.end_token_index = end_token_index
self.role = role
self.role_id = role_id
self.children = children


class EntityLabelObject(Model):
Expand All @@ -903,6 +908,9 @@ class EntityLabelObject(Model):
:type end_char_index: int
:param role: The role the entity plays in the utterance.
:type role: str
:param children: The identified entities within the example utterance.
:type children:
list[~azure.cognitiveservices.language.luis.authoring.models.EntityLabelObject]
"""

_validation = {
Expand All @@ -916,14 +924,16 @@ class EntityLabelObject(Model):
'start_char_index': {'key': 'startCharIndex', 'type': 'int'},
'end_char_index': {'key': 'endCharIndex', 'type': 'int'},
'role': {'key': 'role', 'type': 'str'},
'children': {'key': 'children', 'type': '[EntityLabelObject]'},
}

def __init__(self, *, entity_name: str, start_char_index: int, end_char_index: int, role: str=None, **kwargs) -> None:
def __init__(self, *, entity_name: str, start_char_index: int, end_char_index: int, role: str=None, children=None, **kwargs) -> None:
super(EntityLabelObject, self).__init__(**kwargs)
self.entity_name = entity_name
self.start_char_index = start_char_index
self.end_char_index = end_char_index
self.role = role
self.children = children


class EntityModelCreateObject(Model):
Expand Down Expand Up @@ -1065,6 +1075,9 @@ class EntityPrediction(Model):
:type end_token_index: int
:param phrase: Required. The actual token(s) that comprise the entity.
:type phrase: str
:param children:
:type children:
list[~azure.cognitiveservices.language.luis.authoring.models.EntityPrediction]
"""

_validation = {
Expand All @@ -1079,14 +1092,16 @@ class EntityPrediction(Model):
'start_token_index': {'key': 'startTokenIndex', 'type': 'int'},
'end_token_index': {'key': 'endTokenIndex', 'type': 'int'},
'phrase': {'key': 'phrase', 'type': 'str'},
'children': {'key': 'children', 'type': '[EntityPrediction]'},
}

def __init__(self, *, entity_name: str, start_token_index: int, end_token_index: int, phrase: str, **kwargs) -> None:
def __init__(self, *, entity_name: str, start_token_index: int, end_token_index: int, phrase: str, children=None, **kwargs) -> None:
super(EntityPrediction, self).__init__(**kwargs)
self.entity_name = entity_name
self.start_token_index = start_token_index
self.end_token_index = end_token_index
self.phrase = phrase
self.children = children


class EntityRole(Model):
Expand Down Expand Up @@ -1618,6 +1633,9 @@ class JSONEntity(Model):
:type entity: str
:param role: The role the entity plays in the utterance.
:type role: str
:param children:
:type children:
list[~azure.cognitiveservices.language.luis.authoring.models.JSONEntity]
"""

_validation = {
Expand All @@ -1631,14 +1649,16 @@ class JSONEntity(Model):
'end_pos': {'key': 'endPos', 'type': 'int'},
'entity': {'key': 'entity', 'type': 'str'},
'role': {'key': 'role', 'type': 'str'},
'children': {'key': 'children', 'type': '[JSONEntity]'},
}

def __init__(self, *, start_pos: int, end_pos: int, entity: str, role: str=None, **kwargs) -> None:
def __init__(self, *, start_pos: int, end_pos: int, entity: str, role: str=None, children=None, **kwargs) -> None:
super(JSONEntity, self).__init__(**kwargs)
self.start_pos = start_pos
self.end_pos = end_pos
self.entity = entity
self.role = role
self.children = children


class JSONModelFeature(Model):
Expand Down Expand Up @@ -1802,12 +1822,12 @@ class LabelExampleResponse(Model):
:param utterance_text: The example utterance.
:type utterance_text: str
:param example_id: The newly created sample ID.
:type example_id: int
:type example_id: long
"""

_attribute_map = {
'utterance_text': {'key': 'UtteranceText', 'type': 'str'},
'example_id': {'key': 'ExampleId', 'type': 'int'},
'example_id': {'key': 'ExampleId', 'type': 'long'},
}

def __init__(self, *, utterance_text: str=None, example_id: int=None, **kwargs) -> None:
Expand Down Expand Up @@ -2045,17 +2065,21 @@ class ModelFeatureInformation(Model):
:type model_name: str
:param feature_name: The name of the feature used.
:type feature_name: str
:param is_required:
:type is_required: bool
"""

_attribute_map = {
'model_name': {'key': 'modelName', 'type': 'str'},
'feature_name': {'key': 'featureName', 'type': 'str'},
'is_required': {'key': 'isRequired', 'type': 'bool'},
}

def __init__(self, *, model_name: str=None, feature_name: str=None, **kwargs) -> None:
def __init__(self, *, model_name: str=None, feature_name: str=None, is_required: bool=None, **kwargs) -> None:
super(ModelFeatureInformation, self).__init__(**kwargs)
self.model_name = model_name
self.feature_name = feature_name
self.is_required = is_required


class ModelInfoResponse(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from ._apps_operations import AppsOperations
from ._versions_operations import VersionsOperations
from ._train_operations import TrainOperations
from ._permissions_operations import PermissionsOperations
from ._pattern_operations import PatternOperations
from ._settings_operations import SettingsOperations
from ._azure_accounts_operations import AzureAccountsOperations
Expand All @@ -27,7 +26,6 @@
'AppsOperations',
'VersionsOperations',
'TrainOperations',
'PermissionsOperations',
'PatternOperations',
'SettingsOperations',
'AzureAccountsOperations',
Expand Down
Loading