# coding: utf-8

"""
    Karbon Platform Services API reference.

    OpenAPI documentation for public facing Karbon Platform Services API  This API documentation is generated from source code using go-swagger. Do not edit the generated kps_api.json directly!  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: karbon-platform-services-api@nutanix.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six


class Iter8TrafficControl(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 = {
        'algorithm': 'str',
        'interval': 'str',
        'max_iterations': 'int',
        'max_traffic_percentage': 'float',
        'traffic_step_size': 'float'
    }

    attribute_map = {
        'algorithm': 'algorithm',
        'interval': 'interval',
        'max_iterations': 'maxIterations',
        'max_traffic_percentage': 'maxTrafficPercentage',
        'traffic_step_size': 'trafficStepSize'
    }

    def __init__(self, algorithm=None, interval=None, max_iterations=None, max_traffic_percentage=None, traffic_step_size=None):  # noqa: E501
        """Iter8TrafficControl - a model defined in Swagger"""  # noqa: E501
        self._algorithm = None
        self._interval = None
        self._max_iterations = None
        self._max_traffic_percentage = None
        self._traffic_step_size = None
        self.discriminator = None
        if algorithm is not None:
            self.algorithm = algorithm
        if interval is not None:
            self.interval = interval
        if max_iterations is not None:
            self.max_iterations = max_iterations
        if max_traffic_percentage is not None:
            self.max_traffic_percentage = max_traffic_percentage
        if traffic_step_size is not None:
            self.traffic_step_size = traffic_step_size

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


        :return: The algorithm of this Iter8TrafficControl.  # noqa: E501
        :rtype: str
        """
        return self._algorithm

    @algorithm.setter
    def algorithm(self, algorithm):
        """Sets the algorithm of this Iter8TrafficControl.


        :param algorithm: The algorithm of this Iter8TrafficControl.  # noqa: E501
        :type: str
        """

        self._algorithm = algorithm

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


        :return: The interval of this Iter8TrafficControl.  # noqa: E501
        :rtype: str
        """
        return self._interval

    @interval.setter
    def interval(self, interval):
        """Sets the interval of this Iter8TrafficControl.


        :param interval: The interval of this Iter8TrafficControl.  # noqa: E501
        :type: str
        """

        self._interval = interval

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


        :return: The max_iterations of this Iter8TrafficControl.  # noqa: E501
        :rtype: int
        """
        return self._max_iterations

    @max_iterations.setter
    def max_iterations(self, max_iterations):
        """Sets the max_iterations of this Iter8TrafficControl.


        :param max_iterations: The max_iterations of this Iter8TrafficControl.  # noqa: E501
        :type: int
        """

        self._max_iterations = max_iterations

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


        :return: The max_traffic_percentage of this Iter8TrafficControl.  # noqa: E501
        :rtype: float
        """
        return self._max_traffic_percentage

    @max_traffic_percentage.setter
    def max_traffic_percentage(self, max_traffic_percentage):
        """Sets the max_traffic_percentage of this Iter8TrafficControl.


        :param max_traffic_percentage: The max_traffic_percentage of this Iter8TrafficControl.  # noqa: E501
        :type: float
        """

        self._max_traffic_percentage = max_traffic_percentage

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


        :return: The traffic_step_size of this Iter8TrafficControl.  # noqa: E501
        :rtype: float
        """
        return self._traffic_step_size

    @traffic_step_size.setter
    def traffic_step_size(self, traffic_step_size):
        """Sets the traffic_step_size of this Iter8TrafficControl.


        :param traffic_step_size: The traffic_step_size of this Iter8TrafficControl.  # noqa: E501
        :type: float
        """

        self._traffic_step_size = traffic_step_size

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

        return self.__dict__ == other.__dict__

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