# 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 DescribeMachinePoolMachinesFilters(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 = {
        'allocation_states': 'list[MachineAllocationState]',
        'partitions': 'list[str]',
        'machine_type_partition_filters': 'list[MachineTypePartitionFilter]'
    }

    attribute_map = {
        'allocation_states': 'allocation_states',
        'partitions': 'partitions',
        'machine_type_partition_filters': 'machine_type_partition_filters'
    }

    def __init__(self, allocation_states=None, partitions=None, machine_type_partition_filters=None, local_vars_configuration=None):  # noqa: E501
        """DescribeMachinePoolMachinesFilters - 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._allocation_states = None
        self._partitions = None
        self._machine_type_partition_filters = None
        self.discriminator = None

        if allocation_states is not None:
            self.allocation_states = allocation_states
        if partitions is not None:
            self.partitions = partitions
        if machine_type_partition_filters is not None:
            self.machine_type_partition_filters = machine_type_partition_filters

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

        The allocation states to filter by.  # noqa: E501

        :return: The allocation_states of this DescribeMachinePoolMachinesFilters.  # noqa: E501
        :rtype: list[MachineAllocationState]
        """
        return self._allocation_states

    @allocation_states.setter
    def allocation_states(self, allocation_states):
        """Sets the allocation_states of this DescribeMachinePoolMachinesFilters.

        The allocation states to filter by.  # noqa: E501

        :param allocation_states: The allocation_states of this DescribeMachinePoolMachinesFilters.  # noqa: E501
        :type: list[MachineAllocationState]
        """

        self._allocation_states = allocation_states

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

        The partitions to filter by (for backward compatibility).  # noqa: E501

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

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

        The partitions to filter by (for backward compatibility).  # noqa: E501

        :param partitions: The partitions of this DescribeMachinePoolMachinesFilters.  # noqa: E501
        :type: list[str]
        """

        self._partitions = partitions

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

        The machine_type, partition pair to filter by. If not provided, no filtering is performed.  # noqa: E501

        :return: The machine_type_partition_filters of this DescribeMachinePoolMachinesFilters.  # noqa: E501
        :rtype: list[MachineTypePartitionFilter]
        """
        return self._machine_type_partition_filters

    @machine_type_partition_filters.setter
    def machine_type_partition_filters(self, machine_type_partition_filters):
        """Sets the machine_type_partition_filters of this DescribeMachinePoolMachinesFilters.

        The machine_type, partition pair to filter by. If not provided, no filtering is performed.  # noqa: E501

        :param machine_type_partition_filters: The machine_type_partition_filters of this DescribeMachinePoolMachinesFilters.  # noqa: E501
        :type: list[MachineTypePartitionFilter]
        """

        self._machine_type_partition_filters = machine_type_partition_filters

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

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