# coding: utf-8

"""
    ThingsBoard REST API

    For instructions how to authorize requests please visit <a href='http://thingsboard.io/docs/reference/rest-api/'>REST API documentation page</a>.  # noqa: E501

    OpenAPI spec version: 2.0
    Contact: info@thingsboard.io
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

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

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'additional_info': 'str',
        'created_time': 'int',
        'device_id': 'DeviceId',
        'expiration_time': 'int',
        'id': 'RpcId',
        'request': 'str',
        'response': 'str',
        'status': 'str',
        'tenant_id': 'TenantId'
    }

    attribute_map = {
        'additional_info': 'additionalInfo',
        'created_time': 'createdTime',
        'device_id': 'deviceId',
        'expiration_time': 'expirationTime',
        'id': 'id',
        'request': 'request',
        'response': 'response',
        'status': 'status',
        'tenant_id': 'tenantId'
    }

    def __init__(self, additional_info=None, created_time=None, device_id=None, expiration_time=None, id=None, request=None, response=None, status=None, tenant_id=None):  # noqa: E501
        """Rpc - a model defined in Swagger"""  # noqa: E501
        self._additional_info = None
        self._created_time = None
        self._device_id = None
        self._expiration_time = None
        self._id = None
        self._request = None
        self._response = None
        self._status = None
        self._tenant_id = None
        self.discriminator = None
        if additional_info is not None:
            self.additional_info = additional_info
        if created_time is not None:
            self.created_time = created_time
        if device_id is not None:
            self.device_id = device_id
        if expiration_time is not None:
            self.expiration_time = expiration_time
        if id is not None:
            self.id = id
        if request is not None:
            self.request = request
        if response is not None:
            self.response = response
        if status is not None:
            self.status = status
        if tenant_id is not None:
            self.tenant_id = tenant_id

    @property
    def additional_info(self):
        """Gets the additional_info of this Rpc.  # noqa: E501


        :return: The additional_info of this Rpc.  # noqa: E501
        :rtype: str
        """
        return self._additional_info

    @additional_info.setter
    def additional_info(self, additional_info):
        """Sets the additional_info of this Rpc.


        :param additional_info: The additional_info of this Rpc.  # noqa: E501
        :type: str
        """

        self._additional_info = additional_info

    @property
    def created_time(self):
        """Gets the created_time of this Rpc.  # noqa: E501


        :return: The created_time of this Rpc.  # noqa: E501
        :rtype: int
        """
        return self._created_time

    @created_time.setter
    def created_time(self, created_time):
        """Sets the created_time of this Rpc.


        :param created_time: The created_time of this Rpc.  # noqa: E501
        :type: int
        """

        self._created_time = created_time

    @property
    def device_id(self):
        """Gets the device_id of this Rpc.  # noqa: E501


        :return: The device_id of this Rpc.  # noqa: E501
        :rtype: DeviceId
        """
        return self._device_id

    @device_id.setter
    def device_id(self, device_id):
        """Sets the device_id of this Rpc.


        :param device_id: The device_id of this Rpc.  # noqa: E501
        :type: DeviceId
        """

        self._device_id = device_id

    @property
    def expiration_time(self):
        """Gets the expiration_time of this Rpc.  # noqa: E501


        :return: The expiration_time of this Rpc.  # noqa: E501
        :rtype: int
        """
        return self._expiration_time

    @expiration_time.setter
    def expiration_time(self, expiration_time):
        """Sets the expiration_time of this Rpc.


        :param expiration_time: The expiration_time of this Rpc.  # noqa: E501
        :type: int
        """

        self._expiration_time = expiration_time

    @property
    def id(self):
        """Gets the id of this Rpc.  # noqa: E501


        :return: The id of this Rpc.  # noqa: E501
        :rtype: RpcId
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Rpc.


        :param id: The id of this Rpc.  # noqa: E501
        :type: RpcId
        """

        self._id = id

    @property
    def request(self):
        """Gets the request of this Rpc.  # noqa: E501


        :return: The request of this Rpc.  # noqa: E501
        :rtype: str
        """
        return self._request

    @request.setter
    def request(self, request):
        """Sets the request of this Rpc.


        :param request: The request of this Rpc.  # noqa: E501
        :type: str
        """

        self._request = request

    @property
    def response(self):
        """Gets the response of this Rpc.  # noqa: E501


        :return: The response of this Rpc.  # noqa: E501
        :rtype: str
        """
        return self._response

    @response.setter
    def response(self, response):
        """Sets the response of this Rpc.


        :param response: The response of this Rpc.  # noqa: E501
        :type: str
        """

        self._response = response

    @property
    def status(self):
        """Gets the status of this Rpc.  # noqa: E501


        :return: The status of this Rpc.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this Rpc.


        :param status: The status of this Rpc.  # noqa: E501
        :type: str
        """
        allowed_values = ["QUEUED", "DELIVERED", "SUCCESSFUL", "TIMEOUT", "FAILED"]  # noqa: E501
        if status not in allowed_values:
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"  # noqa: E501
                .format(status, allowed_values)
            )

        self._status = status

    @property
    def tenant_id(self):
        """Gets the tenant_id of this Rpc.  # noqa: E501


        :return: The tenant_id of this Rpc.  # noqa: E501
        :rtype: TenantId
        """
        return self._tenant_id

    @tenant_id.setter
    def tenant_id(self, tenant_id):
        """Sets the tenant_id of this Rpc.


        :param tenant_id: The tenant_id of this Rpc.  # noqa: E501
        :type: TenantId
        """

        self._tenant_id = tenant_id

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(Rpc, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, Rpc):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
