# coding: utf-8

"""
    Task Execution Service

    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
"""


import pprint
import re  # noqa: F401

import six

from libica.openapi.libtes.configuration import Configuration


class Resources(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 = {
        'type': 'str',
        'size': 'str',
        'cpu_cores': 'float',
        'memory_gb': 'float',
        'hardware': 'list[str]',
        'tier': 'str'
    }

    attribute_map = {
        'type': 'type',
        'size': 'size',
        'cpu_cores': 'cpuCores',
        'memory_gb': 'memoryGb',
        'hardware': 'hardware',
        'tier': 'tier'
    }

    def __init__(self, type=None, size=None, cpu_cores=None, memory_gb=None, hardware=None, tier=None, local_vars_configuration=None):  # noqa: E501
        """Resources - 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._type = None
        self._size = None
        self._cpu_cores = None
        self._memory_gb = None
        self._hardware = None
        self._tier = None
        self.discriminator = None

        if type is not None:
            self.type = type
        if size is not None:
            self.size = size
        if cpu_cores is not None:
            self.cpu_cores = cpu_cores
        if memory_gb is not None:
            self.memory_gb = memory_gb
        if hardware is not None:
            self.hardware = hardware
        if tier is not None:
            self.tier = tier

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


        :return: The type of this Resources.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this Resources.


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

        self._type = type

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


        :return: The size of this Resources.  # noqa: E501
        :rtype: str
        """
        return self._size

    @size.setter
    def size(self, size):
        """Sets the size of this Resources.


        :param size: The size of this Resources.  # noqa: E501
        :type: str
        """

        self._size = size

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


        :return: The cpu_cores of this Resources.  # noqa: E501
        :rtype: float
        """
        return self._cpu_cores

    @cpu_cores.setter
    def cpu_cores(self, cpu_cores):
        """Sets the cpu_cores of this Resources.


        :param cpu_cores: The cpu_cores of this Resources.  # noqa: E501
        :type: float
        """

        self._cpu_cores = cpu_cores

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


        :return: The memory_gb of this Resources.  # noqa: E501
        :rtype: float
        """
        return self._memory_gb

    @memory_gb.setter
    def memory_gb(self, memory_gb):
        """Sets the memory_gb of this Resources.


        :param memory_gb: The memory_gb of this Resources.  # noqa: E501
        :type: float
        """

        self._memory_gb = memory_gb

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


        :return: The hardware of this Resources.  # noqa: E501
        :rtype: list[str]
        """
        return self._hardware

    @hardware.setter
    def hardware(self, hardware):
        """Sets the hardware of this Resources.


        :param hardware: The hardware of this Resources.  # noqa: E501
        :type: list[str]
        """

        self._hardware = hardware

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


        :return: The tier of this Resources.  # noqa: E501
        :rtype: str
        """
        return self._tier

    @tier.setter
    def tier(self, tier):
        """Sets the tier of this Resources.


        :param tier: The tier of this Resources.  # noqa: E501
        :type: str
        """

        self._tier = tier

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

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