# 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 SummarizeMachinePoolResponse(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 = {
        'partitions': 'list[PartitionInfo]',
        'running_workloads': 'int',
        'queued_workloads': 'int'
    }

    attribute_map = {
        'partitions': 'partitions',
        'running_workloads': 'running_workloads',
        'queued_workloads': 'queued_workloads'
    }

    def __init__(self, partitions=None, running_workloads=None, queued_workloads=None, local_vars_configuration=None):  # noqa: E501
        """SummarizeMachinePoolResponse - 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._partitions = None
        self._running_workloads = None
        self._queued_workloads = None
        self.discriminator = None

        self.partitions = partitions
        self.running_workloads = running_workloads
        self.queued_workloads = queued_workloads

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

        Summary for each partition in the machine pool.  # noqa: E501

        :return: The partitions of this SummarizeMachinePoolResponse.  # noqa: E501
        :rtype: list[PartitionInfo]
        """
        return self._partitions

    @partitions.setter
    def partitions(self, partitions):
        """Sets the partitions of this SummarizeMachinePoolResponse.

        Summary for each partition in the machine pool.  # noqa: E501

        :param partitions: The partitions of this SummarizeMachinePoolResponse.  # noqa: E501
        :type: list[PartitionInfo]
        """
        if self.local_vars_configuration.client_side_validation and partitions is None:  # noqa: E501
            raise ValueError("Invalid value for `partitions`, must not be `None`")  # noqa: E501

        self._partitions = partitions

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

        The number of running workloads.  # noqa: E501

        :return: The running_workloads of this SummarizeMachinePoolResponse.  # noqa: E501
        :rtype: int
        """
        return self._running_workloads

    @running_workloads.setter
    def running_workloads(self, running_workloads):
        """Sets the running_workloads of this SummarizeMachinePoolResponse.

        The number of running workloads.  # noqa: E501

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

        self._running_workloads = running_workloads

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

        The number of queued workloads.  # noqa: E501

        :return: The queued_workloads of this SummarizeMachinePoolResponse.  # noqa: E501
        :rtype: int
        """
        return self._queued_workloads

    @queued_workloads.setter
    def queued_workloads(self, queued_workloads):
        """Sets the queued_workloads of this SummarizeMachinePoolResponse.

        The number of queued workloads.  # noqa: E501

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

        self._queued_workloads = queued_workloads

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

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