# 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 Iter8Criteria(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 = {
        'metric': 'str',
        'sample_size': 'int',
        'stop_on_failure': 'bool',
        'tolerance': 'float',
        'tolerance_type': 'str'
    }

    attribute_map = {
        'metric': 'metric',
        'sample_size': 'sampleSize',
        'stop_on_failure': 'stopOnFailure',
        'tolerance': 'tolerance',
        'tolerance_type': 'toleranceType'
    }

    def __init__(self, metric=None, sample_size=None, stop_on_failure=None, tolerance=None, tolerance_type=None):  # noqa: E501
        """Iter8Criteria - a model defined in Swagger"""  # noqa: E501
        self._metric = None
        self._sample_size = None
        self._stop_on_failure = None
        self._tolerance = None
        self._tolerance_type = None
        self.discriminator = None
        if metric is not None:
            self.metric = metric
        if sample_size is not None:
            self.sample_size = sample_size
        if stop_on_failure is not None:
            self.stop_on_failure = stop_on_failure
        if tolerance is not None:
            self.tolerance = tolerance
        if tolerance_type is not None:
            self.tolerance_type = tolerance_type

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


        :return: The metric of this Iter8Criteria.  # noqa: E501
        :rtype: str
        """
        return self._metric

    @metric.setter
    def metric(self, metric):
        """Sets the metric of this Iter8Criteria.


        :param metric: The metric of this Iter8Criteria.  # noqa: E501
        :type: str
        """

        self._metric = metric

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


        :return: The sample_size of this Iter8Criteria.  # noqa: E501
        :rtype: int
        """
        return self._sample_size

    @sample_size.setter
    def sample_size(self, sample_size):
        """Sets the sample_size of this Iter8Criteria.


        :param sample_size: The sample_size of this Iter8Criteria.  # noqa: E501
        :type: int
        """

        self._sample_size = sample_size

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


        :return: The stop_on_failure of this Iter8Criteria.  # noqa: E501
        :rtype: bool
        """
        return self._stop_on_failure

    @stop_on_failure.setter
    def stop_on_failure(self, stop_on_failure):
        """Sets the stop_on_failure of this Iter8Criteria.


        :param stop_on_failure: The stop_on_failure of this Iter8Criteria.  # noqa: E501
        :type: bool
        """

        self._stop_on_failure = stop_on_failure

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


        :return: The tolerance of this Iter8Criteria.  # noqa: E501
        :rtype: float
        """
        return self._tolerance

    @tolerance.setter
    def tolerance(self, tolerance):
        """Sets the tolerance of this Iter8Criteria.


        :param tolerance: The tolerance of this Iter8Criteria.  # noqa: E501
        :type: float
        """

        self._tolerance = tolerance

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


        :return: The tolerance_type of this Iter8Criteria.  # noqa: E501
        :rtype: str
        """
        return self._tolerance_type

    @tolerance_type.setter
    def tolerance_type(self, tolerance_type):
        """Sets the tolerance_type of this Iter8Criteria.


        :param tolerance_type: The tolerance_type of this Iter8Criteria.  # noqa: E501
        :type: str
        """

        self._tolerance_type = tolerance_type

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

        return self.__dict__ == other.__dict__

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