# coding: utf-8

"""
    GraphDB Workbench API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from graphdb.graphdb_workbench.configuration import Configuration


class WorkerNode(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 = {
        'average_task_time': 'int',
        'completed_tasks': 'int',
        'failed_tasks': 'int',
        'fingerprint': 'str',
        'is_local': 'bool',
        'last_error': 'str',
        'location': 'str',
        'running_tasks': 'int',
        'status': 'str',
        'type': 'str'
    }

    attribute_map = {
        'average_task_time': 'averageTaskTime',
        'completed_tasks': 'completedTasks',
        'failed_tasks': 'failedTasks',
        'fingerprint': 'fingerprint',
        'is_local': 'isLocal',
        'last_error': 'lastError',
        'location': 'location',
        'running_tasks': 'runningTasks',
        'status': 'status',
        'type': 'type'
    }

    def __init__(self, average_task_time=None, completed_tasks=None, failed_tasks=None, fingerprint=None, is_local=None, last_error=None, location=None, running_tasks=None, status=None, type=None, _configuration=None):  # noqa: E501
        """WorkerNode - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._average_task_time = None
        self._completed_tasks = None
        self._failed_tasks = None
        self._fingerprint = None
        self._is_local = None
        self._last_error = None
        self._location = None
        self._running_tasks = None
        self._status = None
        self._type = None
        self.discriminator = None

        if average_task_time is not None:
            self.average_task_time = average_task_time
        if completed_tasks is not None:
            self.completed_tasks = completed_tasks
        if failed_tasks is not None:
            self.failed_tasks = failed_tasks
        if fingerprint is not None:
            self.fingerprint = fingerprint
        if is_local is not None:
            self.is_local = is_local
        if last_error is not None:
            self.last_error = last_error
        if location is not None:
            self.location = location
        if running_tasks is not None:
            self.running_tasks = running_tasks
        if status is not None:
            self.status = status
        if type is not None:
            self.type = type

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


        :return: The average_task_time of this WorkerNode.  # noqa: E501
        :rtype: int
        """
        return self._average_task_time

    @average_task_time.setter
    def average_task_time(self, average_task_time):
        """Sets the average_task_time of this WorkerNode.


        :param average_task_time: The average_task_time of this WorkerNode.  # noqa: E501
        :type: int
        """

        self._average_task_time = average_task_time

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


        :return: The completed_tasks of this WorkerNode.  # noqa: E501
        :rtype: int
        """
        return self._completed_tasks

    @completed_tasks.setter
    def completed_tasks(self, completed_tasks):
        """Sets the completed_tasks of this WorkerNode.


        :param completed_tasks: The completed_tasks of this WorkerNode.  # noqa: E501
        :type: int
        """

        self._completed_tasks = completed_tasks

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


        :return: The failed_tasks of this WorkerNode.  # noqa: E501
        :rtype: int
        """
        return self._failed_tasks

    @failed_tasks.setter
    def failed_tasks(self, failed_tasks):
        """Sets the failed_tasks of this WorkerNode.


        :param failed_tasks: The failed_tasks of this WorkerNode.  # noqa: E501
        :type: int
        """

        self._failed_tasks = failed_tasks

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


        :return: The fingerprint of this WorkerNode.  # noqa: E501
        :rtype: str
        """
        return self._fingerprint

    @fingerprint.setter
    def fingerprint(self, fingerprint):
        """Sets the fingerprint of this WorkerNode.


        :param fingerprint: The fingerprint of this WorkerNode.  # noqa: E501
        :type: str
        """

        self._fingerprint = fingerprint

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


        :return: The is_local of this WorkerNode.  # noqa: E501
        :rtype: bool
        """
        return self._is_local

    @is_local.setter
    def is_local(self, is_local):
        """Sets the is_local of this WorkerNode.


        :param is_local: The is_local of this WorkerNode.  # noqa: E501
        :type: bool
        """

        self._is_local = is_local

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


        :return: The last_error of this WorkerNode.  # noqa: E501
        :rtype: str
        """
        return self._last_error

    @last_error.setter
    def last_error(self, last_error):
        """Sets the last_error of this WorkerNode.


        :param last_error: The last_error of this WorkerNode.  # noqa: E501
        :type: str
        """

        self._last_error = last_error

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


        :return: The location of this WorkerNode.  # noqa: E501
        :rtype: str
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this WorkerNode.


        :param location: The location of this WorkerNode.  # noqa: E501
        :type: str
        """

        self._location = location

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


        :return: The running_tasks of this WorkerNode.  # noqa: E501
        :rtype: int
        """
        return self._running_tasks

    @running_tasks.setter
    def running_tasks(self, running_tasks):
        """Sets the running_tasks of this WorkerNode.


        :param running_tasks: The running_tasks of this WorkerNode.  # noqa: E501
        :type: int
        """

        self._running_tasks = running_tasks

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


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

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


        :param status: The status of this WorkerNode.  # noqa: E501
        :type: str
        """

        self._status = status

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


        :return: The type of this WorkerNode.  # noqa: E501
        :rtype: str
        """
        return self._type

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


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

        self._type = type

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
