# coding: utf-8

"""
    Managed Ray API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


class DecoratedJobQueue(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'id': 'str',
        'user_provided_id': 'str',
        'name': 'str',
        'current_job_queue_state': 'JobQueueState',
        'execution_mode': 'JobQueueExecutionMode',
        'max_concurrency': 'int',
        'idle_timeout_sec': 'int',
        'created_at': 'datetime',
        'creator_id': 'str',
        'creator_email': 'str',
        'compute_config_id': 'str',
        'current_cluster_state': 'SessionState',
        'cluster_id': 'str',
        'total_jobs': 'int',
        'successful_jobs': 'int',
        'failed_jobs': 'int',
        'active_jobs': 'int'
    }

    attribute_map = {
        'id': 'id',
        'user_provided_id': 'user_provided_id',
        'name': 'name',
        'current_job_queue_state': 'current_job_queue_state',
        'execution_mode': 'execution_mode',
        'max_concurrency': 'max_concurrency',
        'idle_timeout_sec': 'idle_timeout_sec',
        'created_at': 'created_at',
        'creator_id': 'creator_id',
        'creator_email': 'creator_email',
        'compute_config_id': 'compute_config_id',
        'current_cluster_state': 'current_cluster_state',
        'cluster_id': 'cluster_id',
        'total_jobs': 'total_jobs',
        'successful_jobs': 'successful_jobs',
        'failed_jobs': 'failed_jobs',
        'active_jobs': 'active_jobs'
    }

    def __init__(self, id=None, user_provided_id=None, name=None, current_job_queue_state=None, execution_mode=None, max_concurrency=None, idle_timeout_sec=None, created_at=None, creator_id=None, creator_email=None, compute_config_id=None, current_cluster_state=None, cluster_id=None, total_jobs=None, successful_jobs=None, failed_jobs=None, active_jobs=None, local_vars_configuration=None):  # noqa: E501
        """DecoratedJobQueue - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._user_provided_id = None
        self._name = None
        self._current_job_queue_state = None
        self._execution_mode = None
        self._max_concurrency = None
        self._idle_timeout_sec = None
        self._created_at = None
        self._creator_id = None
        self._creator_email = None
        self._compute_config_id = None
        self._current_cluster_state = None
        self._cluster_id = None
        self._total_jobs = None
        self._successful_jobs = None
        self._failed_jobs = None
        self._active_jobs = None
        self.discriminator = None

        self.id = id
        self.user_provided_id = user_provided_id
        self.name = name
        self.current_job_queue_state = current_job_queue_state
        self.execution_mode = execution_mode
        self.max_concurrency = max_concurrency
        self.idle_timeout_sec = idle_timeout_sec
        self.created_at = created_at
        self.creator_id = creator_id
        self.creator_email = creator_email
        self.compute_config_id = compute_config_id
        if current_cluster_state is not None:
            self.current_cluster_state = current_cluster_state
        self.cluster_id = cluster_id
        if total_jobs is not None:
            self.total_jobs = total_jobs
        if successful_jobs is not None:
            self.successful_jobs = successful_jobs
        if failed_jobs is not None:
            self.failed_jobs = failed_jobs
        if active_jobs is not None:
            self.active_jobs = active_jobs

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

        Server assigned unique identifier of the job queue.  # noqa: E501

        :return: The id of this DecoratedJobQueue.  # noqa: E501
        :rtype: str
        """
        return self._id

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

        Server assigned unique identifier of the job queue.  # noqa: E501

        :param id: The id of this DecoratedJobQueue.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and id is None:  # noqa: E501
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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

        User provided identifier of the job queue.  # noqa: E501

        :return: The user_provided_id of this DecoratedJobQueue.  # noqa: E501
        :rtype: str
        """
        return self._user_provided_id

    @user_provided_id.setter
    def user_provided_id(self, user_provided_id):
        """Sets the user_provided_id of this DecoratedJobQueue.

        User provided identifier of the job queue.  # noqa: E501

        :param user_provided_id: The user_provided_id of this DecoratedJobQueue.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and user_provided_id is None:  # noqa: E501
            raise ValueError("Invalid value for `user_provided_id`, must not be `None`")  # noqa: E501

        self._user_provided_id = user_provided_id

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

        Name of the job queue. Drived from the field user_provided_id.  # noqa: E501

        :return: The name of this DecoratedJobQueue.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this DecoratedJobQueue.

        Name of the job queue. Drived from the field user_provided_id.  # noqa: E501

        :param name: The name of this DecoratedJobQueue.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and name is None:  # noqa: E501
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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

        The current state of the job queue.  # noqa: E501

        :return: The current_job_queue_state of this DecoratedJobQueue.  # noqa: E501
        :rtype: JobQueueState
        """
        return self._current_job_queue_state

    @current_job_queue_state.setter
    def current_job_queue_state(self, current_job_queue_state):
        """Sets the current_job_queue_state of this DecoratedJobQueue.

        The current state of the job queue.  # noqa: E501

        :param current_job_queue_state: The current_job_queue_state of this DecoratedJobQueue.  # noqa: E501
        :type: JobQueueState
        """
        if self.local_vars_configuration.client_side_validation and current_job_queue_state is None:  # noqa: E501
            raise ValueError("Invalid value for `current_job_queue_state`, must not be `None`")  # noqa: E501

        self._current_job_queue_state = current_job_queue_state

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

        The execution mode of the job queue.  # noqa: E501

        :return: The execution_mode of this DecoratedJobQueue.  # noqa: E501
        :rtype: JobQueueExecutionMode
        """
        return self._execution_mode

    @execution_mode.setter
    def execution_mode(self, execution_mode):
        """Sets the execution_mode of this DecoratedJobQueue.

        The execution mode of the job queue.  # noqa: E501

        :param execution_mode: The execution_mode of this DecoratedJobQueue.  # noqa: E501
        :type: JobQueueExecutionMode
        """
        if self.local_vars_configuration.client_side_validation and execution_mode is None:  # noqa: E501
            raise ValueError("Invalid value for `execution_mode`, must not be `None`")  # noqa: E501

        self._execution_mode = execution_mode

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

        The maximum number of jobs that can be run concurrently.  # noqa: E501

        :return: The max_concurrency of this DecoratedJobQueue.  # noqa: E501
        :rtype: int
        """
        return self._max_concurrency

    @max_concurrency.setter
    def max_concurrency(self, max_concurrency):
        """Sets the max_concurrency of this DecoratedJobQueue.

        The maximum number of jobs that can be run concurrently.  # noqa: E501

        :param max_concurrency: The max_concurrency of this DecoratedJobQueue.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and max_concurrency is None:  # noqa: E501
            raise ValueError("Invalid value for `max_concurrency`, must not be `None`")  # noqa: E501

        self._max_concurrency = max_concurrency

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

        The number of seconds a job can be idle before it is terminated.  # noqa: E501

        :return: The idle_timeout_sec of this DecoratedJobQueue.  # noqa: E501
        :rtype: int
        """
        return self._idle_timeout_sec

    @idle_timeout_sec.setter
    def idle_timeout_sec(self, idle_timeout_sec):
        """Sets the idle_timeout_sec of this DecoratedJobQueue.

        The number of seconds a job can be idle before it is terminated.  # noqa: E501

        :param idle_timeout_sec: The idle_timeout_sec of this DecoratedJobQueue.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and idle_timeout_sec is None:  # noqa: E501
            raise ValueError("Invalid value for `idle_timeout_sec`, must not be `None`")  # noqa: E501

        self._idle_timeout_sec = idle_timeout_sec

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

        Time at which job queue was created.  # noqa: E501

        :return: The created_at of this DecoratedJobQueue.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this DecoratedJobQueue.

        Time at which job queue was created.  # noqa: E501

        :param created_at: The created_at of this DecoratedJobQueue.  # noqa: E501
        :type: datetime
        """
        if self.local_vars_configuration.client_side_validation and created_at is None:  # noqa: E501
            raise ValueError("Invalid value for `created_at`, must not be `None`")  # noqa: E501

        self._created_at = created_at

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

        Identifier of user who created the job queue.  # noqa: E501

        :return: The creator_id of this DecoratedJobQueue.  # noqa: E501
        :rtype: str
        """
        return self._creator_id

    @creator_id.setter
    def creator_id(self, creator_id):
        """Sets the creator_id of this DecoratedJobQueue.

        Identifier of user who created the job queue.  # noqa: E501

        :param creator_id: The creator_id of this DecoratedJobQueue.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and creator_id is None:  # noqa: E501
            raise ValueError("Invalid value for `creator_id`, must not be `None`")  # noqa: E501

        self._creator_id = creator_id

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

        Email of user who created the job queue.  # noqa: E501

        :return: The creator_email of this DecoratedJobQueue.  # noqa: E501
        :rtype: str
        """
        return self._creator_email

    @creator_email.setter
    def creator_email(self, creator_email):
        """Sets the creator_email of this DecoratedJobQueue.

        Email of user who created the job queue.  # noqa: E501

        :param creator_email: The creator_email of this DecoratedJobQueue.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and creator_email is None:  # noqa: E501
            raise ValueError("Invalid value for `creator_email`, must not be `None`")  # noqa: E501

        self._creator_email = creator_email

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

        The compute config id for the job queue  # noqa: E501

        :return: The compute_config_id of this DecoratedJobQueue.  # noqa: E501
        :rtype: str
        """
        return self._compute_config_id

    @compute_config_id.setter
    def compute_config_id(self, compute_config_id):
        """Sets the compute_config_id of this DecoratedJobQueue.

        The compute config id for the job queue  # noqa: E501

        :param compute_config_id: The compute_config_id of this DecoratedJobQueue.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and compute_config_id is None:  # noqa: E501
            raise ValueError("Invalid value for `compute_config_id`, must not be `None`")  # noqa: E501

        self._compute_config_id = compute_config_id

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

        The current state of the cluster associated with the job queue.  # noqa: E501

        :return: The current_cluster_state of this DecoratedJobQueue.  # noqa: E501
        :rtype: SessionState
        """
        return self._current_cluster_state

    @current_cluster_state.setter
    def current_cluster_state(self, current_cluster_state):
        """Sets the current_cluster_state of this DecoratedJobQueue.

        The current state of the cluster associated with the job queue.  # noqa: E501

        :param current_cluster_state: The current_cluster_state of this DecoratedJobQueue.  # noqa: E501
        :type: SessionState
        """

        self._current_cluster_state = current_cluster_state

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

        The cluster id associated with the job queue.  # noqa: E501

        :return: The cluster_id of this DecoratedJobQueue.  # noqa: E501
        :rtype: str
        """
        return self._cluster_id

    @cluster_id.setter
    def cluster_id(self, cluster_id):
        """Sets the cluster_id of this DecoratedJobQueue.

        The cluster id associated with the job queue.  # noqa: E501

        :param cluster_id: The cluster_id of this DecoratedJobQueue.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and cluster_id is None:  # noqa: E501
            raise ValueError("Invalid value for `cluster_id`, must not be `None`")  # noqa: E501

        self._cluster_id = cluster_id

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

        Total number of jobs in the job queue.  # noqa: E501

        :return: The total_jobs of this DecoratedJobQueue.  # noqa: E501
        :rtype: int
        """
        return self._total_jobs

    @total_jobs.setter
    def total_jobs(self, total_jobs):
        """Sets the total_jobs of this DecoratedJobQueue.

        Total number of jobs in the job queue.  # noqa: E501

        :param total_jobs: The total_jobs of this DecoratedJobQueue.  # noqa: E501
        :type: int
        """

        self._total_jobs = total_jobs

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

        Number of successful jobs in the job queue.  # noqa: E501

        :return: The successful_jobs of this DecoratedJobQueue.  # noqa: E501
        :rtype: int
        """
        return self._successful_jobs

    @successful_jobs.setter
    def successful_jobs(self, successful_jobs):
        """Sets the successful_jobs of this DecoratedJobQueue.

        Number of successful jobs in the job queue.  # noqa: E501

        :param successful_jobs: The successful_jobs of this DecoratedJobQueue.  # noqa: E501
        :type: int
        """

        self._successful_jobs = successful_jobs

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

        Number of failed jobs in the job queue.  # noqa: E501

        :return: The failed_jobs of this DecoratedJobQueue.  # noqa: E501
        :rtype: int
        """
        return self._failed_jobs

    @failed_jobs.setter
    def failed_jobs(self, failed_jobs):
        """Sets the failed_jobs of this DecoratedJobQueue.

        Number of failed jobs in the job queue.  # noqa: E501

        :param failed_jobs: The failed_jobs of this DecoratedJobQueue.  # noqa: E501
        :type: int
        """

        self._failed_jobs = failed_jobs

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

        Number of active jobs in the job queue.  # noqa: E501

        :return: The active_jobs of this DecoratedJobQueue.  # noqa: E501
        :rtype: int
        """
        return self._active_jobs

    @active_jobs.setter
    def active_jobs(self, active_jobs):
        """Sets the active_jobs of this DecoratedJobQueue.

        Number of active jobs in the job queue.  # noqa: E501

        :param active_jobs: The active_jobs of this DecoratedJobQueue.  # noqa: E501
        :type: int
        """

        self._active_jobs = active_jobs

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

        for attr, _ in six.iteritems(self.openapi_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

        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, DecoratedJobQueue):
            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, DecoratedJobQueue):
            return True

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