# 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 ListVMMachineTypesResponse(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 = {
        'count_vm_available': 'int',
        'cpu_models': 'list[CpuModelCategory]',
        'data_centers': 'list[DataCenterCategory]',
        'gpu_models': 'list[GpuModelCategory]',
        'host_configs': 'list[HostConfigCategory]',
        'max_gpu': 'int',
        'max_memory_gib': 'int',
        'max_vcpu': 'int',
        'request': 'ListVMMachineTypesRequest'
    }

    attribute_map = {
        'count_vm_available': 'countVmAvailable',
        'cpu_models': 'cpuModels',
        'data_centers': 'dataCenters',
        'gpu_models': 'gpuModels',
        'host_configs': 'hostConfigs',
        'max_gpu': 'maxGpu',
        'max_memory_gib': 'maxMemoryGib',
        'max_vcpu': 'maxVcpu',
        'request': 'request'
    }

    def __init__(self, count_vm_available=None, cpu_models=None, data_centers=None, gpu_models=None, host_configs=None, max_gpu=None, max_memory_gib=None, max_vcpu=None, request=None, _configuration=None):  # noqa: E501
        """ListVMMachineTypesResponse - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._count_vm_available = None
        self._cpu_models = None
        self._data_centers = None
        self._gpu_models = None
        self._host_configs = None
        self._max_gpu = None
        self._max_memory_gib = None
        self._max_vcpu = None
        self._request = None
        self.discriminator = None

        self.count_vm_available = count_vm_available
        self.cpu_models = cpu_models
        self.data_centers = data_centers
        self.gpu_models = gpu_models
        self.host_configs = host_configs
        self.max_gpu = max_gpu
        self.max_memory_gib = max_memory_gib
        self.max_vcpu = max_vcpu
        self.request = request

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


        :return: The count_vm_available of this ListVMMachineTypesResponse.  # noqa: E501
        :rtype: int
        """
        return self._count_vm_available

    @count_vm_available.setter
    def count_vm_available(self, count_vm_available):
        """Sets the count_vm_available of this ListVMMachineTypesResponse.


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

        self._count_vm_available = count_vm_available

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


        :return: The cpu_models of this ListVMMachineTypesResponse.  # noqa: E501
        :rtype: list[CpuModelCategory]
        """
        return self._cpu_models

    @cpu_models.setter
    def cpu_models(self, cpu_models):
        """Sets the cpu_models of this ListVMMachineTypesResponse.


        :param cpu_models: The cpu_models of this ListVMMachineTypesResponse.  # noqa: E501
        :type: list[CpuModelCategory]
        """
        if self._configuration.client_side_validation and cpu_models is None:
            raise ValueError("Invalid value for `cpu_models`, must not be `None`")  # noqa: E501

        self._cpu_models = cpu_models

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


        :return: The data_centers of this ListVMMachineTypesResponse.  # noqa: E501
        :rtype: list[DataCenterCategory]
        """
        return self._data_centers

    @data_centers.setter
    def data_centers(self, data_centers):
        """Sets the data_centers of this ListVMMachineTypesResponse.


        :param data_centers: The data_centers of this ListVMMachineTypesResponse.  # noqa: E501
        :type: list[DataCenterCategory]
        """
        if self._configuration.client_side_validation and data_centers is None:
            raise ValueError("Invalid value for `data_centers`, must not be `None`")  # noqa: E501

        self._data_centers = data_centers

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


        :return: The gpu_models of this ListVMMachineTypesResponse.  # noqa: E501
        :rtype: list[GpuModelCategory]
        """
        return self._gpu_models

    @gpu_models.setter
    def gpu_models(self, gpu_models):
        """Sets the gpu_models of this ListVMMachineTypesResponse.


        :param gpu_models: The gpu_models of this ListVMMachineTypesResponse.  # noqa: E501
        :type: list[GpuModelCategory]
        """
        if self._configuration.client_side_validation and gpu_models is None:
            raise ValueError("Invalid value for `gpu_models`, must not be `None`")  # noqa: E501

        self._gpu_models = gpu_models

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


        :return: The host_configs of this ListVMMachineTypesResponse.  # noqa: E501
        :rtype: list[HostConfigCategory]
        """
        return self._host_configs

    @host_configs.setter
    def host_configs(self, host_configs):
        """Sets the host_configs of this ListVMMachineTypesResponse.


        :param host_configs: The host_configs of this ListVMMachineTypesResponse.  # noqa: E501
        :type: list[HostConfigCategory]
        """
        if self._configuration.client_side_validation and host_configs is None:
            raise ValueError("Invalid value for `host_configs`, must not be `None`")  # noqa: E501

        self._host_configs = host_configs

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


        :return: The max_gpu of this ListVMMachineTypesResponse.  # noqa: E501
        :rtype: int
        """
        return self._max_gpu

    @max_gpu.setter
    def max_gpu(self, max_gpu):
        """Sets the max_gpu of this ListVMMachineTypesResponse.


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

        self._max_gpu = max_gpu

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


        :return: The max_memory_gib of this ListVMMachineTypesResponse.  # noqa: E501
        :rtype: int
        """
        return self._max_memory_gib

    @max_memory_gib.setter
    def max_memory_gib(self, max_memory_gib):
        """Sets the max_memory_gib of this ListVMMachineTypesResponse.


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

        self._max_memory_gib = max_memory_gib

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


        :return: The max_vcpu of this ListVMMachineTypesResponse.  # noqa: E501
        :rtype: int
        """
        return self._max_vcpu

    @max_vcpu.setter
    def max_vcpu(self, max_vcpu):
        """Sets the max_vcpu of this ListVMMachineTypesResponse.


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

        self._max_vcpu = max_vcpu

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


        :return: The request of this ListVMMachineTypesResponse.  # noqa: E501
        :rtype: ListVMMachineTypesRequest
        """
        return self._request

    @request.setter
    def request(self, request):
        """Sets the request of this ListVMMachineTypesResponse.


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

        self._request = request

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

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