# coding: utf-8

"""
    HPC Web API

    Preview  # 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 hpc_acm.models.node_gpu import NodeGpu  # noqa: F401,E501
from hpc_acm.models.node_network import NodeNetwork  # noqa: F401,E501


class NodeRegistration(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 = {
        'node_name': 'str',
        'core_count': 'int',
        'socket_count': 'int',
        'memory_megabytes': 'int',
        'gpu_info': 'list[NodeGpu]',
        'networks_info': 'list[NodeNetwork]',
        'distro_info': 'str'
    }

    attribute_map = {
        'node_name': 'nodeName',
        'core_count': 'coreCount',
        'socket_count': 'socketCount',
        'memory_megabytes': 'memoryMegabytes',
        'gpu_info': 'gpuInfo',
        'networks_info': 'networksInfo',
        'distro_info': 'distroInfo'
    }

    def __init__(self, node_name=None, core_count=None, socket_count=None, memory_megabytes=None, gpu_info=None, networks_info=None, distro_info=None):  # noqa: E501
        """NodeRegistration - a model defined in Swagger"""  # noqa: E501

        self._node_name = None
        self._core_count = None
        self._socket_count = None
        self._memory_megabytes = None
        self._gpu_info = None
        self._networks_info = None
        self._distro_info = None
        self.discriminator = None

        if node_name is not None:
            self.node_name = node_name
        if core_count is not None:
            self.core_count = core_count
        if socket_count is not None:
            self.socket_count = socket_count
        if memory_megabytes is not None:
            self.memory_megabytes = memory_megabytes
        if gpu_info is not None:
            self.gpu_info = gpu_info
        if networks_info is not None:
            self.networks_info = networks_info
        if distro_info is not None:
            self.distro_info = distro_info

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


        :return: The node_name of this NodeRegistration.  # noqa: E501
        :rtype: str
        """
        return self._node_name

    @node_name.setter
    def node_name(self, node_name):
        """Sets the node_name of this NodeRegistration.


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

        self._node_name = node_name

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


        :return: The core_count of this NodeRegistration.  # noqa: E501
        :rtype: int
        """
        return self._core_count

    @core_count.setter
    def core_count(self, core_count):
        """Sets the core_count of this NodeRegistration.


        :param core_count: The core_count of this NodeRegistration.  # noqa: E501
        :type: int
        """

        self._core_count = core_count

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


        :return: The socket_count of this NodeRegistration.  # noqa: E501
        :rtype: int
        """
        return self._socket_count

    @socket_count.setter
    def socket_count(self, socket_count):
        """Sets the socket_count of this NodeRegistration.


        :param socket_count: The socket_count of this NodeRegistration.  # noqa: E501
        :type: int
        """

        self._socket_count = socket_count

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


        :return: The memory_megabytes of this NodeRegistration.  # noqa: E501
        :rtype: int
        """
        return self._memory_megabytes

    @memory_megabytes.setter
    def memory_megabytes(self, memory_megabytes):
        """Sets the memory_megabytes of this NodeRegistration.


        :param memory_megabytes: The memory_megabytes of this NodeRegistration.  # noqa: E501
        :type: int
        """

        self._memory_megabytes = memory_megabytes

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


        :return: The gpu_info of this NodeRegistration.  # noqa: E501
        :rtype: list[NodeGpu]
        """
        return self._gpu_info

    @gpu_info.setter
    def gpu_info(self, gpu_info):
        """Sets the gpu_info of this NodeRegistration.


        :param gpu_info: The gpu_info of this NodeRegistration.  # noqa: E501
        :type: list[NodeGpu]
        """

        self._gpu_info = gpu_info

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


        :return: The networks_info of this NodeRegistration.  # noqa: E501
        :rtype: list[NodeNetwork]
        """
        return self._networks_info

    @networks_info.setter
    def networks_info(self, networks_info):
        """Sets the networks_info of this NodeRegistration.


        :param networks_info: The networks_info of this NodeRegistration.  # noqa: E501
        :type: list[NodeNetwork]
        """

        self._networks_info = networks_info

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


        :return: The distro_info of this NodeRegistration.  # noqa: E501
        :rtype: str
        """
        return self._distro_info

    @distro_info.setter
    def distro_info(self, distro_info):
        """Sets the distro_info of this NodeRegistration.


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

        self._distro_info = distro_info

    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

        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, NodeRegistration):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
