# coding: utf-8

"""
    Robust Intelligence REST API

    API methods for Robust Intelligence. Users must authenticate using the `rime-api-key` header.  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: dev@robustintelligence.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class DataProfilingColumnTypeInfo(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 = {
        'min_nunique_for_numeric': 'str',
        'numeric_violation_threshold': 'float',
        'categorical_violation_threshold': 'float',
        'min_unique_prop': 'float',
        'allow_float_unique': 'bool',
        'numeric_range_inference_threshold': 'float',
        'unseen_values_allowed_criteria': 'float'
    }

    attribute_map = {
        'min_nunique_for_numeric': 'minNuniqueForNumeric',
        'numeric_violation_threshold': 'numericViolationThreshold',
        'categorical_violation_threshold': 'categoricalViolationThreshold',
        'min_unique_prop': 'minUniqueProp',
        'allow_float_unique': 'allowFloatUnique',
        'numeric_range_inference_threshold': 'numericRangeInferenceThreshold',
        'unseen_values_allowed_criteria': 'unseenValuesAllowedCriteria'
    }

    def __init__(self, min_nunique_for_numeric=None, numeric_violation_threshold=None, categorical_violation_threshold=None, min_unique_prop=None, allow_float_unique=None, numeric_range_inference_threshold=None, unseen_values_allowed_criteria=None):  # noqa: E501
        """DataProfilingColumnTypeInfo - a model defined in Swagger"""  # noqa: E501
        self._min_nunique_for_numeric = None
        self._numeric_violation_threshold = None
        self._categorical_violation_threshold = None
        self._min_unique_prop = None
        self._allow_float_unique = None
        self._numeric_range_inference_threshold = None
        self._unseen_values_allowed_criteria = None
        self.discriminator = None
        if min_nunique_for_numeric is not None:
            self.min_nunique_for_numeric = min_nunique_for_numeric
        if numeric_violation_threshold is not None:
            self.numeric_violation_threshold = numeric_violation_threshold
        if categorical_violation_threshold is not None:
            self.categorical_violation_threshold = categorical_violation_threshold
        if min_unique_prop is not None:
            self.min_unique_prop = min_unique_prop
        if allow_float_unique is not None:
            self.allow_float_unique = allow_float_unique
        if numeric_range_inference_threshold is not None:
            self.numeric_range_inference_threshold = numeric_range_inference_threshold
        if unseen_values_allowed_criteria is not None:
            self.unseen_values_allowed_criteria = unseen_values_allowed_criteria

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

        Specifies a minimum number of unique values in a column. Columns with at least the specified number of unique values are considered numeric columns. Columns with fewer unique values are considered categorical.  # noqa: E501

        :return: The min_nunique_for_numeric of this DataProfilingColumnTypeInfo.  # noqa: E501
        :rtype: str
        """
        return self._min_nunique_for_numeric

    @min_nunique_for_numeric.setter
    def min_nunique_for_numeric(self, min_nunique_for_numeric):
        """Sets the min_nunique_for_numeric of this DataProfilingColumnTypeInfo.

        Specifies a minimum number of unique values in a column. Columns with at least the specified number of unique values are considered numeric columns. Columns with fewer unique values are considered categorical.  # noqa: E501

        :param min_nunique_for_numeric: The min_nunique_for_numeric of this DataProfilingColumnTypeInfo.  # noqa: E501
        :type: str
        """

        self._min_nunique_for_numeric = min_nunique_for_numeric

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

        Maximum fraction of violations when assigning numeric columns (not including missing values).  # noqa: E501

        :return: The numeric_violation_threshold of this DataProfilingColumnTypeInfo.  # noqa: E501
        :rtype: float
        """
        return self._numeric_violation_threshold

    @numeric_violation_threshold.setter
    def numeric_violation_threshold(self, numeric_violation_threshold):
        """Sets the numeric_violation_threshold of this DataProfilingColumnTypeInfo.

        Maximum fraction of violations when assigning numeric columns (not including missing values).  # noqa: E501

        :param numeric_violation_threshold: The numeric_violation_threshold of this DataProfilingColumnTypeInfo.  # noqa: E501
        :type: float
        """

        self._numeric_violation_threshold = numeric_violation_threshold

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

        Maximum fraction of violations when assigning categorical subtypes (not including missing values).  # noqa: E501

        :return: The categorical_violation_threshold of this DataProfilingColumnTypeInfo.  # noqa: E501
        :rtype: float
        """
        return self._categorical_violation_threshold

    @categorical_violation_threshold.setter
    def categorical_violation_threshold(self, categorical_violation_threshold):
        """Sets the categorical_violation_threshold of this DataProfilingColumnTypeInfo.

        Maximum fraction of violations when assigning categorical subtypes (not including missing values).  # noqa: E501

        :param categorical_violation_threshold: The categorical_violation_threshold of this DataProfilingColumnTypeInfo.  # noqa: E501
        :type: float
        """

        self._categorical_violation_threshold = categorical_violation_threshold

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

        If data has at least min_unique_prop proportion of unique values then classify as a column that must have unique values.  # noqa: E501

        :return: The min_unique_prop of this DataProfilingColumnTypeInfo.  # noqa: E501
        :rtype: float
        """
        return self._min_unique_prop

    @min_unique_prop.setter
    def min_unique_prop(self, min_unique_prop):
        """Sets the min_unique_prop of this DataProfilingColumnTypeInfo.

        If data has at least min_unique_prop proportion of unique values then classify as a column that must have unique values.  # noqa: E501

        :param min_unique_prop: The min_unique_prop of this DataProfilingColumnTypeInfo.  # noqa: E501
        :type: float
        """

        self._min_unique_prop = min_unique_prop

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

        Allow float columns to be inferred as unique values.  # noqa: E501

        :return: The allow_float_unique of this DataProfilingColumnTypeInfo.  # noqa: E501
        :rtype: bool
        """
        return self._allow_float_unique

    @allow_float_unique.setter
    def allow_float_unique(self, allow_float_unique):
        """Sets the allow_float_unique of this DataProfilingColumnTypeInfo.

        Allow float columns to be inferred as unique values.  # noqa: E501

        :param allow_float_unique: The allow_float_unique of this DataProfilingColumnTypeInfo.  # noqa: E501
        :type: bool
        """

        self._allow_float_unique = allow_float_unique

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

        The percent of non-null values which must fall within an inferrable numeric range ([0,1], [0,inf), (-inf, inf)) for that to be inferred as the valid range for a numeric column. If 1.0 (default), then all non-null values must fall within the range for that range to be inferred. For ex: if 98% of feature X falls in [0, 1] but 100% of feature X falls in [0, inf) then we'll infer [0, inf) as the valid range for feature X. However, if this threshold is 0.98, we'll instead infer [0, 1] as feature X's range.  # noqa: E501

        :return: The numeric_range_inference_threshold of this DataProfilingColumnTypeInfo.  # noqa: E501
        :rtype: float
        """
        return self._numeric_range_inference_threshold

    @numeric_range_inference_threshold.setter
    def numeric_range_inference_threshold(self, numeric_range_inference_threshold):
        """Sets the numeric_range_inference_threshold of this DataProfilingColumnTypeInfo.

        The percent of non-null values which must fall within an inferrable numeric range ([0,1], [0,inf), (-inf, inf)) for that to be inferred as the valid range for a numeric column. If 1.0 (default), then all non-null values must fall within the range for that range to be inferred. For ex: if 98% of feature X falls in [0, 1] but 100% of feature X falls in [0, inf) then we'll infer [0, inf) as the valid range for feature X. However, if this threshold is 0.98, we'll instead infer [0, 1] as feature X's range.  # noqa: E501

        :param numeric_range_inference_threshold: The numeric_range_inference_threshold of this DataProfilingColumnTypeInfo.  # noqa: E501
        :type: float
        """

        self._numeric_range_inference_threshold = numeric_range_inference_threshold

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

        Either the fraction or count of unique values in the ref set required to infer that a categorical feature is allowed to have unseen values in the eval set. If the criteria is provided as a float in [0.0, 1.0] it will be treated as the fraction of unique non-null values divided by the total number of non-null values required to infer that unseen values are allowed. If provided as an integer in [2, inf), it will be treated as the count of non-null unique values required to infer that unseen values are allowed.  # noqa: E501

        :return: The unseen_values_allowed_criteria of this DataProfilingColumnTypeInfo.  # noqa: E501
        :rtype: float
        """
        return self._unseen_values_allowed_criteria

    @unseen_values_allowed_criteria.setter
    def unseen_values_allowed_criteria(self, unseen_values_allowed_criteria):
        """Sets the unseen_values_allowed_criteria of this DataProfilingColumnTypeInfo.

        Either the fraction or count of unique values in the ref set required to infer that a categorical feature is allowed to have unseen values in the eval set. If the criteria is provided as a float in [0.0, 1.0] it will be treated as the fraction of unique non-null values divided by the total number of non-null values required to infer that unseen values are allowed. If provided as an integer in [2, inf), it will be treated as the count of non-null unique values required to infer that unseen values are allowed.  # noqa: E501

        :param unseen_values_allowed_criteria: The unseen_values_allowed_criteria of this DataProfilingColumnTypeInfo.  # noqa: E501
        :type: float
        """

        self._unseen_values_allowed_criteria = unseen_values_allowed_criteria

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

        return self.__dict__ == other.__dict__

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