# coding: utf-8

"""
    Internal API

    SmartDiagnostics REST API for internal users only  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class NodeResponse(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 = {
        'id': 'int',
        'location': 'LocationChild',
        'corporation': 'CorporationChild',
        'hub': 'HubChild',
        'base_station': 'BaseStationNodeChild',
        'repeater': 'RepeaterNodeChild',
        'serial_number': 'str',
        'nickname': 'str',
        'firmware_version': 'str',
        'node_type_code': 'NodeTypeCodes',
        'active': 'bool',
        'created': 'datetime',
        'updated': 'datetime',
        'monitoring_points': 'list[MonitoringPointChild]',
        'battery_voltage': 'float',
        'burst_success_rate': 'float',
        'is_online': 'bool',
        'last_update_time': 'datetime',
        'packet_success_rate': 'float',
        'temperature': 'float',
        'wireless_efficiency': 'float'
    }

    attribute_map = {
        'id': 'Id',
        'location': 'Location',
        'corporation': 'Corporation',
        'hub': 'Hub',
        'base_station': 'BaseStation',
        'repeater': 'Repeater',
        'serial_number': 'SerialNumber',
        'nickname': 'Nickname',
        'firmware_version': 'FirmwareVersion',
        'node_type_code': 'NodeTypeCode',
        'active': 'Active',
        'created': 'Created',
        'updated': 'Updated',
        'monitoring_points': 'MonitoringPoints',
        'battery_voltage': 'BatteryVoltage',
        'burst_success_rate': 'BurstSuccessRate',
        'is_online': 'IsOnline',
        'last_update_time': 'LastUpdateTime',
        'packet_success_rate': 'PacketSuccessRate',
        'temperature': 'Temperature',
        'wireless_efficiency': 'WirelessEfficiency'
    }

    def __init__(self, id=None, location=None, corporation=None, hub=None, base_station=None, repeater=None, serial_number=None, nickname=None, firmware_version=None, node_type_code=None, active=None, created=None, updated=None, monitoring_points=None, battery_voltage=None, burst_success_rate=None, is_online=None, last_update_time=None, packet_success_rate=None, temperature=None, wireless_efficiency=None):  # noqa: E501
        """NodeResponse - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._location = None
        self._corporation = None
        self._hub = None
        self._base_station = None
        self._repeater = None
        self._serial_number = None
        self._nickname = None
        self._firmware_version = None
        self._node_type_code = None
        self._active = None
        self._created = None
        self._updated = None
        self._monitoring_points = None
        self._battery_voltage = None
        self._burst_success_rate = None
        self._is_online = None
        self._last_update_time = None
        self._packet_success_rate = None
        self._temperature = None
        self._wireless_efficiency = None
        self.discriminator = None
        self.id = id
        self.location = location
        self.corporation = corporation
        if hub is not None:
            self.hub = hub
        if base_station is not None:
            self.base_station = base_station
        if repeater is not None:
            self.repeater = repeater
        self.serial_number = serial_number
        if nickname is not None:
            self.nickname = nickname
        if firmware_version is not None:
            self.firmware_version = firmware_version
        self.node_type_code = node_type_code
        self.active = active
        self.created = created
        self.updated = updated
        self.monitoring_points = monitoring_points
        if battery_voltage is not None:
            self.battery_voltage = battery_voltage
        if burst_success_rate is not None:
            self.burst_success_rate = burst_success_rate
        if is_online is not None:
            self.is_online = is_online
        if last_update_time is not None:
            self.last_update_time = last_update_time
        if packet_success_rate is not None:
            self.packet_success_rate = packet_success_rate
        if temperature is not None:
            self.temperature = temperature
        if wireless_efficiency is not None:
            self.wireless_efficiency = wireless_efficiency

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

        The id of the node  # noqa: E501

        :return: The id of this NodeResponse.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this NodeResponse.

        The id of the node  # noqa: E501

        :param id: The id of this NodeResponse.  # noqa: E501
        :type: int
        """
        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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


        :return: The location of this NodeResponse.  # noqa: E501
        :rtype: LocationChild
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this NodeResponse.


        :param location: The location of this NodeResponse.  # noqa: E501
        :type: LocationChild
        """
        if location is None:
            raise ValueError("Invalid value for `location`, must not be `None`")  # noqa: E501

        self._location = location

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


        :return: The corporation of this NodeResponse.  # noqa: E501
        :rtype: CorporationChild
        """
        return self._corporation

    @corporation.setter
    def corporation(self, corporation):
        """Sets the corporation of this NodeResponse.


        :param corporation: The corporation of this NodeResponse.  # noqa: E501
        :type: CorporationChild
        """
        if corporation is None:
            raise ValueError("Invalid value for `corporation`, must not be `None`")  # noqa: E501

        self._corporation = corporation

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


        :return: The hub of this NodeResponse.  # noqa: E501
        :rtype: HubChild
        """
        return self._hub

    @hub.setter
    def hub(self, hub):
        """Sets the hub of this NodeResponse.


        :param hub: The hub of this NodeResponse.  # noqa: E501
        :type: HubChild
        """

        self._hub = hub

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


        :return: The base_station of this NodeResponse.  # noqa: E501
        :rtype: BaseStationNodeChild
        """
        return self._base_station

    @base_station.setter
    def base_station(self, base_station):
        """Sets the base_station of this NodeResponse.


        :param base_station: The base_station of this NodeResponse.  # noqa: E501
        :type: BaseStationNodeChild
        """

        self._base_station = base_station

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


        :return: The repeater of this NodeResponse.  # noqa: E501
        :rtype: RepeaterNodeChild
        """
        return self._repeater

    @repeater.setter
    def repeater(self, repeater):
        """Sets the repeater of this NodeResponse.


        :param repeater: The repeater of this NodeResponse.  # noqa: E501
        :type: RepeaterNodeChild
        """

        self._repeater = repeater

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

        The serial number of the node  # noqa: E501

        :return: The serial_number of this NodeResponse.  # noqa: E501
        :rtype: str
        """
        return self._serial_number

    @serial_number.setter
    def serial_number(self, serial_number):
        """Sets the serial_number of this NodeResponse.

        The serial number of the node  # noqa: E501

        :param serial_number: The serial_number of this NodeResponse.  # noqa: E501
        :type: str
        """
        if serial_number is None:
            raise ValueError("Invalid value for `serial_number`, must not be `None`")  # noqa: E501

        self._serial_number = serial_number

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

        The name of the node  # noqa: E501

        :return: The nickname of this NodeResponse.  # noqa: E501
        :rtype: str
        """
        return self._nickname

    @nickname.setter
    def nickname(self, nickname):
        """Sets the nickname of this NodeResponse.

        The name of the node  # noqa: E501

        :param nickname: The nickname of this NodeResponse.  # noqa: E501
        :type: str
        """

        self._nickname = nickname

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

        The firmware version of the node  # noqa: E501

        :return: The firmware_version of this NodeResponse.  # noqa: E501
        :rtype: str
        """
        return self._firmware_version

    @firmware_version.setter
    def firmware_version(self, firmware_version):
        """Sets the firmware_version of this NodeResponse.

        The firmware version of the node  # noqa: E501

        :param firmware_version: The firmware_version of this NodeResponse.  # noqa: E501
        :type: str
        """

        self._firmware_version = firmware_version

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


        :return: The node_type_code of this NodeResponse.  # noqa: E501
        :rtype: NodeTypeCodes
        """
        return self._node_type_code

    @node_type_code.setter
    def node_type_code(self, node_type_code):
        """Sets the node_type_code of this NodeResponse.


        :param node_type_code: The node_type_code of this NodeResponse.  # noqa: E501
        :type: NodeTypeCodes
        """
        if node_type_code is None:
            raise ValueError("Invalid value for `node_type_code`, must not be `None`")  # noqa: E501

        self._node_type_code = node_type_code

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

        Boolean set to true if the node is active  # noqa: E501

        :return: The active of this NodeResponse.  # noqa: E501
        :rtype: bool
        """
        return self._active

    @active.setter
    def active(self, active):
        """Sets the active of this NodeResponse.

        Boolean set to true if the node is active  # noqa: E501

        :param active: The active of this NodeResponse.  # noqa: E501
        :type: bool
        """
        if active is None:
            raise ValueError("Invalid value for `active`, must not be `None`")  # noqa: E501

        self._active = active

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

        The date the node is created  # noqa: E501

        :return: The created of this NodeResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._created

    @created.setter
    def created(self, created):
        """Sets the created of this NodeResponse.

        The date the node is created  # noqa: E501

        :param created: The created of this NodeResponse.  # noqa: E501
        :type: datetime
        """
        if created is None:
            raise ValueError("Invalid value for `created`, must not be `None`")  # noqa: E501

        self._created = created

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

        The date the node is last updated  # noqa: E501

        :return: The updated of this NodeResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._updated

    @updated.setter
    def updated(self, updated):
        """Sets the updated of this NodeResponse.

        The date the node is last updated  # noqa: E501

        :param updated: The updated of this NodeResponse.  # noqa: E501
        :type: datetime
        """
        if updated is None:
            raise ValueError("Invalid value for `updated`, must not be `None`")  # noqa: E501

        self._updated = updated

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

        The monitoring points associated with the node  # noqa: E501

        :return: The monitoring_points of this NodeResponse.  # noqa: E501
        :rtype: list[MonitoringPointChild]
        """
        return self._monitoring_points

    @monitoring_points.setter
    def monitoring_points(self, monitoring_points):
        """Sets the monitoring_points of this NodeResponse.

        The monitoring points associated with the node  # noqa: E501

        :param monitoring_points: The monitoring_points of this NodeResponse.  # noqa: E501
        :type: list[MonitoringPointChild]
        """
        if monitoring_points is None:
            raise ValueError("Invalid value for `monitoring_points`, must not be `None`")  # noqa: E501

        self._monitoring_points = monitoring_points

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


        :return: The battery_voltage of this NodeResponse.  # noqa: E501
        :rtype: float
        """
        return self._battery_voltage

    @battery_voltage.setter
    def battery_voltage(self, battery_voltage):
        """Sets the battery_voltage of this NodeResponse.


        :param battery_voltage: The battery_voltage of this NodeResponse.  # noqa: E501
        :type: float
        """

        self._battery_voltage = battery_voltage

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


        :return: The burst_success_rate of this NodeResponse.  # noqa: E501
        :rtype: float
        """
        return self._burst_success_rate

    @burst_success_rate.setter
    def burst_success_rate(self, burst_success_rate):
        """Sets the burst_success_rate of this NodeResponse.


        :param burst_success_rate: The burst_success_rate of this NodeResponse.  # noqa: E501
        :type: float
        """

        self._burst_success_rate = burst_success_rate

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


        :return: The is_online of this NodeResponse.  # noqa: E501
        :rtype: bool
        """
        return self._is_online

    @is_online.setter
    def is_online(self, is_online):
        """Sets the is_online of this NodeResponse.


        :param is_online: The is_online of this NodeResponse.  # noqa: E501
        :type: bool
        """

        self._is_online = is_online

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


        :return: The last_update_time of this NodeResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._last_update_time

    @last_update_time.setter
    def last_update_time(self, last_update_time):
        """Sets the last_update_time of this NodeResponse.


        :param last_update_time: The last_update_time of this NodeResponse.  # noqa: E501
        :type: datetime
        """

        self._last_update_time = last_update_time

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


        :return: The packet_success_rate of this NodeResponse.  # noqa: E501
        :rtype: float
        """
        return self._packet_success_rate

    @packet_success_rate.setter
    def packet_success_rate(self, packet_success_rate):
        """Sets the packet_success_rate of this NodeResponse.


        :param packet_success_rate: The packet_success_rate of this NodeResponse.  # noqa: E501
        :type: float
        """

        self._packet_success_rate = packet_success_rate

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


        :return: The temperature of this NodeResponse.  # noqa: E501
        :rtype: float
        """
        return self._temperature

    @temperature.setter
    def temperature(self, temperature):
        """Sets the temperature of this NodeResponse.


        :param temperature: The temperature of this NodeResponse.  # noqa: E501
        :type: float
        """

        self._temperature = temperature

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


        :return: The wireless_efficiency of this NodeResponse.  # noqa: E501
        :rtype: float
        """
        return self._wireless_efficiency

    @wireless_efficiency.setter
    def wireless_efficiency(self, wireless_efficiency):
        """Sets the wireless_efficiency of this NodeResponse.


        :param wireless_efficiency: The wireless_efficiency of this NodeResponse.  # noqa: E501
        :type: float
        """

        self._wireless_efficiency = wireless_efficiency

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

        return self.__dict__ == other.__dict__

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