Skip to content

Commit

Permalink
[AutoPR apimanagement/resource-manager] ApiIssue HEAD operation name …
Browse files Browse the repository at this point in the history
…consistent across the spec (#2419)

* Generated from 3a649f27e5368d86880dc0f4c3b8b2c76676763e

normalize head names

* Generated from 58adb27c9fd292a5f3c01faa388a3183c075b632

delete supports 200
  • Loading branch information
AutorestCI authored Apr 19, 2018
1 parent dd3d5b2 commit 98c89cf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def internal_paging(next_link=None, raw=False):
return deserialized
list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments'}

def head(
def get_entity_tag(
self, resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers=None, raw=False, **operation_config):
"""Gets the entity state (Etag) version of the issue Attachment for an API
specified by its identifier.
Expand Down Expand Up @@ -161,7 +161,7 @@ def head(
:class:`ErrorResponseException<azure.mgmt.apimanagement.models.ErrorResponseException>`
"""
# Construct URL
url = self.head.metadata['url']
url = self.get_entity_tag.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'),
Expand Down Expand Up @@ -199,7 +199,7 @@ def head(
'ETag': 'str',
})
return client_raw_response
head.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}'}
get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}'}

def get(
self, resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -431,7 +431,7 @@ def delete(
request = self._client.delete(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)

if response.status_code not in [204]:
if response.status_code not in [200, 204]:
raise models.ErrorResponseException(self._deserialize, response)

if raw:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def internal_paging(next_link=None, raw=False):
return deserialized
list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments'}

def head(
def get_entity_tag(
self, resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers=None, raw=False, **operation_config):
"""Gets the entity state (Etag) version of the issue Comment for an API
specified by its identifier.
Expand Down Expand Up @@ -161,7 +161,7 @@ def head(
:class:`ErrorResponseException<azure.mgmt.apimanagement.models.ErrorResponseException>`
"""
# Construct URL
url = self.head.metadata['url']
url = self.get_entity_tag.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'),
Expand Down Expand Up @@ -199,7 +199,7 @@ def head(
'ETag': 'str',
})
return client_raw_response
head.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}'}
get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}'}

def get(
self, resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -431,7 +431,7 @@ def delete(
request = self._client.delete(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)

if response.status_code not in [204]:
if response.status_code not in [200, 204]:
raise models.ErrorResponseException(self._deserialize, response)

if raw:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def internal_paging(next_link=None, raw=False):
return deserialized
list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues'}

def head(
def get_entity_tag(
self, resource_group_name, service_name, api_id, issue_id, custom_headers=None, raw=False, **operation_config):
"""Gets the entity state (Etag) version of the Issue for an API specified
by its identifier.
Expand All @@ -156,7 +156,7 @@ def head(
:class:`ErrorResponseException<azure.mgmt.apimanagement.models.ErrorResponseException>`
"""
# Construct URL
url = self.head.metadata['url']
url = self.get_entity_tag.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'),
Expand Down Expand Up @@ -193,7 +193,7 @@ def head(
'ETag': 'str',
})
return client_raw_response
head.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'}
get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'}

def get(
self, resource_group_name, service_name, api_id, issue_id, custom_headers=None, raw=False, **operation_config):
Expand Down Expand Up @@ -410,7 +410,7 @@ def delete(
request = self._client.delete(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)

if response.status_code not in [204]:
if response.status_code not in [200, 204]:
raise models.ErrorResponseException(self._deserialize, response)

if raw:
Expand Down

0 comments on commit 98c89cf

Please sign in to comment.