# coding: utf-8

"""
    Canopy.Api

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

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


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from canopy.openapi.configuration import Configuration


class GetPoolsItem(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 = {
        'pool_id': 'object',
        'current_dedicated': 'int',
        'target_dedicated': 'int',
        'current_low_priority': 'int',
        'target_low_priority': 'int',
        'intervals': 'list[GetPoolsItemInterval]'
    }

    attribute_map = {
        'pool_id': 'poolId',
        'current_dedicated': 'currentDedicated',
        'target_dedicated': 'targetDedicated',
        'current_low_priority': 'currentLowPriority',
        'target_low_priority': 'targetLowPriority',
        'intervals': 'intervals'
    }

    def __init__(self, pool_id=None, current_dedicated=None, target_dedicated=None, current_low_priority=None, target_low_priority=None, intervals=None, local_vars_configuration=None):  # noqa: E501
        """GetPoolsItem - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._pool_id = None
        self._current_dedicated = None
        self._target_dedicated = None
        self._current_low_priority = None
        self._target_low_priority = None
        self._intervals = None
        self.discriminator = None

        self.pool_id = pool_id
        self.current_dedicated = current_dedicated
        self.target_dedicated = target_dedicated
        self.current_low_priority = current_low_priority
        self.target_low_priority = target_low_priority
        self.intervals = intervals

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


        :return: The pool_id of this GetPoolsItem.  # noqa: E501
        :rtype: object
        """
        return self._pool_id

    @pool_id.setter
    def pool_id(self, pool_id):
        """Sets the pool_id of this GetPoolsItem.


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

        self._pool_id = pool_id

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


        :return: The current_dedicated of this GetPoolsItem.  # noqa: E501
        :rtype: int
        """
        return self._current_dedicated

    @current_dedicated.setter
    def current_dedicated(self, current_dedicated):
        """Sets the current_dedicated of this GetPoolsItem.


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

        self._current_dedicated = current_dedicated

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


        :return: The target_dedicated of this GetPoolsItem.  # noqa: E501
        :rtype: int
        """
        return self._target_dedicated

    @target_dedicated.setter
    def target_dedicated(self, target_dedicated):
        """Sets the target_dedicated of this GetPoolsItem.


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

        self._target_dedicated = target_dedicated

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


        :return: The current_low_priority of this GetPoolsItem.  # noqa: E501
        :rtype: int
        """
        return self._current_low_priority

    @current_low_priority.setter
    def current_low_priority(self, current_low_priority):
        """Sets the current_low_priority of this GetPoolsItem.


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

        self._current_low_priority = current_low_priority

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


        :return: The target_low_priority of this GetPoolsItem.  # noqa: E501
        :rtype: int
        """
        return self._target_low_priority

    @target_low_priority.setter
    def target_low_priority(self, target_low_priority):
        """Sets the target_low_priority of this GetPoolsItem.


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

        self._target_low_priority = target_low_priority

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


        :return: The intervals of this GetPoolsItem.  # noqa: E501
        :rtype: list[GetPoolsItemInterval]
        """
        return self._intervals

    @intervals.setter
    def intervals(self, intervals):
        """Sets the intervals of this GetPoolsItem.


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

        self._intervals = intervals

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, GetPoolsItem):
            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, GetPoolsItem):
            return True

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