# coding: utf-8
"""
    external/v1/external_session_service.proto

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: version not set

    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

from grid.openapi.configuration import Configuration


class V1InstanceType(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_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.
    """
    swagger_types = {'cpu': 'str', 'gpu': 'str', 'hourly_cost': 'float', 'memory': 'str', 'name': 'str', 'spot': 'bool'}

    attribute_map = {
        'cpu': 'cpu',
        'gpu': 'gpu',
        'hourly_cost': 'hourlyCost',
        'memory': 'memory',
        'name': 'name',
        'spot': 'spot'
    }

    def __init__(
        self,
        cpu=None,
        gpu=None,
        hourly_cost=None,
        memory=None,
        name=None,
        spot=None,
        _configuration=None
    ):  # noqa: E501
        """V1InstanceType - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._cpu = None
        self._gpu = None
        self._hourly_cost = None
        self._memory = None
        self._name = None
        self._spot = None
        self.discriminator = None

        if cpu is not None:
            self.cpu = cpu
        if gpu is not None:
            self.gpu = gpu
        if hourly_cost is not None:
            self.hourly_cost = hourly_cost
        if memory is not None:
            self.memory = memory
        if name is not None:
            self.name = name
        if spot is not None:
            self.spot = spot

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


        :return: The cpu of this V1InstanceType.  # noqa: E501
        :rtype: str
        """
        return self._cpu

    @cpu.setter
    def cpu(self, cpu):
        """Sets the cpu of this V1InstanceType.


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

        self._cpu = cpu

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


        :return: The gpu of this V1InstanceType.  # noqa: E501
        :rtype: str
        """
        return self._gpu

    @gpu.setter
    def gpu(self, gpu):
        """Sets the gpu of this V1InstanceType.


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

        self._gpu = gpu

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


        :return: The hourly_cost of this V1InstanceType.  # noqa: E501
        :rtype: float
        """
        return self._hourly_cost

    @hourly_cost.setter
    def hourly_cost(self, hourly_cost):
        """Sets the hourly_cost of this V1InstanceType.


        :param hourly_cost: The hourly_cost of this V1InstanceType.  # noqa: E501
        :type: float
        """

        self._hourly_cost = hourly_cost

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


        :return: The memory of this V1InstanceType.  # noqa: E501
        :rtype: str
        """
        return self._memory

    @memory.setter
    def memory(self, memory):
        """Sets the memory of this V1InstanceType.


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

        self._memory = memory

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


        :return: The name of this V1InstanceType.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this V1InstanceType.


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

        self._name = name

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


        :return: The spot of this V1InstanceType.  # noqa: E501
        :rtype: bool
        """
        return self._spot

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


        :param spot: The spot of this V1InstanceType.  # noqa: E501
        :type: bool
        """

        self._spot = spot

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

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(V1InstanceType, dict):
            for key, value in self.items():
                result[key] = 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, V1InstanceType):
            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, V1InstanceType):
            return True

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