# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

# coding=utf-8
# --------------------------------------------------------------------------
# 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 ResponseError(Model):
    """Defines The error details that happened to a task.

    :param code: Possible values include: 'None', 'ServerError',
     'InvalidRequest', 'InsufficientAuthorization'. Default value: "None" .
    :type code: str or ~microsoft.bing.commerce.search.models.enum
    :param sub_code: Possible values include: 'UnexpectedError',
     'ResourceError', 'DeadlineExceeded', 'ParameterMissing',
     'ParameterInvalidValue'
    :type sub_code: str or ~microsoft.bing.commerce.search.models.enum
    :param message:
    :type message: str
    :param more_details:
    :type more_details: str
    """

    _attribute_map = {
        'code': {'key': 'code', 'type': 'str'},
        'sub_code': {'key': 'subCode', 'type': 'str'},
        'message': {'key': 'message', 'type': 'str'},
        'more_details': {'key': 'moreDetails', 'type': 'str'},
    }

    def __init__(self, **kwargs):
        super(ResponseError, self).__init__(**kwargs)
        self.code = kwargs.get('code', "None")
        self.sub_code = kwargs.get('sub_code', None)
        self.message = kwargs.get('message', None)
        self.more_details = kwargs.get('more_details', None)
