Skip to content

Commit

Permalink
Generated from c6165baff1fdf89c97d7c35304edc6c3dd96e4e8 (#3365)
Browse files Browse the repository at this point in the history
Merge pull request #2 from LanaShafik/upstream_master

Reversing Required
  • Loading branch information
AutorestCI authored Sep 19, 2018
1 parent faf39a5 commit b4875bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -668,6 +669,8 @@ def publish(
:raises:
:class:`ErrorResponseException<azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException>`
"""
application_publish_object = models.ApplicationPublishObject(version_id=version_id, is_staging=is_staging)

# Construct URL
url = self.publish.metadata['url']
path_format_arguments = {
Expand Down

0 comments on commit b4875bb

Please sign in to comment.