# coding: utf-8

"""
TcpStatisticalData.py

 The Clear BSD License

 Copyright (c) – 2016, NetApp, Inc. All rights reserved.

 Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

 * Neither the name of NetApp, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

 NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

from pprint import pformat
from six import iteritems


class TcpStatisticalData(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        TcpStatisticalData - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'interfaces': 'list[str]',  # (required parameter)
            'received_segments': 'int',  # (required parameter)
            'sent_segments': 'int',  # (required parameter)
            'received_segments_in_error': 'int',  # (required parameter)
            'tx_byte_count': 'int',  # (required parameter)
            'rx_byte_count': 'int',  # (required parameter)
            'retransmit_timer_expired_count': 'int',  # (required parameter)
            'rx_duplicate_ack_count': 'int',  # (required parameter)
            'rx_ack_count': 'int',  # (required parameter)
            'tx_delayed_ack_count': 'int',  # (required parameter)
            'tx_ack_count': 'int',  # (required parameter)
            'rx_segment_out_of_order_count': 'int',  # (required parameter)
            'rx_window_probe_count': 'int',  # (required parameter)
            'rx_window_update_count': 'int'
        }

        self.attribute_map = {
            'interfaces': 'interfaces',  # (required parameter)
            'received_segments': 'receivedSegments',  # (required parameter)
            'sent_segments': 'sentSegments',  # (required parameter)
            'received_segments_in_error': 'receivedSegmentsInError',  # (required parameter)
            'tx_byte_count': 'txByteCount',  # (required parameter)
            'rx_byte_count': 'rxByteCount',  # (required parameter)
            'retransmit_timer_expired_count': 'retransmitTimerExpiredCount',  # (required parameter)
            'rx_duplicate_ack_count': 'rxDuplicateAckCount',  # (required parameter)
            'rx_ack_count': 'rxAckCount',  # (required parameter)
            'tx_delayed_ack_count': 'txDelayedAckCount',  # (required parameter)
            'tx_ack_count': 'txAckCount',  # (required parameter)
            'rx_segment_out_of_order_count': 'rxSegmentOutOfOrderCount',  # (required parameter)
            'rx_window_probe_count': 'rxWindowProbeCount',  # (required parameter)
            'rx_window_update_count': 'rxWindowUpdateCount'
        }

        self._interfaces = None
        self._received_segments = None
        self._sent_segments = None
        self._received_segments_in_error = None
        self._tx_byte_count = None
        self._rx_byte_count = None
        self._retransmit_timer_expired_count = None
        self._rx_duplicate_ack_count = None
        self._rx_ack_count = None
        self._tx_delayed_ack_count = None
        self._tx_ack_count = None
        self._rx_segment_out_of_order_count = None
        self._rx_window_probe_count = None
        self._rx_window_update_count = None

    @property
    def interfaces(self):
        """
        Gets the interfaces of this TcpStatisticalData.
        The interface(s) for which the statistics apply. In some cases, the statistics may be aggregated across multiple interfaces. Even though this is shown as an array, it will only be a single instance.

        :return: The interfaces of this TcpStatisticalData.
        :rtype: list[str]
        :required/optional: required
        """
        return self._interfaces

    @interfaces.setter
    def interfaces(self, interfaces):
        """
        Sets the interfaces of this TcpStatisticalData.
        The interface(s) for which the statistics apply. In some cases, the statistics may be aggregated across multiple interfaces. Even though this is shown as an array, it will only be a single instance.

        :param interfaces: The interfaces of this TcpStatisticalData.
        :type: list[str]
        """
        self._interfaces = interfaces

    @property
    def received_segments(self):
        """
        Gets the received_segments of this TcpStatisticalData.
        The total number of segments received.

        :return: The received_segments of this TcpStatisticalData.
        :rtype: int
        :required/optional: required
        """
        return self._received_segments

    @received_segments.setter
    def received_segments(self, received_segments):
        """
        Sets the received_segments of this TcpStatisticalData.
        The total number of segments received.

        :param received_segments: The received_segments of this TcpStatisticalData.
        :type: int
        """
        self._received_segments = received_segments

    @property
    def sent_segments(self):
        """
        Gets the sent_segments of this TcpStatisticalData.
        The total number of segments sent.

        :return: The sent_segments of this TcpStatisticalData.
        :rtype: int
        :required/optional: required
        """
        return self._sent_segments

    @sent_segments.setter
    def sent_segments(self, sent_segments):
        """
        Sets the sent_segments of this TcpStatisticalData.
        The total number of segments sent.

        :param sent_segments: The sent_segments of this TcpStatisticalData.
        :type: int
        """
        self._sent_segments = sent_segments

    @property
    def received_segments_in_error(self):
        """
        Gets the received_segments_in_error of this TcpStatisticalData.
        The total number of segments received in error.

        :return: The received_segments_in_error of this TcpStatisticalData.
        :rtype: int
        :required/optional: required
        """
        return self._received_segments_in_error

    @received_segments_in_error.setter
    def received_segments_in_error(self, received_segments_in_error):
        """
        Sets the received_segments_in_error of this TcpStatisticalData.
        The total number of segments received in error.

        :param received_segments_in_error: The received_segments_in_error of this TcpStatisticalData.
        :type: int
        """
        self._received_segments_in_error = received_segments_in_error

    @property
    def tx_byte_count(self):
        """
        Gets the tx_byte_count of this TcpStatisticalData.
        The number of data payload bytes transmitted in TCP segments.

        :return: The tx_byte_count of this TcpStatisticalData.
        :rtype: int
        :required/optional: required
        """
        return self._tx_byte_count

    @tx_byte_count.setter
    def tx_byte_count(self, tx_byte_count):
        """
        Sets the tx_byte_count of this TcpStatisticalData.
        The number of data payload bytes transmitted in TCP segments.

        :param tx_byte_count: The tx_byte_count of this TcpStatisticalData.
        :type: int
        """
        self._tx_byte_count = tx_byte_count

    @property
    def rx_byte_count(self):
        """
        Gets the rx_byte_count of this TcpStatisticalData.
        The number of data payload bytes received in TCP segments.

        :return: The rx_byte_count of this TcpStatisticalData.
        :rtype: int
        :required/optional: required
        """
        return self._rx_byte_count

    @rx_byte_count.setter
    def rx_byte_count(self, rx_byte_count):
        """
        Sets the rx_byte_count of this TcpStatisticalData.
        The number of data payload bytes received in TCP segments.

        :param rx_byte_count: The rx_byte_count of this TcpStatisticalData.
        :type: int
        """
        self._rx_byte_count = rx_byte_count

    @property
    def retransmit_timer_expired_count(self):
        """
        Gets the retransmit_timer_expired_count of this TcpStatisticalData.
        The number of times the retransmit timer expired and a frame was retransmitted.

        :return: The retransmit_timer_expired_count of this TcpStatisticalData.
        :rtype: int
        :required/optional: required
        """
        return self._retransmit_timer_expired_count

    @retransmit_timer_expired_count.setter
    def retransmit_timer_expired_count(self, retransmit_timer_expired_count):
        """
        Sets the retransmit_timer_expired_count of this TcpStatisticalData.
        The number of times the retransmit timer expired and a frame was retransmitted.

        :param retransmit_timer_expired_count: The retransmit_timer_expired_count of this TcpStatisticalData.
        :type: int
        """
        self._retransmit_timer_expired_count = retransmit_timer_expired_count

    @property
    def rx_duplicate_ack_count(self):
        """
        Gets the rx_duplicate_ack_count of this TcpStatisticalData.
        The number of duplicate ACKs received.

        :return: The rx_duplicate_ack_count of this TcpStatisticalData.
        :rtype: int
        :required/optional: required
        """
        return self._rx_duplicate_ack_count

    @rx_duplicate_ack_count.setter
    def rx_duplicate_ack_count(self, rx_duplicate_ack_count):
        """
        Sets the rx_duplicate_ack_count of this TcpStatisticalData.
        The number of duplicate ACKs received.

        :param rx_duplicate_ack_count: The rx_duplicate_ack_count of this TcpStatisticalData.
        :type: int
        """
        self._rx_duplicate_ack_count = rx_duplicate_ack_count

    @property
    def rx_ack_count(self):
        """
        Gets the rx_ack_count of this TcpStatisticalData.
        The number of pure ACKs received.

        :return: The rx_ack_count of this TcpStatisticalData.
        :rtype: int
        :required/optional: required
        """
        return self._rx_ack_count

    @rx_ack_count.setter
    def rx_ack_count(self, rx_ack_count):
        """
        Sets the rx_ack_count of this TcpStatisticalData.
        The number of pure ACKs received.

        :param rx_ack_count: The rx_ack_count of this TcpStatisticalData.
        :type: int
        """
        self._rx_ack_count = rx_ack_count

    @property
    def tx_delayed_ack_count(self):
        """
        Gets the tx_delayed_ack_count of this TcpStatisticalData.
        The number of delayed ACKs transmitted.

        :return: The tx_delayed_ack_count of this TcpStatisticalData.
        :rtype: int
        :required/optional: required
        """
        return self._tx_delayed_ack_count

    @tx_delayed_ack_count.setter
    def tx_delayed_ack_count(self, tx_delayed_ack_count):
        """
        Sets the tx_delayed_ack_count of this TcpStatisticalData.
        The number of delayed ACKs transmitted.

        :param tx_delayed_ack_count: The tx_delayed_ack_count of this TcpStatisticalData.
        :type: int
        """
        self._tx_delayed_ack_count = tx_delayed_ack_count

    @property
    def tx_ack_count(self):
        """
        Gets the tx_ack_count of this TcpStatisticalData.
        The number of pure ACKs transmitted.

        :return: The tx_ack_count of this TcpStatisticalData.
        :rtype: int
        :required/optional: required
        """
        return self._tx_ack_count

    @tx_ack_count.setter
    def tx_ack_count(self, tx_ack_count):
        """
        Sets the tx_ack_count of this TcpStatisticalData.
        The number of pure ACKs transmitted.

        :param tx_ack_count: The tx_ack_count of this TcpStatisticalData.
        :type: int
        """
        self._tx_ack_count = tx_ack_count

    @property
    def rx_segment_out_of_order_count(self):
        """
        Gets the rx_segment_out_of_order_count of this TcpStatisticalData.
        The number of TCP segments received that were out of order.

        :return: The rx_segment_out_of_order_count of this TcpStatisticalData.
        :rtype: int
        :required/optional: required
        """
        return self._rx_segment_out_of_order_count

    @rx_segment_out_of_order_count.setter
    def rx_segment_out_of_order_count(self, rx_segment_out_of_order_count):
        """
        Sets the rx_segment_out_of_order_count of this TcpStatisticalData.
        The number of TCP segments received that were out of order.

        :param rx_segment_out_of_order_count: The rx_segment_out_of_order_count of this TcpStatisticalData.
        :type: int
        """
        self._rx_segment_out_of_order_count = rx_segment_out_of_order_count

    @property
    def rx_window_probe_count(self):
        """
        Gets the rx_window_probe_count of this TcpStatisticalData.
        The number of window probes received.

        :return: The rx_window_probe_count of this TcpStatisticalData.
        :rtype: int
        :required/optional: required
        """
        return self._rx_window_probe_count

    @rx_window_probe_count.setter
    def rx_window_probe_count(self, rx_window_probe_count):
        """
        Sets the rx_window_probe_count of this TcpStatisticalData.
        The number of window probes received.

        :param rx_window_probe_count: The rx_window_probe_count of this TcpStatisticalData.
        :type: int
        """
        self._rx_window_probe_count = rx_window_probe_count

    @property
    def rx_window_update_count(self):
        """
        Gets the rx_window_update_count of this TcpStatisticalData.
        The number of window updates received.

        :return: The rx_window_update_count of this TcpStatisticalData.
        :rtype: int
        :required/optional: required
        """
        return self._rx_window_update_count

    @rx_window_update_count.setter
    def rx_window_update_count(self, rx_window_update_count):
        """
        Sets the rx_window_update_count of this TcpStatisticalData.
        The number of window updates received.

        :param rx_window_update_count: The rx_window_update_count of this TcpStatisticalData.
        :type: int
        """
        self._rx_window_update_count = rx_window_update_count

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in 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 pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        if self is None:
           return None
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        if self is None or other is None:
            return None
        return self.__dict__ == other.__dict__

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

