Skip to content

Commit

Permalink
Generated from 7825a73e04058cc0a46f8ad579111e5febaa9750 (#4959)
Browse files Browse the repository at this point in the history
revert not support formats
  • Loading branch information
AutorestCI authored Apr 26, 2019
1 parent 56bf6a7 commit 2b2e422
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,7 @@ class NotificationName(str, Enum):
class PolicyExportFormat(str, Enum):

xml = "xml" #: The contents are inline and Content type is an XML document.
xml_link = "xml-link" #: The policy XML document is exported to a storage blob with SAS key valid for 5 minutes.
rawxml = "rawxml" #: The contents are inline and Content type is a non XML encoded policy document.
rawxml_link = "rawxml-link" #: The policy document is not XML encoded is exported to a storage blob with SAS Key valid for 5 minutes.


class TemplateName(str, Enum):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def list_by_operation(
list_by_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies'}

def get_entity_tag(
self, resource_group_name, service_name, api_id, operation_id, format="xml", custom_headers=None, raw=False, **operation_config):
self, resource_group_name, service_name, api_id, operation_id, custom_headers=None, raw=False, **operation_config):
"""Gets the entity state (Etag) version of the API operation policy
specified by its identifier.
Expand All @@ -124,10 +124,6 @@ def get_entity_tag(
:param operation_id: Operation identifier within an API. Must be
unique in the current API Management service instance.
:type operation_id: str
:param format: Policy Export Format. Possible values include: 'xml',
'xml-link', 'rawxml', 'rawxml-link'
:type format: str or
~azure.mgmt.apimanagement.models.PolicyExportFormat
: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 @@ -152,8 +148,6 @@ def get_entity_tag(

# Construct parameters
query_parameters = {}
if format is not None:
query_parameters['format'] = self._serialize.query("format", format, 'str')
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

# Construct headers
Expand Down Expand Up @@ -181,7 +175,7 @@ def get_entity_tag(
get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}'}

def get(
self, resource_group_name, service_name, api_id, operation_id, custom_headers=None, raw=False, **operation_config):
self, resource_group_name, service_name, api_id, operation_id, format="xml", custom_headers=None, raw=False, **operation_config):
"""Get the policy configuration at the API Operation level.
:param resource_group_name: The name of the resource group.
Expand All @@ -195,6 +189,10 @@ def get(
:param operation_id: Operation identifier within an API. Must be
unique in the current API Management service instance.
:type operation_id: str
:param format: Policy Export Format. Possible values include: 'xml',
'rawxml'
:type format: str or
~azure.mgmt.apimanagement.models.PolicyExportFormat
: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 @@ -220,6 +218,8 @@ def get(

# Construct parameters
query_parameters = {}
if format is not None:
query_parameters['format'] = self._serialize.query("format", format, 'str')
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

# Construct headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def get(
suffix where n is the revision number.
:type api_id: str
:param format: Policy Export Format. Possible values include: 'xml',
'xml-link', 'rawxml', 'rawxml-link'
'rawxml'
:type format: str or
~azure.mgmt.apimanagement.models.PolicyExportFormat
:param dict custom_headers: headers that will be added to the request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def get(
:param service_name: The name of the API Management service.
:type service_name: str
:param format: Policy Export Format. Possible values include: 'xml',
'xml-link', 'rawxml', 'rawxml-link'
'rawxml'
:type format: str or
~azure.mgmt.apimanagement.models.PolicyExportFormat
:param dict custom_headers: headers that will be added to the request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def get(
API Management service instance.
:type product_id: str
:param format: Policy Export Format. Possible values include: 'xml',
'xml-link', 'rawxml', 'rawxml-link'
'rawxml'
:type format: str or
~azure.mgmt.apimanagement.models.PolicyExportFormat
:param dict custom_headers: headers that will be added to the request
Expand Down

0 comments on commit 2b2e422

Please sign in to comment.