1# coding=utf-8 2# -------------------------------------------------------------------------- 3# Copyright (c) Microsoft Corporation. All rights reserved. 4# Licensed under the MIT License. See License.txt in the project root for 5# license information. 6# 7# Code generated by Microsoft (R) AutoRest Code Generator. 8# Changes may cause incorrect behavior and will be lost if the code is 9# regenerated. 10# -------------------------------------------------------------------------- 11 12from msrest.serialization import Model 13 14 15class ErrorInfo(Model): 16 """The code and message for an error. 17 18 All required parameters must be populated in order to send to Azure. 19 20 :param code: Required. A machine readable error code. 21 :type code: str 22 :param message: Required. A human readable error message. 23 :type message: str 24 :param details: error details. 25 :type details: list[~azure.loganalytics.models.ErrorDetail] 26 :param innererror: Inner error details if they exist. 27 :type innererror: ~azure.loganalytics.models.ErrorInfo 28 :param additional_properties: 29 :type additional_properties: object 30 """ 31 32 _validation = { 33 'code': {'required': True}, 34 'message': {'required': True}, 35 } 36 37 _attribute_map = { 38 'code': {'key': 'code', 'type': 'str'}, 39 'message': {'key': 'message', 'type': 'str'}, 40 'details': {'key': 'details', 'type': '[ErrorDetail]'}, 41 'innererror': {'key': 'innererror', 'type': 'ErrorInfo'}, 42 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, 43 } 44 45 def __init__(self, *, code: str, message: str, details=None, innererror=None, additional_properties=None, **kwargs) -> None: 46 super(ErrorInfo, self).__init__(**kwargs) 47 self.code = code 48 self.message = message 49 self.details = details 50 self.innererror = innererror 51 self.additional_properties = additional_properties 52