# coding: utf-8

"""
    ThingsBoard REST API

     ThingsBoard open-source IoT platform REST API documentation.  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class Job(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 = {
        'id': 'JobId',
        'created_time': 'int',
        'tenant_id': 'TenantId',
        'type': 'str',
        'key': 'str',
        'entity_id': 'EntityId',
        'entity_name': 'str',
        'status': 'str',
        'configuration': 'str',
        'result': 'str'
    }

    attribute_map = {
        'id': 'id',
        'created_time': 'createdTime',
        'tenant_id': 'tenantId',
        'type': 'type',
        'key': 'key',
        'entity_id': 'entityId',
        'entity_name': 'entityName',
        'status': 'status',
        'configuration': 'configuration',
        'result': 'result'
    }

    def __init__(self, id=None, created_time=None, tenant_id=None, type=None, key=None, entity_id=None, entity_name=None, status=None, configuration=None, result=None):  # noqa: E501
        """Job - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._created_time = None
        self._tenant_id = None
        self._type = None
        self._key = None
        self._entity_id = None
        self._entity_name = None
        self._status = None
        self._configuration = None
        self._result = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if created_time is not None:
            self.created_time = created_time
        self.tenant_id = tenant_id
        self.type = type
        self.key = key
        self.entity_id = entity_id
        if entity_name is not None:
            self.entity_name = entity_name
        self.status = status
        self.configuration = configuration
        self.result = result

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


        :return: The id of this Job.  # noqa: E501
        :rtype: JobId
        """
        return self._id

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


        :param id: The id of this Job.  # noqa: E501
        :type: JobId
        """

        self._id = id

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


        :return: The created_time of this Job.  # noqa: E501
        :rtype: object
        """
        return self._created_time

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


        :param created_time: The created_time of this Job.  # noqa: E501
        :type: object
        """

        self._created_time = created_time

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


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

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


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

        self._tenant_id = tenant_id

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


        :return: The type of this Job.  # noqa: E501
        :rtype: object
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this Job.


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

        self._type = type

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


        :return: The key of this Job.  # noqa: E501
        :rtype: object
        """
        return self._key

    @key.setter
    def key(self, key):
        """Sets the key of this Job.


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

        self._key = key

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


        :return: The entity_id of this Job.  # noqa: E501
        :rtype: EntityId
        """
        return self._entity_id

    @entity_id.setter
    def entity_id(self, entity_id):
        """Sets the entity_id of this Job.


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

        self._entity_id = entity_id

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


        :return: The entity_name of this Job.  # noqa: E501
        :rtype: object
        """
        return self._entity_name

    @entity_name.setter
    def entity_name(self, entity_name):
        """Sets the entity_name of this Job.


        :param entity_name: The entity_name of this Job.  # noqa: E501
        :type: object
        """

        self._entity_name = entity_name

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


        :return: The status of this Job.  # noqa: E501
        :rtype: object
        """
        return self._status

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


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

        self._status = status

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


        :return: The configuration of this Job.  # noqa: E501
        :rtype: object
        """
        return self._configuration

    @configuration.setter
    def configuration(self, configuration):
        """Sets the configuration of this Job.


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

        self._configuration = configuration

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


        :return: The result of this Job.  # noqa: E501
        :rtype: object
        """
        return self._result

    @result.setter
    def result(self, result):
        """Sets the result of this Job.


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

        self._result = result

    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(Job, 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, Job):
            return False

        return self.__dict__ == other.__dict__

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