# coding: utf-8

"""
    Paragon Insights APIs

    API interface for PI application  # noqa: E501

    OpenAPI spec version: 4.0.0
    Contact: healthbot-feedback@juniper.net
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class RuleSchemaFormulaValuedifference(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 = {
        'field_name': 'str',
        'hold_time': 'str',
        'multiplication_factor': 'str',
        'extra_keys': 'list[str]'
    }

    attribute_map = {
        'field_name': 'field-name',
        'hold_time': 'hold-time',
        'multiplication_factor': 'multiplication-factor',
        'extra_keys': 'extra-keys'
    }

    def __init__(self, field_name=None, hold_time=None, multiplication_factor=None, extra_keys=None):  # noqa: E501
        """RuleSchemaFormulaValuedifference - a model defined in Swagger"""  # noqa: E501

        self._field_name = None
        self._hold_time = None
        self._multiplication_factor = None
        self._extra_keys = None
        self.discriminator = None

        self.field_name = field_name
        if hold_time is not None:
            self.hold_time = hold_time
        if multiplication_factor is not None:
            self.multiplication_factor = multiplication_factor
        if extra_keys is not None:
            self.extra_keys = extra_keys

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

        Field name on which delta operation needs to be performed  # noqa: E501

        :return: The field_name of this RuleSchemaFormulaValuedifference.  # noqa: E501
        :rtype: str
        """
        return self._field_name

    @field_name.setter
    def field_name(self, field_name):
        """Sets the field_name of this RuleSchemaFormulaValuedifference.

        Field name on which delta operation needs to be performed  # noqa: E501

        :param field_name: The field_name of this RuleSchemaFormulaValuedifference.  # noqa: E501
        :type: str
        """
        if field_name is None:
            raise ValueError("Invalid value for `field_name`, must not be `None`")  # noqa: E501
        if field_name is not None and not re.search(r'^[$][a-z][a-zA-Z0-9_-]*$', field_name):  # noqa: E501
            raise ValueError(r"Invalid value for `field_name`, must be a follow pattern or equal to `/^[$][a-z][a-zA-Z0-9_-]*$/`")  # noqa: E501

        self._field_name = field_name

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

        How long previous value should be stored. Should match the pattern [0-9]*(seconds|minutes|hours|days|weeks|years|offset). Default is 1 day  # noqa: E501

        :return: The hold_time of this RuleSchemaFormulaValuedifference.  # noqa: E501
        :rtype: str
        """
        return self._hold_time

    @hold_time.setter
    def hold_time(self, hold_time):
        """Sets the hold_time of this RuleSchemaFormulaValuedifference.

        How long previous value should be stored. Should match the pattern [0-9]*(seconds|minutes|hours|days|weeks|years|offset). Default is 1 day  # noqa: E501

        :param hold_time: The hold_time of this RuleSchemaFormulaValuedifference.  # noqa: E501
        :type: str
        """
        if hold_time is not None and not re.search(r'[0-9]*(\\.[0-9]+)?(seconds|minutes|hours|days|weeks|years|offset)', hold_time):  # noqa: E501
            raise ValueError(r"Invalid value for `hold_time`, must be a follow pattern or equal to `/[0-9]*(\\.[0-9]+)?(seconds|minutes|hours|days|weeks|years|offset)/`")  # noqa: E501

        self._hold_time = hold_time

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

        Value to be multiplied with calculated time. Default is 1.0. Should be IEEE-754 64-bit floating-point numbers  # noqa: E501

        :return: The multiplication_factor of this RuleSchemaFormulaValuedifference.  # noqa: E501
        :rtype: str
        """
        return self._multiplication_factor

    @multiplication_factor.setter
    def multiplication_factor(self, multiplication_factor):
        """Sets the multiplication_factor of this RuleSchemaFormulaValuedifference.

        Value to be multiplied with calculated time. Default is 1.0. Should be IEEE-754 64-bit floating-point numbers  # noqa: E501

        :param multiplication_factor: The multiplication_factor of this RuleSchemaFormulaValuedifference.  # noqa: E501
        :type: str
        """

        self._multiplication_factor = multiplication_factor

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


        :return: The extra_keys of this RuleSchemaFormulaValuedifference.  # noqa: E501
        :rtype: list[str]
        """
        return self._extra_keys

    @extra_keys.setter
    def extra_keys(self, extra_keys):
        """Sets the extra_keys of this RuleSchemaFormulaValuedifference.


        :param extra_keys: The extra_keys of this RuleSchemaFormulaValuedifference.  # noqa: E501
        :type: list[str]
        """

        self._extra_keys = extra_keys

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

        return self.__dict__ == other.__dict__

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