# 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_metadata_network_ipv4_ip_address import NodeMetadataNetworkIpv4IpAddress  # noqa: F401,E501
from hpc_acm.models.node_metadata_network_ipv4_subnet import NodeMetadataNetworkIpv4Subnet  # noqa: F401,E501


class NodeMetadataNetworkIpv4(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 = {
        'ip_address': 'list[NodeMetadataNetworkIpv4IpAddress]',
        'subnet': 'list[NodeMetadataNetworkIpv4Subnet]'
    }

    attribute_map = {
        'ip_address': 'ipAddress',
        'subnet': 'subnet'
    }

    def __init__(self, ip_address=None, subnet=None):  # noqa: E501
        """NodeMetadataNetworkIpv4 - a model defined in Swagger"""  # noqa: E501

        self._ip_address = None
        self._subnet = None
        self.discriminator = None

        if ip_address is not None:
            self.ip_address = ip_address
        if subnet is not None:
            self.subnet = subnet

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


        :return: The ip_address of this NodeMetadataNetworkIpv4.  # noqa: E501
        :rtype: list[NodeMetadataNetworkIpv4IpAddress]
        """
        return self._ip_address

    @ip_address.setter
    def ip_address(self, ip_address):
        """Sets the ip_address of this NodeMetadataNetworkIpv4.


        :param ip_address: The ip_address of this NodeMetadataNetworkIpv4.  # noqa: E501
        :type: list[NodeMetadataNetworkIpv4IpAddress]
        """

        self._ip_address = ip_address

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


        :return: The subnet of this NodeMetadataNetworkIpv4.  # noqa: E501
        :rtype: list[NodeMetadataNetworkIpv4Subnet]
        """
        return self._subnet

    @subnet.setter
    def subnet(self, subnet):
        """Sets the subnet of this NodeMetadataNetworkIpv4.


        :param subnet: The subnet of this NodeMetadataNetworkIpv4.  # noqa: E501
        :type: list[NodeMetadataNetworkIpv4Subnet]
        """

        self._subnet = subnet

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

        return self.__dict__ == other.__dict__

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