# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from xpctl.xpserver.models.base_model_ import Model
from xpctl.xpserver import util


class Response(Model):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    def __init__(self, code=None, message=None, response_type=None):  # noqa: E501
        """Response - a model defined in Swagger

        :param code: The code of this Response.  # noqa: E501
        :type code: int
        :param message: The message of this Response.  # noqa: E501
        :type message: str
        :param response_type: The response_type of this Response.  # noqa: E501
        :type response_type: str
        """
        self.swagger_types = {
            'code': int,
            'message': str,
            'response_type': str
        }

        self.attribute_map = {
            'code': 'code',
            'message': 'message',
            'response_type': 'response_type'
        }

        self._code = code
        self._message = message
        self._response_type = response_type

    @classmethod
    def from_dict(cls, dikt):
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The Response of this Response.  # noqa: E501
        :rtype: Response
        """
        return util.deserialize_model(dikt, cls)

    @property
    def code(self):
        """Gets the code of this Response.


        :return: The code of this Response.
        :rtype: int
        """
        return self._code

    @code.setter
    def code(self, code):
        """Sets the code of this Response.


        :param code: The code of this Response.
        :type code: int
        """
        if code is None:
            raise ValueError("Invalid value for `code`, must not be `None`")  # noqa: E501

        self._code = code

    @property
    def message(self):
        """Gets the message of this Response.


        :return: The message of this Response.
        :rtype: str
        """
        return self._message

    @message.setter
    def message(self, message):
        """Sets the message of this Response.


        :param message: The message of this Response.
        :type message: str
        """
        if message is None:
            raise ValueError("Invalid value for `message`, must not be `None`")  # noqa: E501

        self._message = message

    @property
    def response_type(self):
        """Gets the response_type of this Response.


        :return: The response_type of this Response.
        :rtype: str
        """
        return self._response_type

    @response_type.setter
    def response_type(self, response_type):
        """Sets the response_type of this Response.


        :param response_type: The response_type of this Response.
        :type response_type: str
        """
        allowed_values = ["success", "error"]  # noqa: E501
        if response_type not in allowed_values:
            raise ValueError(
                "Invalid value for `response_type` ({0}), must be one of {1}"
                .format(response_type, allowed_values)
            )

        self._response_type = response_type
