# 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.mac_address import MacAddress  # noqa: F401,E501
from hpc_acm.models.node_metadata_network_ipv4 import NodeMetadataNetworkIpv4  # noqa: F401,E501
from hpc_acm.models.node_metadata_network_ipv6 import NodeMetadataNetworkIpv6  # noqa: F401,E501


class NodeMetadataNetworkInterface(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 = {
        'ipv4': 'NodeMetadataNetworkIpv4',
        'ipv6': 'NodeMetadataNetworkIpv6',
        'mac_address': 'MacAddress'
    }

    attribute_map = {
        'ipv4': 'ipv4',
        'ipv6': 'ipv6',
        'mac_address': 'macAddress'
    }

    def __init__(self, ipv4=None, ipv6=None, mac_address=None):  # noqa: E501
        """NodeMetadataNetworkInterface - a model defined in Swagger"""  # noqa: E501

        self._ipv4 = None
        self._ipv6 = None
        self._mac_address = None
        self.discriminator = None

        if ipv4 is not None:
            self.ipv4 = ipv4
        if ipv6 is not None:
            self.ipv6 = ipv6
        if mac_address is not None:
            self.mac_address = mac_address

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


        :return: The ipv4 of this NodeMetadataNetworkInterface.  # noqa: E501
        :rtype: NodeMetadataNetworkIpv4
        """
        return self._ipv4

    @ipv4.setter
    def ipv4(self, ipv4):
        """Sets the ipv4 of this NodeMetadataNetworkInterface.


        :param ipv4: The ipv4 of this NodeMetadataNetworkInterface.  # noqa: E501
        :type: NodeMetadataNetworkIpv4
        """

        self._ipv4 = ipv4

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


        :return: The ipv6 of this NodeMetadataNetworkInterface.  # noqa: E501
        :rtype: NodeMetadataNetworkIpv6
        """
        return self._ipv6

    @ipv6.setter
    def ipv6(self, ipv6):
        """Sets the ipv6 of this NodeMetadataNetworkInterface.


        :param ipv6: The ipv6 of this NodeMetadataNetworkInterface.  # noqa: E501
        :type: NodeMetadataNetworkIpv6
        """

        self._ipv6 = ipv6

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


        :return: The mac_address of this NodeMetadataNetworkInterface.  # noqa: E501
        :rtype: MacAddress
        """
        return self._mac_address

    @mac_address.setter
    def mac_address(self, mac_address):
        """Sets the mac_address of this NodeMetadataNetworkInterface.


        :param mac_address: The mac_address of this NodeMetadataNetworkInterface.  # noqa: E501
        :type: MacAddress
        """

        self._mac_address = mac_address

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

        return self.__dict__ == other.__dict__

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