# coding: utf-8

"""
    Cudo Compute service

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

    OpenAPI spec version: 1.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from cudo_compute.configuration import Configuration


class GpuModel(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 = {
        'id': 'str',
        'vendor_name': 'str',
        'model_name': 'str',
        'memory_gib': 'int'
    }

    attribute_map = {
        'id': 'id',
        'vendor_name': 'vendorName',
        'model_name': 'modelName',
        'memory_gib': 'memoryGib'
    }

    def __init__(self, id=None, vendor_name=None, model_name=None, memory_gib=None, _configuration=None):  # noqa: E501
        """GpuModel - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._vendor_name = None
        self._model_name = None
        self._memory_gib = None
        self.discriminator = None

        self.id = id
        self.vendor_name = vendor_name
        self.model_name = model_name
        self.memory_gib = memory_gib

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


        :return: The id of this GpuModel.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this GpuModel.


        :param id: The id of this GpuModel.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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


        :return: The vendor_name of this GpuModel.  # noqa: E501
        :rtype: str
        """
        return self._vendor_name

    @vendor_name.setter
    def vendor_name(self, vendor_name):
        """Sets the vendor_name of this GpuModel.


        :param vendor_name: The vendor_name of this GpuModel.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and vendor_name is None:
            raise ValueError("Invalid value for `vendor_name`, must not be `None`")  # noqa: E501

        self._vendor_name = vendor_name

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


        :return: The model_name of this GpuModel.  # noqa: E501
        :rtype: str
        """
        return self._model_name

    @model_name.setter
    def model_name(self, model_name):
        """Sets the model_name of this GpuModel.


        :param model_name: The model_name of this GpuModel.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and model_name is None:
            raise ValueError("Invalid value for `model_name`, must not be `None`")  # noqa: E501

        self._model_name = model_name

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


        :return: The memory_gib of this GpuModel.  # noqa: E501
        :rtype: int
        """
        return self._memory_gib

    @memory_gib.setter
    def memory_gib(self, memory_gib):
        """Sets the memory_gib of this GpuModel.


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

        self._memory_gib = memory_gib

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

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