# coding: utf-8

"""
    Phantasma API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: v1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class ResultNetInfo(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 = {
        'listening': 'bool',
        'listeners': 'list[str]',
        'n_peers': 'str',
        'peers': 'list[NetInfoPeer]'
    }

    attribute_map = {
        'listening': 'listening',
        'listeners': 'listeners',
        'n_peers': 'nPeers',
        'peers': 'peers'
    }

    def __init__(self, listening=None, listeners=None, n_peers=None, peers=None):  # noqa: E501
        """ResultNetInfo - a model defined in Swagger"""  # noqa: E501
        self._listening = None
        self._listeners = None
        self._n_peers = None
        self._peers = None
        self.discriminator = None
        if listening is not None:
            self.listening = listening
        if listeners is not None:
            self.listeners = listeners
        if n_peers is not None:
            self.n_peers = n_peers
        if peers is not None:
            self.peers = peers

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


        :return: The listening of this ResultNetInfo.  # noqa: E501
        :rtype: bool
        """
        return self._listening

    @listening.setter
    def listening(self, listening):
        """Sets the listening of this ResultNetInfo.


        :param listening: The listening of this ResultNetInfo.  # noqa: E501
        :type: bool
        """

        self._listening = listening

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


        :return: The listeners of this ResultNetInfo.  # noqa: E501
        :rtype: list[str]
        """
        return self._listeners

    @listeners.setter
    def listeners(self, listeners):
        """Sets the listeners of this ResultNetInfo.


        :param listeners: The listeners of this ResultNetInfo.  # noqa: E501
        :type: list[str]
        """

        self._listeners = listeners

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


        :return: The n_peers of this ResultNetInfo.  # noqa: E501
        :rtype: str
        """
        return self._n_peers

    @n_peers.setter
    def n_peers(self, n_peers):
        """Sets the n_peers of this ResultNetInfo.


        :param n_peers: The n_peers of this ResultNetInfo.  # noqa: E501
        :type: str
        """

        self._n_peers = n_peers

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


        :return: The peers of this ResultNetInfo.  # noqa: E501
        :rtype: list[NetInfoPeer]
        """
        return self._peers

    @peers.setter
    def peers(self, peers):
        """Sets the peers of this ResultNetInfo.


        :param peers: The peers of this ResultNetInfo.  # noqa: E501
        :type: list[NetInfoPeer]
        """

        self._peers = peers

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

        return self.__dict__ == other.__dict__

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