# coding: utf-8

"""
    Hydrogen Proton API

    Financial engineering module of Hydrogen Atom  # noqa: E501

    OpenAPI spec version: 1.8.0
    Contact: info@hydrogenplatform.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class Settings(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 = {
        'drift_rebal': 'bool',
        'downside': 'bool',
        'default_drift_factor': 'float',
        'period_rebal': 'bool',
        'rebalance_period': 'int',
        'tax_efficiency_id': 'int'
    }

    attribute_map = {
        'drift_rebal': 'drift_rebal',
        'downside': 'downside',
        'default_drift_factor': 'default_drift_factor',
        'period_rebal': 'period_rebal',
        'rebalance_period': 'rebalance_period',
        'tax_efficiency_id': 'tax_efficiency_id'
    }

    def __init__(self, drift_rebal=None, downside=None, default_drift_factor=None, period_rebal=None, rebalance_period=None, tax_efficiency_id=None):  # noqa: E501
        """Settings - a model defined in Swagger"""  # noqa: E501

        self._drift_rebal = None
        self._downside = None
        self._default_drift_factor = None
        self._period_rebal = None
        self._rebalance_period = None
        self._tax_efficiency_id = None
        self.discriminator = None

        if drift_rebal is not None:
            self.drift_rebal = drift_rebal
        if downside is not None:
            self.downside = downside
        if default_drift_factor is not None:
            self.default_drift_factor = default_drift_factor
        if period_rebal is not None:
            self.period_rebal = period_rebal
        if rebalance_period is not None:
            self.rebalance_period = rebalance_period
        if tax_efficiency_id is not None:
            self.tax_efficiency_id = tax_efficiency_id

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


        :return: The drift_rebal of this Settings.  # noqa: E501
        :rtype: bool
        """
        return self._drift_rebal

    @drift_rebal.setter
    def drift_rebal(self, drift_rebal):
        """Sets the drift_rebal of this Settings.


        :param drift_rebal: The drift_rebal of this Settings.  # noqa: E501
        :type: bool
        """

        self._drift_rebal = drift_rebal

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


        :return: The downside of this Settings.  # noqa: E501
        :rtype: bool
        """
        return self._downside

    @downside.setter
    def downside(self, downside):
        """Sets the downside of this Settings.


        :param downside: The downside of this Settings.  # noqa: E501
        :type: bool
        """

        self._downside = downside

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


        :return: The default_drift_factor of this Settings.  # noqa: E501
        :rtype: float
        """
        return self._default_drift_factor

    @default_drift_factor.setter
    def default_drift_factor(self, default_drift_factor):
        """Sets the default_drift_factor of this Settings.


        :param default_drift_factor: The default_drift_factor of this Settings.  # noqa: E501
        :type: float
        """
        if default_drift_factor is not None and default_drift_factor < 0:  # noqa: E501
            raise ValueError("Invalid value for `default_drift_factor`, must be a value greater than or equal to `0`")  # noqa: E501

        self._default_drift_factor = default_drift_factor

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


        :return: The period_rebal of this Settings.  # noqa: E501
        :rtype: bool
        """
        return self._period_rebal

    @period_rebal.setter
    def period_rebal(self, period_rebal):
        """Sets the period_rebal of this Settings.


        :param period_rebal: The period_rebal of this Settings.  # noqa: E501
        :type: bool
        """

        self._period_rebal = period_rebal

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


        :return: The rebalance_period of this Settings.  # noqa: E501
        :rtype: int
        """
        return self._rebalance_period

    @rebalance_period.setter
    def rebalance_period(self, rebalance_period):
        """Sets the rebalance_period of this Settings.


        :param rebalance_period: The rebalance_period of this Settings.  # noqa: E501
        :type: int
        """
        allowed_values = [0, 1, 2, 3, 4]  # noqa: E501
        if rebalance_period not in allowed_values:
            raise ValueError(
                "Invalid value for `rebalance_period` ({0}), must be one of {1}"  # noqa: E501
                .format(rebalance_period, allowed_values)
            )

        self._rebalance_period = rebalance_period

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


        :return: The tax_efficiency_id of this Settings.  # noqa: E501
        :rtype: int
        """
        return self._tax_efficiency_id

    @tax_efficiency_id.setter
    def tax_efficiency_id(self, tax_efficiency_id):
        """Sets the tax_efficiency_id of this Settings.


        :param tax_efficiency_id: The tax_efficiency_id of this Settings.  # noqa: E501
        :type: int
        """
        allowed_values = [0, 1, 2, 3, 4]  # noqa: E501
        if tax_efficiency_id not in allowed_values:
            raise ValueError(
                "Invalid value for `tax_efficiency_id` ({0}), must be one of {1}"  # noqa: E501
                .format(tax_efficiency_id, allowed_values)
            )

        self._tax_efficiency_id = tax_efficiency_id

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

        return self.__dict__ == other.__dict__

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