# coding: utf-8

"""
    Anyscale 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 anyscale_client.configuration import Configuration


class UXInstance(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 = {
        'cpu_count': 'int',
        'memory_in_gib': 'float',
        'gpu_type': 'str',
        'gpu_count': 'int',
        'cloud_type': 'CloudType',
        'support_type': 'str',
        'name': 'str',
        'family': 'str',
        'group_key': 'str',
        'anyscale_credits_per_hour': 'float',
        'available_in_anyscale_hosted': 'bool'
    }

    attribute_map = {
        'cpu_count': 'cpu_count',
        'memory_in_gib': 'memory_in_gib',
        'gpu_type': 'gpu_type',
        'gpu_count': 'gpu_count',
        'cloud_type': 'cloud_type',
        'support_type': 'support_type',
        'name': 'name',
        'family': 'family',
        'group_key': 'group_key',
        'anyscale_credits_per_hour': 'anyscale_credits_per_hour',
        'available_in_anyscale_hosted': 'available_in_anyscale_hosted'
    }

    def __init__(self, cpu_count=None, memory_in_gib=None, gpu_type=None, gpu_count=None, cloud_type=None, support_type=None, name=None, family=None, group_key=None, anyscale_credits_per_hour=None, available_in_anyscale_hosted=None, local_vars_configuration=None):  # noqa: E501
        """UXInstance - 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._cpu_count = None
        self._memory_in_gib = None
        self._gpu_type = None
        self._gpu_count = None
        self._cloud_type = None
        self._support_type = None
        self._name = None
        self._family = None
        self._group_key = None
        self._anyscale_credits_per_hour = None
        self._available_in_anyscale_hosted = None
        self.discriminator = None

        self.cpu_count = cpu_count
        self.memory_in_gib = memory_in_gib
        if gpu_type is not None:
            self.gpu_type = gpu_type
        if gpu_count is not None:
            self.gpu_count = gpu_count
        self.cloud_type = cloud_type
        self.support_type = support_type
        self.name = name
        self.family = family
        self.group_key = group_key
        self.anyscale_credits_per_hour = anyscale_credits_per_hour
        self.available_in_anyscale_hosted = available_in_anyscale_hosted

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

        The number of CPUs  # noqa: E501

        :return: The cpu_count of this UXInstance.  # noqa: E501
        :rtype: int
        """
        return self._cpu_count

    @cpu_count.setter
    def cpu_count(self, cpu_count):
        """Sets the cpu_count of this UXInstance.

        The number of CPUs  # noqa: E501

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

        self._cpu_count = cpu_count

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

        The amount of memory in GiB  # noqa: E501

        :return: The memory_in_gib of this UXInstance.  # noqa: E501
        :rtype: float
        """
        return self._memory_in_gib

    @memory_in_gib.setter
    def memory_in_gib(self, memory_in_gib):
        """Sets the memory_in_gib of this UXInstance.

        The amount of memory in GiB  # noqa: E501

        :param memory_in_gib: The memory_in_gib of this UXInstance.  # noqa: E501
        :type: float
        """
        if self.local_vars_configuration.client_side_validation and memory_in_gib is None:  # noqa: E501
            raise ValueError("Invalid value for `memory_in_gib`, must not be `None`")  # noqa: E501

        self._memory_in_gib = memory_in_gib

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

        The type of GPU  # noqa: E501

        :return: The gpu_type of this UXInstance.  # noqa: E501
        :rtype: str
        """
        return self._gpu_type

    @gpu_type.setter
    def gpu_type(self, gpu_type):
        """Sets the gpu_type of this UXInstance.

        The type of GPU  # noqa: E501

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

        self._gpu_type = gpu_type

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

        The number of GPUs  # noqa: E501

        :return: The gpu_count of this UXInstance.  # noqa: E501
        :rtype: int
        """
        return self._gpu_count

    @gpu_count.setter
    def gpu_count(self, gpu_count):
        """Sets the gpu_count of this UXInstance.

        The number of GPUs  # noqa: E501

        :param gpu_count: The gpu_count of this UXInstance.  # noqa: E501
        :type: int
        """

        self._gpu_count = gpu_count

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

        The cloud provider  # noqa: E501

        :return: The cloud_type of this UXInstance.  # noqa: E501
        :rtype: CloudType
        """
        return self._cloud_type

    @cloud_type.setter
    def cloud_type(self, cloud_type):
        """Sets the cloud_type of this UXInstance.

        The cloud provider  # noqa: E501

        :param cloud_type: The cloud_type of this UXInstance.  # noqa: E501
        :type: CloudType
        """
        if self.local_vars_configuration.client_side_validation and cloud_type is None:  # noqa: E501
            raise ValueError("Invalid value for `cloud_type`, must not be `None`")  # noqa: E501

        self._cloud_type = cloud_type

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

        The instance should be shown in the UI and through API (SDK/CLI).  # noqa: E501

        :return: The support_type of this UXInstance.  # noqa: E501
        :rtype: str
        """
        return self._support_type

    @support_type.setter
    def support_type(self, support_type):
        """Sets the support_type of this UXInstance.

        The instance should be shown in the UI and through API (SDK/CLI).  # noqa: E501

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

        self._support_type = support_type

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

        Name of this instance type.  # noqa: E501

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

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

        Name of this instance type.  # noqa: E501

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

        self._name = name

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

        Family of this instance type.  # noqa: E501

        :return: The family of this UXInstance.  # noqa: E501
        :rtype: str
        """
        return self._family

    @family.setter
    def family(self, family):
        """Sets the family of this UXInstance.

        Family of this instance type.  # noqa: E501

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

        self._family = family

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

        The groupKey indicates which instance types are similar and should be grouped together  # noqa: E501

        :return: The group_key of this UXInstance.  # noqa: E501
        :rtype: str
        """
        return self._group_key

    @group_key.setter
    def group_key(self, group_key):
        """Sets the group_key of this UXInstance.

        The groupKey indicates which instance types are similar and should be grouped together  # noqa: E501

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

        self._group_key = group_key

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

        Anyscale credits per hour for the instance.  # noqa: E501

        :return: The anyscale_credits_per_hour of this UXInstance.  # noqa: E501
        :rtype: float
        """
        return self._anyscale_credits_per_hour

    @anyscale_credits_per_hour.setter
    def anyscale_credits_per_hour(self, anyscale_credits_per_hour):
        """Sets the anyscale_credits_per_hour of this UXInstance.

        Anyscale credits per hour for the instance.  # noqa: E501

        :param anyscale_credits_per_hour: The anyscale_credits_per_hour of this UXInstance.  # noqa: E501
        :type: float
        """
        if self.local_vars_configuration.client_side_validation and anyscale_credits_per_hour is None:  # noqa: E501
            raise ValueError("Invalid value for `anyscale_credits_per_hour`, must not be `None`")  # noqa: E501

        self._anyscale_credits_per_hour = anyscale_credits_per_hour

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

        If the instance type is available for anyscale hosted.  # noqa: E501

        :return: The available_in_anyscale_hosted of this UXInstance.  # noqa: E501
        :rtype: bool
        """
        return self._available_in_anyscale_hosted

    @available_in_anyscale_hosted.setter
    def available_in_anyscale_hosted(self, available_in_anyscale_hosted):
        """Sets the available_in_anyscale_hosted of this UXInstance.

        If the instance type is available for anyscale hosted.  # noqa: E501

        :param available_in_anyscale_hosted: The available_in_anyscale_hosted of this UXInstance.  # noqa: E501
        :type: bool
        """
        if self.local_vars_configuration.client_side_validation and available_in_anyscale_hosted is None:  # noqa: E501
            raise ValueError("Invalid value for `available_in_anyscale_hosted`, must not be `None`")  # noqa: E501

        self._available_in_anyscale_hosted = available_in_anyscale_hosted

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

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