| 1 | # coding: utf-8
|
|---|
| 2 |
|
|---|
| 3 | from __future__ import absolute_import
|
|---|
| 4 | from datetime import date, datetime # noqa: F401
|
|---|
| 5 |
|
|---|
| 6 | from typing import List, Dict # noqa: F401
|
|---|
| 7 |
|
|---|
| 8 | from openapi_server.models.base_model_ import Model
|
|---|
| 9 | from openapi_server import util
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 | class HttpError(Model):
|
|---|
| 13 | """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|---|
| 14 |
|
|---|
| 15 | Do not edit the class manually.
|
|---|
| 16 | """
|
|---|
| 17 |
|
|---|
| 18 | def __init__(self, code=None, message=None): # noqa: E501
|
|---|
| 19 | """HttpError - a model defined in OpenAPI
|
|---|
| 20 |
|
|---|
| 21 | :param code: The code of this HttpError. # noqa: E501
|
|---|
| 22 | :type code: int
|
|---|
| 23 | :param message: The message of this HttpError. # noqa: E501
|
|---|
| 24 | :type message: str
|
|---|
| 25 | """
|
|---|
| 26 | self.openapi_types = {
|
|---|
| 27 | 'code': int,
|
|---|
| 28 | 'message': str
|
|---|
| 29 | }
|
|---|
| 30 |
|
|---|
| 31 | self.attribute_map = {
|
|---|
| 32 | 'code': 'code',
|
|---|
| 33 | 'message': 'message'
|
|---|
| 34 | }
|
|---|
| 35 |
|
|---|
| 36 | self._code = code
|
|---|
| 37 | self._message = message
|
|---|
| 38 |
|
|---|
| 39 | @classmethod
|
|---|
| 40 | def from_dict(cls, dikt) -> 'HttpError':
|
|---|
| 41 | """Returns the dict as a model
|
|---|
| 42 |
|
|---|
| 43 | :param dikt: A dict.
|
|---|
| 44 | :type: dict
|
|---|
| 45 | :return: The HttpError of this HttpError. # noqa: E501
|
|---|
| 46 | :rtype: HttpError
|
|---|
| 47 | """
|
|---|
| 48 | return util.deserialize_model(dikt, cls)
|
|---|
| 49 |
|
|---|
| 50 | @property
|
|---|
| 51 | def code(self):
|
|---|
| 52 | """Gets the code of this HttpError.
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 | :return: The code of this HttpError.
|
|---|
| 56 | :rtype: int
|
|---|
| 57 | """
|
|---|
| 58 | return self._code
|
|---|
| 59 |
|
|---|
| 60 | @code.setter
|
|---|
| 61 | def code(self, code):
|
|---|
| 62 | """Sets the code of this HttpError.
|
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 | :param code: The code of this HttpError.
|
|---|
| 66 | :type code: int
|
|---|
| 67 | """
|
|---|
| 68 | if code is None:
|
|---|
| 69 | raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501
|
|---|
| 70 |
|
|---|
| 71 | self._code = code
|
|---|
| 72 |
|
|---|
| 73 | @property
|
|---|
| 74 | def message(self):
|
|---|
| 75 | """Gets the message of this HttpError.
|
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 | :return: The message of this HttpError.
|
|---|
| 79 | :rtype: str
|
|---|
| 80 | """
|
|---|
| 81 | return self._message
|
|---|
| 82 |
|
|---|
| 83 | @message.setter
|
|---|
| 84 | def message(self, message):
|
|---|
| 85 | """Sets the message of this HttpError.
|
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 | :param message: The message of this HttpError.
|
|---|
| 89 | :type message: str
|
|---|
| 90 | """
|
|---|
| 91 | if message is None:
|
|---|
| 92 | raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501
|
|---|
| 93 |
|
|---|
| 94 | self._message = message
|
|---|