# 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
from msrest.exceptions import HttpOperationError


class ProblemResponse(Model):
    """ProblemResponse.

    Variables are only populated by the server, and will be ignored when
    sending a request.

    :ivar code:
    :vartype code: int
    :param error:
    :type error: dict[str, list[str]]
    """

    _validation = {
        'code': {'readonly': True},
    }

    _attribute_map = {
        'code': {'key': 'code', 'type': 'int'},
        'error': {'key': 'error', 'type': '{[str]}'},
    }

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


class ProblemResponseException(HttpOperationError):
    """Server responsed with exception of type: 'ProblemResponse'.

    :param deserialize: A deserializer
    :param response: Server response to be deserialized.
    """

    def __init__(self, deserialize, response, *args):

        super(ProblemResponseException, self).__init__(deserialize, response, 'ProblemResponse', *args)
