# coding: utf-8

"""
    MEC Sandbox API

    The MEC Sandbox API described using OpenAPI  # noqa: E501

    OpenAPI spec version: 0.0.9
    Contact: cti_support@etsi.org
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class NetworkCharacteristics(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 = {
        'latency': 'int',
        'latency_variation': 'int',
        'latency_distribution': 'str',
        'throughput': 'int',
        'throughput_dl': 'int',
        'throughput_ul': 'int',
        'packet_loss': 'float'
    }

    attribute_map = {
        'latency': 'latency',
        'latency_variation': 'latencyVariation',
        'latency_distribution': 'latencyDistribution',
        'throughput': 'throughput',
        'throughput_dl': 'throughputDl',
        'throughput_ul': 'throughputUl',
        'packet_loss': 'packetLoss'
    }

    def __init__(self, latency=None, latency_variation=None, latency_distribution=None, throughput=None, throughput_dl=None, throughput_ul=None, packet_loss=None):  # noqa: E501
        """NetworkCharacteristics - a model defined in Swagger"""  # noqa: E501
        self._latency = None
        self._latency_variation = None
        self._latency_distribution = None
        self._throughput = None
        self._throughput_dl = None
        self._throughput_ul = None
        self._packet_loss = None
        self.discriminator = None
        if latency is not None:
            self.latency = latency
        if latency_variation is not None:
            self.latency_variation = latency_variation
        if latency_distribution is not None:
            self.latency_distribution = latency_distribution
        if throughput is not None:
            self.throughput = throughput
        if throughput_dl is not None:
            self.throughput_dl = throughput_dl
        if throughput_ul is not None:
            self.throughput_ul = throughput_ul
        if packet_loss is not None:
            self.packet_loss = packet_loss

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

        Latency in ms  # noqa: E501

        :return: The latency of this NetworkCharacteristics.  # noqa: E501
        :rtype: int
        """
        return self._latency

    @latency.setter
    def latency(self, latency):
        """Sets the latency of this NetworkCharacteristics.

        Latency in ms  # noqa: E501

        :param latency: The latency of this NetworkCharacteristics.  # noqa: E501
        :type: int
        """

        self._latency = latency

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

        Latency variation in ms  # noqa: E501

        :return: The latency_variation of this NetworkCharacteristics.  # noqa: E501
        :rtype: int
        """
        return self._latency_variation

    @latency_variation.setter
    def latency_variation(self, latency_variation):
        """Sets the latency_variation of this NetworkCharacteristics.

        Latency variation in ms  # noqa: E501

        :param latency_variation: The latency_variation of this NetworkCharacteristics.  # noqa: E501
        :type: int
        """

        self._latency_variation = latency_variation

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

        Latency distribution. Can only be set in the Scenario Deployment network characteristics, ignored otherwise. Latency distribution is set for the whole network and applied to every end-to-end traffic flows. Default value is 'Normal' distribution.  # noqa: E501

        :return: The latency_distribution of this NetworkCharacteristics.  # noqa: E501
        :rtype: str
        """
        return self._latency_distribution

    @latency_distribution.setter
    def latency_distribution(self, latency_distribution):
        """Sets the latency_distribution of this NetworkCharacteristics.

        Latency distribution. Can only be set in the Scenario Deployment network characteristics, ignored otherwise. Latency distribution is set for the whole network and applied to every end-to-end traffic flows. Default value is 'Normal' distribution.  # noqa: E501

        :param latency_distribution: The latency_distribution of this NetworkCharacteristics.  # noqa: E501
        :type: str
        """
        allowed_values = ["Normal", "Pareto", "Paretonormal", "Uniform"]  # noqa: E501
        if latency_distribution not in allowed_values:
            raise ValueError(
                "Invalid value for `latency_distribution` ({0}), must be one of {1}"  # noqa: E501
                .format(latency_distribution, allowed_values)
            )

        self._latency_distribution = latency_distribution

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

        **DEPRECATED** As of release 1.5.0, replaced by throughputUl and throughputDl  # noqa: E501

        :return: The throughput of this NetworkCharacteristics.  # noqa: E501
        :rtype: int
        """
        return self._throughput

    @throughput.setter
    def throughput(self, throughput):
        """Sets the throughput of this NetworkCharacteristics.

        **DEPRECATED** As of release 1.5.0, replaced by throughputUl and throughputDl  # noqa: E501

        :param throughput: The throughput of this NetworkCharacteristics.  # noqa: E501
        :type: int
        """

        self._throughput = throughput

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

        Downlink throughput limit in Mbps  # noqa: E501

        :return: The throughput_dl of this NetworkCharacteristics.  # noqa: E501
        :rtype: int
        """
        return self._throughput_dl

    @throughput_dl.setter
    def throughput_dl(self, throughput_dl):
        """Sets the throughput_dl of this NetworkCharacteristics.

        Downlink throughput limit in Mbps  # noqa: E501

        :param throughput_dl: The throughput_dl of this NetworkCharacteristics.  # noqa: E501
        :type: int
        """

        self._throughput_dl = throughput_dl

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

        Uplink throughput limit in Mbps  # noqa: E501

        :return: The throughput_ul of this NetworkCharacteristics.  # noqa: E501
        :rtype: int
        """
        return self._throughput_ul

    @throughput_ul.setter
    def throughput_ul(self, throughput_ul):
        """Sets the throughput_ul of this NetworkCharacteristics.

        Uplink throughput limit in Mbps  # noqa: E501

        :param throughput_ul: The throughput_ul of this NetworkCharacteristics.  # noqa: E501
        :type: int
        """

        self._throughput_ul = throughput_ul

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

        Packet loss percentage  # noqa: E501

        :return: The packet_loss of this NetworkCharacteristics.  # noqa: E501
        :rtype: float
        """
        return self._packet_loss

    @packet_loss.setter
    def packet_loss(self, packet_loss):
        """Sets the packet_loss of this NetworkCharacteristics.

        Packet loss percentage  # noqa: E501

        :param packet_loss: The packet_loss of this NetworkCharacteristics.  # noqa: E501
        :type: float
        """

        self._packet_loss = packet_loss

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

        return self.__dict__ == other.__dict__

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