diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py index 99bc8a8aedc..a1fc918799a 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py @@ -11,6 +11,7 @@ try: from .error_field_contract_py3 import ErrorFieldContract + from .error_response_body_py3 import ErrorResponseBody from .error_response_py3 import ErrorResponse, ErrorResponseException from .policy_contract_py3 import PolicyContract from .policy_collection_py3 import PolicyCollection @@ -155,6 +156,7 @@ from .api_version_set_update_parameters_py3 import ApiVersionSetUpdateParameters except (SyntaxError, ImportError): from .error_field_contract import ErrorFieldContract + from .error_response_body import ErrorResponseBody from .error_response import ErrorResponse, ErrorResponseException from .policy_contract import PolicyContract from .policy_collection import PolicyCollection @@ -364,6 +366,7 @@ __all__ = [ 'ErrorFieldContract', + 'ErrorResponseBody', 'ErrorResponse', 'ErrorResponseException', 'PolicyContract', 'PolicyCollection', diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response_body.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response_body.py new file mode 100644 index 00000000000..80fd246c2f3 --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response_body.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorResponseBody(Model): + """Error Body contract. + + :param code: Service-defined error code. This code serves as a sub-status + for the HTTP error code specified in the response. + :type code: str + :param message: Human-readable representation of the error. + :type message: str + :param details: The list of invalid fields send in request, in case of + validation error. + :type details: list[~azure.mgmt.apimanagement.models.ErrorFieldContract] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorFieldContract]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response_body_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response_body_py3.py new file mode 100644 index 00000000000..1c8dedf4ed1 --- /dev/null +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/error_response_body_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorResponseBody(Model): + """Error Body contract. + + :param code: Service-defined error code. This code serves as a sub-status + for the HTTP error code specified in the response. + :type code: str + :param message: Human-readable representation of the error. + :type message: str + :param details: The list of invalid fields send in request, in case of + validation error. + :type details: list[~azure.mgmt.apimanagement.models.ErrorFieldContract] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorFieldContract]'}, + } + + def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None: + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_contract.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_contract.py index 14e39327b28..736344faab2 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_contract.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_contract.py @@ -34,7 +34,7 @@ class OperationResultContract(Model): :param result_info: Optional result info. :type result_info: str :param error: Error Body Contract - :type error: ~azure.mgmt.apimanagement.models.ErrorResponse + :type error: ~azure.mgmt.apimanagement.models.ErrorResponseBody :ivar action_log: This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the @@ -53,7 +53,7 @@ class OperationResultContract(Model): 'started': {'key': 'started', 'type': 'iso-8601'}, 'updated': {'key': 'updated', 'type': 'iso-8601'}, 'result_info': {'key': 'resultInfo', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorResponse'}, + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, 'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'}, } diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_contract_py3.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_contract_py3.py index ec429753d4d..0694c535ae2 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_contract_py3.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/operation_result_contract_py3.py @@ -34,7 +34,7 @@ class OperationResultContract(Model): :param result_info: Optional result info. :type result_info: str :param error: Error Body Contract - :type error: ~azure.mgmt.apimanagement.models.ErrorResponse + :type error: ~azure.mgmt.apimanagement.models.ErrorResponseBody :ivar action_log: This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the @@ -53,7 +53,7 @@ class OperationResultContract(Model): 'started': {'key': 'started', 'type': 'iso-8601'}, 'updated': {'key': 'updated', 'type': 'iso-8601'}, 'result_info': {'key': 'resultInfo', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorResponse'}, + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, 'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'}, }