Skip to content

Commit

Permalink
Generated from d5154334bedc1a06875214e99338c61be88739fb (#6771)
Browse files Browse the repository at this point in the history
Revert the changes for 2019-07-01/Microsoft.Resources.
  • Loading branch information
AutorestCI authored and Zim Kalinowski committed Sep 2, 2019
1 parent e3fb8dc commit 449b0a6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -521,17 +521,22 @@ def __init__(self, **kwargs):
class DeploymentValidateResult(Model):
"""Information from validate template deployment response.
:param error: The deployment validation error.
:type error:
~azure.mgmt.resource.resources.v2019_07_01.models.ErrorResponse
:param properties: The template deployment properties.
:type properties:
~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentPropertiesExtended
"""

_attribute_map = {
'error': {'key': 'error', 'type': 'ErrorResponse'},
'properties': {'key': 'properties', 'type': 'DeploymentPropertiesExtended'},
}

def __init__(self, **kwargs):
super(DeploymentValidateResult, self).__init__(**kwargs)
self.error = kwargs.get('error', None)
self.properties = kwargs.get('properties', None)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,17 +521,22 @@ def __init__(self, *, outputs=None, providers=None, dependencies=None, template=
class DeploymentValidateResult(Model):
"""Information from validate template deployment response.
:param error: The deployment validation error.
:type error:
~azure.mgmt.resource.resources.v2019_07_01.models.ErrorResponse
:param properties: The template deployment properties.
:type properties:
~azure.mgmt.resource.resources.v2019_07_01.models.DeploymentPropertiesExtended
"""

_attribute_map = {
'error': {'key': 'error', 'type': 'ErrorResponse'},
'properties': {'key': 'properties', 'type': 'DeploymentPropertiesExtended'},
}

def __init__(self, *, properties=None, **kwargs) -> None:
def __init__(self, *, error=None, properties=None, **kwargs) -> None:
super(DeploymentValidateResult, self).__init__(**kwargs)
self.error = error
self.properties = properties


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,14 +470,16 @@ def validate_at_scope(
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
if response.status_code not in [200, 400]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('DeploymentValidateResult', response)
if response.status_code == 400:
deserialized = self._deserialize('DeploymentValidateResult', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
Expand Down Expand Up @@ -1034,14 +1036,16 @@ def validate_at_tenant_scope(
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
if response.status_code not in [200, 400]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('DeploymentValidateResult', response)
if response.status_code == 400:
deserialized = self._deserialize('DeploymentValidateResult', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
Expand Down Expand Up @@ -1609,14 +1613,16 @@ def validate_at_management_group_scope(
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
if response.status_code not in [200, 400]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('DeploymentValidateResult', response)
if response.status_code == 400:
deserialized = self._deserialize('DeploymentValidateResult', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
Expand Down Expand Up @@ -2179,14 +2185,16 @@ def validate_at_subscription_scope(
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
if response.status_code not in [200, 400]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('DeploymentValidateResult', response)
if response.status_code == 400:
deserialized = self._deserialize('DeploymentValidateResult', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
Expand Down Expand Up @@ -2773,14 +2781,16 @@ def validate(
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
if response.status_code not in [200, 400]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('DeploymentValidateResult', response)
if response.status_code == 400:
deserialized = self._deserialize('DeploymentValidateResult', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
Expand Down

0 comments on commit 449b0a6

Please sign in to comment.