diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object.py index 756b803da141..963186f835c7 100644 --- a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object.py +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object.py @@ -20,18 +20,14 @@ class ApplicationPublishObject(Model): :param is_staging: Indicates if the staging slot should be used, instead of the Production one. Default value: False . :type is_staging: bool - :param region: The target region that the application is published to. - :type region: str """ _attribute_map = { 'version_id': {'key': 'versionId', 'type': 'str'}, 'is_staging': {'key': 'isStaging', 'type': 'bool'}, - 'region': {'key': 'region', 'type': 'str'}, } def __init__(self, **kwargs): super(ApplicationPublishObject, self).__init__(**kwargs) self.version_id = kwargs.get('version_id', None) self.is_staging = kwargs.get('is_staging', False) - self.region = kwargs.get('region', None) diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object_py3.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object_py3.py index 9064fb0e6440..3bda03edfe1a 100644 --- a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object_py3.py +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/application_publish_object_py3.py @@ -20,18 +20,14 @@ class ApplicationPublishObject(Model): :param is_staging: Indicates if the staging slot should be used, instead of the Production one. Default value: False . :type is_staging: bool - :param region: The target region that the application is published to. - :type region: str """ _attribute_map = { 'version_id': {'key': 'versionId', 'type': 'str'}, 'is_staging': {'key': 'isStaging', 'type': 'bool'}, - 'region': {'key': 'region', 'type': 'str'}, } - def __init__(self, *, version_id: str=None, is_staging: bool=False, region: str=None, **kwargs) -> None: + def __init__(self, *, version_id: str=None, is_staging: bool=False, **kwargs) -> None: super(ApplicationPublishObject, self).__init__(**kwargs) self.version_id = version_id self.is_staging = is_staging - self.region = region diff --git a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/apps_operations.py b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/apps_operations.py index 18b46100b82a..8d8753b35a2d 100644 --- a/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/apps_operations.py +++ b/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/operations/apps_operations.py @@ -646,15 +646,16 @@ def delete( delete.metadata = {'url': '/apps/{appId}'} def publish( - self, app_id, application_publish_object, custom_headers=None, raw=False, **operation_config): + self, app_id, version_id=None, is_staging=False, custom_headers=None, raw=False, **operation_config): """Publishes a specific version of the application. :param app_id: The application ID. :type app_id: str - :param application_publish_object: The application publish object. The - region is the target region that the application is published to. - :type application_publish_object: - ~azure.cognitiveservices.language.luis.authoring.models.ApplicationPublishObject + :param version_id: The version ID to publish. + :type version_id: str + :param is_staging: Indicates if the staging slot should be used, + instead of the Production one. + :type is_staging: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -668,6 +669,8 @@ def publish( :raises: :class:`ErrorResponseException` """ + application_publish_object = models.ApplicationPublishObject(version_id=version_id, is_staging=is_staging) + # Construct URL url = self.publish.metadata['url'] path_format_arguments = {