# coding: utf-8

"""
    Aron API

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

    The version of the OpenAPI document: 1.0.0
    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 openapi_client.configuration import Configuration


class V1ResourcesForm(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 = {
        'cluster': 'str',
        'cluster_id': 'int',
        'node_id': 'list[int]',
        'node_names': 'list[str]',
        'preset': 'str',
        'preset_id': 'int',
        'requests': 'V1ResourceRequest',
        'spot': 'str'
    }

    attribute_map = {
        'cluster': 'cluster',
        'cluster_id': 'cluster_id',
        'node_id': 'node_id',
        'node_names': 'node_names',
        'preset': 'preset',
        'preset_id': 'preset_id',
        'requests': 'requests',
        'spot': 'spot'
    }

    def __init__(self, cluster=None, cluster_id=None, node_id=None, node_names=None, preset=None, preset_id=None, requests=None, spot=None, local_vars_configuration=None):  # noqa: E501
        """V1ResourcesForm - 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._cluster = None
        self._cluster_id = None
        self._node_id = None
        self._node_names = None
        self._preset = None
        self._preset_id = None
        self._requests = None
        self._spot = None
        self.discriminator = None

        self.cluster = cluster
        self.cluster_id = cluster_id
        if node_id is not None:
            self.node_id = node_id
        if node_names is not None:
            self.node_names = node_names
        self.preset = preset
        self.preset_id = preset_id
        if requests is not None:
            self.requests = requests
        self.spot = spot

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


        :return: The cluster of this V1ResourcesForm.  # noqa: E501
        :rtype: str
        """
        return self._cluster

    @cluster.setter
    def cluster(self, cluster):
        """Sets the cluster of this V1ResourcesForm.


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

        self._cluster = cluster

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


        :return: The cluster_id of this V1ResourcesForm.  # noqa: E501
        :rtype: int
        """
        return self._cluster_id

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


        :param cluster_id: The cluster_id of this V1ResourcesForm.  # noqa: E501
        :type cluster_id: int
        """

        self._cluster_id = cluster_id

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


        :return: The node_id of this V1ResourcesForm.  # noqa: E501
        :rtype: list[int]
        """
        return self._node_id

    @node_id.setter
    def node_id(self, node_id):
        """Sets the node_id of this V1ResourcesForm.


        :param node_id: The node_id of this V1ResourcesForm.  # noqa: E501
        :type node_id: list[int]
        """

        self._node_id = node_id

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


        :return: The node_names of this V1ResourcesForm.  # noqa: E501
        :rtype: list[str]
        """
        return self._node_names

    @node_names.setter
    def node_names(self, node_names):
        """Sets the node_names of this V1ResourcesForm.


        :param node_names: The node_names of this V1ResourcesForm.  # noqa: E501
        :type node_names: list[str]
        """

        self._node_names = node_names

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


        :return: The preset of this V1ResourcesForm.  # noqa: E501
        :rtype: str
        """
        return self._preset

    @preset.setter
    def preset(self, preset):
        """Sets the preset of this V1ResourcesForm.


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

        self._preset = preset

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


        :return: The preset_id of this V1ResourcesForm.  # noqa: E501
        :rtype: int
        """
        return self._preset_id

    @preset_id.setter
    def preset_id(self, preset_id):
        """Sets the preset_id of this V1ResourcesForm.


        :param preset_id: The preset_id of this V1ResourcesForm.  # noqa: E501
        :type preset_id: int
        """

        self._preset_id = preset_id

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


        :return: The requests of this V1ResourcesForm.  # noqa: E501
        :rtype: V1ResourceRequest
        """
        return self._requests

    @requests.setter
    def requests(self, requests):
        """Sets the requests of this V1ResourcesForm.


        :param requests: The requests of this V1ResourcesForm.  # noqa: E501
        :type requests: V1ResourceRequest
        """

        self._requests = requests

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

        oneof:<empty string>,SpotOnly,SpotFirst,OnDemandOnly  # noqa: E501

        :return: The spot of this V1ResourcesForm.  # noqa: E501
        :rtype: str
        """
        return self._spot

    @spot.setter
    def spot(self, spot):
        """Sets the spot of this V1ResourcesForm.

        oneof:<empty string>,SpotOnly,SpotFirst,OnDemandOnly  # noqa: E501

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

        self._spot = spot

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

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