# 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 LifeInsuranceNeedsCalculatorRequest(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 = {
        'children_education_config': 'list[ChildrenEducationConfig]',
        'liquid_assets': 'float',
        'other_debt': 'float',
        'client_id': 'str',
        'tax_rate': 'float',
        'end_of_life_expenses': 'float',
        'mortgage_balance': 'float',
        'income_config': 'list[IncomeConfig]',
        'beneficiary_bequest_config': 'list[BeneficiaryBequestConfig]',
        'margin_of_error': 'float',
        'education_inflation_rate': 'float',
        'interest_rate': 'float',
        'existing_life_insurance': 'float',
        'benefit_amount_rounding': 'int',
        'general_inflation_rate': 'float'
    }

    attribute_map = {
        'children_education_config': 'children_education_config',
        'liquid_assets': 'liquid_assets',
        'other_debt': 'other_debt',
        'client_id': 'client_id',
        'tax_rate': 'tax_rate',
        'end_of_life_expenses': 'end_of_life_expenses',
        'mortgage_balance': 'mortgage_balance',
        'income_config': 'income_config',
        'beneficiary_bequest_config': 'beneficiary_bequest_config',
        'margin_of_error': 'margin_of_error',
        'education_inflation_rate': 'education_inflation_rate',
        'interest_rate': 'interest_rate',
        'existing_life_insurance': 'existing_life_insurance',
        'benefit_amount_rounding': 'benefit_amount_rounding',
        'general_inflation_rate': 'general_inflation_rate'
    }

    def __init__(self, children_education_config=None, liquid_assets=None, other_debt=None, client_id=None, tax_rate=0.0, end_of_life_expenses=None, mortgage_balance=None, income_config=None, beneficiary_bequest_config=None, margin_of_error=0.0, education_inflation_rate=0.0, interest_rate=None, existing_life_insurance=None, benefit_amount_rounding=0, general_inflation_rate=0.0):  # noqa: E501
        """LifeInsuranceNeedsCalculatorRequest - a model defined in Swagger"""  # noqa: E501

        self._children_education_config = None
        self._liquid_assets = None
        self._other_debt = None
        self._client_id = None
        self._tax_rate = None
        self._end_of_life_expenses = None
        self._mortgage_balance = None
        self._income_config = None
        self._beneficiary_bequest_config = None
        self._margin_of_error = None
        self._education_inflation_rate = None
        self._interest_rate = None
        self._existing_life_insurance = None
        self._benefit_amount_rounding = None
        self._general_inflation_rate = None
        self.discriminator = None

        if children_education_config is not None:
            self.children_education_config = children_education_config
        if liquid_assets is not None:
            self.liquid_assets = liquid_assets
        if other_debt is not None:
            self.other_debt = other_debt
        if client_id is not None:
            self.client_id = client_id
        if tax_rate is not None:
            self.tax_rate = tax_rate
        if end_of_life_expenses is not None:
            self.end_of_life_expenses = end_of_life_expenses
        if mortgage_balance is not None:
            self.mortgage_balance = mortgage_balance
        if income_config is not None:
            self.income_config = income_config
        if beneficiary_bequest_config is not None:
            self.beneficiary_bequest_config = beneficiary_bequest_config
        if margin_of_error is not None:
            self.margin_of_error = margin_of_error
        if education_inflation_rate is not None:
            self.education_inflation_rate = education_inflation_rate
        self.interest_rate = interest_rate
        if existing_life_insurance is not None:
            self.existing_life_insurance = existing_life_insurance
        if benefit_amount_rounding is not None:
            self.benefit_amount_rounding = benefit_amount_rounding
        if general_inflation_rate is not None:
            self.general_inflation_rate = general_inflation_rate

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


        :return: The children_education_config of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :rtype: list[ChildrenEducationConfig]
        """
        return self._children_education_config

    @children_education_config.setter
    def children_education_config(self, children_education_config):
        """Sets the children_education_config of this LifeInsuranceNeedsCalculatorRequest.


        :param children_education_config: The children_education_config of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :type: list[ChildrenEducationConfig]
        """

        self._children_education_config = children_education_config

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


        :return: The liquid_assets of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :rtype: float
        """
        return self._liquid_assets

    @liquid_assets.setter
    def liquid_assets(self, liquid_assets):
        """Sets the liquid_assets of this LifeInsuranceNeedsCalculatorRequest.


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

        self._liquid_assets = liquid_assets

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


        :return: The other_debt of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :rtype: float
        """
        return self._other_debt

    @other_debt.setter
    def other_debt(self, other_debt):
        """Sets the other_debt of this LifeInsuranceNeedsCalculatorRequest.


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

        self._other_debt = other_debt

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


        :return: The client_id of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :rtype: str
        """
        return self._client_id

    @client_id.setter
    def client_id(self, client_id):
        """Sets the client_id of this LifeInsuranceNeedsCalculatorRequest.


        :param client_id: The client_id of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :type: str
        """

        self._client_id = client_id

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


        :return: The tax_rate of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :rtype: float
        """
        return self._tax_rate

    @tax_rate.setter
    def tax_rate(self, tax_rate):
        """Sets the tax_rate of this LifeInsuranceNeedsCalculatorRequest.


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

        self._tax_rate = tax_rate

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


        :return: The end_of_life_expenses of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :rtype: float
        """
        return self._end_of_life_expenses

    @end_of_life_expenses.setter
    def end_of_life_expenses(self, end_of_life_expenses):
        """Sets the end_of_life_expenses of this LifeInsuranceNeedsCalculatorRequest.


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

        self._end_of_life_expenses = end_of_life_expenses

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


        :return: The mortgage_balance of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :rtype: float
        """
        return self._mortgage_balance

    @mortgage_balance.setter
    def mortgage_balance(self, mortgage_balance):
        """Sets the mortgage_balance of this LifeInsuranceNeedsCalculatorRequest.


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

        self._mortgage_balance = mortgage_balance

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


        :return: The income_config of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :rtype: list[IncomeConfig]
        """
        return self._income_config

    @income_config.setter
    def income_config(self, income_config):
        """Sets the income_config of this LifeInsuranceNeedsCalculatorRequest.


        :param income_config: The income_config of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :type: list[IncomeConfig]
        """

        self._income_config = income_config

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


        :return: The beneficiary_bequest_config of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :rtype: list[BeneficiaryBequestConfig]
        """
        return self._beneficiary_bequest_config

    @beneficiary_bequest_config.setter
    def beneficiary_bequest_config(self, beneficiary_bequest_config):
        """Sets the beneficiary_bequest_config of this LifeInsuranceNeedsCalculatorRequest.


        :param beneficiary_bequest_config: The beneficiary_bequest_config of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :type: list[BeneficiaryBequestConfig]
        """

        self._beneficiary_bequest_config = beneficiary_bequest_config

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


        :return: The margin_of_error of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :rtype: float
        """
        return self._margin_of_error

    @margin_of_error.setter
    def margin_of_error(self, margin_of_error):
        """Sets the margin_of_error of this LifeInsuranceNeedsCalculatorRequest.


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

        self._margin_of_error = margin_of_error

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


        :return: The education_inflation_rate of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :rtype: float
        """
        return self._education_inflation_rate

    @education_inflation_rate.setter
    def education_inflation_rate(self, education_inflation_rate):
        """Sets the education_inflation_rate of this LifeInsuranceNeedsCalculatorRequest.


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

        self._education_inflation_rate = education_inflation_rate

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


        :return: The interest_rate of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :rtype: float
        """
        return self._interest_rate

    @interest_rate.setter
    def interest_rate(self, interest_rate):
        """Sets the interest_rate of this LifeInsuranceNeedsCalculatorRequest.


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

        self._interest_rate = interest_rate

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


        :return: The existing_life_insurance of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :rtype: float
        """
        return self._existing_life_insurance

    @existing_life_insurance.setter
    def existing_life_insurance(self, existing_life_insurance):
        """Sets the existing_life_insurance of this LifeInsuranceNeedsCalculatorRequest.


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

        self._existing_life_insurance = existing_life_insurance

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


        :return: The benefit_amount_rounding of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :rtype: int
        """
        return self._benefit_amount_rounding

    @benefit_amount_rounding.setter
    def benefit_amount_rounding(self, benefit_amount_rounding):
        """Sets the benefit_amount_rounding of this LifeInsuranceNeedsCalculatorRequest.


        :param benefit_amount_rounding: The benefit_amount_rounding of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :type: int
        """
        if benefit_amount_rounding is not None and benefit_amount_rounding > 12:  # noqa: E501
            raise ValueError("Invalid value for `benefit_amount_rounding`, must be a value less than or equal to `12`")  # noqa: E501
        if benefit_amount_rounding is not None and benefit_amount_rounding < 0:  # noqa: E501
            raise ValueError("Invalid value for `benefit_amount_rounding`, must be a value greater than or equal to `0`")  # noqa: E501

        self._benefit_amount_rounding = benefit_amount_rounding

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


        :return: The general_inflation_rate of this LifeInsuranceNeedsCalculatorRequest.  # noqa: E501
        :rtype: float
        """
        return self._general_inflation_rate

    @general_inflation_rate.setter
    def general_inflation_rate(self, general_inflation_rate):
        """Sets the general_inflation_rate of this LifeInsuranceNeedsCalculatorRequest.


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

        self._general_inflation_rate = general_inflation_rate

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

        return self.__dict__ == other.__dict__

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